gencow 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/dashboard/404/index.html +1 -1
  2. package/dashboard/404.html +1 -1
  3. package/dashboard/__next.__PAGE__.txt +1 -1
  4. package/dashboard/__next._full.txt +6 -6
  5. package/dashboard/__next._head.txt +1 -1
  6. package/dashboard/__next._index.txt +6 -6
  7. package/dashboard/__next._tree.txt +2 -2
  8. package/dashboard/_next/static/chunks/2812dadb4ce49b25.js +1 -0
  9. package/dashboard/_next/static/chunks/3a83cedd4cb50b40.js +1 -0
  10. package/dashboard/_next/static/chunks/{b53d8107e0864607.js → 66e55fa336d1aaa8.js} +1 -1
  11. package/dashboard/_next/static/chunks/6b400f2ddeafc411.js +1 -0
  12. package/dashboard/_next/static/chunks/6f54fb939763dd96.js +49 -0
  13. package/dashboard/_next/static/chunks/{2f7fb3e85e932cda.js → 91ba5906faf3ea24.js} +1 -1
  14. package/dashboard/_next/static/chunks/9aa74d2b0b9f4d0d.js +1 -0
  15. package/dashboard/_next/static/chunks/ab4da94aa3ec36ec.js +1 -0
  16. package/dashboard/_next/static/chunks/af86d0e720d5dfa0.js +5 -0
  17. package/dashboard/_next/static/chunks/b09a8e5811d44363.js +1 -0
  18. package/dashboard/_next/static/chunks/bbbd35679f739a79.css +1 -0
  19. package/dashboard/_next/static/chunks/cc60ed9f76def6b8.js +1 -0
  20. package/dashboard/_next/static/chunks/cf8c92dd2ceed5ac.js +1 -0
  21. package/dashboard/_next/static/chunks/d04fc497471d2c5f.js +1 -0
  22. package/dashboard/_next/static/chunks/d39aa8a0c43889f5.js +1 -0
  23. package/dashboard/_next/static/chunks/turbopack-d1f59d345d8c59ea.js +4 -0
  24. package/dashboard/_not-found/__next._full.txt +6 -6
  25. package/dashboard/_not-found/__next._head.txt +1 -1
  26. package/dashboard/_not-found/__next._index.txt +6 -6
  27. package/dashboard/_not-found/__next._not-found.__PAGE__.txt +1 -1
  28. package/dashboard/_not-found/__next._not-found.txt +1 -1
  29. package/dashboard/_not-found/__next._tree.txt +2 -2
  30. package/dashboard/_not-found/index.html +1 -1
  31. package/dashboard/_not-found/index.txt +6 -6
  32. package/dashboard/auth/__next._full.txt +7 -7
  33. package/dashboard/auth/__next._head.txt +1 -1
  34. package/dashboard/auth/__next._index.txt +6 -6
  35. package/dashboard/auth/__next._tree.txt +2 -2
  36. package/dashboard/auth/__next.auth.__PAGE__.txt +2 -2
  37. package/dashboard/auth/__next.auth.txt +1 -1
  38. package/dashboard/auth/index.html +1 -1
  39. package/dashboard/auth/index.txt +7 -7
  40. package/dashboard/data/__next._full.txt +7 -7
  41. package/dashboard/data/__next._head.txt +1 -1
  42. package/dashboard/data/__next._index.txt +6 -6
  43. package/dashboard/data/__next._tree.txt +2 -2
  44. package/dashboard/data/__next.data.__PAGE__.txt +2 -2
  45. package/dashboard/data/__next.data.txt +1 -1
  46. package/dashboard/data/index.html +1 -1
  47. package/dashboard/data/index.txt +7 -7
  48. package/dashboard/files/__next._full.txt +7 -7
  49. package/dashboard/files/__next._head.txt +1 -1
  50. package/dashboard/files/__next._index.txt +6 -6
  51. package/dashboard/files/__next._tree.txt +2 -2
  52. package/dashboard/files/__next.files.__PAGE__.txt +2 -2
  53. package/dashboard/files/__next.files.txt +1 -1
  54. package/dashboard/files/index.html +1 -1
  55. package/dashboard/files/index.txt +7 -7
  56. package/dashboard/functions/__next._full.txt +7 -7
  57. package/dashboard/functions/__next._head.txt +1 -1
  58. package/dashboard/functions/__next._index.txt +6 -6
  59. package/dashboard/functions/__next._tree.txt +2 -2
  60. package/dashboard/functions/__next.functions.__PAGE__.txt +2 -2
  61. package/dashboard/functions/__next.functions.txt +1 -1
  62. package/dashboard/functions/index.html +1 -1
  63. package/dashboard/functions/index.txt +7 -7
  64. package/dashboard/index.html +1 -1
  65. package/dashboard/index.txt +6 -6
  66. package/dashboard/logs/__next._full.txt +7 -7
  67. package/dashboard/logs/__next._head.txt +1 -1
  68. package/dashboard/logs/__next._index.txt +6 -6
  69. package/dashboard/logs/__next._tree.txt +2 -2
  70. package/dashboard/logs/__next.logs.__PAGE__.txt +2 -2
  71. package/dashboard/logs/__next.logs.txt +1 -1
  72. package/dashboard/logs/index.html +1 -1
  73. package/dashboard/logs/index.txt +7 -7
  74. package/dashboard/scheduler/__next._full.txt +7 -7
  75. package/dashboard/scheduler/__next._head.txt +1 -1
  76. package/dashboard/scheduler/__next._index.txt +6 -6
  77. package/dashboard/scheduler/__next._tree.txt +2 -2
  78. package/dashboard/scheduler/__next.scheduler.__PAGE__.txt +2 -2
  79. package/dashboard/scheduler/__next.scheduler.txt +1 -1
  80. package/dashboard/scheduler/index.html +1 -1
  81. package/dashboard/scheduler/index.txt +7 -7
  82. package/dashboard/settings/__next._full.txt +8 -8
  83. package/dashboard/settings/__next._head.txt +1 -1
  84. package/dashboard/settings/__next._index.txt +6 -6
  85. package/dashboard/settings/__next._tree.txt +2 -2
  86. package/dashboard/settings/__next.settings.__PAGE__.txt +3 -3
  87. package/dashboard/settings/__next.settings.txt +1 -1
  88. package/dashboard/settings/index.html +1 -1
  89. package/dashboard/settings/index.txt +8 -8
  90. package/dashboard/usage/__next._full.txt +22 -0
  91. package/dashboard/usage/__next._head.txt +6 -0
  92. package/dashboard/usage/__next._index.txt +9 -0
  93. package/dashboard/usage/__next._tree.txt +2 -0
  94. package/dashboard/usage/__next.usage.__PAGE__.txt +9 -0
  95. package/dashboard/usage/__next.usage.txt +4 -0
  96. package/dashboard/usage/index.html +1 -0
  97. package/dashboard/usage/index.txt +22 -0
  98. package/package.json +1 -1
  99. package/server/index.js +22 -0
  100. package/server/index.js.map +2 -2
  101. package/dashboard/_next/static/chunks/35f92271baf1e273.js +0 -2
  102. package/dashboard/_next/static/chunks/544729b1d14e133f.js +0 -1
  103. package/dashboard/_next/static/chunks/5f1dc5123f43f954.js +0 -1
  104. package/dashboard/_next/static/chunks/69c2a0d587153425.js +0 -1
  105. package/dashboard/_next/static/chunks/6fa4d7b0382eb69a.js +0 -4
  106. package/dashboard/_next/static/chunks/8405a37f6e78c6fe.js +0 -1
  107. package/dashboard/_next/static/chunks/967d50dc43e363ee.js +0 -1
  108. package/dashboard/_next/static/chunks/c0d4e7aa4b1e8cd6.js +0 -49
  109. package/dashboard/_next/static/chunks/c306fa0e301f7e53.js +0 -1
  110. package/dashboard/_next/static/chunks/cdf042c6c74b5110.js +0 -1
  111. package/dashboard/_next/static/chunks/d63d5908e48bea60.css +0 -1
  112. package/dashboard/_next/static/chunks/dbb8e079c2a14288.js +0 -1
  113. package/dashboard/_next/static/chunks/dd5b8d905cbcd0e1.js +0 -1
  114. package/dashboard/_next/static/chunks/de03e99a1076d0b0.js +0 -1
  115. package/dashboard/_next/static/chunks/f652ed4293e209dc.js +0 -1
  116. package/dashboard/_next/static/chunks/turbopack-00aed88e1fb5f17d.js +0 -4
  117. /package/dashboard/_next/static/{LbqHle9Fc0EAIeQ_jBK9S → R5CFZZGrM1OgG44Vfhpou}/_buildManifest.js +0 -0
  118. /package/dashboard/_next/static/{LbqHle9Fc0EAIeQ_jBK9S → R5CFZZGrM1OgG44Vfhpou}/_clientMiddlewareManifest.json +0 -0
  119. /package/dashboard/_next/static/{LbqHle9Fc0EAIeQ_jBK9S → R5CFZZGrM1OgG44Vfhpou}/_ssgManifest.js +0 -0
@@ -1,49 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99173,14475,26725,5289,e=>{"use strict";let t,i,o,r,s;var n,l,a,d,h,u,c,g,p,f,m,C,w,v,b,y,S,R,F,P=e.i(62667);function x(e){if(e?.length)return e[e.length-1]}function D(e,t,i){if(e===t)return!0;if(!e||!t)return null==e&&null==t;let o=e.length;if(o!==t.length)return!1;for(let r=0;r<o;r++)if(e[r]!==t[r]&&!i?.(e[r],t[r]))return!1;return!0}function E(e,t){if(e){for(let i of e)if(t(i))return!0}}function M(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}function T(e,t,i){for(let i=0;i<t.length;i++)M(e,t[i]);for(let o=t.length-1;o>=0;o--)e.splice(i,0,t[o])}Object.freeze([]);var k=e=>null==e||""===e?null:e;function A(e){return null!=e&&""!==e}function I(e){return!A(e)}var L=e=>null!=e&&"function"==typeof e.toString?e.toString():null,B=(e,t)=>(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null),V=(e,t,i=!1)=>null==e?null==t?0:-1:null==t?1:("object"==typeof e&&e.toNumber&&(e=e.toNumber()),"object"==typeof t&&t.toNumber&&(t=t.toNumber()),i&&"string"==typeof e)?e.localeCompare(t):e>t?1:e<t?-1:0,G=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 o=t?this.allAsyncListeners:this.allSyncListeners,r=o.get(e);return!r&&i&&(r=new Set,o.set(e,r)),r}noRegisteredListenersExist(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size}addEventListener(e,t,i=!1){this.getListeners(e,i,!0).add(t)}removeEventListener(e,t,i=!1){let o=this.getListeners(e,i,!1);o&&(o.delete(t),0===o.size&&(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){this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){let i=e.type;if(t&&"event"in e){let t=e.event;t instanceof Event&&(e.eventPath=t.composedPath())}let{frameworkOverrides:o}=this,r=e=>{let i=o?()=>o.wrapIncoming(e):e;t?this.dispatchAsync(i):i()},s=this.getListeners(i,t,!1);if((s?.size??0)>0)for(let t of new Set(s))s?.has(t)&&r(()=>t(e));let n=this.getGlobalListeners(t);if(n.size>0)for(let t of new Set(n))r(()=>t(i,e))}getGlobalListeners(e){return e?this.globalAsyncListeners:this.globalSyncListeners}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){let e=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)},t=this.frameworkOverrides;t?t.wrapIncoming(e):e(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;let e=this.asyncFunctionsQueue.slice();for(let t of(this.asyncFunctionsQueue=[],e))t()}},H=/[&<>"']/g,O={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function N(e){return e?.toString().toString()??null}function z(e){return N(e)?.replace(H,e=>O[e])??null}function W(e){return"string"==typeof e&&e.startsWith("=")&&e.length>1}function U(e){return e.eRootDiv.getRootNode()}function $(e){return U(e).activeElement}function K(e){let{gos:t,eRootDiv:i}=e,o=null,r=t.get("getDocument");return(r&&A(r)?o=r():i&&(o=i.ownerDocument),o&&A(o))?o:document}function j(e){let t=$(e);return null===t||t===K(e).body}function _(e){return K(e).defaultView||window}function q(e){let t=null,i=null;try{t=K(e).fullscreenElement}catch(e){}finally{t||(t=U(e));let o=t.querySelector("body");i=o||(t instanceof ShadowRoot?t:t instanceof Document?t?.documentElement:t)}return i}function Y(e,t,i){null==i||"string"==typeof i&&""==i?Z(e,t):Q(e,t,i)}function Q(e,t,i){var o;e.setAttribute((o=t,`aria-${o}`),i.toString())}function Z(e,t){var i;e.removeAttribute((i=t,`aria-${i}`))}function J(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function X(e,t){Y(e,"label",t)}function ee(e,t){Y(e,"labelledby",t)}function et(e,t){Y(e,"invalid",t)}function ei(e,t){Y(e,"hidden",t)}function eo(e,t){Q(e,"expanded",t)}function er(e,t){Q(e,"rowcount",t)}function es(e,t){Q(e,"rowindex",t)}function en(e,t){Q(e,"colcount",t)}function el(e,t){Q(e,"colindex",t)}function ea(e,t){Q(e,"sort",t)}function ed(e){Z(e,"sort")}function eh(e,t){Y(e,"selected",t)}function eu(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var ec="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function eg(e){return!!e&&!!e.matches("input, select, button, textarea")&&!!e.matches(ec)&&eE(e)}function ep(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-hidden",!t),o||ei(e,!t)}function ef(e,t){let i="disabled",o=t?e=>e.setAttribute(i,""):e=>e.removeAttribute(i);for(let t of(o(e),e.querySelectorAll("input")??[]))o(t)}function em(e,t,i){let o=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof i){if(++o>i)break}else if(e===i)break}return!1}function eC(e){let{height:t,width:i,borderTopWidth:o,borderRightWidth:r,borderBottomWidth:s,borderLeftWidth:n,paddingTop:l,paddingRight:a,paddingBottom:d,paddingLeft:h,marginTop:u,marginRight:c,marginBottom:g,marginLeft:p,boxSizing:f}=window.getComputedStyle(e),m=Number.parseFloat;return{height:m(t||"0"),width:m(i||"0"),borderTopWidth:m(o||"0"),borderRightWidth:m(r||"0"),borderBottomWidth:m(s||"0"),borderLeftWidth:m(n||"0"),paddingTop:m(l||"0"),paddingRight:m(a||"0"),paddingBottom:m(d||"0"),paddingLeft:m(h||"0"),marginTop:m(u||"0"),marginRight:m(c||"0"),marginBottom:m(g||"0"),marginLeft:m(p||"0"),boxSizing:f}}function ew(e){let t=eC(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom-t.borderTopWidth-t.borderBottomWidth:t.height}function ev(e){let t=eC(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight-t.borderLeftWidth-t.borderRightWidth:t.width}function eb(e){let{height:t,marginBottom:i,marginTop:o}=eC(e);return Math.floor(t+i+o)}function ey(e){let{width:t,marginLeft:i,marginRight:o}=eC(e);return Math.floor(t+i+o)}function eS(e){let t=e.getBoundingClientRect(),{borderTopWidth:i,borderLeftWidth:o,borderRightWidth:r,borderBottomWidth:s}=eC(e);return{top:t.top+(i||0),left:t.left+(o||0),right:t.right+(r||0),bottom:t.bottom+(s||0)}}function eR(e,t){let i=e.scrollLeft;return t&&(i=Math.abs(i)),i}function eF(e,t,i){i&&(t*=-1),e.scrollLeft=t}function eP(e){for(;e?.firstChild;)e.firstChild.remove()}function ex(e){e?.parentNode&&e.remove()}function eD(e){return!!e.offsetParent}function eE(e){return e.checkVisibility?e.checkVisibility({checkVisibilityCSS:!0}):!(!eD(e)||"visible"!==window.getComputedStyle(e).visibility)}function eM(e){let t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function eT(e){return()=>{var t;let i=e();return!i||ek(i)||(t=i).clientHeight<t.scrollHeight}}function ek(e){return e.clientWidth<e.scrollWidth}function eA(e,t){"flex"===t?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):eI(e,t)}function eI(e,t){t=eB(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function eL(e,t){t=eB(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function eB(e){return"number"==typeof e?`${e}px`:e}function eV(e){return e instanceof Node||e instanceof HTMLElement}function eG(e,t,i){null==i||""===i?e.removeAttribute(t):e.setAttribute(t,i.toString())}function eH(e,t,i){let o=_(e).ResizeObserver,r=o?new o(i):null;return r?.observe(t),()=>r?.disconnect()}function eO(e,t){let i=_(e);i.requestAnimationFrame?i.requestAnimationFrame(t):i.webkitRequestAnimationFrame?i.webkitRequestAnimationFrame(t):i.setTimeout(t,0)}var eN="data-ref";function ez(){return u??(u=document.createTextNode(" ")),u.cloneNode()}function eW(e){let{attrs:t,children:i,cls:o,ref:r,role:s,tag:n}=e,l=document.createElement(n);if(o&&(l.className=o),r&&l.setAttribute(eN,r),s&&l.setAttribute("role",s),t)for(let e of Object.keys(t))l.setAttribute(e,t[e]);if(i)if("string"==typeof i)l.textContent=i;else{let e=!0;for(let t of i)t&&("string"==typeof t?(l.appendChild(document.createTextNode(t)),e=!1):"function"==typeof t?l.appendChild(t()):(e&&(l.appendChild(ez()),e=!1),l.append(eW(t)),l.appendChild(ez())))}return l}var eU=["touchstart","touchend","touchmove","touchcancel","scroll"],e$=["wheel"],eK={},ej=(t={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},e=>{if("boolean"==typeof eK[e])return eK[e];let i=document.createElement(t[e]||"div");return eK[e="on"+e]=e in i});function e_(e,t,i){return 0!==i&&Math.max(Math.abs(e.clientX-t.clientX),Math.abs(e.clientY-t.clientY))<=i}var eq=(e,t)=>{let i=e.identifier;for(let e=0,o=t.length;e<o;++e){let o=t[e];if(o.identifier===i)return o}return null};function eY(e,t){return e.gos.isElementInThisInstance(t.target)}var eQ=(e,...t)=>{for(let i of t){let[t,o,r,s]=i;t.addEventListener(o,r,s),e.push(i)}},eZ=e=>{if(e){for(let[t,i,o,r]of e)t.removeEventListener(i,o,r);e.length=0}},eJ=e=>{e.cancelable&&e.preventDefault()};function eX(e,t){return t}function e0(e){return e?.getLocaleTextFunc()??eX}var e1=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 G),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 o of Object.keys(t)){let r=t[o];r&&i.push(this._setupListener(e,o,r))}return i}_setupListener(e,t,i){let o;if(this.destroyed)return()=>null;if(void 0!==e.__addEventListener)e.__addEventListener(t,i),o=()=>(e.__removeEventListener(t,i),null);else{let s="global"===e.eventServiceType;if(e instanceof HTMLElement){var r;let o,s,n,l;r=t,n=eU.includes(r),l=e$.includes(r),null!=(s=!!n||!l&&void 0)&&(o={passive:s}),e.addEventListener(t,i,o)}else s?e.addListener(t,i):e.addEventListener(t,i);o=s?()=>(e.removeListener(t,i),null):()=>(e.removeEventListener(t,i),null)}return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==o),null)}setupPropertyListener(e,t){let{gos:i}=this;i.addPropertyEventListener(e,t);let o=()=>(i.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(o),()=>(o(),this.destroyFunctions=this.destroyFunctions.filter(e=>e!==o),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupPropertyListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;let i=e.join("-")+this.propertyListenerId++,o=e=>{if(e.changeSet){if(e.changeSet&&e.changeSet.id===this.lastChangeSetIdLookup[i])return;this.lastChangeSetIdLookup[i]=e.changeSet.id}t({type:"propertyChanged",changeSet:e.changeSet,source:e.source})};for(let t of e)this.setupPropertyListener(t,o)}getLocaleTextFunc(){return e0(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)}},e2=class extends e1{},e5=new Set,e3=(e,t)=>{e5.has(t)||(e5.add(t),e())};e3._set=e5;var e4={pending:!1,funcs:[]},e6={pending:!1,funcs:[]};function e8(e,t="setTimeout",i){let o="raf"===t?e6:e4;if(o.funcs.push(e),o.pending)return;o.pending=!0;let r=()=>{let e=o.funcs.slice();for(let t of(o.funcs.length=0,o.pending=!1,e))t()};"raf"===t?eO(i,r):window.setTimeout(r,0)}function e7(e,t,i){let o;return function(...r){let s=this;return window.clearTimeout(o),o=window.setTimeout(function(){e.isAlive()&&t.apply(s,r)},i)}}function e9(e,t){let i=0;return function(...o){let r=Date.now();r-i<t||(i=r,e.apply(this,o))}}var te=new Set(["__proto__","constructor","prototype"]);function tt(e,t,i=!0,o=!1){A(t)&&function(e,t){if(null!=e){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).filter(e=>!te.has(e)))t(i,e[i])}}(t,(t,r)=>{let s=e[t];s!==r&&(o&&null==s&&null!=r&&"object"==typeof r&&r.constructor===Object&&(s={},e[t]=s),ti(r)&&ti(s)&&!Array.isArray(s)?tt(s,r,i,o):(i||void 0!==r)&&(e[t]=r))})}function ti(e){return"object"==typeof e&&null!==e}var to=class e{static applyGlobalGridOptions(t){if(!e.gridOptions)return{...t};let i={};return tt(i,e.gridOptions,!0,!0),"deep"===e.mergeStrategy?tt(i,t,!0,!0):i={...i,...t},e.gridOptions.context&&(i.context=e.gridOptions.context),t.context&&("deep"===e.mergeStrategy&&i.context&&tt(t.context,i.context,!0,!0),i.context=t.context),i}static applyGlobalGridOption(t,i){if("deep"===e.mergeStrategy){let o=tr(t);if(o&&"object"==typeof o&&"object"==typeof i)return e.applyGlobalGridOptions({[t]:i})[t]}return i}};function tr(e){return to.gridOptions?.[e]}to.gridOptions=void 0,to.mergeStrategy="shallow";var ts={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipSwitchShowDelay:200,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,refreshAfterGroupEdit:!1,rowDragInsertDelay:500,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,enableFilterHandlers:!1},tn="https://www.ag-grid.com";function tl(e,t,...i){e.get("debug")&&console.log("AG Grid: "+t,...i)}function ta(e,...t){e3(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function td(e,...t){e3(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var th=new Set,tu={},tc={},tg=!1,tp=!1;function tf(e,t,i=!1){let o,r,s;i||(tg=!0),c||(c=e.version),r=e=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${e} Please update all modules to the same version.`,e.version?!function(e){let[t,i]=e.version.split(".")||[],[o,r]=c.split(".")||[];return t===o&&i===r}(e)&&td(r(`'${e.moduleName}' is version ${e.version} but the other modules are version ${c}.`)):td(r(`'${e.moduleName}' is incompatible.`)),(s=e.validate?.())&&!s.isValid&&td(`${s.message}`);let n=e.rowModels??["all"];for(let i of(th.add(e),void 0!==t?(tp=!0,void 0===tc[t]&&(tc[t]={}),o=tc[t]):o=tu,n))void 0===o[i]&&(o[i]={}),o[i][e.moduleName]=e;if(e.dependsOn)for(let o of e.dependsOn)tf(o,t,i)}function tm(e,t,i){let o=i=>!!tu[i]?.[e]||!!tc[t]?.[i]?.[e];return o(i)||o("all")}function tC(e,t){let i=tc[e]??{};return[...Object.values(i.all??{}),...Object.values(i[t]??{})]}function tw(e){for(let t of e){if("setLicenseKey"in t)return t;if(t.dependsOn){let e=tw(t.dependsOn);if(e)return e}}}var tv="35.1.0",tb="_version_",ty=null,tS=`${tn}/javascript-data-grid`;function tR(e,t,i){return ty?.(e,t)??[tE(e,t,i)]}function tF(e,t,i,o,r){e(`${o?"warning":"error"} #${t}`,...tR(t,i,r))}function tP(e){return void 0===e?"undefined":null===e?"null":e}function tx(e,t){return`${e}?${t.toString()}`}function tD(e,t){let i=new URLSearchParams;if(i.append(tb,tv),t)for(let e of Object.keys(t))i.append(e,function(e){let t=e;return e instanceof Error?t=e.toString():"object"==typeof e&&(t=function(e){if(!e)return String(e);let t={};for(let i of Object.keys(e))"object"!=typeof e[i]&&"function"!=typeof e[i]&&(t[i]=e[i]);return JSON.stringify(t)}(e)),t}(t[e]));let o=`${tS}/errors/${e}`,r=tx(o,i);return r.length<=2e3?r:function(e,t,i){let o=Array.from(t.entries()).sort((e,t)=>t[1].length-e[1].length),r=tx(e,t);for(let[i,s]of o){if(i===tb)continue;let o=r.length-2e3;if(o<=0)break;let n=o+3,l=s.length-n>100?s.slice(0,s.length-n)+"...":s.slice(0,100)+"...";t.set(i,l),r=tx(e,t)}return r}(o,i,0)}var tE=(e,t,i)=>{let o=tD(e,t),r=`${i?i+" \n":""}Visit ${o}`;return`${r}${i?"":" \n Alternatively register the ValidationModule to see the full message in the console."}`};function tM(...e){tF(ta,e[0],e[1],!0)}function tT(...e){tF(td,e[0],e[1],!1)}function tk(e,t,i){tF(td,e,t,!1,i)}function tA(...e){var t;let i;return t=void 0,i=e[0],`error #${i} `+tR(i,e[1],t).join(" ")}function tI(e,t){return e.get("rowModelType")===t}function tL(e,t){return tI(e,"clientSide")}function tB(e,t){return tI(e,"serverSide")}function tV(e,t){return e.get("domLayout")===t}function tG(e){return void 0!==t6(e)}function tH(e){return"function"==typeof e.get("getRowHeight")}function tO(e,t,i=!1,o){let{gos:r,environment:s}=e;if(null==o&&(o=s.getDefaultRowHeight()),tH(r)){if(i)return{height:o,estimated:!0};let e={node:t,data:t.data},s=r.getCallback("getRowHeight")(e);if(tz(s))return 0===s&&tM(23),{height:Math.max(1,s),estimated:!1}}if(t.detail&&r.get("masterDetail")){var n=r;if(n.get("detailRowAutoHeight"))return{height:1,estimated:!1};let e=n.get("detailRowHeight");return tz(e)?{height:e,estimated:!1}:{height:300,estimated:!1}}let l=r.get("rowHeight");return{height:l&&tz(l)?l:o,estimated:!1}}function tN(e){let{environment:t,gos:i}=e,o=i.get("rowHeight");if(!o||I(o))return t.getDefaultRowHeight();let r=t.refreshRowHeightVariable();return -1!==r?r:(tM(24),t.getDefaultRowHeight())}function tz(e){return!isNaN(e)&&"number"==typeof e&&isFinite(e)}function tW(e,t,i){let o=t[e.getDomDataKey()];return o?o[i]:void 0}function tU(e,t,i,o){let r=e.getDomDataKey(),s=t[r];I(s)&&(s={},t[r]=s),s[i]=o}function t$(e){return!e.get("ensureDomOrder")&&e.get("animateRows")}function tK(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||tV(e,"print"))}function tj(e){let t=e.get("autoGroupColumnDef");return!t?.comparator&&!e.get("treeData")}function t_(e){let t=e.get("groupAggFiltering");return"function"==typeof t?e.getCallback("groupAggFiltering"):!0===t?()=>!0:void 0}function tq(e){return e.get("grandTotalRow")}function tY(e,t){return!t&&"groupRows"===e.get("groupDisplayType")}function tQ(e,t,i){return!!t.group&&!t.footer&&tY(e,i)}function tZ(e){let t=e.getCallback("getRowId");return void 0===t?t:e=>{let i=t(e);return"string"!=typeof i&&(e3(()=>tM(25,{id:i}),"getRowIdString"),i=String(i)),i}}function tJ(e){return e?.checkboxes??!0}function tX(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function t0(e){if("object"==typeof e)return e.checkboxLocation??"selectionColumn"}function t1(e){return e?.hideDisabledCheckboxes??!1}function t2(e){let t=e.get("cellSelection");return void 0!==t?!!t:e.get("enableRangeSelection")}function t5(e){let t=e.get("cellSelection")??!1;return("object"==typeof t&&t.enableColumnSelection)??!1}function t3(e){let t=e.get("rowSelection")??"single";if("string"==typeof t){let t=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return(!t||!i)&&(t?"enableDeselection":!i||"enableSelection")}return("singleRow"===t.mode||"multiRow"===t.mode)&&(t.enableClickSelection??!1)}function t4(e){let t=e.get("rowSelection");return"string"==typeof t?e.get("isRowSelectable"):t?.isRowSelectable}function t6(e){let t="beanName"in e&&"gos"===e.beanName?e.get("rowSelection"):e.rowSelection;if("string"==typeof t)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 t8(e){return"multiRow"===t6(e)}function t7(e){let t=e.get("rowSelection");if("string"==typeof t){let t=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return t&&i?"filteredDescendants":t?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function t9(e,t=!0){let i=e.get("rowSelection");return"object"!=typeof i?t?"all":void 0:"multiRow"===i.mode?i.selectAll:"all"}function ie(e){let t=t7(e);return"descendants"===t||"filteredDescendants"===t}function it(e){let t=e.get("rowSelection");return"object"==typeof t&&t.masterSelects||"self"}function ii(e){return"legacy"===e.get("columnMenu")}function io(e,t,i){"object"!=typeof e&&(e={});let o={...e};for(let e of i){let i=t[e];void 0!==i&&(o[e]=i)}return o}function ir(e,t){if(!e)return;let i={},o=!1;for(let t of Object.keys(e))i[t]=e[t],o=!0;if(!o)return;t.dispatchEvent({type:"gridOptionsChanged",options:i});let r={type:"componentStateChanged",...i};t.dispatchEvent(r)}function is(e,t){return e.addCommon(t)}function il(e,t){return e[t]??e.gridOptions?.[t]??tr(t)??ts[t]}var ia={resizable:!0,sortable:!0},id=0;function ih(e){return e instanceof ig}var iu=["asc","desc",null],ic=[{type:"absolute",direction:"asc"},{type:"absolute",direction:"desc"},null],ig=class extends e2{constructor(e,t,i,o){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=i,this.primary=o,this.isColumn=!0,this.instanceId=id++,this.autoHeaderHeight=null,this.sortDef=ip(),this._wasSortExplicitlyRemoved=!1,this.moving=!1,this.resizing=!1,this.menuVisible=!1,this.formulaRef=null,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new G,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=z(i)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}initState(){let{colDef:e,beans:{sortSvc:t,pinnedCols:i,colFlex:o}}=this;t?.initCol(this);let r=e.hide;void 0!==r?this.visible=!r:this.visible=!e.initialHide,i?.initCol(this),o?.initCol(this)}setColDef(e,t,i){let o=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),o&&(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.initState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan(),this.addPivotListener()}initDotNotation(){let{gos:e,colDef:{field:t,tooltipField:i}}=this,o=e.get("suppressFieldDotNotation");this.fieldContainsDots=A(t)&&t.includes(".")&&!o,this.tooltipFieldContainsDots=A(i)&&i.includes(".")&&!o}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)}addPivotListener(){let e=this.beans.pivotColDefSvc,t=this.colDef.pivotValueColumn;e&&t&&this.addManagedListeners(t,{colDefChanged:t=>{let i=e.recreateColDef(this.colDef);this.setColDef(i,i,t.source)}})}resetActualWidth(e){let t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){return Math.max(Math.min(e.width??e.initialWidth??200,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 is(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({rowNode:e,column:this})??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){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]??ia[e]}isColumnFunc(e,t){return"boolean"==typeof t?t:"function"==typeof t&&t(this.createColumnFunctionCallbackParams(e))}createColumnEvent(e,t){return is(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sortDef.direction}getSortDef(){return this.sortDef.direction?this.sortDef:null}getColDefAllowedSortTypes(){let e=[],{sort:t,initialSort:i}=this.colDef,o=null===t?t:iy(t?.type),r=null===i?i:iy(i?.type);return o&&e.push(o),r&&e.push(r),e}getSortingOrder(){let e=this.getColDefAllowedSortTypes().includes("absolute")?ic:iu;return(this.colDef.sortingOrder??this.gos.get("sortingOrder")??e).map(e=>ip(e))}getAvailableSortTypes(){return new Set(this.getSortingOrder().reduce((e,t)=>(t.direction&&e.push(t.type),e),this.getColDefAllowedSortTypes()))}get wasSortExplicitlyRemoved(){return this._wasSortExplicitlyRemoved}setSortDef(e,t=!1){t||(this._wasSortExplicitlyRemoved=!e.direction),this.sortDef=e}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return"asc"===this.getSort()}isSortDescending(){return"desc"===this.getSort()}isSortNone(){return I(this.getSort())}isSorting(){return A(this.getSort())}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 tM(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"left"===this.pinned||"right"===this.pinned}isPinnedLeft(){return"left"===this.pinned}isPinnedRight(){return"right"===this.pinned}getPinned(){return this.pinned}setVisible(e,t){let i=!0===e;this.visible!==i&&(this.visible=i,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getFirstRealParent(){let e=this.getOriginalParent();for(;e?.isPadding();)e=e.getOriginalParent();return e}getColumnGroupPaddingInfo(){let e=this.getParent();if(!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 is(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(I(this.colDef.colSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.colSpan(t),1)}getRowSpan(e){if(I(this.colDef.rowSpan))return 1;let t=this.createBaseColDefParams(e);return Math.max(this.colDef.rowSpan(t),1)}setActualWidth(e,t,i=!1){e=Math.min(e=Math.max(e,this.minWidth),this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,null!=this.flex&&"flex"!==t&&"gridInitializing"!==t&&(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!0===this.colDef.enablePivot}isAllowValue(){return!0===this.colDef.enableValue}isAllowRowGroup(){return!0===this.colDef.enableRowGroup}isAllowFormula(){return!0===this.colDef.allowFormula}dispatchColEvent(e,t,i){let o=this.createColumnEvent(e,t);i&&tt(o,i),this.colEventSvc.dispatchEvent(o)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function ip(e){return iw(e)?{direction:e.direction,type:e.type}:{direction:ib(e),type:iy(e)}}function im(e){return"asc"===e||"desc"===e||null===e}function iC(e){return"default"===e||"absolute"===e}function iw(e){return!!e&&"object"==typeof e&&iC(e.type)&&im(e.direction)}function iv(e,t){return e?t?e.type===t.type&&e.direction===t.direction:!e||null===e.direction:!t||null===t.direction}function ib(e){return im(e)?e:null}function iy(e){return iC(e)?e:"default"}function iS(e){return e instanceof iR}var iR=class extends e2{constructor(e,t,i,o){super(),this.colGroupDef=e,this.groupId=t,this.padding=i,this.level=o,this.isColumn=!1,this.expandable=!1,this.instanceId=id++,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())}isPadding(){return this.padding}setExpanded(e){this.expanded=void 0!==e&&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)ih(t)?e(t):iS(t)&&t.forEachLeafColumn(e)}addLeafColumns(e){if(this.children)for(let t of this.children)ih(t)?e.push(t):iS(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);for(let t of this.getLeafColumns())t.__addEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=()=>{for(let t of this.getLeafColumns())t.__removeEventListener("visibleChanged",e);this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,i=!1,o=this.findChildrenRemovingPadding();for(let r=0,s=o.length;r<s;r++){let s=o[r];if(!s.isVisible())continue;let n=s.getColumnGroupShow();"open"===n?(e=!0,i=!0):"closed"===n?(t=!0,i=!0):(e=!0,t=!0)}let r=e&&t&&i;this.expandable!==r&&(this.expandable=r,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){let e=[],t=i=>{for(let o of i)iS(o)&&o.isPadding()?t(o.children):e.push(o)};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},iF={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function iP(e,t,i){let o={},r=e.gos;return Object.assign(o,r.get("defaultColGroupDef")),Object.assign(o,t),r.validateColDef(o,i),o}var ix=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=L(e);let i=0;for(;;){let o=e??t;if(o?0!==i&&(o+="_"+i):o=i,!this.existingKeys[o]){let t=String(o);return e&&i>0&&tM(273,{providedId:e,usedId:t}),this.existingKeys[t]=!0,t}i++}}},iD="ag-Grid-AutoColumn",iE="ag-Grid-SelectionColumn",iM="ag-Grid-RowNumbersColumn";function iT(e){let t=[],i=e=>{for(let o=0;o<e.length;o++){let r=e[o];ih(r)?t.push(r):iS(r)&&i(r.getChildren())}};return i(e),t}function ik(e){return e.reduce((e,t)=>e+t.getActualWidth(),0)}function iA(e,t,i){let o={};if(!t)return;i$(null,t,e=>{o[e.getInstanceId()]=e}),i&&i$(null,i,e=>{o[e.getInstanceId()]=null});let r=Object.values(o).filter(e=>null!=e);e.context.destroyBeans(r)}function iI(e){return e.getId().startsWith(iD)}function iL(e){let t="string"==typeof e?e:"getColId"in e?e.getColId():e.colId;return t?.startsWith(iE)??!1}function iB(e){let t="string"==typeof e?e:"getColId"in e?e.getColId():e.colId;return t?.startsWith(iM)??!1}function iV(e){let t=[];return e instanceof Array?t=e:"string"==typeof e&&(t=e.split(",")),t}function iG(e){return"optionsUpdated"===e?"gridOptionsChanged":e}function iH(e,t){return e===t||e.colId==t||e.getColDef()===t}function iO(e){let{sort:t,initialSort:i}=e,o=iw(t)||im(t),r=iw(i)||im(i);return o?ip(t):r?ip(i):null}var iN=(e,t)=>{iS(e)&&e.setupExpandable(),e.originalParent=t};function iz(e,t,i,o,r,s,n,l){if(!t)return[];let{colGroupSvc:a}=e,d=Array(t.length);for(let h=0;h<d.length;h++){let u=t[h];a&&void 0!==u.children?d[h]=a.createProvidedColumnGroup(o,u,i,r,s,n,l):d[h]=function(e,t,i,o,r,s){let n=function(e,t){if(t)for(let i=0;i<t.length;i++){let o=t[i].getUserProvidedColDef();if(o){if(null!=e.colId){if(t[i].getId()===e.colId)return{idx:i,column:t[i]};continue}if(null!=e.field){if(o.field===e.field)return{idx:i,column:t[i]};continue}if(o===e)return{idx:i,column:t[i]}}}}(i,o);n&&o?.splice(n.idx,1);let l=n?.column;if(l){let t=iU(e,i,l.getColId());l.setColDef(t,i,s),function(e,t,i,o){iW(e,t,i.hide,i.sort,i.sortIndex,i.pinned,i.flex,o);let r=t.getFlex();if(null==r||!(r>0))if(null!=i.width)t.setActualWidth(i.width,o);else{let e=t.getActualWidth();t.setActualWidth(e,o)}}(e,l,t,s)}else{let o=r.getUniqueKey(i.colId,i.field);l=new ig(iU(e,i,o),i,o,t),e.context.createBean(l)}return e.dataTypeSvc?.addColumnListeners(l),l}(e,o,u,r,s,l)}return d}function iW(e,t,i,o,r,s,n,l){let{sortSvc:a,pinnedCols:d,colFlex:h}=e;void 0!==i&&t.setVisible(!i,l),a&&(a.updateColSort(t,o,l),void 0!==r&&a.setColSortIndex(t,r)),void 0!==s&&d?.setColPinned(t,s),void 0!==n&&h?.setColFlex(t,n)}function iU(e,t,i,o){var r,s,n,l;let a,d,{gos:h,dataTypeSvc:u}=e,c={};tt(c,h.get("defaultColDef"),!1,!0);let g=(r=e,s=c,n=t,l=i,a=r.dataTypeSvc?.updateColDefAndGetColumnType(s,n,l),d=n.type??a??s.type,s.type=d,d?iV(d):void 0);g&&function(e,t,i){if(!t.length)return;let o=Object.assign({},iF),r=e.gos.get("columnTypes")||{};for(let e of Object.keys(r)){let t=r[e];e in o?tM(34,{key:e}):(t.type&&tM(35),o[e]=t)}for(let e of t){let t=o[e.trim()];t?tt(i,t,!1,!0):tM(36,{t:e})}}(e,g,c);let p=c.cellDataType;tt(c,t,!1,!0),void 0!==p&&(c.cellDataType=p);let f=h.get("autoGroupColumnDef"),m=tj(h);return t.rowGroup&&f&&m&&tt(c,{sort:f.sort,initialSort:f.initialSort},!1,!0),u?.postProcess(c),u?.validateColDef(c),h.validateColDef(c,i,o),c}function i$(e,t,i){if(t)for(let o=0;o<t.length;o++){let r=t[o];iS(r)&&i$(r,r.getChildren(),i),i(r,e)}}function iK(e,t){let i=[],o=[],r=[];return(e.forEach(e=>{let t=e.getColDef().lockPosition;"right"===t?r.push(e):"left"===t||!0===t?i.push(e):o.push(e)}),t.get("enableRtl"))?[...r,...o,...i]:[...i,...o,...r]}function ij(e,t){let i=!0;return i$(null,t,t=>{if(!iS(t))return;let o=t.getColGroupDef();if(!o?.marryChildren)return;let r=[];for(let i of t.getLeafColumns()){let t=e.indexOf(i);r.push(t)}Math.max.apply(Math,r)-Math.min.apply(Math,r)>t.getLeafColumns().length-1&&(i=!1)}),i}function i_(e,t){if(!e||0==e.length)return;let i=t(e[0]);for(let o=1;o<e.length;o++)if(i!==t(e[o]))return;return i}function iq(e,t,i){if(!t.length)return;let o=1===t.length?t[0]:null,r=i_(t,e=>e.getPinned());e.dispatchEvent({type:"columnPinned",pinned:null!=r?r:null,columns:t,column:o,source:i})}function iY(e,t,i,o,r=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:1===t.length?t[0]:null,flexColumns:r,finished:i,source:o})}function iQ(e,t,i){let{colModel:o,rowGroupColsSvc:r,pivotColsSvc:s,autoColSvc:n,selectionColSvc:l,colAnimation:a,visibleCols:d,pivotResultCols:h,environment:u,valueColsSvc:c,eventSvc:g,gos:p}=e,f=o.getColDefCols()??[],m=l?.getColumns();if(!f.length&&!m?.length)return!1;if(t?.state&&!t.state.forEach)return tM(32),!1;let C=(o,n,l,a,d)=>{let h;if(!o)return;let g=(h=t.defaultState,(e,t)=>{let i={value1:void 0,value2:void 0},o=!1;return n&&(void 0!==n[e]&&(i.value1=n[e],o=!0),A(t)&&void 0!==n[t]&&(i.value2=n[t],o=!0)),!o&&h&&(void 0!==h[e]&&(i.value1=h[e]),A(t)&&void 0!==h[t]&&(i.value2=h[t])),i}),p=g("flex").value1,f=g("sort").value1,m=g("sortType").value1,C=im(f)||iC(m),w=iy(m),v=ib(f);if(iW(e,o,g("hide").value1,C?{type:w,direction:v}:void 0,g("sortIndex").value1,g("pinned").value1,p,i),null==p){let e=g("width").value1;if(null!=e){let t=o.getColDef().minWidth??u.getDefaultColumnMinWidth();null!=t&&e>=t&&o.setActualWidth(e,i)}}!d&&o.isPrimary()&&(c?.syncColumnWithState(o,i,g),r?.syncColumnWithState(o,i,g,l),s?.syncColumnWithState(o,i,g,a))},w=(a,h,u)=>{let c=iZ(e,i),f=h.slice(),m={},w={},v=[],b=[],y=[],S=0,R=r?.columns.slice()??[],F=s?.columns.slice()??[];for(let e of a){let t=e.colId;if(t.startsWith(iD)){v.push(e),y.push(e);continue}if(iL(t)){b.push(e),y.push(e);continue}let i=u(t);i?(C(i,e,m,w,!1),M(f,i)):(y.push(e),S+=1)}let P=e=>C(e,null,m,w,!1);f.forEach(P),r?.sortColumns(i0.bind(r,m,R)),s?.sortColumns(i0.bind(s,w,F)),o.refreshCols(!1,i);let x=(e,t,i=[])=>{for(let o of t){let t=e(o.colId);M(i,t),C(t,o,null,null,!0)}i.forEach(P)};return x(e=>n?.getColumn(e)??null,v,n?.getColumns()?.slice()),x(e=>l?.getColumn(e)??null,b,l?.getColumns()?.slice()),function(e,t,i){if(!e.applyOrder||!e.state)return;let o=[];for(let t of e.state)null!=t.colId&&o.push(t.colId);!function(e,t,i,o){if(null==e)return;let r=[],s={};for(let i of t){if(s[i])continue;let t=e.map[i];t&&(r.push(t),s[i]=!0)}let n=0;for(let t of e.list){let e=t.getColId();null==s[e]&&(e.startsWith(iD)?r.splice(n++,0,t):r.push(t))}ij(r=iK(r,o),i.getColTree())?e.list=r:tM(39)}(t.cols,o,t,i)}(t,o,p),d.refresh(i),g.dispatchEvent({type:"columnEverythingChanged",source:i}),c(),{unmatchedAndAutoStates:y,unmatchedCount:S}};a?.start();let{unmatchedAndAutoStates:v,unmatchedCount:b}=w(t.state||[],f,e=>o.getColDefCol(e));return(v.length>0||A(t.defaultState))&&(b=w(v,h?.getPivotResultCols()?.list??[],e=>h?.getPivotResultCol(e)??null).unmatchedCount),a?.finish(),0===b}function iZ(e,t){let{rowGroupColsSvc:i,pivotColsSvc:o,valueColsSvc:r,colModel:s,sortSvc:n,eventSvc:l}=e,a={rowGroupColumns:i?.columns.slice()??[],pivotColumns:o?.columns.slice()??[],valueColumns:r?.columns.slice()??[]},d=iJ(e),h={};for(let e of d)h[e.colId]=e;return()=>{let r=(e,i,o,r)=>{if(D(i.map(r),o.map(r)))return;let s=new Set(i);for(let e of o)s.delete(e)||s.add(e);let n=[...s];l.dispatchEvent({type:e,columns:n,column:1===n.length?n[0]:null,source:t})},u=e=>{let t=[];return s.forAllCols(i=>{let o=h[i.getColId()];o&&e(o,i)&&t.push(i)}),t},c=e=>e.getColId();r("columnRowGroupChanged",a.rowGroupColumns,i?.columns??[],c),r("columnPivotChanged",a.pivotColumns,o?.columns??[],c);let g=u((e,t)=>{let i=null!=e.aggFunc,o=i!=t.isValueActive(),r=i&&e.aggFunc!=t.getAggFunc();return o||r});g.length>0&&l.dispatchEvent({type:"columnValueChanged",columns:g,column:g&&1==g.length?g[0]:null,source:t}),iY(l,u((e,t)=>e.width!=t.getActualWidth()),!0,t),iq(l,u((e,t)=>e.pinned!=t.getPinned()),t),!function(e,t,i){if(!t.length)return;let o=1===t.length?t[0]:null,r=i_(t,e=>e.isVisible());e.dispatchEvent({type:"columnVisible",visible:r,columns:t,column:o,source:i})}(l,u((e,t)=>e.hide==t.isVisible()),t);let p=u((e,t)=>!iv(t.getSortDef(),{type:iy(e.sortType),direction:ib(e.sort)})||e.sortIndex!=t.getSortIndex());p.length>0&&n?.dispatchSortChangedEvents(t,p),function(e,t,i,o,r){let s={};for(let e of t)s[e.colId]=e;let n={};for(let t of e)s[t.colId]&&(n[t.colId]=!0);let l=e.filter(e=>n[e.colId]),a=t.filter(e=>n[e.colId]),d=[];a.forEach((e,t)=>{let i=l?.[t];if(i&&i.colId!==e.colId){let e=o.getCol(i.colId);e&&d.push(e)}}),d.length&&r.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,finished:!0,source:i})}(d,iJ(e),t,s,l)}}function iJ(e){let{colModel:t,rowGroupColsSvc:i,pivotColsSvc:o}=e;if(I(t.getColDefCols())||!t.isAlive())return[];let r=i?.columns,s=o?.columns,n=[];t.forAllCols(e=>{let t,i,o,l;return t=e.isRowGroupActive()&&r?r.indexOf(e):null,i=e.isPivotActive()&&s?s.indexOf(e):null,o=e.isValueActive()?e.getAggFunc():null,l=null!=e.getSortIndex()?e.getSortIndex():null,void n.push({colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:e.getSort(),sortType:e.getSortDef()?.type,sortIndex:l,aggFunc:o,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:i,flex:e.getFlex()??null})});let l=new Map(t.getCols().map((e,t)=>[e.getColId(),t]));return n.sort((e,t)=>(l.has(e.colId)?l.get(e.colId):-1)-(l.has(t.colId)?l.get(t.colId):-1)),n}function iX(e){let t=(e,t)=>null!=e?e:null!=t?t:null,i=e.getColDef(),o=ip(t(i.sort,i.initialSort)),r=o.direction,s=o.type,n=t(i.sortIndex,i.initialSortIndex),l=t(i.hide,i.initialHide),a=t(i.pinned,i.initialPinned),d=t(i.width,i.initialWidth),h=t(i.flex,i.initialFlex),u=t(i.rowGroupIndex,i.initialRowGroupIndex),c=t(i.rowGroup,i.initialRowGroup);null!=u||c||(u=null,c=null);let g=t(i.pivotIndex,i.initialPivotIndex),p=t(i.pivot,i.initialPivot);null!=g||p||(g=null,p=null);let f=t(i.aggFunc,i.initialAggFunc);return{colId:e.getColId(),sort:r,sortType:s,sortIndex:n,hide:l,pinned:a,width:d,flex:h,rowGroup:c,rowGroupIndex:u,pivot:p,pivotIndex:g,aggFunc:f}}var i0=(e,t,i,o)=>{let r=e[i.getId()],s=e[o.getId()],n=null!=r,l=null!=s;if(n&&l)return r-s;if(n)return -1;if(l)return 1;let a=t.indexOf(i),d=t.indexOf(o),h=a>=0;return h&&d>=0?a-d:h?-1:1};function i1(e){return e instanceof i2}var i2=class extends e2{constructor(e,t,i,o){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=i,this.pinned=o,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null,this.colIdSanitised=z(this.getUniqueId())}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return this.groupId+"_"+this.partId}isEmptyGroup(){return 0===this.displayedChildren.length}isMoving(){let e=this.getProvidedColumnGroup().getLeafColumns();return!!e&&0!==e.length&&e.every(e=>e.isMoving())}checkLeft(){for(let e of this.displayedChildren)i1(e)&&e.checkLeft();if(this.displayedChildren.length>0)if(this.gos.get("enableRtl")){let e=x(this.displayedChildren).getLeft();this.setLeft(e)}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;for(let t of this.displayedChildren??[])e+=t.getActualWidth();return e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;for(let t of this.displayedChildren)t.isResizable()&&(e=!0);return e}getMinWidth(){let e=0;for(let t of this.displayedChildren)e+=t.getMinWidth();return 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){for(let t of this.displayedChildren??[])ih(t)?e.push(t):i1(t)&&t.addDisplayedLeafColumns(e)}addLeafColumns(e){for(let t of this.children??[])ih(t)?e.push(t):i1(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?.isPadding()?1+e.getPaddingLevel():0}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e?.isPadding();)e=e.getParent();if(!(e&&e.getProvidedColumnGroup().isExpandable())){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}for(let t of this.children??[])if(!i1(t)||t.displayedChildren?.length)switch(t.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(t);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(t);break;default:this.displayedChildren.push(t)}this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},i5="Backspace",i3="Enter",i4="Escape",i6="ArrowLeft",i8="ArrowUp",i7="ArrowRight",i9="ArrowDown",oe="Delete",ot="PageUp",oi="PageDown",oo="Home",or="KeyA",os="KeyC",on="KeyD",ol="KeyV",oa="KeyY",od="KeyZ";function oh(e){let t,{keyCode:i}=e;switch(i){case 65:t=or;break;case 67:t=os;break;case 86:t=ol;break;case 68:t=on;break;case 90:t=od;break;case 89:t=oa;break;default:t=e.code}return t}var ou=class e{constructor(e){this.status=0,this.resolution=null,this.waiters=[],e(e=>this.onDone(e),e=>this.onReject(e))}static all(t){return t.length?new e(e=>{let i=t.length,o=Array(i);t.forEach((t,r)=>{t.then(t=>{o[r]=t,0==--i&&e(o)})})}):e.resolve()}static resolve(t=null){return new e(e=>e(t))}then(t){return new e(e=>{1===this.status?e(t(this.resolution)):this.waiters.push(i=>e(t(i)))})}onDone(e){for(let t of(this.status=1,this.resolution=e,this.waiters))t(e)}onReject(e){}};function oc(e){return"function"==typeof e?.getGui}function og(e,t,i){let o=null;"smallDown"===e?tM(262):"smallLeft"===e?tM(263):"smallRight"===e&&tM(264);let r=i?.getColDef().icons;if(r&&(o=r[e]),t.gos&&!o){let i=t.gos.get("icons");i&&(o=i[e])}if(o){let t;if("function"==typeof o)t=o();else{if("string"!=typeof o)return void tM(38,{iconName:e});t=o}return"string"==typeof t?eM(t):eV(t)?t:void tM(133,{iconName:e})}{let i=t.registry.getIcon(e);return i||t.validation?.validateIcon(e),eW({tag:"span",cls:`ag-icon ag-icon-${i??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var op=class{constructor(e){this.cssClassStates={},this.getGui=e}toggleCss(e,t){if(e){if(e.includes(" ")){let i=(e||"").split(" ");if(i.length>1){for(let e of i)this.toggleCss(e,t);return}}this.cssClassStates[e]!==t&&e.length&&(this.getGui()?.classList.toggle(e,t),this.cssClassStates[e]=t)}}},of=0,om=class extends e1{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=of++,this.cssManager=new op(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(e=>[e.selector,e])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui()),this.addGlobalCss()}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(eN):null}applyElementsToComponent(e,t,i,o=null){if(void 0===t&&(t=this.getDataRefAttribute(e)),t){let r=this[t];if(null===r)this[t]=o??e;else{let e=i?.[t];if(!this.suppressDataRefValidation&&!e)throw Error(`data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){let i=[];for(let t of e.childNodes??[])i.push(t);for(let o of i){if(!(o instanceof HTMLElement))continue;let i=this.createComponentFromElement(o,e=>{let t=e.getGui();if(t)for(let e of o.attributes??[])t.setAttribute(e.name,e.value)},t);if(i){if(i.addItems&&o.children.length){this.createChildComponentsFromTags(o,t);let e=Array.prototype.slice.call(o.children);i.addItems(e)}this.swapComponentForNode(i,e,o)}else o.childNodes&&this.createChildComponentsFromTags(o,t)}}createComponentFromElement(e,t,i){let o=e.nodeName,r=this.getDataRefAttribute(e),s=0===o.indexOf("AG-"),n=s?this.componentSelectors.get(o):null,l=null;if(n){let e=i&&r?i[r]:void 0;(l=new n.component(e)).setParentComponent(this),this.createBean(l,null,t)}else if(s)throw Error(`selector: ${o}`);return this.applyElementsToComponent(e,r,i,l),l}swapComponentForNode(e,t,i){let o=e.getGui();t.replaceChild(o,i),t.insertBefore(document.createComment(i.nodeName),o),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e,t){let i=t??this.gos.get("tabIndex");for(let t of(e||(e=[]),e.length||e.push(this.getGui()),e))t.setAttribute("tabindex",i.toString())}setTemplate(e,t,i){let o;o="string"==typeof e||null==e?eM(e):eW(e),this.setTemplateFromElement(o,t,i)}setTemplateFromElement(e,t,i,o=!1){if(this.eGui=e,this.suppressDataRefValidation=o,t)for(let e=0;e<t.length;e++){let i=t[e];this.componentSelectors.set(i.selector,i)}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 null==e?null:(i||(i=this.eGui),eV(e))?{element:e,parent:i}:{element:e.getGui(),parent:i}}prependChild(e,t){let{element:i,parent:o}=this.getContainerAndElement(e,t)||{};i&&o&&o.prepend(i)}appendChild(e,t){let{element:i,parent:o}=this.getContainerAndElement(e,t)||{};i&&o&&o.appendChild(i)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;let{skipAriaHidden:i}=t;!function(e,t,i={}){let{skipAriaHidden:o}=i;e.classList.toggle("ag-invisible",!t),o||ei(e,!t)}(this.eGui,e,{skipAriaHidden:i})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;let{skipAriaHidden:i}=t;ep(this.eGui,e,{skipAriaHidden:i});let o={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(o)}}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===oC?(this.css=[e],this.addGlobalCss()):(this.css||(this.css=[]),this.css.push(e))}addGlobalCss(){if(Array.isArray(this.css)){let e="component-"+Object.getPrototypeOf(this)?.constructor?.name;for(let t of this.css??[])this.beans.environment.addGlobalCSS(t,e)}this.css=oC}},oC=Symbol(),ow=class extends om{},ov={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"}]}]},ob=class extends ow{constructor(){super(),this.dragSource=null,this.eIcon=null,this.eLabel=null,this.eGhost=null,this.registerCSS(".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}.ag-dnd-ghost-not-allowed{border:var(--ag-drag-and-drop-image-not-allowed-border)}")}postConstruct(){let e=e=>(function(e,t,i){let o=og(e,t,null);if(o){let{className:e}=o;if("string"==typeof e&&e.includes("ag-icon")||"object"==typeof e&&e["ag-icon"])return o}let r=eW({tag:"span"});return r.appendChild(o),r})(e,this.beans,0);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(ov),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){let{eGhost:i,eIcon:o,dragSource:r,dropIconMap:s,gos:n}=this;eP(o);let l=null;e||(e=r?.getDefaultIconName?r.getDefaultIconName():"notAllowed"),l=s[e],i.classList.toggle("ag-dnd-ghost-not-allowed","notAllowed"===e),o.classList.toggle("ag-shake-left-to-right",t),!(l===s.hide&&n.get("suppressDragLeaveHidesColumns"))&&l&&o.appendChild(l)}setLabel(e){this.eLabel.textContent=e}},oy=class extends e1{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.dragSource=null,this.dragImageCompPromise=null,this.dragImageComp=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.dropTargets=[],this.externalDropZoneCount=0,this.lastDropTarget=null}addDragSource(e,t=!1){let i={capturePointer:!0,dragSource:e,eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:t=>this.onDragStart(e,t),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push(i),this.beans.dragSvc.addDragSource(i)}setDragImageCompIcon(e,t=!1){let i=this.dragImageComp;i&&(t||this.dragImageLastIcon!==e)&&(this.dragImageLastIcon=e,i.setIcon(e,t))}removeDragSource(e){let{dragSourceAndParamsList:t,beans:i}=this;for(let o=0,r=t.length;o<r;o++)if(t[o].dragSource===e){let e=t[o];i.dragSvc?.removeDragSource(e),t.splice(o,1);break}}destroy(){let{dragSourceAndParamsList:e,dropTargets:t,beans:i}=this,o=i.dragSvc;for(let t of e)o?.removeDragSource(t);e.length=0,t.length=0,this.externalDropZoneCount=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){let e=this.lastMouseEvent;e&&this.onDragging(e,!0)}onDragStart(e,t){this.lastMouseEvent=t,this.dragSource=e,this.dragItem=e.getDragItem();let i=e.eElement.getBoundingClientRect();this.dragInitialSourcePointerOffsetX=t.clientX-i.left,this.dragInitialSourcePointerOffsetY=t.clientY-i.top,e.onDragStarted?.(),this.createAndUpdateDragImageComp(e)}onDragStop(e){let{dragSource:t,lastDropTarget:i}=this;if(t?.onDragStopped?.(),i){let t=this.dropTargetEvent(i,e,!1);i.onDragStop?.(t)}this.clearDragAndDropProperties()}onDragCancel(){let{dragSource:e,lastDropTarget:t,lastMouseEvent:i}=this;if(e?.onDragCancelled?.(),t&&i){let e=this.dropTargetEvent(t,i,!1);t.onDragCancel?.(e)}this.clearDragAndDropProperties()}onDragging(e,t=!1){this.positionDragImageComp(e);let i=this.findCurrentDropTarget(e),{lastDropTarget:o,dragSource:r,dragItem:s}=this,n=!1;if(i!==o){if(n=!0,o){let i=this.dropTargetEvent(o,e,t);o.onDragLeave?.(i)}if(null===o||i?null===o&&i&&this.handleEnter(r,s):this.handleExit(r,s),i){let o=this.dropTargetEvent(i,e,t);i.onDragEnter?.(o)}this.lastDropTarget=i}else if(i){let o=this.dropTargetEvent(i,e,t);i.onDragging?.(o),o?.changed&&(n=!0)}this.lastMouseEvent=e,n&&this.updateDragImageComp()}clearDragAndDropProperties(){this.removeDragImageComp(this.dragImageComp),this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0,this.lastMouseEvent=null,this.lastDraggingEvent=null,this.lastDropTarget=null,this.dragItem=null,this.dragInitialSourcePointerOffsetX=0,this.dragInitialSourcePointerOffsetY=0,this.dragSource=null}getAllContainersFromDropTarget(e){let t=e.getContainer(),i=e.getSecondaryContainers?.(),o=i?.length;if(!o)return[[t]];let r=Array(o+1);r[0]=[t];for(let e=0;e<o;++e)r[e+1]=i[e];return r}isMouseOnDropTarget(e,t){let i=this.getAllContainersFromDropTarget(t),o=!1,r=(e,t)=>{for(let i of t){let{width:t,height:o,left:r,right:s,top:n,bottom:l}=i.getBoundingClientRect();if(0===t||0===o)return!1;let a=e.clientX>=r&&e.clientX<s,d=e.clientY>=n&&e.clientY<l;if(!a||!d)return!1}return!0};for(let t of i)if(r(e,t)){o=!0;break}let{eElement:s,type:n}=this.dragSource;return(!t.targetContainsSource||!!t.getContainer().contains(s))&&o&&t.isInterestedIn(n,s)}findCurrentDropTarget(e){let t=[],i=this.dropTargets;for(let o=0,r=i.length;o<r;++o){let r=i[o];this.isMouseOnDropTarget(e,r)&&t.push(r)}let o=t.length;if(0===o)return null;if(1===o)return t[0];let r=U(this.beans).elementsFromPoint(e.clientX,e.clientY);for(let e=0,i=r.length;e<i;++e){let i=r[e];for(let e=0,o=t.length;e<o;e++){let o=t[e],r=this.getAllContainersFromDropTarget(o),s=!1;for(let e=0,t=r.length;e<t&&!s;e++){let t=r[e];for(let e=0,o=t.length;e<o;e++)if(t[e]===i){s=!0;break}}if(s)return o}}return null}addDropTarget(e){this.dropTargets.push(e),e.external&&this.externalDropZoneCount++}removeDropTarget(e){let t=e.getContainer(),i=this.dropTargets,o=0;for(let e=0,r=i.length;e<r;++e){let r=i[e];if(r.getContainer()===t){r.external&&--this.externalDropZoneCount;continue}o!==e&&(i[o]=r),++o}i.length=o}hasExternalDropZones(){return this.externalDropZoneCount>0}findExternalZone(e){let t=this.dropTargets;for(let i=0,o=t.length;i<o;++i){let o=t[i];if(o.external&&o.getContainer()===e)return o}return null}dropTargetEvent(e,t,i){let{dragSource:o,dragItem:r,lastDraggingEvent:s,lastMouseEvent:n,dragInitialSourcePointerOffsetX:l,dragInitialSourcePointerOffsetY:a}=this,d=e.getContainer(),h=d.getBoundingClientRect(),{clientX:u,clientY:c}=t,g=u-(n?.clientX||0),p=c-(n?.clientY||0),f=this.createEvent({event:t,x:u-h.left,y:c-h.top,vDirection:p>0?"down":p<0?"up":null,hDirection:g<0?"left":g>0?"right":null,initialSourcePointerOffsetX:l,initialSourcePointerOffsetY:a,dragSource:o,fromNudge:i,dragItem:r,dropZoneTarget:d,dropTarget:s?.dropTarget??null,changed:!!s?.changed});return this.lastDraggingEvent=f,f}positionDragImageComp(e){let t=this.dragImageComp?.getGui();t&&function(e,t,i){let o,r,s=e.getBoundingClientRect().height,n=(o=q(i),(o?.clientWidth??(window.innerWidth||-1))-2),l=(r=q(i),(r?.clientHeight??(window.innerHeight||-1))-2);if(!e.offsetParent)return;let a=eS(e.offsetParent),{clientY:d,clientX:h}=t,u=d-a.top-s/2,c=h-a.left-10,g=K(i),p=g.defaultView||window,f=p.pageYOffset||g.documentElement.scrollTop,m=p.pageXOffset||g.documentElement.scrollLeft;n>0&&c+e.clientWidth>n+m&&(c=n+m-e.clientWidth),c<0&&(c=0),l>0&&u+e.clientHeight>l+f&&(u=l+f-e.clientHeight),u<0&&(u=0),e.style.left=`${c}px`,e.style.top=`${u}px`}(t,e,this.beans)}removeDragImageComp(e){this.dragImageComp===e&&(this.dragImageComp=null),e&&(e.getGui()?.remove(),this.destroyBean(e))}createAndUpdateDragImageComp(e){let t=this.createDragImageComp(e)??null;this.dragImageCompPromise=t,t?.then(e=>{let i=this.lastMouseEvent;if(t!==this.dragImageCompPromise||!i||!this.isAlive())return void this.destroyBean(e);this.dragImageCompPromise=null,this.dragImageLastIcon=void 0,this.dragImageLastLabel=void 0;let o=this.dragImageComp;o!==e&&(this.dragImageComp=e,this.removeDragImageComp(o)),e&&(this.appendDragImageComp(e),this.updateDragImageComp(),this.positionDragImageComp(i))})}appendDragImageComp(e){let t=e.getGui(),i=t.style;i.position="absolute",i.zIndex="9999",this.beans.dragSvc?.hasPointerCapture()&&(i.pointerEvents="none"),this.gos.setInstanceDomData(t),this.beans.environment.applyThemeClasses(t),i.top="20px",i.left="20px";let o=q(this.beans);o?o.appendChild(t):this.warnNoBody()}updateDragImageComp(){let{dragImageComp:e,dragSource:t,lastDropTarget:i,lastDraggingEvent:o,dragImageLastLabel:r}=this;if(!e)return;this.setDragImageCompIcon(i?.getIconName?.(o)??null);let s=t?.dragItemName;"function"==typeof s&&(s=s(o)),s||(s=""),r!==s&&(this.dragImageLastLabel=s,e.setLabel(s))}};function oS(e){return"object"==typeof e&&!!e.component}function oR(e,t,i,o){let r,s,n,l,a,d,{name:h}=i;if(t){let i=t[h+"Selector"],u=i?i(o):null,c=t=>{"string"==typeof t?r=t:null!=t&&!0!==t&&(e.isFrameworkComponent(t)?n=t:s=t)};u?(c(u.component),l=u.params,a=u.popup,d=u.popupPosition):c(t[h])}return{compName:r,jsComp:s,fwComp:n,paramsFromSelector:l,popupFromSelector:a,popupPositionFromSelector:d}}var oF=class extends e2{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,o=!1){return this.getCompDetails(this.gridOptions,e,t,i,o)}getCompDetails(e,t,i,o,r=!1){var s;let n,l,{name:a,cellRenderer:d}=t,{compName:h,jsComp:u,fwComp:c,paramsFromSelector:g,popupFromSelector:p,popupPositionFromSelector:f}=oR(this.beans.frameworkOverrides,e,t,o),m=e=>{let t=this.registry.getUserComponent(a,e);t&&(u=t.componentFromFramework?void 0:t.component,c=t.componentFromFramework?t.component:void 0,n=t.params,l=t.processParams)};if(null!=h&&m(h),null==u&&null==c&&null!=i&&m(i),u&&d&&!((s=u)&&s.prototype&&"getGui"in s.prototype)&&(u=this.agCompUtils?.adaptFunction(t,u)),!u&&!c){let{validation:e}=this.beans;r&&(h!==i||!i)?h?e?.isProvidedUserComp(h)||tT(50,{compName:h}):i?e||tT(260,{...this.gos.getModuleErrorParams(),propName:a,compName:i}):tT(216,{name:a}):i&&!e&&tT(146,{comp:i});return}let C=this.mergeParams(e,t,o,g,n,l),w=null==u,v=u??c;return{componentFromFramework:w,componentClass:v,params:C,type:t,popupFromSelector:p,popupPositionFromSelector:f,newAgStackInstance:()=>this.newAgStackInstance(v,w,C,t)}}newAgStackInstance(e,t,i,o){let r;r=t?this.frameworkCompWrapper.wrap(e,o.mandatoryMethods,o.optionalMethods,o):new e,this.createBean(r);let s=r.init?.(i);return null==s?ou.resolve(r):s.then(()=>r)}mergeParams(e,t,i,o=null,r,s){let n={...i,...r},l=e?.[t.name+"Params"];return"function"==typeof l?tt(n,l(i)):"object"==typeof l&&tt(n,l),tt(n,o),s?s(n):n}},oP={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},ox={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},oD={name:"headerComponent",optionalMethods:["refresh"]},oE={name:"innerHeaderComponent"},oM={name:"innerHeaderGroupComponent"},oT={name:"headerGroupComponent"},ok={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},oA={name:"loadingCellRenderer",cellRenderer:!0},oI={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},oL={name:"tooltipComponent"},oB={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},oV={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},oG={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},oH={name:"loadingCellRenderer",cellRenderer:!0},oO={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},oN={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function oz(e,t,i){return e.getCompDetails(t,ok,void 0,i)}function oW(e,t,i){return e.getCompDetails(t,oA,"agSkeletonCellRenderer",i,!0)}function oU(e,t,i){return e.getCompDetails(t,oI,"agCellEditor",i,!0)}function o$(e,t,i){return e.mergeParams(t,oB,i)}var oK=((n=oK||{})[n.ToolPanel=0]="ToolPanel",n[n.HeaderCell=1]="HeaderCell",n[n.RowDrag=2]="RowDrag",n[n.ChartPanel=3]="ChartPanel",n[n.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",n),oj=class extends oy{createEvent(e){return is(this.gos,e)}createDragImageComp(e){var t,i;let{gos:o,beans:r}=this,s=(t=r.userCompFactory,i=is(o,{dragSource:e}),t.getCompDetailsFromGridOptions(ox,"agDragAndDropImage",i,!0));return s?.newAgStackInstance()}handleEnter(e,t){e?.onGridEnter?.(t)}handleExit(e,t){e?.onGridExit?.(t)}warnNoBody(){tM(54)}isDropZoneWithinThisGrid(e){return this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody.contains(e.dropZoneTarget)}registerGridDropTarget(e,t){let i={getContainer:e,isInterestedIn:e=>1===e||0===e,getIconName:()=>"notAllowed"};this.addDropTarget(i),t.addDestroyFunc(()=>this.removeDropTarget(i))}},o_=class extends ow{constructor(e){const{className:t="ag-filter-apply-panel"}=e??{};super(function(e){return{tag:"div",cls:e}}(t)),this.listeners=[],this.validationMessage=null,this.className=t}updateButtons(e,t){let i,o=this.buttons;if(this.buttons=e,o===e)return;let r=this.getGui();eP(r),this.destroyListeners();let s=document.createDocumentFragment(),n=this.className,l=({type:e,label:o})=>{let r=t=>{this.dispatchLocalEvent({type:e,event:t})};["apply","clear","reset","cancel"].includes(e)||tM(75);let l="apply"===e,a=eW({tag:"button",attrs:{type:l&&t?"submit":"button"},ref:`${e}FilterButton`,cls:`ag-button ag-standard-button ${n}-button${l?" "+n+"-apply-button":""}`,children:o});this.activateTabIndex([a]),l&&(i=a);let d=e=>{e.key===i3&&(e.preventDefault(),r(e))},h=this.listeners;a.addEventListener("click",r),h.push(()=>a.removeEventListener("click",r)),a.addEventListener("keydown",d),h.push(()=>a.removeEventListener("keydown",d)),s.append(a)};for(let t of e)l(t);this.eApply=i;let a=this.validationTooltipFeature;i&&!a?this.validationTooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.eApply,getLocation:()=>"advancedFilter",getTooltipShowDelayOverride:()=>1e3})):!i&&a&&(this.validationTooltipFeature=this.destroyBean(a)),r.append(s)}getApplyButton(){return this.eApply}updateValidity(e,t=null){let i=this.eApply;i&&(ef(i,!e),this.validationMessage=t,this.validationTooltipFeature?.setTooltipAndRefresh(this.validationMessage))}destroyListeners(){for(let e of this.listeners)e();this.listeners=[]}destroy(){this.destroyListeners(),super.destroy()}},oq={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",bigintFilter:"BigInt 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",filterSummaryInactive:"is (All)",filterSummaryContains:"contains",filterSummaryNotContains:"does not contain",filterSummaryTextEquals:"equals",filterSummaryTextNotEqual:"does not equal",filterSummaryStartsWith:"begins with",filterSummaryEndsWith:"ends with",filterSummaryBlank:"is blank",filterSummaryNotBlank:"is not blank",filterSummaryEquals:"=",filterSummaryNotEqual:"!=",filterSummaryGreaterThan:">",filterSummaryGreaterThanOrEqual:">=",filterSummaryLessThan:"<",filterSummaryLessThanOrEqual:"<=",filterSummaryInRange:"between",yesterday:"Yesterday",today:"Today",tomorrow:"Tomorrow",last7Days:"Last 7 Days",lastWeek:"Last Week",thisWeek:"This Week",nextWeek:"Next Week",last30Days:"Last 30 Days",lastMonth:"Last Month",thisMonth:"This Month",nextMonth:"Next Month",last90Days:"Last 90 Days",lastQuarter:"Last Quarter",thisQuarter:"This Quarter",nextQuarter:"Next Quarter",lastYear:"Last Year",thisYear:"This Year",yearToDate:"Year To Date",nextYear:"Next Year",last6Months:"Last 6 Months",last12Months:"Last 12 Months",last24Months:"Last 24 Months",filterSummaryInRangeValues:e=>`(${e[0]}, ${e[1]})`,filterSummaryTextQuote:e=>`"${e[0]}"`,minDateValidation:e=>`Date must be after ${e[0]}`,maxDateValidation:e=>`Date must be before ${e[0]}`,strictMinValueValidation:e=>`Must be greater than ${e[0]}`,strictMaxValueValidation:e=>`Must be less than ${e[0]}`};function oY(e,t,i){let o;return o=oq[t],e.getLocaleTextFunc()(t,"function"==typeof o?o(i):o,i)}function oQ(e,t){let{debounceMs:i}=e;return oZ(e)?(null!=i&&tM(71),0):i??t}function oZ(e){return(e.buttons?.indexOf("apply")??-1)>=0}function oJ(e,t,i,o){let r=oY(e,i);if("function"==typeof t){let i=oY(e,o);r=t({filterOptionKey:o,filterOption:i,placeholder:r})}else"string"==typeof t&&(r=t);return r}var oX=class extends ow{constructor(e,t,i,o,r,s){super(),this.column=e,this.wrapper=t,this.eventParent=i,this.updateModel=o,this.isGlobalButtons=r,this.enableGlobalButtonCheck=s,this.hidePopup=null,this.applyActive=!1}postConstruct(){let{comp:e,params:t}=this.wrapper,i=t.useForm;this.setTemplate({tag:i?"form":"div",cls:"ag-filter-wrapper"}),i&&this.addManagedElementListeners(this.getGui(),{submit:e=>{e?.preventDefault()},keydown:this.handleKeyDown.bind(this)}),this.appendChild(e.getGui()),this.params=t,this.resetButtonsPanel(t),this.addManagedListeners(this.eventParent,{filterParamsChanged:({column:e,params:t})=>{e===this.column&&this.resetButtonsPanel(t,this.params)},filterStateChanged:({column:e,state:t})=>{e===this.column&&this.eButtons?.updateValidity(!1!==t.valid)},filterAction:({column:e,action:t,event:i})=>{e===this.column&&this.afterAction(t,i)},...this.enableGlobalButtonCheck?{filterGlobalButtons:({isGlobal:e})=>{if(e!==this.isGlobalButtons){this.isGlobalButtons=e;let t=this.params;this.resetButtonsPanel(t,t,!0)}}}:void 0})}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup)}resetButtonsPanel(e,t,i){let{buttons:o,readOnly:r}=t??{},{buttons:s,readOnly:n,useForm:l}=e;if(!i&&r===n&&B(o,s))return;let a=s&&s.length>0&&!e.readOnly&&!this.isGlobalButtons,d=this.eButtons;if(a){let e=s.map(e=>{let t=`${e}Filter`;return{type:e,label:oY(this,t)}});if(this.applyActive=oZ(this.params),!d){d=this.createBean(new o_),this.appendChild(d.getGui());let e=this.column,t=t=>({event:i})=>{this.updateModel(e,t,{fromButtons:!0}),this.afterAction(t,i)};d?.addManagedListeners(d,{apply:t("apply"),clear:t("clear"),reset:t("reset"),cancel:t("cancel")}),this.eButtons=d}d.updateButtons(e,l)}else this.applyActive=!1,d&&(ex(d.getGui()),this.eButtons=this.destroyBean(d))}close(e){let t,i=this.hidePopup;if(!i)return;let o=e?.key;(o===i3||" "===o)&&(t={keyboardEvent:e}),i(t),this.hidePopup=null}afterAction(e,t){let{params:i,applyActive:o}=this,r=i?.closeOnApply;switch(e){case"apply":t?.preventDefault(),r&&o&&this.close(t);break;case"reset":r&&o&&this.close();break;case"cancel":r&&this.close(t)}}handleKeyDown(e){!e.defaultPrevented&&e.key===i3&&this.applyActive&&(this.updateModel(this.column,"apply",{fromButtons:!0}),this.afterAction("apply",e))}destroy(){this.hidePopup=null,this.eButtons=this.destroyBean(this.eButtons)}},o0={tag:"div",cls:"ag-filter"},o1=class extends ow{constructor(e,t,i){super(o0),this.column=e,this.source=t,this.enableGlobalButtonCheck=i,this.wrapper=null}postConstruct(){this.beans.colFilter?.activeFilterComps.add(this),this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return null!=this.wrapper}getFilter(){return this.wrapper?.then(e=>e.comp)??null}afterInit(){return this.wrapper?.then(()=>{})??ou.resolve()}afterGuiAttached(e){this.afterGuiAttachedParams=e,this.wrapper?.then(t=>{this.comp?.afterGuiAttached(e),t?.comp?.afterGuiAttached?.(e)})}afterGuiDetached(){this.wrapper?.then(e=>{e?.comp?.afterGuiDetached?.()})}createFilter(e){let{column:t,source:i,beans:{colFilter:o}}=this,r=o.getFilterUiForDisplay(t)??null;this.wrapper=r,r?.then(r=>{let s;if(!r)return;let{isHandler:n,comp:l}=r;if(n){let e=!!this.enableGlobalButtonCheck,i=this.createBean(new oX(t,r,o,o.updateModel.bind(o),e&&o.isGlobalButtons,e));this.comp=i,s=i.getGui()}else this.registerCSS(":where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}"),A(s=l.getGui())||tM(69,{guiFromFilter:s});this.appendChild(s),e?this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:i,eGui:this.getGui()}):l.afterGuiAttached?.(this.afterGuiAttachedParams)})}onFilterDestroyed(e){let{source:t,column:i}=e;("api"===t||"paramsUpdated"===t)&&i.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(eP(this.getGui()),this.comp=this.destroyBean(this.comp),this.createFilter())}destroy(){this.beans.colFilter?.activeFilterComps.delete(this),this.eventSvc.dispatchEvent({type:"filterClosed",column:this.column}),this.wrapper=null,this.comp=this.destroyBean(this.comp),this.afterGuiAttachedParams=void 0,super.destroy()}};function o2(e){return!!e.operator}var o5="ag-resizer-wrapper",o3=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),o4={tag:"div",cls:o5,children:[o3("eTopLeft","topLeft"),o3("eTop","top"),o3("eTopRight","topRight"),o3("eRight","right"),o3("eBottomRight","bottomRight"),o3("eBottom","bottom"),o3("eBottomLeft","bottomLeft"),o3("eLeft","left")]},o6=class extends e1{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={popup:!1,...t}}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(e){let{clientHeight:t,clientWidth:i}=this.offsetParent,o=i/2-this.getWidth()/2,r=t/2-this.getHeight()/2;this.offsetElement(o,r,e)}initialisePosition(e){if(this.positioned)return;let{centered:t,forcePopupParentAsOffsetParent:i,minWidth:o,width:r,minHeight:s,height:n,x:l,y:a}=this.config;this.offsetParent||this.setOffsetParent();let d=0,h=0,u=eE(this.element);if(u){let e=this.findBoundaryElement(),t=window.getComputedStyle(e);if(null!=t.minWidth){let i=e.offsetWidth-this.element.offsetWidth;h=Number.parseInt(t.minWidth,10)-i}if(null!=t.minHeight){let i=e.offsetHeight-this.element.offsetHeight;d=Number.parseInt(t.minHeight,10)-i}}if(this.minHeight=s||d,this.minWidth=o||h,r&&this.setWidth(r),n&&this.setHeight(n),r&&n||this.refreshSize(),t)this.center(e);else if(l||a)this.offsetElement(l,a,e);else if(u&&i){let t=this.boundaryEl,i=!0;if(t||(t=this.findBoundaryElement(),i=!1),t){let o=Number.parseFloat(t.style.top),r=Number.parseFloat(t.style.left);i?this.offsetElement(Number.isNaN(r)?0:r,Number.isNaN(o)?0:o,e):this.setPosition(r,o)}}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(),"boolean"==typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}for(let t of Object.keys(e)){let i=!!e[t],o=this.getResizerElement(t),r={dragStartPixels:0,eElement:o,onDragStart:e=>this.onResizeStart(e,t),onDragging:this.onResize.bind(this),onDragStop:e=>this.onResizeEnd(e,t)};!i&&(this.isAlive()||i)||(i?(this.dragSvc?.addDragSource(r),this.resizeListeners.push(r),o.style.pointerEvents="all"):o.style.pointerEvents="none",this.resizable[t]=i)}}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;-1!==t&&(this.element.style.width=`${t}px`),-1!==e&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){let{popup:t}=this.config,i=this.element,o=!1;if("string"==typeof e&&e.includes("%"))eL(i,e),e=eb(i),o=!0;else if(e=Math.max(this.minHeight,e),this.positioned){let t=this.getAvailableHeight();t&&e>t&&(e=t)}this.getHeight()!==e&&(o?(i.style.maxHeight="unset",i.style.minHeight="unset"):t?eL(i,e):(i.style.height=`${e}px`,i.style.flex="0 0 auto",this.lastSize.height="number"==typeof e?e:Number.parseFloat(e)))}getAvailableHeight(){let{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();let{clientHeight:i}=this.offsetParent;if(!i)return null;let o=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=e?this.position.y:o.top,n=e?0:r.top,l=0;if(t){let e=this.element.parentElement;if(e){let{bottom:t}=e.getBoundingClientRect();l=t-o.bottom}}return i+n-s-l}getWidth(){return this.element.offsetWidth}setWidth(e){let t=this.element,{popup:i}=this.config,o=!1;if("string"==typeof e&&e.includes("%"))eI(t,e),e=ey(t),o=!0;else if(this.positioned){e=Math.max(this.minWidth,e);let{clientWidth:t}=this.offsetParent,o=i?this.position.x:this.element.getBoundingClientRect().left;t&&e+o>t&&(e=t-o)}this.getWidth()!==e&&(o?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?eI(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width="number"==typeof e?e:Number.parseFloat(e)))}offsetElement(e=0,t=0,i){let{forcePopupParentAsOffsetParent:o}=this.config,r=o?this.boundaryEl:this.element;r&&(this.popupSvc?.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t}),postProcessCallback:i}),this.setPosition(Number.parseFloat(r.style.left),Number.parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;let t=()=>{let e=this.getAvailableHeight();this.element.style.setProperty("max-height",`${e}px`)};e&&this.popupSvc?(this.resizeObserverSubscriber?.(),this.resizeObserverSubscriber=eH(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:o,anywhereWithin:r,topBuffer:s}=e,n=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!i,!!r,n)?0:n,movementY:this.shouldSkipY(t,!!o,s,l)?0:l}}shouldSkipX(e,t,i,o){let r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:r.left,a=l<=0&&s.left>=e.clientX||s.right<=e.clientX&&s.right<=n.right;return!!a||(a=t?o<0&&e.clientX>l+s.left||o>0&&e.clientX<l+s.left:i?o<0&&e.clientX>n.right||o>0&&e.clientX<l+s.left:o<0&&e.clientX>n.right||o>0&&e.clientX<n.right)}shouldSkipY(e,t,i=0,o){let r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.y:r.top,a=l<=0&&s.top>=e.clientY||s.bottom<=e.clientY&&s.bottom<=n.bottom;return!!a||(a=t?o<0&&e.clientY>l+s.top+i||o>0&&e.clientY<l+s.top:o<0&&e.clientY>n.bottom||o>0&&e.clientY<n.bottom)}createResizeMap(){let e=e=>({element:this.element.querySelector(`[data-ref=${e}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(eW(o4)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;let e=this.element.querySelector(`.${o5}`);e?.remove(),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:o}=this.config;i||o||this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){let e=this.element.parentElement;return e?Array.prototype.slice.call(e.children).filter(e=>!e.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){let e=this.getSiblings()||[],t=0,i=0;for(let o of e){let e=!!o.style.flex&&"0 0 auto"!==o.style.flex;if(o===this.element)continue;let r=this.minHeight||0,s=this.minWidth||0;if(e){let e=window.getComputedStyle(o);e.minHeight&&(r=Number.parseInt(e.minHeight,10)),e.minWidth&&(s=Number.parseInt(e.minWidth,10))}else r=o.offsetHeight,s=o.offsetWidth;t+=r,i+=s}return{height:t,width:i}}applySizeToSiblings(e){let t=null,i=this.getSiblings();if(i){for(let o=0;o<i.length;o++){let r=i[o];r!==t&&(e?r.style.height=`${r.offsetHeight}px`:r.style.width=`${r.offsetWidth}px`,r.style.flex="0 0 auto",r===this.element&&(t=i[o+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:o,isRight:r,isBottom:s,isLeft:n}=this.currentResizer,l=r||n,a=s||o,{movementX:d,movementY:h}=this.calculateMouseMovement({e,isLeft:n,isTop:o}),u=this.position.x,c=this.position.y,g=0,p=0;if(l&&d){let e=n?-1:1,t=this.getWidth(),i=t+d*e,o=!1;n&&(u+(g=t-i)<=0||i<=this.minWidth)&&(o=!0,g=0),o||this.setWidth(i)}if(a&&h){let e=o?-1:1,t=this.getHeight(),i=t+h*e,r=!1;o?(c+(p=t-i)<=0||i<=this.minHeight)&&(r=!0,p=0):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&t<i&&this.getMinSizeOfSiblings().height+i>this.element.parentElement.offsetHeight&&(r=!0),r||this.setHeight(i)}this.updateDragStartPosition(e.clientX,e.clientY),((t||i)&&g||p)&&this.offsetElement(u+g,c+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){let t;if(!this.isMoving)return;let{x:i,y:o}=this.position;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());let{movementX:r,movementY:s}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:t});this.offsetElement(i+r,o+s),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("static"!==window.getComputedStyle(e).position)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()}},o8=class extends o6{};function o7(){return void 0===g&&(g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),g}function o9(){return void 0===p&&(p=/(firefox)/i.test(navigator.userAgent)),p}function re(){return void 0===f&&(f=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),f}function rt(){return void 0===m&&(m=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),m}function ri(e){if(!e)return null;let t=e.tabIndex,i=e.getAttribute("tabIndex");return -1!==t||null!==i&&(""!==i||o9())?t.toString():null}function ro(){return null==w&&rr(),w}function rr(){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;0===i&&0===t.clientWidth&&(i=null),t.parentNode&&t.remove(),null!=i&&(w=i,C=0===i)}function rs(){return null==C&&rr(),C}var rn=!1,rl=0;function ra(e){let t=rn,i="keydown"===e.type;i&&(e.ctrlKey||e.metaKey||e.altKey)||t!==i&&(rn=i)}function rd(e,t,i=!1){let o=ec;t&&(o+=", "+t),i&&(o+=', [tabindex="-1"]');let r=Array.prototype.slice.apply(e.querySelectorAll("[tabindex], input, select, button, textarea, [href]")).filter(e=>eE(e)),s=Array.prototype.slice.apply(e.querySelectorAll(o));return s.length?r.filter(e=>-1===s.indexOf(e)):r}function rh(e,t=!1,i=!1,o=!1){let r=rd(e,o?".ag-tab-guard":null,i),s=t?x(r):r[0];return!!s&&(s.focus({preventScroll:!0}),!0)}function ru(e,t,i,o){let r=rd(t,i?':not([tabindex="-1"])':null),s=$(e),n=(i?r.findIndex(e=>e.contains(s)):r.indexOf(s))+(o?-1:1);return n<0||n>=r.length?null:r[n]}function rc(e,t=5){let i=0;for(;e&&null===ri(e)&&++i<=t;)e=e.parentElement;return null===ri(e)?null:e}var rg=class extends e1{constructor(e,t={isStopPropagation:()=>!1,stopPropagation:()=>{}},i={}){super(),this.eFocusable=e,this.stopPropagationCallbacks=t,this.callbacks=i,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:e=>{if(e.defaultPrevented)return;let t=ru(this.beans,this.eFocusable,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())},...i}}postConstruct(){let{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:i}}=this;e.classList.add("ag-focus-managed"),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),i&&this.addManagedElementListeners(e,{focusout:i})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:e=>{if(e.defaultPrevented||this.stopPropagationCallbacks.isStopPropagation(e))return;let{callbacks:t}=this;t.shouldStopEventPropagation(e)?this.stopPropagationCallbacks.stopPropagation(e):"Tab"===e.key?t.onTabKeyDown(e):t.handleKeyDown&&t.handleKeyDown(e)}})}},rp="__ag_Grid_Stop_Propagation";function rf(e){e[rp]=!0}function rm(e){return!0===e[rp]}var rC={isStopPropagation:rm,stopPropagation:rf},rw=class extends rg{constructor(e,t){super(e,rC,t)}},rv=class extends ow{constructor(e,t){super(),this.filterNameKey=e,this.cssIdentifier=t,this.applyActive=!1,this.debouncePending=!1,this.defaultDebounceMs=0}postConstruct(){let e={tag:"div",cls:`ag-filter-body-wrapper ag-${this.cssIdentifier}-body-wrapper`,children:[this.createBodyTemplate()]};this.setTemplate(e,this.getAgComponents()),this.createManagedBean(new rw(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=this.createBean(new o8(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}))}handleKeyDown(e){}init(e){this.setParams(e),this.setModelIntoUi(e.state.model,!0).then(()=>this.updateUiVisibility())}areStatesEqual(e,t){return e===t}refresh(e){let t=this.params;this.params=e;let{source:i,state:o,additionalEventAttributes:r}=e;"colDef"===i&&this.updateParams(e,t);let s=this.state;this.state=o;let n=r?.fromAction;return(n&&"apply"!==n||o.model!==s.model||!this.areStatesEqual(o.state,s.state))&&this.setModelIntoUi(o.model),!0}setParams(e){this.params=e,this.state=e.state,this.commonUpdateParams(e)}updateParams(e,t){this.commonUpdateParams(e,t)}commonUpdateParams(e,t){this.applyActive=oZ(e),this.setupApplyDebounced()}doesFilterPass(e){tM(283);let{getHandler:t,model:i,column:o}=this.params;return t().doesFilterPass({...e,model:i,handlerParams:this.beans.colFilter.getHandlerParams(o)})}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return tM(284),null!=this.params.model}setupApplyDebounced(){let e=oQ(this.params,this.defaultDebounceMs),t=e7(this,this.checkApplyDebounce.bind(this),e);this.applyDebounced=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.doApplyModel())}getModel(){return tM(285),this.params.model}setModel(e){tM(286);let{beans:t,params:i}=this;return t.colFilter.setModelForColumnLegacy(i.column,e)}applyModel(e="api"){return this.doApplyModel()}canApply(e){return!0}doApplyModel(e){let{params:t,state:{valid:i=!0,model:o}}=this;if(!i)return!1;let r=!this.areModelsEqual(t.model,o);return r&&t.onAction("apply",e),r}onNewRowsLoaded(){}onUiChanged(e,t=!1){this.updateUiVisibility();let i=this.getModelFromUi(),o={model:i,state:this.getState(),valid:this.canApply(i)};this.state=o;let{params:r,gos:s,eventSvc:n,applyActive:l}=this;r.onStateChange(o),r.onUiChange(this.getUiChangeEventParams()),s.get("enableFilterHandlers")||n.dispatchEvent({type:"filterModified",column:r.column,filterInstance:this}),o.valid&&(e??(e=l?void 0:"debounce"),"immediately"===e?this.doApplyModel({afterFloatingFilter:t,afterDataChange:!1}):"debounce"===e&&this.applyDebounced())}getState(){}getUiChangeEventParams(){}afterGuiAttached(e){this.lastContainerType=e?.container,this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){let{positionableFeature:t,gos:i}=this;if(!t)return;let o="floatingFilter"===e||"columnFilter"===e;o?(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(o)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}destroy(){this.positionableFeature=this.destroyBean(this.positionableFeature),super.destroy()}translate(e,t){return oY(this,e,t)}getPositionableElement(){return this.getGui()}areModelsEqual(e,t){return e===t||null==e&&null==t||null!=e&&null!=t&&this.areNonNullModelsEqual(e,t)}};function rb(e,t){let i=e.column===t.column,o=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return i&&o&&r}function ry(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 rS(e,t){let i=e.spannedRowRenderer?.getCellByPosition(t);if(i)return i;let o=e.rowRenderer.getRowByPosition(t);return o?o.getCellCtrl(t.column):null}function rR(e,t,i=!1){let{rowIndex:o,rowPinned:r}=t,{pageBounds:s,pinnedRowModel:n,rowModel:l}=e;return 0===o?"top"===r?null:"bottom"===r&&l.isRowsToRender()?{rowIndex:s.getLastRow(),rowPinned:null}:n?.isRowsToRender("top")?{rowIndex:n.getPinnedTopRowCount()-1,rowPinned:"top"}:null:i?rP(e,r?void 0:l.getRow(o),!0)??{rowIndex:o-1,rowPinned:r}:{rowIndex:o-1,rowPinned:r}}function rF(e,t,i=!1){let{rowIndex:o,rowPinned:r}=t,{pageBounds:s,pinnedRowModel:n,rowModel:l}=e;return function(e,t){let{rowPinned:i,rowIndex:o}=t,{pinnedRowModel:r,pageBounds:s}=e;return"top"===i?(r?.getPinnedTopRowCount()??0)-1<=o:"bottom"===i?(r?.getPinnedBottomRowCount()??0)-1<=o:s.getLastRow()<=o}(e,t)?"bottom"===r?null:"top"===r&&l.isRowsToRender()?{rowIndex:s.getFirstRow(),rowPinned:null}:n?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null:i?rP(e,r?void 0:l.getRow(o))??{rowIndex:o+1,rowPinned:r}:{rowIndex:o+1,rowPinned:r}}function rP(e,t,i=!1){let o,{gos:r,rowRenderer:s}=e;if(!t?.sticky||!tK(r))return;let n=s.getStickyTopRowCtrls(),l=s.getStickyBottomRowCtrls(),a=!l.some(e=>e.rowNode.rowIndex===t.rowIndex),d=a?n:l,h=(i?-1:1)*(a?-1:1);for(let e=0;e<d.length;e++)if(d[e].rowNode.rowIndex===t.rowIndex){o=d[e+h];break}return o?{rowIndex:o.rowNode.rowIndex,rowPinned:null}:void 0}function rx(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.exclusive}function rD(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.exclusive}function rE(e,t,i=!1){let o=e.ctrlsSvc.get("gridCtrl");return!!(!i&&o.focusNextInnerContainer(t))||(!i&&(t||o.isDetailGrid())||o.forceFocusOutOfContainer(t),!1)}function rM(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function rT(e){let t=[];for(let i of e.ctrlsSvc.getHeaderRowContainerCtrls()){if(!i)continue;let o=i.getGroupRowCount()||0;for(let r=0;r<o;r++){let o=i.getGroupRowCtrlAtIndex(r),s=t[r];if(o){let i=function(e,t){var i;let o=e.colModel.isPivotMode()?(i=e).gos.get("pivotGroupHeaderHeight")??rL(i):rL(e);for(let e of t.getHeaderCellCtrls()){let{column:t}=e,i=t.getAutoHeaderHeight();null!=i&&i>o&&t.isAutoHeaderHeight()&&(o=i)}return o}(e,o);(null==s||i>s)&&(t[r]=i)}}}return t}function rk(e){var t;let i=e.colModel.isPivotMode()?(t=e).gos.get("pivotHeaderHeight")??rA(t):rA(e);return e.colModel.forAllCols(e=>{let t=e.getAutoHeaderHeight();null!=t&&t>i&&e.isAutoHeaderHeight()&&(i=t)}),i}function rA(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function rI(e){return e.gos.get("floatingFiltersHeight")??rA(e)}function rL(e){return e.gos.get("groupHeaderHeight")??rA(e)}var rB=class extends e2{setComp(e,t,i){this.comp=e,this.eGui=t;let{beans:o}=this,{headerNavigation:r,touchSvc:s,ctrlsSvc:n}=o;r&&this.createManagedBean(new rw(i,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,o),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,o)}),this.onPivotModeChanged(o),this.setupHeaderHeight();let l=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:l}),s?.mockHeaderContextMenu(this,l),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){let e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({headerRowsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>eO(this.beans,()=>e()),stylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){let{beans:e}=this,t=0,i=rT(e).reduce((e,t)=>e+t,0),o=rk(e);e.filterManager?.hasFloatingFilters()&&(t+=rI(e)),t+=i;let r=(t+=o)+e.environment.getHeaderRowBorderWidth();if(this.headerHeightWithBorder!==r){this.headerHeightWithBorder=r;let e=`${r}px`;this.comp.setHeightAndMinHeight(e)}this.headerHeight!==t&&(this.headerHeight=t,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 t=e.visibleCols.allCols.some(e=>e.isSpanHeaderHeight());this.comp.toggleCss("ag-header-allow-overflow",t)}onTabKeyDown(e){let t=this.gos.get("enableRtl"),i=e.shiftKey,{beans:o}=this,{headerNavigation:r,focusSvc:s}=o;(r.navigateHorizontally(i!==t?"LEFT":"RIGHT",!0,e)||!i&&s.focusOverlay(!1)||rE(o,i,!0))&&e.preventDefault()}handleKeyDown(e){let t=null,{headerNavigation:i}=this.beans;switch(e.key){case i6:t="LEFT";case i7:A(t)||(t="RIGHT"),i.navigateHorizontally(t,!1,e)&&e.preventDefault();break;case i8:t="UP";case i9:A(t)||(t="DOWN"),i.navigateVertically(t,e)&&e.preventDefault();break;default:return}}onFocusOut(e){let{relatedTarget:t}=e,{eGui:i,beans:o}=this;!(!t&&i.contains($(o)))&&(i.contains(t)||(o.focusSvc.focusedHeader=null))}onHeaderContextMenu(e,t,i){let{menuSvc:o,ctrlsSvc:r}=this.beans;if(!e&&!i||!o?.isHeaderContextMenuEnabled())return;let{target:s}=e??t;(s===this.eGui||s===r.getHeaderRowContainerCtrl()?.eViewport)&&o.showHeaderContextMenu(void 0,e,i)}},rV=class extends e2{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,t=tV(this.gos,"print"),{visibleCols:i,scrollVisibleSvc:o}=this.beans,r=i.bodyWidth,s=i.getColsLeftWidth(),n=i.getDisplayedColumnsRightWidth();t?e=r+s+n:(e=r,this.addSpacer&&0===(this.gos.get("enableRtl")?s:n)&&o.verticalScrollShowing&&(e+=o.getScrollbarWidth())),this.callback(e)}},rG=class extends e2{};function rH(e,t,i){return i&&e.addDestroyFunc(()=>t.destroyBean(i)),i??e}var rO=class extends e2{constructor(e,t,i,o){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=o,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?x(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"),o=A(this.columnOrGroup.getOldLeft());t?.isActive()&&o&&!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:o}=this.beans;if(!tV(i,"print")||"left"===e.getPinned())return t;let r=o.getColsLeftWidth();return"right"===e.getPinned()?r+o.bodyWidth+t:r+t}setLeft(e){if(A(e)&&(this.eCell.style.left=`${e}px`),i1(this.columnOrGroup)){let e=this.columnOrGroup.getLeafColumns();e.length&&e.length>1&&Q(this.ariaEl,"colspan",e.length)}}};function rN(e,t,i,o){return I(e)?[]:function(e,t,i,o,r){let s;if(I(e))return[];if("function"==typeof e)s=e(is(i,{colDef:t,column:o,columnGroup:r}));else s=e;return"string"==typeof s?[s]:Array.isArray(s)?[...s]:[]}(e.headerClass,e,t,i,o)}function rz(e,t,i){e.toggleCss("ag-column-first",i.isColAtEdge(t,"first")),e.toggleCss("ag-column-last",i.isColAtEdge(t,"last"))}var rW=0,rU="headerCtrl",r$=class extends e2{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.reAttemptToFocus=!1,this.instanceId=e.getUniqueId()+"-"+rW++}postConstruct(){let e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}setComp(e,t,i,o,r){t.setAttribute("col-id",this.column.colIdSanitised),this.wireComp(e,t,i,o,r),this.reAttemptToFocus&&(this.reAttemptToFocus=!1,this.focus(this.lastFocusEvent??void 0))}shouldStopEventPropagation(e){let{headerRowIndex:t,column:i}=this.beans.focusSvc.focusedHeader,o=i.getDefinition(),r=o?.suppressHeaderKeyboardEvent;return!!A(r)&&!!r(is(this.gos,{colDef:o,column:i,headerRowIndex:t,event:e}))}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,t=this.column.getDefinition();if(!t)return;let{headerStyle:i}=t;(e="function"==typeof i?i(this.getHeaderClassParams()):i)&&this.comp.setUserStyles(e)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){let t,{wrapperElement:i,checkMeasuringCallback:o,compBean:r}=e,{beans:s}=this,n=e=>{if(!this.isAlive()||!r.isAlive())return;let{paddingTop:t,paddingBottom:o,borderBottomWidth:l,borderTopWidth:a}=eC(this.eGui),d=i.offsetHeight+(t+o+l+a);if(e<5){let t=K(s),o=!t?.contains(i),r=0==d;if(o||r)return void e8(()=>n(e+1),"raf",s)}this.setColHeaderHeight(this.column,d)},l=!1,a=()=>{let e=this.column.isAutoHeaderHeight();e&&!l&&d(),!e&&l&&h()},d=()=>{l=!0,this.comp.toggleCss("ag-header-cell-auto-height",!0),n(0),t=eH(this.beans,i,()=>n(0))},h=()=>{l=!1,t&&t(),this.comp.toggleCss("ag-header-cell-auto-height",!1),t=void 0};a(),r.addDestroyFunc(()=>h()),r.addManagedListeners(this.column,{widthChanged:()=>l&&n(0)}),r.addManagedEventListeners({sortChanged:()=>{l&&window.setTimeout(()=>n(0))}}),o&&o(a)}onDisplayedColumnsChanged(){let{comp:e,column:t,beans:i,eGui:o}=this;e&&t&&o&&(rz(e,t,i.visibleCols),el(o,i.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){let e=rx(this.beans);this.eGui&&eG(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){let t=$(this.beans),i=e.key===i6||e.key===i7;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey&&!e.ctrlKey&&!e.metaKey)return;if((this.isResizing||i)&&(e.preventDefault(),e.stopImmediatePropagation()),(e.ctrlKey||e.metaKey)&&oh(e)===os)return this.beans.clipboardSvc?.copyToClipboard();if(!i)return;let o=e.key===i6!==this.gos.get("enableRtl");if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;let t=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(t,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(o?"left":"right")}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,o=e.key===i6!==t.get("enableRtl"),r=i.getPinned(),s=t.get("enableRtl");return r&&s!==("right"===r)&&(o=!o),(o?-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 oi:case ot:case oo:case"End":t&&e.preventDefault()}}addDomData(e){let{eGui:t,gos:i}=this;tU(i,t,rU,this),e.addDestroyFunc(()=>tU(i,t,rU,null))}focus(e){if(!this.isAlive())return!1;let{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus()):this.reAttemptToFocus=!0,!0}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 o=e??t,{menuSvc:r,gos:s}=this.beans;s.get("preventDefaultOnContextMenu")&&o.preventDefault(),r?.isHeaderContextMenuEnabled(i)&&r.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}},rK=class extends r${constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}wireComp(e,t,i,o,r){this.comp=e;let{rowCtrl:s,column:n,beans:l}=this,{colResize:a,context:d,colHover:h,rangeSvc:u}=l,c=rH(this,d,r);this.setGui(t,c),this.updateState(),this.setupWidth(c),this.setupMovingCss(c),this.setupMenuClass(c),this.setupSortableClass(c),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:o,checkMeasuringCallback:e=>this.setRefreshFunction("measuring",e),compBean:c}),this.addColumnHoverListener(c),this.setupFilterClass(c),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(c),this.setupSelectAll(c),this.setupUserComp(),this.refreshAria(),a?this.resizeFeature=c.createManagedBean(a.createResizeFeature(s.pinned,n,i,e,this)):ep(i,!1),h?.createHoverFeature(c,[n],t),u?.createRangeHighlightFeature(c,n,e),c.createManagedBean(new rO(n,t,l)),c.createManagedBean(new rw(t,{shouldStopEventPropagation:e=>this.shouldStopEventPropagation(e),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(c),c.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),c.addManagedListeners(n,{colDefChanged:()=>this.refresh(),formulaRefChanged:()=>this.refresh(),headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});let g=()=>this.checkDisplayName();c.addManagedEventListeners({columnValueChanged:g,columnRowGroupChanged:g,columnPivotChanged:g,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),c.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 is(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(){var e;let t=this.createParams(),i=this.column.getColDef();return e=this.beans.userCompFactory,e.getCompDetails(i,oD,"agColumnHeader",t)}createParams(){let{menuSvc:e,sortSvc:t,colFilter:i,gos:o}=this.beans;return is(o,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!i&&(!this.openFilterEnabled||ii(this.gos)),showColumnMenu:(t,i)=>{e?.showColumnMenu({column:this.column,buttonElement:t,positionBy:"button",onClosedCallback:i})},showColumnMenuAfterMouseClick:(t,i)=>{e?.showColumnMenu({column:this.column,mouseEvent:t,positionBy:"mouse",onClosedCallback:i})},showFilter:t=>{e?.showFilterMenu({column:this.column,buttonElement:t,containerType:"columnFilter",positionBy:"button"})},progressSort:e=>{t?.progressSort(this.column,!!e,"uiColumnSorted")},setSort:(e,i)=>{t?.setSortForColumn(this.column,ip(e),!!i,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(e,t)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(e,t)}})}setupSelectAll(e){let{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createOptionalManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature?.setComp(this),e.addManagedPropertyListener("rowSelection",()=>{let i=t.createSelectAllFeature(this.column);i&&!this.selectAllFeature?(this.selectAllFeature=e.createManagedBean(i),this.selectAllFeature?.setComp(this),this.comp.refreshSelectAllGui()):this.selectAllFeature&&!i&&(this.comp.removeSelectAllGui(),this.selectAllFeature=this.destroyBean(this.selectAllFeature))}))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e)," "===e.key?this.selectAllFeature?.onSpaceKeyDown(e):e.key===i3?this.onEnterKeyDown(e):e.key===i9&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){let{column:t,gos:i,sortable:o,beans:r}=this,s=!1;(e.ctrlKey||e.metaKey)&&(s=this.showMenuOnKeyPress(e,!0)),!s&&(!e.altKey&&t5(i)?r.rangeSvc?.handleColumnSelection(t,e):o&&r.sortSvc?.progressSort(t,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){let i=this.comp.getUserCompInstance();return!!rj(i)&&!!i.onMenuKeyboardShortcut(t)&&(e.preventDefault(),!0)}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),rn&&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 e=rN(this.column.getColDef(),this.gos,this.column,null),t=this.userHeaderClasses;for(let i of(this.userHeaderClasses=new Set(e),e))t.has(i)?t.delete(i):this.comp.toggleCss(i,!0);for(let e of t)this.comp.toggleCss(e,!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(){for(let e of(this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions)))e()}refreshHeaderComp(){let e=this.lookupUserCompDetails();e&&(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e))}attemptHeaderCompRefresh(e){let t=this.comp.getUserCompInstance();return!!t&&!!t.refresh&&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 e=this.column.getActualWidth();this.comp.setWidth(`${e}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 e=this.column.isFilterActive();this.comp.toggleCss("ag-header-cell-filtered",e),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){let e=()=>{let e=!!this.column.getColDef().wrapHeaderText;this.comp.toggleCss("ag-header-cell-wrap-text",e)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){let e=this.column.getHighlighted();this.comp.toggleCss("ag-header-highlight-before",0===e),this.comp.toggleCss("ag-header-highlight-after",1===e)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){let{eGui:e,column:t,comp:i,beans:o}=this,r=rT(this.beans),s=0===r.reduce((e,t)=>e+t,0);if(i.toggleCss("ag-header-parent-hidden",s),!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:n,isSpanningTotal:l}=this.column.getColumnGroupPaddingInfo();i.toggleCss("ag-header-span-height",n>0);let a=rk(o);if(0===n){i.toggleCss("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${a}px`);return}i.toggleCss("ag-header-span-total",l);let d=(this.column.getFirstRealParent()?.getLevel()??-1)+1,h=r.length-d,u=0;for(let e=0;e<h;e++)u+=r[r.length-1-e];e.style.setProperty("top",`${-u}px`),e.style.setProperty("height",`${a+u}px`)}refreshAriaSort(){let e=null,{beans:t,column:i,comp:o,sortable:r}=this;if(r){var s;let r,n=this.getLocaleTextFunc(),l=t.sortSvc?.getDisplaySortForColumn(i)??null;o.setAriaSort((s=l,"asc"===(r=s?.direction)?"ascending":"desc"===r?"descending":"mixed"===r?"other":"none")),e=n("ariaSortableColumn","Press ENTER to sort")}else o.setAriaSort();this.setAriaDescriptionProperty("sort",e)}refreshAriaMenu(){let e=null;this.menuEnabled&&(e=this.getLocaleTextFunc()("ariaMenuColumn","Press ALT DOWN to open column menu")),this.setAriaDescriptionProperty("menu",e)}refreshAriaFilterButton(){let e=null,{openFilterEnabled:t,gos:i}=this;t&&!ii(i)&&(e=this.getLocaleTextFunc()("ariaFilterColumn","Press CTRL ENTER to open filter")),this.setAriaDescriptionProperty("filterButton",e)}refreshAriaFiltered(){let e=null;this.column.isFilterActive()&&(e=this.getLocaleTextFunc()("ariaColumnFiltered","Column Filtered")),this.setAriaDescriptionProperty("filter",e)}refreshAriaCellSelection(){let e=null,{gos:t,column:i,beans:o}=this;if(t5(t)){let t=this.getLocaleTextFunc(),r=o.rangeSvc?.isColumnInAnyRange(i);e=t("ariaColumnCellSelection",`Press CTRL+SPACE to ${r?"de":""}select all visible cells in this column`)}this.setAriaDescriptionProperty("cellSelection",e)}setAriaDescriptionProperty(e,t){let i=this.ariaDescriptionProperties;null!=t?i.set(e,t):i.delete(e)}announceAriaDescription(){let{beans:e,eGui:t,ariaDescriptionProperties:i}=this;if(!t.contains($(e)))return;let o=Array.from(i.keys()).sort((e,t)=>"filter"===e?-1:t.charCodeAt(0)-e.charCodeAt(0)).map(e=>i.get(e)).join(". ");e.ariaAnnounce?.announceValue(o,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered(),this.refreshAriaCellSelection()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){let t=e=>this.handleMouseOverChange("mouseenter"===e.type),i=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},o=e=>this.handleContextMenuMouseEvent(e,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:i,contextmenu:o})}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 rj(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function rj(e){return"function"==typeof e?.getAnchorElementForMenu&&"function"==typeof e.onMenuKeyboardShortcut}var r_=0,rq=class extends e2{constructor(e,t,i){super(),this.rowIndex=e,this.pinned=t,this.type=i,this.instanceId=r_++,this.comp=null,this.allCtrls=[];let o="ag-header-row-column";"group"===i?o="ag-header-row-group":"filter"===i&&(o="ag-header-row-filter"),this.headerRowClass=`ag-header-row ${o}`}setRowIndex(e){this.rowIndex=e,this.comp?.setRowIndex(this.getAriaRowIndex()),this.onRowHeightChanged()}postConstruct(){this.isPrintLayout=tV(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return!!this.comp&&this.allCtrls.every(e=>null!=e.eGui)}setComp(e,t,i=!0){this.comp=e,t=rH(this,this.beans.context,t),i&&(this.setRowIndex(this.rowIndex),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:e=>this.onVirtualColumnsChanged(e.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,stylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",i),e.addManagedPropertyListener("ensureDomOrder",e=>this.isEnsureDomOrder=e.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=tV(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){if(!this.comp)return;let e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){let{visibleCols:e}=this.beans;return this.isPrintLayout?null!=this.pinned?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){if(!this.comp)return;let{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){let e=0,t=rT(this.beans);for(let i=0;i<t.length;i++){if(i===this.rowIndex&&"group"===this.type)return{topOffset:e,rowHeight:t[i]};e+=t[i]}let i=rk(this.beans);return"column"===this.type?{topOffset:e,rowHeight:i}:{topOffset:e+=i,rowHeight:rI(this.beans)}}onVirtualColumnsChanged(e=!1){if(!this.comp)return;let t=this.getUpdatedHeaderCtrls(),i=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,i,e)}getUpdatedHeaderCtrls(){let e=this.ctrlsById;for(let t of(this.ctrlsById=new Map,this.getColumnsInViewport()))this.recycleAndCreateHeaderCtrls(t,this.ctrlsById,e);let t=e=>{let{focusSvc:t,visibleCols:i}=this.beans;return!!t.isHeaderWrapperFocused(e)&&i.isVisible(e.column)};if(e)for(let[i,o]of e)t(o)?this.ctrlsById.set(i,o):this.destroyBean(o);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,i){let o;if(e.isEmptyGroup())return;let r=e.getUniqueId();if(i&&(o=i.get(r),i.delete(r)),o&&o.column!=e&&(this.destroyBean(o),o=void 0),null==o)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 rK(e,this))}t.set(r,o)}getColumnsInViewport(){if(!this.isPrintLayout)return this.getComponentsToRender();if(this.pinned)return[];let e=[];for(let t of["left",null,"right"])e.push(...this.getComponentsToRender(t));return e}getComponentsToRender(e=this.pinned){return"group"===this.type?this.beans.colViewport.getHeadersToRender(e,this.rowIndex):this.beans.colViewport.getColumnHeadersToRender(e)}focusHeader(e,t){let i=this.allCtrls.find(t=>t.column==e);return!!i&&i.focus(t)}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,this.comp=null,super.destroy()}},rY=class extends e2{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:o,colModel:r,colMoves:s}=this.beans;this.setupCenterWidth(),i?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(s,this.eViewport);let n=this.refresh.bind(this,!0);this.addManagedEventListeners({displayedColumnsChanged:n,advancedFilterEnabledChanged:n});let l=`${"string"==typeof this.pinned?this.pinned:"center"}Header`;o.register(l,this),r.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,filterManager:i,visibleCols:o}=this.beans,r=0,s=t.getFocusHeaderToUseAfterRefresh(),n=()=>{let t=o.headerGroupRowCount;r=t,e||(this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls));let i=this.groupsRowCtrls.length;if(i!==t){if(i>t){for(let e=t;e<i;e++)this.destroyBean(this.groupsRowCtrls[e]);this.groupsRowCtrls.length=t;return}for(let e=i;e<t;e++){let t=this.createBean(new rq(e,this.pinned,"group"));this.groupsRowCtrls.push(t)}}},l=()=>{let t=r++;if(this.hidden){this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl);return}null!=this.columnsRowCtrl&&e?this.columnsRowCtrl.rowIndex!==t&&this.columnsRowCtrl.setRowIndex(t):(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.columnsRowCtrl=this.createBean(new rq(t,this.pinned,"column")))},a=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;let t=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter)return void t();e||t();let o=r++;this.filtersRowCtrl?this.filtersRowCtrl.rowIndex!==o&&this.filtersRowCtrl.setRowIndex(o):this.filtersRowCtrl=this.createBean(new rq(o,this.pinned,"filter"))},d=this.getAllCtrls();n(),l(),a();let h=this.getAllCtrls();this.comp.setCtrls(h),this.restoreFocusOnHeader(t,s),d.length!==h.length&&this.beans.eventSvc.dispatchEvent({type:"headerRowsChanged"})}getHeaderCtrlForColumn(e){let t=t=>t?.getHeaderCellCtrls().find(t=>t.column===e);if(ih(e))return t(this.columnsRowCtrl);if(0!==this.groupsRowCtrls.length)for(let e=0;e<this.groupsRowCtrls.length;e++){let i=t(this.groupsRowCtrls[e]);if(i)return i}}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)}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+ +!!this.columnsRowCtrl+ +!!this.filtersRowCtrl}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,scroll:!1})}setupCenterWidth(){null==this.pinned&&this.createManagedBean(new rV(e=>this.comp.setCenterWidth(`${e}px`),!0))}},rQ=class extends om{isPopup(){return!0}setParentComponent(e){e.addCss("ag-has-popup"),super.setParentComponent(e)}destroy(){let e=this.parentComponent;e?.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},rZ=class extends rQ{constructor(){super(...arguments),this.errorMessages=null}init(e){this.params=e,this.initialiseEditor(e),this.eEditor.onValueChange(()=>e.validate())}destroy(){this.eEditor.destroy(),this.errorMessages=null,super.destroy()}},rJ=class extends ow{constructor(){super()}},rX={tag:"div",cls:"ag-overlay-exporting-center",children:[{tag:"span",ref:"eExportingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eExportingText",cls:"ag-exporting-text"}]},r0=class extends rJ{constructor(){super(...arguments),this.eExportingIcon=null,this.eExportingText=null}init(e){let{beans:t}=this;this.setTemplate(rX);let i=og("overlayExporting",t,null);i&&this.eExportingIcon.appendChild(i);let o=e.exporting?.overlayText??this.getLocaleTextFunc()("exportingOoo","Exporting...");this.eExportingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}},r1={tag:"div",cls:"ag-overlay-loading-center",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},r2=class extends rJ{constructor(){super(...arguments),this.eLoadingIcon=null,this.eLoadingText=null}init(e){let{beans:t,gos:i}=this,o=k(i.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(o??r1),!o){let i=og("overlayLoading",t,null);i&&this.eLoadingIcon.appendChild(i);let o=e.loading?.overlayText??this.getLocaleTextFunc()("loadingOoo","Loading...");this.eLoadingText.textContent=o,t.ariaAnnounce.announceValue(o,"overlay")}}},r5={tag:"span",cls:"ag-overlay-no-matching-rows-center"},r3=class extends rJ{init(e){let{beans:t}=this;this.setTemplate(r5);let i=e.noMatchingRows?.overlayText??this.getLocaleTextFunc()("noMatchingRows","No Matching Rows");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}},r4={tag:"span",cls:"ag-overlay-no-rows-center"},r6=class extends rJ{init(e){let{beans:t,gos:i}=this,o=k(i.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(o??r4),!o){let i=e.noRows?.overlayText??this.getLocaleTextFunc()("noRowsToShow","No Rows To Show");this.getGui().textContent=i,t.ariaAnnounce.announceValue(i,"overlay")}}},r8=class extends om{constructor(e,t,i){super(t,i),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(".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)}:where(.ag-label-align-right){.ag-label,.ag-wrapper{flex:none}}.ag-label-align-top{align-items:flex-start;flex-direction:column}:where(.ag-label-align-top){.ag-label,.ag-wrapper{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)}")}postConstruct(){this.addCss("ag-labeled"),this.eLabel.classList.add("ag-label");let{labelSeparator:e,label:t,labelWidth:i,labelAlignment:o,disabled:r,labelEllipsis:s}=this.config;null!=r&&this.setDisabled(r),null!=e&&this.setLabelSeparator(e),null!=t&&this.setLabel(t),null!=i&&this.setLabelWidth(i),null!=s&&this.setLabelEllipsis(s),this.setLabelAlignment(o||this.labelAlignment),this.refreshLabel()}refreshLabel(){let{label:e,eLabel:t}=this;eP(t),"string"==typeof e?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),""===e?(ep(t,!1),J(t,"presentation")):(ep(t,!0),J(t,null))}setLabelSeparator(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&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.label=e,this.refreshLabel()),this}setLabelAlignment(e){let t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return null==this.label||eA(this.eLabel,e),this}setDisabled(e){e=!!e;let t=this.getGui();return ef(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},r7=class extends r8{constructor(e,t,i,o){super(e,t,i),this.className=o}postConstruct(){super.postConstruct();let{width:e,value:t,onValueChange:i,ariaLabel:o}=this.config;null!=e&&this.setWidth(e),null!=t&&this.setValue(t),null!=i&&this.onValueChange(i),null!=o&&this.setAriaLabel(o),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();null==i||""==i||null!==e.getAttribute("aria-label")?ee(e,""):ee(e,t??"")}setAriaLabel(e){return X(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 eI(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"})),this}},r9=class extends r7{constructor(e,t,i="text",o="input"){super(e,e?.template??function(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"}]}]}}(o),[],t),this.inputType=i,this.displayFieldTag=o,this.eLabel=null,this.eWrapper=null,this.eInput=null}postConstruct(){super.postConstruct(),this.setInputType(this.inputType);let{eLabel:e,eWrapper:t,eInput:i,className:o}=this;e.classList.add(`${o}-label`),t.classList.add(`${o}-input-wrapper`),i.classList.add(`${o}-input`),this.addCss("ag-input-field"),i.id=i.id||`ag-${this.getCompId()}-input`;let{inputName:r,inputWidth:s,inputPlaceholder:n,autoComplete:l,tabIndex:a}=this.config;null!=r&&this.setInputName(r),null!=s&&this.setInputWidth(s),null!=n&&this.setInputPlaceholder(n),null!=l&&this.setAutoComplete(l),this.addInputListeners(),this.activateTabIndex([i],a)}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(e){"input"===this.displayFieldTag&&(this.inputType=e,eG(this.eInput,"type",e))}getInputElement(){return this.eInput}getWrapperElement(){return this.eWrapper}setInputWidth(e){return eA(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){return this.eInput.maxLength=e,this}setInputPlaceholder(e){return eG(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return X(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return ef(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){return!0===e?eG(this.eInput,"autocomplete",null):eG(this.eInput,"autocomplete","string"==typeof e?e:"off"),this}},se=class extends r9{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,name:i}=this.config;"boolean"==typeof e&&this.setReadOnly(e),"boolean"==typeof t&&this.setPassive(t),null!=i&&this.setName(i)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return void 0===this.selected||!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){return this.getInputElement().name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected="boolean"==typeof e?e:void 0;let i=this.eInput;i.checked=e,i.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,i){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:i});let o=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:o.id,name:o.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",!0===e),t.toggle("ag-indeterminate",null==e)}},st={selector:"AG-CHECKBOX",component:se},si={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},so=class extends ow{constructor(){super(si,[st]),this.eCheckbox=null,this.registerCSS(".ag-checkbox-cell{height:100%}")}init(e){this.refresh(e);let{eCheckbox:t,beans:i}=this,o=t.getInputElement();o.setAttribute("tabindex","-1"),Y(o,"live","polite"),this.addManagedListeners(o,{click:e=>{if(rf(e),t.isDisabled())return;let i=t.getValue();this.onCheckboxChanged(i)},dblclick:e=>{rf(e)}}),this.addManagedElementListeners(e.eGridCell,{keydown:o=>{if(" "===o.key&&!t.isDisabled()){e.eGridCell===$(i)&&t.toggle();let r=t.getValue();this.onCheckboxChanged(r),o.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,i=!0,{value:o,column:r,node:s}=e;if(s.group&&r)if("boolean"==typeof o)t=o;else{let e=r.getColId();e.startsWith(iD)?t=null==o||""===o?void 0:"true"===o:s.aggData&&void 0!==s.aggData[e]||s.sourceRowIndex>=0?t=o??void 0:i=!1}else t=o??void 0;let{eCheckbox:n}=this;if(!i)return void n.setDisplayed(!1);n.setValue(t);let l=e.disabled??!r?.isCellEditable(s);n.setDisabled(l);let a=this.getLocaleTextFunc(),d=eu(a,t),h=l?d:`${a("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;n.setInputAriaLabel(h)}onCheckboxChanged(e){let{params:t}=this,{column:i,node:o,value:r}=t,{editSvc:s}=this.beans;if(!i)return;let n={rowNode:o,column:i};s?.dispatchCellEvent(n,null,"cellEditingStarted",{value:r});let l=o.setDataValue(i,e,"ui");s?.dispatchCellEvent(n,null,"cellEditingStopped",{oldValue:r,newValue:e,valueChanged:l}),l||this.updateCheckbox(t)}};function sr(e){let t=e.rowModel;return"clientSide"===t.getType()?t:void 0}function ss(e){let t=e.rowModel;return"infinite"===t.getType()?t:void 0}var sn="row-group-",sl=0,sa=class{constructor(e){this.id=void 0,this.destroyed=!1,this._groupData=void 0,this.master=!1,this.detail=void 0,this.rowIndex=null,this.field=null,this.rowGroupColumn=null,this.key=null,this.sourceRowIndex=-1,this._leafs=void 0,this.childrenMapped=null,this.treeParent=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=sl++,this.alreadyRendered=!1,this.formulaRowIndex=null,this.hovered=!1,this.__selected=!1,this.beans=e}get groupData(){let e=this._groupData;return void 0!==e?e:this.footer?this.sibling?.groupData:this.beans.groupStage?.loadGroupData(this)??null}set groupData(e){this._groupData=e}get allLeafChildren(){let e=this._leafs;return void 0===e?this.beans.groupStage?.loadLeafs?.(this)??null:e}set allLeafChildren(e){this._leafs=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){let{valueCache:i,eventSvc:o}=this.beans,r=this.data;this.data=e,i?.onDataChanged(),this.updateDataOnDetailNode(),this.resetQuickFilterAggregateText();let s=this.createDataChangedEvent(e,r,t);if(this.__localEventService?.dispatchEvent(s),this.sibling){this.sibling.data=e;let i=this.sibling.createDataChangedEvent(e,r,t);this.sibling.__localEventService?.dispatchEvent(i)}o.dispatchEvent({type:"rowNodeDataChanged",node:this});let n=this.pinnedSibling;n&&(n.data=e,n.__localEventService?.dispatchEvent(n.createDataChangedEvent(e,r,t)),o.dispatchEvent({type:"rowNodeDataChanged",node:n}))}updateDataOnDetailNode(){let e=this.detailNode;e&&(e.data=this.data)}createDataChangedEvent(e,t,i){return{type:"dataChanged",node:this,oldData:t,newData:e,update:i}}getRowIndexString(){return null==this.rowIndex?(tT(13),null):"top"===this.rowPinned?"t-"+this.rowIndex:"bottom"===this.rowPinned?"b-"+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){let{selectionSvc:i}=this.beans,o=i?.createDaemonNode?.(this),r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),i&&(i.updateRowSelectable(this),i.syncInRowNode(this,o));let s=this.createDataChangedEvent(e,r,!1);this.__localEventService?.dispatchEvent(s)}setId(e){let t=tZ(this.beans.gos);if(t)if(this.data){let e=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:e.length>0?e:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(sn)&&tT(14,{groupPrefix:sn})}else this.id=void 0;else this.id=e}setRowTop(e){if(this.oldRowTop=this.rowTop,this.rowTop===e)return;this.rowTop=e,this.dispatchRowEvent("topChanged");let t=null!==e;this.displayed!==t&&(this.displayed=t,this.dispatchRowEvent("displayedChanged"))}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:o,valueSvc:r,gos:s,editSvc:n}=this.beans;if(null==e)return!1;let l=o.getCol(e)??o.getColDefCol(e);if(!l)return!1;if(!this.group){let e=l.getColDef();e.pivotValueColumn&&(l=e.pivotValueColumn)}let a=r.getValueForDisplay({column:l,node:this,from:"data"}).value;if(s.get("readOnlyEdit")){let{beans:{eventSvc:e},data:o,rowIndex:r,rowPinned:s}=this;return e.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:r,rowPinned:s,column:l,colDef:l.colDef,data:o,node:this,oldValue:a,newValue:t,value:t,source:i}),!1}if(n&&!n.committing){let e=n.setDataValue({rowNode:this,column:l},t,i);if(null!=e)return e}let d=r.setValue(this,l,t,i);return this.dispatchCellChangedEvent(l,t,a),d&&this.pinnedSibling?.dispatchCellChangedEvent(l,t,a),d}getDataValue(e){let{colModel:t,valueSvc:i,formula:o}=this.beans;if(null==e)return;let r=t.getCol(e)??t.getColDefCol(e);if(!r)return;let s=i.getValue(r,this,"data");return o&&r.isAllowFormula()&&o.isFormula(s)&&(s=o.resolveValue(r,this)),s}updateHasChildren(){let e=this.group&&!this.footer||!!this.childrenAfterGroup?.length,{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,i){this.__localEventService?.dispatchEvent({type:"cellChanged",node:this,column:e,newValue:t,oldValue:i})}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){if(this.footer)return this.sibling.isSelected();let e=this.rowPinned&&this.pinnedSibling;return e?e.isSelected():this.__selected}depthFirstSearch(e){let t=this.childrenAfterGroup;if(t)for(let i=0,o=t.length;i<o;++i)t[i].depthFirstSearch(e);e(this)}getAggregatedChildren(e){let t=this.beans;return t.aggStage?.getAggregatedChildren(this,t.colModel.getCol(e))??[]}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 G)).addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e);let i=this.__localEventService??(this.__localEventService=new G);this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,i);let o=this.frameworkEventListenerService?.wrap(e,t)??t;i.addEventListener(e,o)}removeEventListener(e,t){let i=this.frameworkEventListenerService?.unwrap(e,t)??t;this.removeLocalListener(e,i)}removeLocalListener(e,t){let i=this.__localEventService;i&&(i.removeEventListener(e,t),i.noRegisteredListenersExist()&&(this.__localEventService=null))}isFullWidthCell(){if(tM(61),this.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this})}getRoute(){if(-1===this.level)return[];if(null==this.key)return;let e=[],t=this;for(;t?.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}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(){let e=this.childStore;return e?e.getFirstNode():this.childrenAfterSort?.[0]??null}_destroy(e){if(this.destroyed)return!1;this.destroyed=!0;let t=this.pinnedSibling;if(t?.rowPinned&&!this.rowPinned&&this.beans.pinnedRowModel?.pinRow(t,null),e?this.clearRowTopAndRowIndex():(this.setRowTop(null),this.setRowIndex(null)),!this.footer){let t=this.detailNode;t&&t._destroy(e);let i=this.sibling;i&&i._destroy(e)}return!0}},sd=new Set(["__autoHeights","__checkAutoHeightsDebounced","__localEventService","__objectId","_groupData","_leafs","childStore","groupValue","oldRowTop","sticky","treeNodeFlags","treeParent"]),sh=(e,t,i)=>{if(!i)return;let o=i.rowIndex;if(null==o)return;o+=t;let r=e.getRowCount();for(;o>=0&&o<r;){let i=e.getRow(o);if(!i||!i.footer&&!i.detail)return i;o+=t}},su=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:o}=this;t.has(e)||(t.add(e),i.add(e),o.push(e),this.sort())}delete(e){this.all.delete(e),this.visible.delete(e),this.queued.delete(e.id),M(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:o}=this;e.clear(),o.clear(),t.clear(),i.length=0}sort(){let{sortSvc:e,rowNodeSorter:t,gos:i}=this.beans,o=e?.getSortOptions()??[],r=this.order,s=function(e){let t=e.findIndex(sg);if(t>-1)return e.splice(t,1)?.[0]}(r);if(r.sort((e,i)=>t?.compareRowNodes(o,e,i)||(e.pinnedSibling?.rowIndex??0)-(i.pinnedSibling?.rowIndex??0)),!s)return;let n=tq(i);"bottom"===n||"pinnedBottom"===n?this.order.push(s):this.order.unshift(s)}hide(e){let{all:t,visible:i}=this,o=i.size;return t.forEach(t=>e(t)?i.delete(t):i.add(t)),this.order=Array.from(i),this.sort(),o!=i.size}queue(e){this.queued.add(e)}unqueue(e){this.queued.delete(e)}forEachQueued(e){this.queued.forEach(e)}};function sc(e,t){let{gos:i,rowModel:o,filterManager:r}=e;return tB(i,o)?!o.getRowNode(t.id):r?.isAnyFilterPresent()?!function e(t){if(-1===t.level)return!0;let i=t.parent;return!!i?.childrenAfterSort?.some(e=>e==t)&&e(i)}(t):!!i.get("pivotMode")&&!t.group}function sg(e){var t;return!!e.pinnedSibling&&!!(t=e.pinnedSibling).footer&&-1===t.level}var sp=class extends e2{constructor(){super(...arguments),this.csrm=null}postConstruct(){let{gos:e,beans:t}=this;this.top=new su(t,"top"),this.bottom=new su(t,"bottom"),this.csrm=sr(t)??null;let i=e=>sc(t,e.pinnedSibling),o=()=>{let i=e.get("isRowPinned");i&&e.get("enableRowPinning")&&t.rowModel.forEachNode(e=>this.pinRow(e,i(e)),!0),this.refreshRowPositions(),this.dispatchRowPinnedEvents()};this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this),modelUpdated:({keepRenderedRows:e})=>{this.tryToEmptyQueues(),this.pinGrandTotalRow();let t=!1;this.forContainers(e=>{t||(t=e.hide(i))});let o=this.refreshRowPositions();(!e||o||t)&&this.dispatchRowPinnedEvents()},columnRowGroupChanged:()=>{this.forContainers(sC),this.refreshRowPositions()},rowNodeDataChanged:({node:t})=>{let i=e.get("isRowPinnable");(i?.(t)??!0)||this.pinRow(t,null)},firstDataRendered:o}),this.addManagedPropertyListener("pivotMode",()=>{this.forContainers(e=>e.hide(i)),this.dispatchRowPinnedEvents()}),this.addManagedPropertyListener("grandTotalRow",({currentValue:e})=>{this._grandTotalPinned="pinnedBottom"===e?"bottom":"pinnedTop"===e?"top":null}),this.addManagedPropertyListener("isRowPinned",o)}destroy(){this.reset(!1),super.destroy()}reset(e=!0){this.forContainers(e=>{let t=[];e.forEach(e=>t.push(e)),t.forEach(e=>this.pinRow(e,null)),e.clear()}),e&&this.dispatchRowPinnedEvents()}pinRow(e,t,i){if(null!=t&&e.destroyed)return;if(e.footer){let i=e.level;if(i>-1)return;if(-1===i){this._grandTotalPinned=t,this.csrm?.reMapRows();return}}let o=e.rowPinned??e.pinnedSibling?.rowPinned;if(null!=o&&null!=t&&t!=o){let o=e.rowPinned?e:e.pinnedSibling,r=e.rowPinned?e.pinnedSibling:e;this.pinRow(o,null,i),this.pinRow(r,t,i);return}let r=i&&function(e,t,i){let{rowSpanSvc:o}=e,r=(i&&o?.isCellSpanning(i,t))??!1;if(i&&r)return o?.getCellSpan(i,t)?.spannedNodes}(this.beans,e,i);if(r)return void r.forEach(e=>this.pinRow(e,t));if(null==t){let i=e.rowPinned?e:e.pinnedSibling,o=this.findPinnedRowNode(i);if(!o)return;o.delete(i);let r=i.pinnedSibling;sm(i),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(r)}else{let i=sf(this.beans,e,t),o=this.getContainer(t);o.add(i),sc(this.beans,e)&&o.hide(e=>sc(this.beans,e.pinnedSibling)),this.refreshRowPositions(t),this.dispatchRowPinnedEvents(e)}}isManual(){return!0}isEmpty(e){return 0===this.getContainer(e).size()}isRowsToRender(e){return!this.isEmpty(e)}ensureRowHeightsValid(){let e=!1,t=0,i=i=>{if(i.rowHeightEstimated){let o=tO(this.beans,i);i.setRowTop(t),i.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(){return sw(this.top)}getPinnedBottomTotalHeight(){return sw(this.bottom)}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=e=>{let t=[];return this.forEachPinnedRow(e,e=>{let i=e.pinnedSibling?.id;null!=i&&t.push(i)}),t};return{top:e("top"),bottom:e("bottom")}}setPinnedState(e){this.forContainers((t,i)=>{for(let o of e[i]){let e=this.beans.rowModel.getRowNode(o);e?this.pinRow(e,i):t.queue(o)}})}getGrandTotalPinned(){return this._grandTotalPinned}setGrandTotalPinned(e){this._grandTotalPinned=e}tryToEmptyQueues(){this.forContainers((e,t)=>{let i=new Set;for(let o of(e.forEachQueued(e=>{let t=this.beans.rowModel.getRowNode(e);t&&i.add(t)}),i))e.unqueue(o.id),this.pinRow(o,t)})}pinGrandTotalRow(){let{csrm:e,beans:t,_grandTotalPinned:i}=this;if(!e)return;let o=e.rootNode?.sibling;if(!o)return;let r=o.pinnedSibling,s=r&&this.findPinnedRowNode(r);if(i){if(s&&s.floating!==i&&(sm(r),s.delete(r)),!s||s.floating!==i){let e=sf(t,o,i);this.getContainer(i).add(e)}}else{if(!s)return;sm(r),s.delete(r)}}onGridStylesChanges(e){e.rowHeightChanged&&this.forContainers(e=>e.forEach(e=>e.setRowHeight(e.rowHeight,!0)))}getContainer(e){return"top"===e?this.top:this.bottom}findPinnedRowNode(e){return this.top.has(e)?this.top:this.bottom.has(e)?this.bottom:void 0}refreshRowPositions(e){let t=e=>{var t;let i,o;return t=this.beans,i=0,o=!1,e.forEach((e,r)=>{if(o||(o=e.rowTop!==i),e.setRowTop(i),e.rowHeightEstimated||null==e.rowHeight){let i=tO(t,e).height;o||(o=e.rowHeight!==i),e.setRowHeight(i)}e.setRowIndex(r),i+=e.rowHeight}),o};if(e)return t(this.getContainer(e));let i=!1;return this.forContainers(e=>{let o=t(e);i||(i=o)}),i}forContainers(e){e(this.top,"top"),e(this.bottom,"bottom")}dispatchRowPinnedEvents(e){this.eventSvc.dispatchEvent({type:"pinnedRowsChanged"}),e?.dispatchRowEvent("rowPinned")}};function sf(e,t,i){if(t.pinnedSibling)return t.pinnedSibling;let o=((e,t)=>{let i=new sa(t);for(let t of Object.keys(e))sd.has(t)||(i[t]=e[t]);return i.oldRowTop=null,i})(t,e);o.setRowTop(null),o.setRowIndex(null),o.rowPinned=i;let r="top"===i?"t-":"b-";return o.id=`${r}${i}-${t.id}`,o.pinnedSibling=t,t.pinnedSibling=o,o}function sm(e){if(!e.pinnedSibling)return;e.rowPinned=null,e._destroy(!1);let t=e.pinnedSibling;e.pinnedSibling=void 0,t&&(t.pinnedSibling=void 0,t.rowPinned=null)}function sC(e){let t=new Set;e.forEach(e=>{e.group&&t.add(e)}),t.forEach(t=>e.delete(t))}function sw(e){let t=e.size();if(0===t)return 0;let i=e.getByIndex(t-1);return void 0===i?0:i.rowTop+i.rowHeight}var sv=class extends e2{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",e=>this.setPinnedRowData(e.currentValue,"top")),this.addManagedPropertyListener("pinnedBottomRowData",e=>this.setPinnedRowData(e.currentValue,"bottom")),this.addManagedEventListeners({stylesChanged:this.onGridStylesChanges.bind(this)})}reset(){}isEmpty(e){return 0===this.getCache(e).order.length}isRowsToRender(e){return!this.isEmpty(e)}isManual(){return!1}pinRow(e,t){}onGridStylesChanges(e){if(e.rowHeightChanged){let e=e=>{e.setRowHeight(e.rowHeight,!0)};sR(this.pinnedBottomRows,e),sR(this.pinnedTopRows,e)}}ensureRowHeightsValid(){let e=!1,t=0,i=i=>{if(i.rowHeightEstimated){let o=tO(this.beans,i);i.setRowTop(t),i.setRowHeight(o.height),t+=o.height,e=!0}};return sR(this.pinnedBottomRows,i),t=0,sR(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(void 0===e){i.order.length=0,i.cache={};return}let o=tZ(this.gos),r="top"===t?"t-":"b-",s=new Set(i.order),n=[],l=new Set,a=0,d=-1;for(let h of e){let e=o?.({data:h,level:0,rowPinned:t})??r+this.nextId++;if(l.has(e)){tM(96,{id:e,data:h});continue}d++,l.add(e),n.push(e);let u=sy(i,e);if(void 0!==u)u.data!==h&&u.updateData(h),a+=this.setRowTopAndRowIndex(u,a,d),s.delete(e);else{let o=new sa(this.beans);o.id=e,o.data=h,o.rowPinned=t,a+=this.setRowTopAndRowIndex(o,a,d),i.cache[e]=o,i.order.push(e)}}for(let e of s)sy(i,e)?.clearRowTopAndRowIndex(),delete i.cache[e];i.order=n}setRowTopAndRowIndex(e,t,i){return e.setRowTop(t),e.setRowHeight(tO(this.beans,e).height),e.setRowIndex(i),e.rowHeight}getPinnedTopTotalHeight(){return sb(this.pinnedTopRows)}getPinnedBottomTotalHeight(){return sb(this.pinnedBottomRows)}getPinnedTopRowCount(){return sF(this.pinnedTopRows)}getPinnedBottomRowCount(){return sF(this.pinnedBottomRows)}getPinnedTopRow(e){return sS(this.pinnedTopRows,e)}getPinnedBottomRow(e){return sS(this.pinnedBottomRows,e)}getPinnedRowById(e,t){return sy(this.getCache(t),e)}forEachPinnedRow(e,t){return sR(this.getCache(e),t)}getCache(e){return"top"===e?this.pinnedTopRows:this.pinnedBottomRows}getPinnedState(){return{top:[],bottom:[]}}setPinnedState(){}getGrandTotalPinned(){}setGrandTotalPinned(){}};function sb(e){let t=sF(e);if(0===t)return 0;let i=sS(e,t-1);return void 0===i?0:i.rowTop+i.rowHeight}function sy(e,t){return e.cache[t]}function sS(e,t){return sy(e,e.order[t])}function sR(e,t){e.order.forEach((i,o)=>{let r=sy(e,i);r&&t(r,o)})}function sF(e){return e.order.length}var sP=class extends e2{constructor(){super(...arguments),this.beanName="pinnedRowModel"}postConstruct(){let{gos:e}=this,t=()=>{let t=e.get("enableRowPinning"),i=tq(e),o=!!t||"pinnedBottom"===i||"pinnedTop"===i,r=o?this.inner instanceof sv:this.inner instanceof sp;this.inner&&r&&this.destroyBean(this.inner),(r||!this.inner)&&(this.inner=this.createManagedBean(o?new sp:new sv))};this.addManagedPropertyListeners(["enableRowPinning","grandTotalRow"],t),t()}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()}},sx=((l=sx||{}).Applied="Applied",l.StoreNotFound="StoreNotFound",l.StoreLoading="StoreLoading",l.StoreWaitingToLoad="StoreWaitingToLoad",l.StoreLoadingFailed="StoreLoadingFailed",l.StoreWrongType="StoreWrongType",l.Cancelled="Cancelled",l.StoreNotStarted="StoreNotStarted",l),sD=class{constructor(e,t=!1){this.eElement=e,this.preventClick=t,this.startListener=null,this.handlers=[],this.eventSvc=void 0,this.touchStart=null,this.lastTapTime=null,this.longPressTimer=0,this.moved=!1}addEventListener(e,t){let i=this.eventSvc;if(!i){if(null===i)return;this.eventSvc=i=new G;let e=this.onTouchStart.bind(this);this.startListener=e,this.eElement.addEventListener("touchstart",e,{passive:!0})}i.addEventListener(e,t)}removeEventListener(e,t){this.eventSvc?.removeEventListener(e,t)}onTouchStart(e){if(this.touchStart||!(e=>{if(b){if(b.has(e))return!1}else b=new WeakSet;return b.add(e),!0})(e))return;let t=e.touches[0];this.touchStart=t;let i=this.handlers;if(!i.length){let e=this.eElement,t=e.ownerDocument,o=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this),s=this.onTouchCancel.bind(this),n={passive:!0},l={passive:!1};eQ(i,[e,"touchmove",o,n],[t,"touchcancel",s,n],[t,"touchend",r,l],[t,"contextmenu",eJ,l])}this.clearLongPress(),this.longPressTimer=window.setTimeout(()=>{this.longPressTimer=0,this.touchStart!==t||this.moved||(this.moved=!0,this.eventSvc?.dispatchEvent({type:"longTap",touchStart:t,touchEvent:e}))},550)}onTouchMove(e){let{moved:t,touchStart:i}=this;if(!t&&i){let t=eq(i,e.touches);t&&!e_(t,i,4)&&(this.clearLongPress(),this.moved=!0)}}onTouchEnd(e){let t=this.touchStart;t&&eq(t,e.changedTouches)&&(this.moved||(this.eventSvc?.dispatchEvent({type:"tap",touchStart:t}),this.checkDoubleTap(t)),this.preventClick&&eJ(e),this.cancel())}onTouchCancel(e){let t=this.touchStart;t&&eq(t,e.changedTouches)&&(this.lastTapTime=null,this.cancel())}checkDoubleTap(e){let t=Date.now(),i=this.lastTapTime;i&&t-i>500&&(this.eventSvc?.dispatchEvent({type:"doubleTap",touchStart:e}),t=null),this.lastTapTime=t}cancel(){this.clearLongPress(),eZ(this.handlers),this.touchStart=null}clearLongPress(){window.clearTimeout(this.longPressTimer),this.longPressTimer=0,this.moved=!1}destroy(){let e=this.startListener;e&&(this.startListener=null,this.eElement.removeEventListener("touchstart",e)),this.cancel(),this.eElement=null,this.eventSvc=null}},sE=((a=sE||{})[a.VALUE=0]="VALUE",a[a.DIMENSION=1]="DIMENSION",a),sM=1,sT=class{constructor(e){if(this.beans={},this.createdBeans=[],this.destroyed=!1,this.instanceId=sM++,!e?.beanClasses)return;this.beanDestroyComparator=e.beanDestroyComparator,this.init(e)}init(e){for(let t of(this.id=e.id,this.beans.context=this,this.destroyCallback=e.destroyCallback,Object.keys(e.providedBeanInstances)))this.beans[t]=e.providedBeanInstances[t];for(let t of e.beanClasses){let e=new t;e.beanName?this.beans[e.beanName]=e:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(e)}for(let t of e.derivedBeans??[]){let{beanName:e,bean:i}=t(this);this.beans[e]=i,this.createdBeans.push(i)}e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){return this.initBeans([e],t),e}initBeans(e,t){let i=this.beans;for(let t of e)t.preWireBeans?.(i),t.wireBeans?.(i);for(let t of e)t.preConstruct?.();for(let i of(t&&e.forEach(t),e))i.postConstruct?.()}getBeans(){return this.beans}getBean(e){return this.beans[e]}getId(){return this.id}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=[],this.destroyCallback?.()}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}};function sk(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var sA=Object.fromEntries(["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","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"].map((e,t)=>[e,t]));function sI(e,t){return((e.beanName?sA[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER)-((t.beanName?sA[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER)}function sL(e,t){return e?.beanName==="gridDestroySvc"?-1:+(t?.beanName==="gridDestroySvc")}var sB={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},sV=class extends e2{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:"autoHeight"===e,normal:"normal"===e,print:"print"===e},i=t.autoHeight?sB.AUTO_HEIGHT:t.print?sB.PRINT:sB.NORMAL;this.view.updateLayoutClasses(i,t)}},sG=class extends ow{constructor(e,t){super(),this.direction=t,this.eViewport=null,this.eContainer=null,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.toggleCss("ag-apple-scrollbar",re()||rt())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(this.invisibleScrollbar=rs(),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(){void 0===this.invisibleScrollbar&&this.initialiseInvisibleScrollbar(),eO(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;!function(e,t,i,o=100){let r=Date.now(),s=null,n=!1,l=()=>{null!=s&&(window.clearInterval(s),s=null)};e.addDestroyFunc(l);let a=()=>{let e=Date.now()-r>o;(t()||e)&&(i(),n=!0,l())};a(),n||(s=window.setInterval(a,10))}(this,()=>eE(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},sH={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"}]},sO=class extends sG{constructor(){super(sH,"horizontal"),this.eLeftSpacer=null,this.eRightSpacer=null,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 rV(e=>this.eContainer.style.width=`${e}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){void 0===this.invisibleScrollbar&&(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,o=this.scrollVisibleSvc.getScrollbarWidth();i&&(t+=o),eI(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=o);let r=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(r+=o),eI(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=o)}setScrollVisible(){let e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,i=this.gos.get("suppressHorizontalScroll"),o=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,r=0===o&&t?16:o,s=i?0:r,n=()=>{this.setScrollVisibleDebounce=0,this.toggleCss("ag-scrollbar-invisible",t),eL(this.getGui(),s),eL(this.eViewport,s),eL(this.eContainer,s),s||this.eContainer.style.setProperty("min-height","1px"),this.setVisible(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(n,100):n()}getScrollPosition(){return eR(this.eViewport,this.enableRtl)}setScrollPosition(e){eE(this.eViewport)||this.attemptSettingScrollPosition(e),eF(this.eViewport,e,this.enableRtl)}},sN=class extends e2{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=null!=t?`${t}px`:"";this.eContainer.style.height=i,this.eViewport&&(this.eViewport.style.height=i)}},sz={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"}]}]},sW=class extends sG{constructor(){super(sz,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new sN(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,o=t&&e.getScrollbarWidth()||0,r=0===o&&i?16:o;this.toggleCss("ag-scrollbar-invisible",i),eI(this.getGui(),r),eI(this.eViewport,r),eI(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){let t=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),o=t.scrollTop;i!=o&&this.setScrollPosition(o,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){t||eE(this.eViewport)||this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},sU=((d=sU||{})[d.Vertical=0]="Vertical",d[d.Horizontal=1]="Horizontal",d),s$="Viewport",sK="fakeVScrollComp",sj=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],s_=class extends e2{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.isScrollActive=!1,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=e7(this,()=>this.lastScrollSource[1]=null,150),this.resetLastVScrollDebounced=e7(this,()=>this.lastScrollSource[0]=null,150)}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),bodyHeightChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){for(let e of(this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,s$)}),sj)){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?e7(this,this.onVScroll.bind(this,s$),100):this.onVScroll.bind(this,s$),o=t?e7(this,this.onVScroll.bind(this,sK),100):this.onVScroll.bind(this,sK);this.addManagedElementListeners(this.eBodyViewport,{scroll:i}),this.registerScrollPartner(e,o)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){null!=this.centerRowsCtrl&&(void 0===e&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(let t of[...sj,s$])this.lastScrollSource[1]!==t&&eF(this.getViewportForSource(t),e,this.enableRtl)}getViewportForSource(e){return e===s$?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return null==this.lastScrollSource[t]?(0===t?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;let{scrollLeft:t}=this.centerRowsCtrl.eViewport;if(this.shouldBlockScrollUpdate(1,t,!0))return;let i=eR(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){let t;if(!this.isControllingScroll(e,0)||(t=e===s$?this.eBodyViewport.scrollTop:this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0)))return;let{animationFrameSvc:i}=this;i?.setScrollTop(t),this.nextScrollTop=t,e===s$?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))}isScrolling(){return this.isScrollActive}fireScrollEvent(e){let t={type:"bodyScroll",direction:1===e?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.isScrollActive=!0,this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.isScrollActive=!1,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},150)}shouldBlockScrollUpdate(e,t,i=!1){return(!i||!!rt())&&(0===e?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))}shouldBlockVerticalScroll(e){let t=ew(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(){let e=this.scrollLeft,t=!1;for(let i of sj)if(this.getViewportForSource(i).scrollLeft!==e){t=!0;break}t&&this.onHScroll(s$)}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 i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(e=this.enableRtl?e>0?0:i:Math.min(Math.max(e,0),i)),eF(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:e,lastScrollTop:t}=this;return{top:t,bottom:t+e}}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,o=i.getRowCount(),r=-1;for(let t=0;t<o;t++){let o=i.getRow(t);if("function"==typeof e){if(o&&e(o)){r=t;break}}else if(e===o||e===o.data){r=t;break}}r>=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t,i=0){if(tV(this.gos,"print"))return;let{rowModel:o}=this.beans,r=o.getRowCount();if("number"!=typeof e||e<0||e>=r)return void tM(88,{index:e});this.clearRetryListeners();let{frameworkOverrides:s,pageBounds:n,rowContainerHeight:l,rowRenderer:a}=this.beans;s.wrapIncoming(()=>{let r,s,d=this.ctrlsSvc.getGridBodyCtrl(),h=o.getRow(e),u=0;this.invalidateVerticalScroll();do{let{stickyTopHeight:e,stickyBottomHeight:i}=d,o=h.rowTop,c=h.rowHeight,g=n.getPixelOffset(),p=h.rowTop-g,f=p+h.rowHeight,m=this.getVScrollPosition(),C=l.divStretchOffset,w=m.top+C,v=m.bottom+C,b=v-w,y=l.getScrollPositionForPixel(p),S=l.getScrollPositionForPixel(f-b),R=Math.min((y+S)/2,p),F=w+e>p,P=v-i<f,x=null;"top"===t?x=y-e:"bottom"===t?x=S+i:"middle"===t?x=R:F?x=y-e:P&&(x=S-y>b?y-e:S+i),null!==x&&(this.setVerticalScrollPosition(x),a.redraw({afterScroll:!0})),r=o!==h.rowTop||c!==h.rowHeight,s=e!==d.stickyTopHeight||i!==d.stickyBottomHeight,u++}while((r||s)&&u<10)if(this.animationFrameSvc?.flushAllFrames(),i<10&&(h?.stub||!this.beans.rowAutoHeight?.areRowsMeasured())){let r=this.getVScrollPosition().top;this.clearRetryListenerFncs=this.addManagedEventListeners({bodyScroll:()=>{r!==this.getVScrollPosition().top&&this.clearRetryListeners()},modelUpdated:()=>{this.clearRetryListeners(),e>=o.getRowCount()||this.ensureIndexVisible(e,t,i+1)}})}})}clearRetryListeners(){for(let e of this.clearRetryListenerFncs)e();this.clearRetryListenerFncs=[]}ensureColumnVisible(e,t="auto"){let{colModel:i,frameworkOverrides:o}=this.beans,r=i.getCol(e);if(!r||r.isPinned()||!this.visibleCols.isColDisplayed(r))return;let s=this.getPositionedHorizontalScroll(r,t);o.wrapIncoming(()=>{null!==s&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){let{columnBeforeStart:i,columnAfterEnd:o}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),s=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl,l=(n?i:o)||r,a=n?o:i;"auto"!==t&&(l="start"===t,a="end"===t);let d="middle"===t;if(l||a||d){let{colLeft:t,colMiddle:i,colRight:o}=this.getColumnBounds(e);return d?i-s/2:l?n?o:t:n?t-s:o-s}return null}isColumnOutsideViewport(e){let{start:t,end:i}=this.getViewportBounds(),{colLeft:o,colRight:r}=this.getColumnBounds(e),s=this.enableRtl;return{columnBeforeStart:s?t>r:i<r,columnAfterEnd:s?i<o:t>o}}getColumnBounds(e){let t=this.enableRtl,i=this.visibleCols.bodyWidth,o=e.getActualWidth(),r=e.getLeft(),s=t?-1:1,n=t?i-r:r;return{colLeft:n,colMiddle:n+o/2*s,colRight:n+o*s}}getViewportBounds(){let e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}}},sq={horizontal:{overflow:e=>e.scrollWidth-e.clientWidth,scrollSize:e=>e.scrollWidth,clientSize:e=>e.clientWidth,opposite:"vertical"},vertical:{overflow:e=>e.scrollHeight-e.clientHeight,scrollSize:e=>e.scrollHeight,clientSize:e=>e.clientHeight,opposite:"horizontal"}};function sY(e,t,i,o,r,s){let n=sq[i],l=sq[n.opposite],a=!r||eE(r),d=!s||eE(s),h=n.overflow(e);if(h<=0)return!1;if(!t||0===o)return!0;let u=l.overflow(t);if(u<=0)return!0;if(h<=o){if(a&&d&&function({candidateOverflow:e,candidateScrollSize:t,candidateClientSize:i,scrollbarWidth:o}){return!(e<=0)&&!(e>o)&&t>i&&t<=i+o}({candidateOverflow:u,candidateScrollSize:l.scrollSize(t),candidateClientSize:l.clientSize(t),scrollbarWidth:o}))return!1;let i=n.clientSize(e)+o;return n.scrollSize(e)<=i}return!0}var sQ=class extends e2{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,o=()=>{eO(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(o),i.registerBodyViewportResizeListener(o)}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=ew(this.gridBodyCtrl.eBodyViewport);this.bodyHeight!==e&&(this.bodyHeight=e,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){if(!this.isAlive())return;let e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){let{centerContainerCtrl:e,beans:t}=this,i=e.getCenterWidth(),o=e.getViewportScrollLeft();t.colViewport.setScrollPosition(i,o)}};function sZ(e){return!e.altKey&&!e.ctrlKey&&!e.metaKey&&e.key?.length===1}function sJ(e,t,i,o){let r=t.getColDef().cellRendererParams?.suppressMouseEventHandling;return sX(e,t,i,o,r)}function sX(e,t,i,o,r){return!!r&&r(is(e,{column:t,node:i,event:o}))}function s0(e,t,i){let o=t;for(;o;){let t=tW(e,o,i);if(t)return t;o=o.parentElement}return null}var s1="cellCtrl",s2="renderedRow";function s5(e,t,i,o,r){let s=o?o.getColDef().suppressKeyboardEvent:void 0;if(!s)return!1;let n=is(e,{event:t,editing:r,column:o,node:i,data:i.data,colDef:o.getColDef()});return!!(s&&s(n))||!1}var s3=class extends e2{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this),this.editSvc=this.beans.editSvc}addKeyboardListeners(){let e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){let e="mousedown";for(let t of(ej("pointerdown")?e="pointerdown":ej("touchstart")&&(e="touchstart"),["dblclick","contextmenu","mouseover","mouseout","click",e])){let e=this.processMouseEvent.bind(this,t);this.addManagedElementListeners(this.element,{[t]:e})}}processMouseEvent(e,t){if(!eY(this.beans,t)||rm(t))return;let{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);"contextmenu"===e?(i?.column&&i.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,o,i)):(i&&i.onMouseEvent(e,t),o&&o.onMouseEvent(e,t))}getControlsForEventTarget(e){let{gos:t}=this;return{cellCtrl:s0(t,e,s1),rowCtrl:s0(t,e,s2)}}processKeyboardEvent(e,t){let{cellCtrl:i,rowCtrl:o}=this.getControlsForEventTarget(t.target);!t.defaultPrevented&&(i?this.processCellKeyboardEvent(i,e,t):o?.isFullWidth()&&this.processFullWidthRowKeyboardEvent(o,e,t))}processCellKeyboardEvent(e,t,i){let o=this.editSvc?.isEditing(e,{withOpenEditor:!0})??!1;!s5(this.gos,i,e.rowNode,e.column,o)&&"keydown"===t&&(!o&&this.beans.navigation?.handlePageScrollingKey(i)||e.onKeyDown(i),this.doGridOperations(i,o),sZ(i)&&e.processCharacter(i)),"keydown"===t&&this.eventSvc.dispatchEvent(e.createEvent(i,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,i){let{rowNode:o}=e,{focusSvc:r,navigation:s}=this.beans,n=r.getFocusedCell(),l=n?.column;if(!s5(this.gos,i,o,l,!1)){let o=i.key;if("keydown"===t)switch(o){case oo:case"End":case ot:case oi:s?.handlePageScrollingKey(i,!0);break;case i6:case i7:if(!this.gos.get("embedFullWidthRows"))break;case i8:case i9:e.onKeyboardNavigate(i);break;case"Tab":e.onTabKeyDown(i)}}"keydown"===t&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",i))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!eY(this.beans,e))return;let i=oh(e),{clipboardSvc:o,undoRedo:r}=this.beans;return i===or?this.onCtrlAndA(e):i===os?this.onCtrlAndC(o,e):i===on?this.onCtrlAndD(o,e):i===ol?this.onCtrlAndV(o,e):"KeyX"===i?this.onCtrlAndX(o,e):i===oa?this.onCtrlAndY(r):i===od?this.onCtrlAndZ(r,e):void 0}onCtrlAndA(e){let t,{beans:{rowModel:i,rangeSvc:o,selectionSvc:r},gos:s}=this;o&&t2(s)&&("string"==typeof(t=s.get("rowSelection"))||t?.mode!=="multiRow"||!t.ctrlASelectsRows)&&i.isRowsToRender()?!function(e){let t,i,{pinnedRowModel:o,rowModel:r,rangeSvc:s,visibleCols:n}=e;if(!s||0===n.allCols.length)return;let l=o?.isEmpty("top")??!0;o?.isEmpty("bottom")??!0?(t=null,i=r.getRowCount()-1):(t="bottom",i=o?.getPinnedBottomRowCount()??-1),s.setCellRange({rowStartIndex:0,rowStartPinned:l?null:"top",rowEndIndex:i,rowEndPinned:t})}(this.beans):r&&r.selectAllRowNodes({source:"keyboardSelectAll",selectAll:t9(s)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;let{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;let{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){let{cellCtrl:i}=this.getControlsForEventTarget(t.target);this.editSvc?.isEditing(i,{withOpenEditor:!0})||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")}},s4=e=>e.topRowCtrls,s6=e=>e.getStickyTopRowCtrls(),s8=e=>e.getStickyBottomRowCtrls(),s7=e=>e.bottomRowCtrls,s9=e=>e.allRowCtrls,ne=e=>e.getCtrls("top"),nt=e=>e.getCtrls("center"),ni=e=>e.getCtrls("bottom"),no={center:{type:"center",name:"center-cols",getRowCtrls:s9,getSpannedRowCtrls:nt},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:s9,getSpannedRowCtrls:nt},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:s9,getSpannedRowCtrls:nt},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:s9},topCenter:{type:"center",name:"floating-top",getRowCtrls:s4,getSpannedRowCtrls:ne},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:s4,getSpannedRowCtrls:ne},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:s4,getSpannedRowCtrls:ne},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:s4},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:s6},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:s6},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:s6},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:s6},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:s8},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:s8},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:s8},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:s8},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:s7,getSpannedRowCtrls:ni},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:s7,getSpannedRowCtrls:ni},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:s7,getSpannedRowCtrls:ni},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:s7}};function nr(e){let t=no[e];return`ag-${t.name}-viewport`}function ns(e){let t=no[e];return t.container??`ag-${t.name}-container`}function nn(e){let t=no[e];return`ag-${t.name}-spanned-cells-container`}function nl(e){return no[e]}var na=["center","left","right","fullWidth"],nd=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],nh=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],nu=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],nc=["stickyTopCenter","stickyTopLeft","stickyTopRight"],ng=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],np=[...nc,"stickyTopFullWidth",...ng,"stickyBottomFullWidth"],nf=["topCenter","topLeft","topRight","bottomCenter","bottomLeft","bottomRight","center","left","right",...nc,...ng],nm=class extends e2{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=function(e){return no[e]}(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new sQ(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,o){this.comp=e,this.eContainer=t,this.eSpannedContainer=i,this.eViewport=o,this.createManagedBean(new s3(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();let{pinnedCols:r,rangeSvc:s}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(nh,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(nu,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(na,()=>this.createManagedBean(new sN(this.eContainer,"center"===this.name?o:void 0))),s&&this.forContainers(nf,()=>this.createManagedBean(s.createDragListenerFeature(this.eContainer))),this.forContainers(nd,()=>this.createManagedBean(new rV(e=>this.comp.setContainerWidth(`${e}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:e=>this.onDisplayedRowsChanged(e.afterScroll)}),i(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{let t=this.options.getSpannedRowCtrls(e);t&&this.comp.setSpannedRowCtrls(t,!1)}})}listenOnDomOrder(){if(np.indexOf(this.name)>=0)return void this.comp.setDomOrder(!0);let e=()=>{let e=this.gos.get("ensureDomOrder"),t=tV(this.gos,"print");this.comp.setDomOrder(e||t)};this.addManagedPropertyListener("domLayout",e),e()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){let{dragSvc:e}=this.beans;if(!e)return;let t=t=>{e.dragging&&t.cancelable&&t.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 ev(this.eViewport)}getCenterViewportScrollLeft(){return eR(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){let t=eH(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return eD(this.eViewport)}getViewportScrollLeft(){return eR(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){let{beans:e,gos:t,eViewport:i}=this,o=t.get("alwaysShowHorizontalScroll"),{ctrlsSvc:r}=e,s=r.getGridBodyCtrl()?.eBodyViewport,n=r.get("fakeHScrollComp")?.getGui(),l=r.get("fakeVScrollComp")?.getGui();return o||function(e,t,i=ro()||0,o,r){return sY(e,t,"horizontal",i,o,r)}(i,s,void 0,n,l)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){eF(this.eViewport,e,this.enableRtl)}isContainerVisible(){return null==this.options.pinnedType||!!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||0===t.length)return void this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});let i=tV(this.gos,"print"),o=this.gos.get("embedFullWidthRows")||i,r=t.filter(e=>{let t=e.isFullWidth();return this.options.fullWidth?!o&&t:o||!t});this.comp.setRowCtrls({rowCtrls:r,useFlushSync:e})}},nC=class extends e2{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,o,r,s,n){this.comp=e,this.eGridBody=t,this.eBodyViewport=i,this.eTop=o,this.eBottom=r,this.eStickyTop=s,this.eStickyBottom=n,this.eCenterColsViewport=i.querySelector(`.${nr("center")}`),this.eFullWidthContainer=i.querySelector(`.${ns("fullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",e=>this.setCellTextSelection(e.currentValue)),this.createManagedBean(new sV(this.comp)),this.scrollFeature=this.createManagedBean(new s_(i)),this.beans.rowDragSvc?.setupRowDrag(i,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([o,i,r,s,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(o),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="rowResizeStarted"===e.type;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,o=16*!!rs(),r=`calc(100% + ${i+o}px)`;eO(this.beans,()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}setGridRootRole(){let{rowGroupColsSvc:e,colModel:t,gos:i}=this,o=i.get("treeData");if(!o){let i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){for(let t of e)this.addManagedElementListeners(t,{focusin:e=>{let{target:i}=e,o=em(i,"ag-root",t);t.classList.toggle("ag-has-focus",!o)},focusout:e=>{let{target:i,relatedTarget:o}=e,r=t.contains(o),s=em(o,"ag-root",t);em(i,"ag-root",t)||(!r||s)&&t.classList.remove("ag-has-focus")}})}setColumnMovingCss(e){this.comp.setColumnMovingCss("ag-column-moving",e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss("ag-selectable",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;this.comp.setRowCount(-1===i?-1:e+i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){this.comp.setPinnedTopBottomOverflowY(e?"scroll":"hidden")}isVerticalScrollShowing(){let{gos:e,comp:t,ctrlsSvc:i}=this,o=e.get("alwaysShowVerticalScroll"),r=tV(e,"normal");t.setAlwaysVerticalScrollClass(o?"ag-force-vertical-scroll":null,o);let s=i.get("center")?.eViewport,n=i.get("fakeHScrollComp")?.getGui(),l=i.get("fakeVScrollComp")?.getGui();return o||r&&function(e,t,i=ro()||0,o,r){return sY(e,t,"vertical",i,o,r)}(this.eBodyViewport,s,void 0,l,n)}setupRowAnimationCssClass(){let{rowContainerHeight:e,environment:t}=this.beans,i=t.sizesMeasured,o=()=>{let t=i&&t$(this.gos)&&!e.stretching;this.comp.setRowAnimationCssOnBodyViewport(t?"ag-row-animation":"ag-row-no-animation",t)};o(),this.addManagedEventListeners({heightScaleChanged:o}),this.addManagedPropertyListener("animateRows",o),this.addManagedEventListeners({stylesChanged:()=>{!i&&t.sizesMeasured&&(i=!0,o())}})}addBodyViewportListener(){let{eBodyViewport:e,eStickyTop:t,eStickyBottom:i,eTop:o,eBottom:r,beans:{popupSvc:s,touchSvc:n}}=this,l=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(e,{contextmenu:l}),n?.mockBodyContextMenu(this,l),this.addManagedElementListeners(e,{wheel:this.onBodyViewportWheel.bind(this,s)});let a=this.onStickyWheel.bind(this);for(let e of[t,i,o,r])this.addManagedElementListeners(e,{wheel:a});let d=this.onHorizontalWheel.bind(this);for(let e of["left","right","topLeft","topRight","bottomLeft","bottomRight"])this.addManagedElementListeners(this.ctrlsSvc.get(e).eContainer,{wheel:d});this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){let{deltaX:t,deltaY:i,shiftKey:o}=e;(o||Math.abs(t)>Math.abs(i))&&eY(this.beans,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){let{deltaY:t}=e;this.scrollVertically(t)>0&&e.preventDefault()}onHorizontalWheel(e){let{deltaX:t,deltaY:i,shiftKey:o}=e;(o||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:o}=e||t;(o===this.eBodyViewport||o===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(),o=e?.getPinnedBottomTotalHeight(),r=t.getPinnedRowBorderWidth()-t.getRowBorderWidth(),s=i?r+i:0,n=o?r+o:0;this.comp.setTopHeight(s),this.comp.setBottomHeight(n),this.comp.setTopInvisible(s<=0),this.comp.setBottomInvisible(n<=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){let e=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${e}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${e}px)`)}else this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%")}setStickyTopOffsetTop(){let e=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),t=this.pinnedRowModel?.getPinnedTopTotalHeight()??0,i=0;e>0&&(i+=e),t>0&&(i+=t),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){let{pinnedRowModel:e,scrollVisibleSvc:t,comp:i}=this,o=e?.getPinnedBottomTotalHeight()??0,r=t.horizontalScrollShowing&&t.getScrollbarWidth()||0;i.setStickyBottomBottom(`${o+r}px`)}},nw={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},nv=class extends e1{constructor(e,t){super(),this.stopPropagationCallbacks=t,this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:i,eTopGuard:o,eBottomGuard:r,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:n,isFocusableContainer:l,focusInnerElement:a,onFocusIn:d,onFocusOut:h,shouldStopEventPropagation:u,onTabKeyDown:c,handleKeyDown:g,isEmpty:p,eFocusableElement:f}=e;this.comp=i,this.eTopGuard=o,this.eBottomGuard=r,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!n,this.isFocusableContainer=!!l,this.providedFocusIn=d,this.providedFocusOut=h,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=c,this.providedHandleKeyDown=g,this.providedIsEmpty=p}postConstruct(){for(let e of(this.createManagedBean(new rg(this.eFocusableElement,this.stopPropagationCallbacks,{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]))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()}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)return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():0===rd(this.eFocusableElement,".ag-tab-guard").length))return void this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);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,i,o=rd(K(this.beans).body,null,!0),r=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(-1===r)return;e?(t=0,i=r):(t=r+1,i=o.length);let s=o.slice(t,i),n=this.gos.get("tabIndex");s.sort((e,t)=>{let i=Number.parseInt(e.getAttribute("tabindex")||"0"),o=Number.parseInt(t.getAttribute("tabindex")||"0");return o===n?1:i===n?-1:0===i?1:0===o?-1:i-o}),s[e?s.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)return void this.providedOnTabKeyDown(e);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=rd(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(-1,1)),!!t.length&&(t[e?t.length-1:0].focus({preventScroll:!0}),!0)}getNextFocusableElement(e){return ru(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}},nb=class extends e1{constructor(e,t){super(),this.comp=e,this.stopPropagationCallbacks=t}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();let{eTopGuard:t,eBottomGuard:i,eFocusableElement:o,stopPropagationCallbacks:r}=this,s=[t,i];this.addTabGuards(t,i);let{focusTrapActive:n=!1,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:h,onTabKeyDown:u,shouldStopEventPropagation:c,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f}=e;this.tabGuardCtrl=this.createManagedBean(new nv({comp:{setTabIndex:e=>{for(let t of s)null==e?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e)}},focusTrapActive:n,eTopGuard:t,eBottomGuard:i,eFocusableElement:o,onFocusIn:l,onFocusOut:a,focusInnerElement:d,handleKeyDown:h,onTabKeyDown:u,shouldStopEventPropagation:c,isEmpty:g,forceFocusOutWhenTabGuardsAreEmpty:p,isFocusableContainer:f},r))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){let t=K(this.beans).createElement("div"),i="top"===e?nw.TAB_GUARD_TOP:nw.TAB_GUARD_BOTTOM;return t.classList.add(nw.TAB_GUARD,i),J(t,"presentation"),t}addTabGuards(e,t){let i=this.eFocusableElement;i.prepend(e),i.append(t)}removeAllChildrenExceptTabGuards(){let e=[this.eTopGuard,this.eBottomGuard];eP(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,i){eV(t)||(t=t.getGui());let{eBottomGuard:o}=this;o?o.before(t):e(t,i)}destroy(){let{eTopGuard:e,eBottomGuard:t}=this;ex(e),ex(t),super.destroy()}},ny=class extends om{initialiseTabGuard(e,t){this.tabGuardFeature=this.createManagedBean(new nb(this,t)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},nS=class extends ny{initialiseTabGuard(e){super.initialiseTabGuard(e,rC)}},nR=class extends e2{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.getId());let{dragAndDrop:o,ctrlsSvc:r}=this.beans;o?.registerGridDropTarget(()=>this.eGui,this),this.createManagedBean(new sV(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");let s=eH(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),r.register("gridCtrl",this)}isDetailGrid(){let e=rc(this.getGui());return e?.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){let{view:t}=this;!1===e?t.setCursor(null):t.setCursor(1===e?"ew-resize":"ns-resize")}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){let t=this.getFocusableContainers(),{indexWithFocus:i,nextIndex:o}=this.getNextFocusableIndex(t,e);if(o<0||o>=t.length)return!1;if(0===o){if(i>0){let{visibleCols:e,focusSvc:t}=this.beans,i=x(e.allCols);if(t.focusGridView({column:i,backwards:!0}))return!0}return!1}return this.focusContainer(t[o],e)}focusInnerElement(e){let t=this.gos.getCallback("focusGridInnerElement");if(t?.({fromBottom:!!e}))return!0;let i=this.getFocusableContainers(),{focusSvc:o,visibleCols:r}=this.beans,s=r.allCols;if(e){if(i.length>1)return this.focusContainer(x(i),e);let t=x(s);if(o.focusGridView({column:t,backwards:e}))return!0}if(0===this.gos.get("headerHeight")||rx(this.beans)){if(o.focusGridView({column:s[0],backwards:e}))return!0;for(let t=1;t<i.length;t++)if(rh(i[t].getGui(),e))return!0;return!1}return o.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}=this.getNextFocusableIndex(t,e),o=t[i];o?this.focusContainer(o):this.forceFocusOutOfContainer(e)}isFocusable(){let e=this.beans;return!rD(e)||!rx(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){let i=$(this.beans),o=e.findIndex(e=>e.getGui().contains(i));return{indexWithFocus:o,nextIndex:o+(t?-1:1)}}focusContainer(e,t){e.setAllowFocus?.(!0);let i=rh(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),i}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},nF=(e,t)=>{for(let i of Object.keys(t))t[i]=e;return t},nP={dispatchEvent:"CommunityCore",...nF("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0,isModuleRegistered:0}),...nF("GridState",{getState:0,setState:0}),...nF("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...nF("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...nF("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...nF("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...nF("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...nF("ValueCache",{expireValueCache:0}),...nF("CellApi",{getCellValue:0}),...nF("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...nF("Sort",{onSortChanged:0}),...nF("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0,forEachPinnedRow:0}),...nF("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...nF("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...nF("HighlightChanges",{flashCells:0}),...nF("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0,getRowDropPositionIndicator:0,setRowDropPositionIndicator:0}),...nF("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}),...nF("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...nF("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...nF("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...nF("ColumnResize",{setColumnWidths:0}),...nF("ColumnHover",{isColumnHovered:0}),...nF("EditCore",{getCellEditorInstances:0,getEditingCells:0,getEditRowValues:0,stopEditing:0,startEditingCell:0,isEditing:0,validateEdit:0}),...nF("BatchEdit",{startBatchEdit:0,cancelBatchEdit:0,commitBatchEdit:0,isBatchEditing:0}),...nF("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...nF("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...nF("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0,hideColumnFilter:0,getColumnFilterHandler:0,doFilterAction:0}),...nF("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...nF("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...nF("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...nF("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0}),...nF("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...nF("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0,onRowHeightChanged:0,resetRowHeights:0}),...nF("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...nF("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...nF("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...nF("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...nF("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...nF("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...nF("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...nF("ContextMenu",{showContextMenu:0}),...nF("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...nF("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...nF("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...nF("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...nF("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}),...nF("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0,onRowHeightChanged:0,resetRowHeights:0}),...nF("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...nF("StatusBar",{getStatusPanel:0}),...nF("AiToolkit",{getStructuredSchema:0})},nx={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},nD=(e,t)=>e.eventSvc.dispatchEvent(t),nE=class{};Reflect.defineProperty(nE,"name",{value:"GridApi"});var nM=class extends e2{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new nE,this.fns={...nx,dispatchEvent:nD},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(nP))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:o}=this;i!==nx&&(i[e]=o?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{let{beans:i,fns:{[e]:o}}=this;return o?o(i,...t):this.apiNotFound(e)}}}apiNotFound(e){let{beans:t,gos:i,preDestroyLink:o}=this;if(t){let t=nP[e];i.assertModuleRegistered(t,`api.${e}`)&&tM(27,{fnName:e,module:t})}else tM(26,{fnName:e,preDestroyLink:o})}destroy(){super.destroy(),this.fns=nx,this.beans=null}};function nT(e,t){e.gos.updateGridOptions({options:t})}var nk={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{draggable:"true"}},nA=class extends ow{constructor(e,t,i){super(nk),this.rowNode=e,this.column=t,this.eCell=i}postConstruct(){this.getGui().appendChild(og("rowDrag",this.beans,null)),this.addGuiEventListener("mousedown",e=>{e.stopPropagation()}),this.addDragSource(),this.checkVisibility()}addDragSource(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))}onDragStart(e){let{rowNode:t,column:i,eCell:o,gos:r}=this,s=i.getColDef().dndSourceOnRowDrag,n=e.dataTransfer;if(n.setDragImage(o,0,0),s)s(is(r,{rowNode:t,dragEvent:e}));else try{let e=JSON.stringify(t.data);n.setData("application/json",e),n.setData("text/plain",e)}catch(e){}}checkVisibility(){let e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)}},nI=(e,t)=>{if(null!=t&&e?.setPointerCapture)try{return e.setPointerCapture(t),e.hasPointerCapture(t)}catch{}return!1},nL=e=>{let{eElement:t,onLost:i}=e;t&&i&&(t.removeEventListener("lostpointercapture",i),e.onLost=null)},nB={passive:!0},nV={passive:!1},nG=e=>{if(S){if(S.has(e))return!1}else S=new WeakSet;return S.add(e),!0},nH=class extends e1{constructor(){super(...arguments),this.beanName="dragSvc",this.dragging=!1,this.drag=null,this.dragSources=[]}get startTarget(){return this.drag?.start.target??null}isPointer(){return!!y?.has(U(this.beans))}hasPointerCapture(){let e=this.drag?.pointerCapture;return!!(e&&this.beans.eRootDiv.hasPointerCapture?.(e.pointerId))}destroy(){this.drag&&this.cancelDrag();let e=this.dragSources;for(let t of e)nO(t);e.length=0,super.destroy()}removeDragSource(e){let t=this.dragSources;for(let i=0,o=t.length;i<o;++i){let o=t[i];if(o.params===e){t.splice(i,1),nO(o);break}}}addDragSource(e){let t;if(!this.isAlive())return;let{eElement:i,includeTouch:o}=e,r=[];if(o){let e=i.style;e&&(t=e.touchAction,e.touchAction="none")}let s={handlers:r,params:e,oldTouchAction:t};this.dragSources.push(s),eQ(r,[i,"pointerdown",t=>this.onPointerDown(e,t),nV],[i,"mousedown",t=>this.onMouseDown(e,t)]);let n=this.gos.get("suppressTouch");o&&!n&&eQ(r,[i,"touchstart",t=>this.onTouchStart(e,t),nV])}cancelDrag(e){let t=this.drag;e??(e=t?.eElement),e&&this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),t?.params.onDragCancel?.(),this.destroyDrag()}shouldPreventMouseEvent(e){let t=e.type;return("mousemove"===t||"pointermove"===t)&&e.cancelable&&eY(this.beans,e)&&!eg(nz(e))}initDrag(e,...t){this.drag=e;let i=this.beans,o=e=>this.onScroll(e),r=e=>this.onKeyDown(e),s=U(i),n=K(i);eQ(e.handlers,[s,"contextmenu",eJ],[s,"keydown",r],[n,"scroll",o,{capture:!0}],[n.defaultView||window,"scroll",o],...t)}destroyDrag(){this.dragging=!1;let e=this.drag;if(e){let t=e.rootEl;y?.get(t)===e&&y.delete(t),this.drag=null,(e=>{if(!e)return;nL(e);let{eElement:t,pointerId:i}=e;if(t){try{t.releasePointerCapture(i)}catch{}e.eElement=null}})(e.pointerCapture),eZ(e.handlers)}}onPointerDown(e,t){if(this.isPointer())return;let i=this.beans;if(S?.has(t))return;let o=t.pointerType;if("touch"===o&&(i.gos.get("suppressTouch")||!e.includeTouch||(e.stopPropagationForTouch&&t.stopPropagation(),eg(nz(t)))))return;if(!t.isPrimary||"mouse"===o&&0!==t.button)return;this.destroyDrag();let r=U(i),s=e.eElement,n=t.pointerId,l=new nN(r,e,t,n);y??(y=new WeakMap),y.set(r,l);let a=e=>{e.pointerId===n&&this.onMouseOrPointerMove(e)},d=e=>{e.pointerId===n&&this.onMouseOrPointerUp(e)},h=e=>{e.pointerId===n&&nG(e)&&this.cancelDrag()},u=e=>this.draggingPreventDefault(e);this.initDrag(l,[r,"pointerup",d],[r,"pointercancel",h],[r,"pointermove",a,nV],[r,"touchmove",u,nV],[s,"mousemove",u,nV]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):nG(t)}onTouchStart(e,t){if(this.gos.get("suppressTouch")||!e.includeTouch||!nG(t)||eg(nz(t)))return;if(e.stopPropagationForTouch&&t.stopPropagation(),this.isPointer()){this.dragging&&eJ(t);return}this.destroyDrag();let i=this.beans,o=new nN(U(i),e,t.touches[0]),r=e=>this.onTouchMove(e),s=e=>this.onTouchUp(e),n=e=>this.onTouchCancel(e),l=e=>this.draggingPreventDefault(e),a=U(i),d=t.target??e.eElement;this.initDrag(o,[d,"touchmove",r,nB],[d,"touchend",s,nB],[d,"touchcancel",n,nB],[a,"touchmove",l,nV],[a,"touchend",s,nV],[a,"touchcancel",n,nV]),0===e.dragStartPixels&&this.onMove(o.start)}draggingPreventDefault(e){this.dragging&&eJ(e)}onMouseDown(e,t){if(0!==t.button||S?.has(t)||this.isPointer())return;let i=this.beans;this.destroyDrag();let o=new nN(U(i),e,t),r=e=>this.onMouseOrPointerMove(e),s=e=>this.onMouseOrPointerUp(e),n=U(i);this.initDrag(o,[n,"mousemove",r],[n,"mouseup",s]),0===e.dragStartPixels?this.onMouseOrPointerMove(t):nG(t)}onScroll(e){if(!nG(e))return;let t=this.drag,i=t?.lastDrag;i&&this.dragging&&t.params?.onDragging?.(i)}onMouseOrPointerMove(e){nG(e)&&(o7()&&K(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&eJ(e),this.onMove(e))}onTouchCancel(e){let t=this.drag;t&&nG(e)&&eq(t.start,e.changedTouches)&&this.cancelDrag()}onTouchMove(e){let t=this.drag;if(!t||!nG(e))return;let i=eq(t.start,e.touches);i&&(this.onMove(i),this.draggingPreventDefault(e))}onMove(e){let t=this.drag;if(!t)return;t.lastDrag=e;let i=t.params;if(!this.dragging){let o=t.start;if(e_(e,o,i.dragStartPixels??4)||(this.dragging=!0,i.capturePointer&&(t.pointerCapture=((e,t)=>{if("u"<typeof PointerEvent||!(t instanceof PointerEvent))return null;let i=t.pointerId;if(!nI(e,i))return null;let o={eElement:e,pointerId:i,onLost(e){((e,t)=>{nL(e);let{eElement:i,pointerId:o}=e;i&&t.pointerId===o&&nI(i,o)})(o,e)}};return e.addEventListener("lostpointercapture",o.onLost),o})(this.beans.eRootDiv,e)),this.eventSvc.dispatchEvent({type:"dragStarted",target:i.eElement}),i.onDragStart?.(o),this.drag!==t)||(i.onDragging?.(o),this.drag!==t))return}i.onDragging?.(e)}onTouchUp(e){let t=this.drag;t&&nG(e)&&this.onUp(eq(t.start,e.changedTouches))}onMouseOrPointerUp(e){nG(e)&&this.onUp(e)}onUp(e){let t=this.drag;t&&(e||(e=t.lastDrag),e&&this.dragging&&(this.dragging=!1,t.params.onDragStop?.(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t.params.eElement})),this.destroyDrag())}onKeyDown(e){e.key===i4&&this.cancelDrag()}},nO=e=>{eZ(e.handlers);let t=e.oldTouchAction;if(null!=t){let i=e.params.eElement.style;i&&(i.touchAction=t)}},nN=class{constructor(e,t,i,o=null){this.rootEl=e,this.params=t,this.start=i,this.pointerId=o,this.handlers=[],this.lastDrag=null,this.pointerCapture=null,this.eElement=t.eElement}},nz=e=>{let t=e.target;return t instanceof Element?t:null},nW=class extends nH{shouldPreventMouseEvent(e){return this.gos.get("enableCellTextSelection")&&super.shouldPreventMouseEvent(e)}},nU=class extends e2{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&&!0===t.shiftKey;e.onResizeStart(i)}setResizeIcons(){let e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(1),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)}},n$={tag:"div",cls:"ag-drag-handle ag-row-drag",attrs:{"aria-hidden":"true"}},nK={skipAriaHidden:!0},nj=class extends ow{constructor(e,t,i,o,r,s=!1){super(),this.cellValueFn=e,this.rowNode=t,this.column=i,this.customGui=o,this.dragStartPixels=r,this.alwaysVisible=s,this.dragSource=null,this.disabled=!1}isCustomGui(){return null!=this.customGui}postConstruct(){let{beans:e,customGui:t}=this;t?this.setDragElement(t,this.dragStartPixels):(this.setTemplate(n$),this.getGui().appendChild(og("rowDrag",e,null)),this.addDragSource()),this.alwaysVisible||this.initCellDrag()}initCellDrag(){let{beans:e,rowNode:t}=this,i=this.refreshVisibility.bind(this);this.addManagedListeners(e.eventSvc,{rowDragVisibilityChanged:i}),this.addManagedListeners(t,{dataChanged:i,cellChanged:i}),this.refreshVisibility()}setDragElement(e,t){this.setTemplateFromElement(e,void 0,void 0,!0),this.addDragSource(t)}refreshVisibility(){if(this.alwaysVisible)return;let{beans:e,column:t,rowNode:i}=this,{gos:o,dragAndDrop:r,rowDragSvc:s}=e,n=s?.visibility,l=!("suppress"===n||"hidden"===n&&!r?.hasExternalDropZones()),a=l;if(l&&!this.isCustomGui()&&t){let e=t.getColDef().rowDrag;!1===e?l=!1:(a=t.isRowDrag(i),l="function"==typeof e||a)}l&&a&&i.footer&&o.get("rowDragManaged")&&(a=!1,l=!0),a&&(a=l),l||this.setDisplayed(l,nK),a||this.setVisible(a,nK),this.setDisabled(!a||"disabled"===n&&!r?.hasExternalDropZones()),l&&this.setDisplayed(l,nK),a&&this.setVisible(a,nK)}setDisabled(e){e!==this.disabled&&(this.disabled=e,this.getGui()?.classList?.toggle("ag-drag-handle-disabled",e))}getSelectedNodes(){let e=this.rowNode;if(!this.gos.get("rowDragMultiRow"))return[e];let t=this.beans.selectionSvc?.getSelectedNodes()??[];return -1!==t.indexOf(e)?t:[e]}getDragItem(){let{column:e,rowNode:t}=this;return{rowNode:t,rowNodes:this.getSelectedNodes(),columns:e?[e]:void 0,defaultTextValue:this.cellValueFn()}}addDragSource(e=4){if(this.dragSource&&this.removeDragSource(),this.gos.get("rowDragManaged")&&this.rowNode.footer)return;let t=this.getGui();if(this.gos.get("enableCellTextSelection")){this.removeMouseDownListener();let e=ej("pointerdown")?{pointerdown:eJ}:{mousedown:eJ};this.mouseDownListener=this.addManagedElementListeners(t,e)[0]}let i=this.getLocaleTextFunc();this.dragSource={type:2,eElement:t,dragItemName:e=>this.getDragItemName(e,i),getDragItem:()=>this.getDragItem(),dragStartPixels:e,dragSourceDomDataKey:this.gos.getDomDataKey()},this.beans.dragAndDrop.addDragSource(this.dragSource,!0)}getDragItemName(e,t){let i=e?.dragItem||this.getDragItem(),o=(e?.dropTarget?.rows.length??i.rowNodes?.length)||1,r=this.column?.getColDef()?.rowDragText??this.gos.get("rowDragText");if(r)return r(i,o);if(1!==o)return`${o} ${t("rowDragRows","rows")}`;let s=this.cellValueFn();return s||`1 ${t("rowDragRow","rows")}`}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)}},n_=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.includes("x"),this.scrollVertically=e.scrollAxis.includes("y"),this.scrollByTick=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)}get scrolling(){return null!==this.tickingInterval}check(e,t=!1){let i=t||this.shouldSkipVerticalScroll();if(i&&this.shouldSkipHorizontalScroll())return;let o=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=e.clientX<o.left+r,this.tickRight=e.clientX>o.right-r,this.tickUp=e.clientY<o.top+r&&!i,this.tickDown=e.clientY>o.bottom-r&&!i,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){null===this.tickingInterval&&(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)}},nq=class{constructor(){this.reordered=!1,this.removals=[],this.updates=new Set,this.adds=new Set}},nY=e=>{let t=e.childrenAfterGroup;for(;t?.length;){let e=t[0];if(e.sourceRowIndex>=0)return e;t=e.childrenAfterGroup}};function nQ(e,t){let i,o,r=tV(e.gos,"normal");null!=t.clientX||null!=t.clientY?(i=t.clientX,o=t.clientY):(i=t.x,o=t.y);let{pageFirstPixel:s}=e.pageBounds.getCurrentPagePixelRange();if(o+=s,r){let t=e.ctrlsSvc.getScrollFeature(),r=t.getVScrollPosition();i+=t.getHScrollPosition().left,o+=r.top}return{x:i,y:o}}var nZ=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:o}=e;if(o)for(let e=0;e<o.length;++e)this.depthFirstSearchChangedPath(o[e],t);t(i)}depthFirstSearchEverything(e,t,i){let o=e.childrenAfterGroup;if(o)for(let e=0,r=o.length;e<r;++e){let r=o[e];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 e={rowNode:t,children:null};this.mapToItems[t.id]=e,i++,t=t.parent}return i}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let i=e;for(;i;){for(let e of(this.nodeIdsToColumns[i.id]||(this.nodeIdsToColumns[i.id]={}),t))this.nodeIdsToColumns[i.id][e.getId()]=!0;i=i.parent}}linkPathItems(e,t){let i=e;for(let e=0;e<t;e++){let e=this.mapToItems[i.id],t=this.mapToItems[i.parent.id];t.children||(t.children=[]),t.children.push(e),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(e=>i[e.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;let i=this.nodeIdsToColumns[e.id];return t.filter(e=>!i[e.getId()])}},nJ=class extends e2{constructor(e){super(),this.eContainer=e,this.lastDraggingEvent=null,this.autoScroll=null,this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,t=>{let i=()=>t.gridBodyCtrl.scrollFeature.getVScrollPosition().top,o=new n_({scrollContainer:t.gridBodyCtrl.eBodyViewport,scrollAxis:"y",getVerticalPosition:i,setVerticalPosition:e=>t.gridBodyCtrl.scrollFeature.setVerticalScrollPosition(e),onScrollCallback:()=>{let t=i();if(this.autoScrollOldV!==t){this.autoScrollOldV=t,this.autoScrollChanging=!0;return}let o=this.autoScrollChanging;this.autoScrollChanged=o,this.autoScrollChanging=!1,o&&(e.dragAndDrop?.nudge(),this.autoScrollChanged=!1)}});this.autoScroll=o,this.clearAutoScroll()})}destroy(){super.destroy(),this.clearAutoScroll(),this.autoScroll=null,this.lastDraggingEvent=null,this.eContainer=null}getContainer(){return this.eContainer}isInterestedIn(e){return 2===e}getIconName(e){return e?.dropTarget?.allowed===!1||"visible"!==this.beans.rowDragSvc.visibility?"notAllowed":"move"}getRowNodes(e){if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];let t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){let e=this.beans.selectionSvc?.getSelectedNodes();if(e&&e.indexOf(t)>=0)return e.slice().sort(n0)}return[t]}onDragEnter(e){this.dragging(e,!0)}onDragging(e){this.dragging(e,!1)}dragging(e,t){let{lastDraggingEvent:i,beans:o}=this;if(t){let t=this.getRowNodes(e);e.dragItem.rowNodes=t,n1(t,!0)}this.lastDraggingEvent=e;let r=e.fromNudge,s=this.makeRowsDrop(i,e,r,!1);o.rowDropHighlightSvc?.fromDrag(e),t&&this.dispatchGridEvent("rowDragEnter",e),this.dispatchGridEvent("rowDragMove",e);let n=this.autoScroll;s?.rowDragManaged&&s.moved&&s.allowed&&s.sameGrid&&!s.suppressMoveWhenRowDragging&&(!r&&!n?.scrolling||this.autoScrollChanged)&&this.dropRows(s),n?.check(e.event)}isFromThisGrid(e){return e.dragSource.dragSourceDomDataKey===this.gos.getDomDataKey()}makeRowsDrop(e,t,i,o){let{beans:r,gos:s}=this,n=this.newRowsDrop(t,o),l=r.rowModel;if(t.dropTarget=n,t.changed=!1,!n)return null;let{sameGrid:a,rootNode:d,source:h,target:u}=n;u??(u=l.getRow(l.getRowCount()-1)??null);let c=this.beans.groupEditSvc,g=!!c?.canSetParent(n),p=null;if(u?.footer){let e=sh(l,-1,u)??sh(l,1,u);g&&(p=u.sibling??d),u=e??null}u?.detail&&(u=u.parent),n.moved&&(n.moved=h!==u);let f=.5;if(u&&(f=a&&n.moved&&(p||!g)?h.rowIndex>u.rowIndex?-.5:.5:(n.y-u.rowTop-u.rowHeight/2)/u.rowHeight||0),!g&&a&&u&&n.moved&&tL(s)){let e=n2(l,n);e&&(f=h.rowIndex>e.rowIndex?-.5:.5,u=e,n.moved&&(n.moved=h!==u))}return n.target=u,n.newParent=p,n.pointerPos=n5(u,n.y),n.yDelta=f,c?.fixRowsDrop(n,g,i,f),this.validateRowsDrop(n,g,o),t.changed||(t.changed=nX(e?.dropTarget,n)),n}newRowsDrop(e,t){let{beans:i,gos:o}=this,r=i.rowModel.rootNode,s=!!tL(o)&&o.get("rowDragManaged"),n=o.get("suppressMoveWhenRowDragging"),l=this.isFromThisGrid(e),{rowNode:a,rowNodes:d}=e.dragItem;if(d||(d=a?[a]:[]),a||(a=d[0]),!a||!r)return null;let h=this.beans.dragAndDrop.isDropZoneWithinThisGrid(e),u=!0;!s||d.length&&"visible"===i.rowDragSvc.visibility&&(!n&&l||h)||(u=!1);let c=nQ(i,e).y,g=this.getOverNode(c);return{api:i.gridApi,context:i.gridOptions.context,draggingEvent:e,rowDragManaged:s,suppressMoveWhenRowDragging:n,sameGrid:l,withinGrid:h,treeData:!1,rootNode:r,moved:a!==g,y:c,overNode:g,overIndex:g?.rowIndex??-1,pointerPos:"none",position:"none",source:a,target:g??null,newParent:null,rows:d,allowed:u,highlight:!t&&s&&n&&(h||!l),yDelta:0,inside:!1,droppedManaged:!1}}validateRowsDrop(e,t,i){let{source:o,target:r,yDelta:s,inside:n,moved:l,rowDragManaged:a,suppressMoveWhenRowDragging:d}=e;e.moved&&(e.moved=o!==r);let{position:h,fallbackPosition:u}=this.computeDropPosition(l,n,s);e.position=h,t||(e.newParent=null),this.enforceSuppressMoveWhenRowDragging(e,d,"initial");let c=(!a||e.allowed)&&this.gos.get("isRowValidDropPosition");c&&this.applyDropValidator(e,t,i,a,c),a&&(e.rows=this.filterRows(e)),this.beans.groupEditSvc?.clearNewSameParent(e,t),this.enforceSuppressMoveWhenRowDragging(e,d,"final"),"inside"!==e.position||e.allowed&&e.newParent||(e.position=u)}computeDropPosition(e,t,i){let o=i<0?"above":"below";return e?{position:t?"inside":o,fallbackPosition:o}:{position:"none",fallbackPosition:o}}enforceSuppressMoveWhenRowDragging(e,t,i){if(t){if("initial"===i){e.moved||(e.allowed=!1);return}e.rows.length&&"none"!==e.position||(e.allowed=!1)}}applyDropValidator(e,t,i,o,r){this.beans.groupEditSvc?.clearNewSameParent(e,t);let s=r(e);if(!s){e.allowed=!1;return}if("object"!=typeof s)return;void 0!==s.rows&&(e.rows=s.rows??[]),t&&void 0!==s.newParent&&(e.newParent=s.newParent),void 0!==s.target&&(e.target=s.target),s.position&&(e.position=s.position),void 0!==s.allowed?e.allowed=s.allowed:o||(e.allowed=!0);let n=e.draggingEvent;s.changed&&n&&(n.changed=!0),i||void 0===s.highlight||(e.highlight=s.highlight)}addRowDropZone(e){if(!e.getContainer())return void tM(55);let t=this.beans.dragAndDrop;if(t.findExternalZone(e.getContainer()))return void tM(56);let i={isInterestedIn:e=>2===e,getIconName:()=>"move",external:!0,...e.fromGrid?e:{getContainer:e.getContainer,onDragEnter:e.onDragEnter&&(t=>e.onDragEnter(this.rowDragEvent("rowDragEnter",t))),onDragLeave:e.onDragLeave&&(t=>e.onDragLeave(this.rowDragEvent("rowDragLeave",t))),onDragging:e.onDragging&&(t=>e.onDragging(this.rowDragEvent("rowDragMove",t))),onDragStop:e.onDragStop&&(t=>e.onDragStop(this.rowDragEvent("rowDragEnd",t))),onDragCancel:e.onDragCancel&&(t=>e.onDragCancel(this.rowDragEvent("rowDragCancel",t)))}};t.addDropTarget(i),this.addDestroyFunc(()=>t.removeDropTarget(i))}getRowDropZone(e){return{getContainer:this.getContainer.bind(this),onDragEnter:t=>{this.onDragEnter(t),e?.onDragEnter?.(this.rowDragEvent("rowDragEnter",t))},onDragLeave:t=>{this.onDragLeave(t),e?.onDragLeave?.(this.rowDragEvent("rowDragLeave",t))},onDragging:t=>{this.onDragging(t),e?.onDragging?.(this.rowDragEvent("rowDragMove",t))},onDragStop:t=>{this.onDragStop(t),e?.onDragStop?.(this.rowDragEvent("rowDragEnd",t))},onDragCancel:t=>{this.onDragCancel(t),e?.onDragCancel?.(this.rowDragEvent("rowDragCancel",t))},fromGrid:!0}}getOverNode(e){let{pageBounds:t,rowModel:i}=this.beans,o=e>t.getCurrentPagePixelRange().pageLastPixel?-1:i.getRowIndexAtPixel(e);return o>=0?i.getRow(o):void 0}rowDragEvent(e,t){let i=this.beans,{dragItem:o,dropTarget:r,event:s,vDirection:n}=t,l=r?.rootNode===i.rowModel.rootNode,a=l?r.y:nQ(i,t).y,d=l?r.overNode:this.getOverNode(a),h=l?r.overIndex:d?.rowIndex??-1;return{api:i.gridApi,context:i.gridOptions.context,type:e,event:s,node:o.rowNode,nodes:o.rowNodes,overIndex:h,overNode:d,y:a,vDirection:n,rowsDrop:r}}dispatchGridEvent(e,t){let i=this.rowDragEvent(e,t);this.eventSvc.dispatchEvent(i)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e,!1)}onDragStop(e){let t=this.lastDraggingEvent?.dropTarget??null,i=this.makeRowsDrop(this.lastDraggingEvent,e,!1,!0);this.dispatchGridEvent("rowDragEnd",e),i?.allowed&&i.rowDragManaged&&(!t?.droppedManaged||nX(t,i))&&this.dropRows(i),this.stopDragging(e,!0)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e,!0)}stopDragging(e,t){this.clearAutoScroll(),this.beans.groupEditSvc?.stopDragging(t),this.beans.rowDropHighlightSvc?.fromDrag(null),n1(e.dragItem.rowNodes,!1),this.lastDraggingEvent=null}clearAutoScroll(){this.autoScroll?.ensureCleared(),this.autoScrollChanged=!1,this.autoScrollChanging=!1,this.autoScrollOldV=null}dropRows(e){return e.droppedManaged=!0,e.sameGrid?this.csrmMoveRows(e):this.csrmAddRows(e)}csrmAddRows({position:e,target:t,rows:i}){let o,r=tZ(this.gos),s=this.beans.rowModel,n=i.filter(({data:e,rowPinned:t})=>!s.getRowNode(r?.({data:e,level:0,rowPinned:t})??e.id)).map(({data:e})=>e);if(0===n.length)return!1;if(t){let i=t.sourceRowIndex>=0?t:nY(t);i&&(o=i.sourceRowIndex+ +("above"!==e))}return s.updateRowData({add:n,addIndex:o}),!0}filterRows(e){let t,{groupEditSvc:i}=this.beans,{rows:o,sameGrid:r}=e;for(let s=0,n=o.length;s<n;++s){let n=!0,l=o[s];(!l||l.footer||r&&l.destroyed&&!l.group||!this.csrmGetLeaf(l))&&(n=!1),n&&i&&!i.canDropRow(l,e)&&(n=!1),n?t?.push(l):t??(t=o.slice(0,s))}return t??o}csrmMoveRows(e){let t=this.beans.groupEditSvc;return t?.isGroupingDrop(e)?t.dropGroupEdit(e):this.csrmMoveRowsReorder(e)}csrmMoveRowsReorder({position:e,target:t,rows:i,newParent:o,rootNode:r}){let s=!1,n=new Set;for(let e of i){o&&e.parent!==o&&(e.treeParent=o,s=!0);let t=this.csrmGetLeaf(e);t&&n.add(t)}if(!s&&0===n.size)return!1;let l=this.beans.focusSvc,a=l.getFocusedCell(),d=a&&rS(this.beans,a);if(n.size&&((e,t,i,o)=>{if(!t.size||!e)return!1;let r=!1,s=e.length??0,n=-1;i&&(i=(n=i.sourceRowIndex)<0?nY(i):null)&&(n=i.sourceRowIndex),n<0||n>=s?n=s:!o&&++n;let l=n,a=Math.min(n,s-1);for(let e of t){let t=e.sourceRowIndex;t<l&&(l=t),t>a&&(a=t)}let d=l;for(let i=l;i<n;++i){let o=e[i];!t.has(o)&&(o.sourceRowIndex!==d&&(o.sourceRowIndex=d,e[d]=o,r=!0),++d)}let h=a;for(let i=a;i>=n;--i){let o=e[i];!t.has(o)&&(o.sourceRowIndex!==h&&(o.sourceRowIndex=h,e[h]=o,r=!0),--h)}for(let i of t)i.sourceRowIndex!==d&&(i.sourceRowIndex=d,e[d]=i,r=!0),++d;return r})(r._leafs,n,t,"above"===e)&&(s=!0),!s)return!1;let h=this.beans.rowModel,u=new nq;return u.reordered=!0,h.refreshModel({step:"group",keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedPath:new nZ(!1,r),changedRowNodes:u}),d?d.focusCell():l.clearFocusedCell(),!0}csrmGetLeaf(e){if(e.sourceRowIndex>=0)return e.destroyed?void 0:e;let t=this.beans.groupEditSvc;return t?t.csrmFirstLeaf(e):nY(e)}},nX=(e,t)=>e!==t&&(!e||e.sameGrid!==t.sameGrid||e.allowed!==t.allowed||e.position!==t.position||e.target!==t.target||e.source!==t.source||e.newParent!==t.newParent||!D(e.rows,t.rows)),n0=({rowIndex:e},{rowIndex:t})=>null!==e&&null!==t?e-t:0,n1=(e,t)=>{for(let i=0,o=e?.length||0;i<o;++i){let o=e[i];o.dragging!==t&&(o.dragging=t,o.dispatchRowEvent("draggingChanged"))}},n2=(e,t)=>{let i=null,o=t.target;if(o&&0>t.rows.indexOf(o))return null;let r=t.source;if(!o||!r)return null;let s=o.rowIndex-r.rowIndex,n=s<0?-1:1;s=t.suppressMoveWhenRowDragging?Math.abs(s):1;let l=new Set(t.rows);do{let t=sh(e,n,o);if(!t)break;!l.has(t)&&(i=t,--s),o=t}while(s>0)return i},n5=(e,t)=>{let i=e?.rowTop,o=e?.rowHeight??0;if(null==i||!o||o<=0)return"none";let r=t-i,s=.25*o;return r<=s?"above":r>=o-s?"below":"inside"},n3=class extends e2{constructor(){super(...arguments),this.beanName="rowDragSvc",this.rowDragFeature=null,this.visibility="suppress"}setupRowDrag(e,t){let i=t.createManagedBean(new nJ(e)),o=this.beans.dragAndDrop;o.addDropTarget(i),t.addDestroyFunc(()=>o.removeDropTarget(i)),this.rowDragFeature=i;let r=()=>this.refreshVisibility();this.addManagedPropertyListeners(["rowDragManaged","suppressRowDrag","refreshAfterGroupEdit"],r),this.addManagedEventListeners({newColumnsLoaded:r,columnRowGroupChanged:r,columnPivotModeChanged:r,sortChanged:r,filterChanged:r}),this.visibility=this.computeVisibility()}createRowDragComp(e,t,i,o,r,s){return new nj(e,t,i,o,r,s)}createRowDragCompForRow(e,t){if(t2(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,o,r,s){let n=this.gos;if(!(n.get("rowDragManaged")&&(!tL(n)||n.get("pagination"))))return this.createRowDragComp(i,e,t,o,r,s)}cancelRowDrag(){this.rowDragFeature?.lastDraggingEvent&&this.beans.dragSvc?.cancelDrag()}computeVisibility(){let e=this.beans,t=e.gos;if(t.get("suppressRowDrag"))return"suppress";if(!t.get("rowDragManaged"))return"visible";let i=e.colModel.isPivotMode();return(i||e.rowGroupColsSvc?.columns?.length)&&!t.get("refreshAfterGroupEdit")?"hidden":i||e.filterManager?.isAnyFilterPresent()||e.sortSvc?.isSortActive()?"disabled":"visible"}refreshVisibility(){let e=this.visibility,t=this.computeVisibility();e!==t&&(this.visibility=t,this.eventSvc?.dispatchEvent({type:"rowDragVisibilityChanged"}))}},n4=class extends e2{constructor(){super(...arguments),this.beanName="rowDropHighlightSvc",this.uiLevel=0,this.dragging=!1,this.row=null,this.position="none"}postConstruct(){this.addManagedEventListeners({modelUpdated:this.onModelUpdated.bind(this)})}onModelUpdated(){let e=this.row,t=this.dragging;e&&e?.rowIndex!==null&&"none"!==this.position?this.set(e,this.position):this.clear(),this.dragging=t}destroy(){this.clear(),super.destroy()}clear(){let e=this.row;this.dragging=!1,e&&(this.uiLevel=0,this.position="none",this.row=null,e.dispatchRowEvent("rowHighlightChanged"))}set(e,t){let i=e!==this.row,o=e.uiLevel,r=t!==this.position,s=o!==this.uiLevel;this.dragging=!1,(i||r||s)&&(i&&this.clear(),this.uiLevel=o,this.position=t,this.row=e,e.dispatchRowEvent("rowHighlightChanged"))}fromDrag(e){let t=e?.dropTarget;if(t){let{highlight:e,target:i,position:o}=t;if(e&&i&&"none"!==o){this.set(i,o),this.dragging=!0;return}}this.dragging&&this.clear()}},n6={moduleName:"Drag",version:tv,beans:[nW]},n8={moduleName:"SharedDragAndDrop",version:tv,beans:[oj],dependsOn:[n6],userComponents:{agDragAndDropImage:ob},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},n7=class extends e2{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:o}=this;if(0===i.length&&0===o.length){e(),t();return}let r=e=>{for(;e.length;){let t=e.pop();t&&t()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),r(i)},0),window.setTimeout(()=>{t(),r(o)},200)})}},n9=class extends e2{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;if(t)for(let e of t)e.isPrimary()&&!e.isAnyFunctionActive()&&(e.isAllowValue()?this.columnsToAggregate.push(e):e.isAllowRowGroup()?this.columnsToGroup.push(e):e.isAllowPivot()&&this.columnsToPivot.push(e))}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:o}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&i?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&o?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function le(e){var t,i;let o,r,s,{isFromHeader:n,fromLeft:l,xPosition:a,fromEnter:d,fakeEvent:h,pinned:u,gos:c,colModel:g,colMoves:p,visibleCols:f}=e,{allMovingColumns:m}=e;n&&(m=function(e){let t=[...e];for(let i of e){let e=null,o=i.getParent();for(;null!=o&&1===o.getDisplayedLeafColumns().length;)e=o,o=o.getParent();if(null!=e)for(let i of e.getColGroupDef()?.marryChildren?e.getProvidedColumnGroup().getLeafColumns():e.getLeafColumns())t.includes(i)||t.push(i)}return t}(m));let C=m.slice();t=g.getCols(),C&&!(C.length<=1)&&(C.filter(e=>0>t.indexOf(e)).length>0||C.sort((e,i)=>t.indexOf(e)-t.indexOf(i)));let w=function(e){let t,{movingCols:i,draggingRight:o,xPosition:r,pinned:s,gos:n,colModel:l,visibleCols:a}=e;if(n.get("suppressMovableColumns")||i.some(e=>e.getColDef().suppressMovable))return[];let d=function(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}(a,s),h=l.getCols(),u=d.filter(e=>i.includes(e)),c=d.filter(e=>!i.includes(e)),g=h.filter(e=>!i.includes(e)),p=0,f=r;if(o){let e=0;for(let t of u)e+=t.getActualWidth();f-=e}if(f>0){for(let e=0;e<c.length&&!((f-=c[e].getActualWidth())<0);e++)p++;o&&p++}if(p>0){let e=c[p-1];t=g.indexOf(e)+1}else -1===(t=g.indexOf(c[0]))&&(t=0);let m=[t],C=(e,t)=>e-t;if(o){let e=t+1,i=h.length-1;for(;e<=i;)m.push(e),e++;m.sort(C)}else{let e=t,i=h.length-1,o=h[e];for(;e<=i&&0>d.indexOf(o);)e++,m.push(e),o=h[e];for(e=t-1;e>=0;)m.push(e),e--;m.sort(C).reverse()}return m}({movingCols:C,draggingRight:l,xPosition:a,pinned:u,gos:c,colModel:g,visibleCols:f}),v=(i=C,o=g.getCols(),s=(r=i.map(e=>o.indexOf(e)).sort((e,t)=>e-t))[0],x(r)-s!=r.length-1?null:s);if(0===w.length)return;let b=w[0];if(null!==v&&(n||!d)&&!h&&(!l&&b>=v||l&&b<=v))return;let y=function(e,t,i,o){let r=o.allCols,s=null,n=null;for(let o=0;o<e.length;o++){let l=e[o],a=i.getProposedColumnOrder(t,l);if(!i.doesOrderPassRules(a))continue;let d=a.filter(e=>r.includes(e));if(null===n)n=d;else if(!D(d,n))break;let h=function(e){function t(e){let t=[],i=e.getOriginalParent();for(;null!=i;)t.push(i),i=i.getOriginalParent();return t}let i=0;for(let o=0;o<e.length-1;o++){let r=t(e[o]),s=t(e[o+1]);for(let e of([r,s]=r.length>s.length?[r,s]:[s,r],r))-1===s.indexOf(e)&&i++}return i}(a);(null===s||h<s.fragCount)&&(s={move:l,fragCount:h})}return s}(w,C,p,f);if(!y)return;let S=y.move;if(!(S>g.getCols().length-C.length))return{columns:C,toIndex:S}}function lt(e){let{columns:t,toIndex:i}=le(e)||{},{finished:o,colMoves:r}=e;return t&&null!=i?(r.moveColumns(t,i,"uiColumnMoved",o),o?null:{columns:t,toIndex:i}):null}function li(e){let{pinned:t,fromKeyboard:i,gos:o,ctrlsSvc:r,useHeaderRow:s,skipScrollPadding:n}=e,l=r.getHeaderRowContainerCtrl(t)?.eViewport,{x:a}=e;return l?(i&&(a-=l.getBoundingClientRect().left),o.get("enableRtl")&&(s&&(l=l.querySelector(".ag-header-row")),a=l.clientWidth-a),null!=t||n||(a+=r.get("center").getCenterViewportScrollLeft()),a):0}function lo(e,t){for(let i of e)i.moving=t,i.dispatchColEvent("movingChanged","uiColumnMoved")}var lr=class extends e2{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!A(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){let{pinned:e,lastDraggingEvent:t}=this,{dragItem:i}=t||{};for(let t of i?.columns??[]){let o=t.getPinned();if(t.getColDef().lockPinned){if(o==e)return"move";continue}let r=i?.containerType;if(r===e||!e)return"move";if(e&&(!o||r!==e))return"pinned"}return"notAllowed"}onDragEnter(e){let t=e.dragItem,i=t.columns;if(0===e.dragSource.type)this.setColumnsVisible(i,!0,"uiColumnDragged");else{let e=t.visibleState,o=(i||[]).filter(t=>e[t.getId()]&&!t.isVisible());this.setColumnsVisible(o,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(i,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,i=!1,o=!1){let{gos:r,ctrlsSvc:s}=this.beans,n=r.get("suppressMoveWhenColumnDragging");if(o&&!n)return void this.finishColumnMoving();if(this.lastDraggingEvent=e,!e||!o&&I(e.hDirection))return;let l=li({x:e.x,pinned:this.pinned,gos:r,ctrlsSvc:s});t||this.checkCenterForScrolling(l),n?this.handleColumnDragWhileSuppressingMovement(e,t,i,l,o):this.handleColumnDragWhileAllowingMovement(e,t,i,l,o)}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?.length)return;let o=e.filter(e=>!e.getColDef().lockVisible);o.length&&this.beans.colModel.setColsVisible(o,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,o,r){let s=this.getAllMovingColumns(e,!0);if(r){let e=this.isAttemptingToPin(s);e&&this.attemptToPinColumns(s,void 0,!0);let{fromLeft:o,xPosition:r}=this.getNormalisedXPositionInfo(s,e)||{};if(null==o||null==r)return void this.finishColumnMoving();this.moveColumnsAfterHighlight({allMovingColumns:s,xPosition:r,fromEnter:t,fakeEvent:i,fromLeft:o})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(s,o)}}handleColumnDragWhileAllowingMovement(e,t,i,o,r){let s=this.getAllMovingColumns(e),n="right"===this.normaliseDirection(e.hDirection),l=1===e.dragSource.type,a=lt({...this.getMoveColumnParams({allMovingColumns:s,isFromHeader:l,xPosition:o,fromLeft:n,fromEnter:t,fakeEvent:i}),finished:r});a&&(this.lastMovedInfo=a)}getAllMovingColumns(e,t=!1){let i=e.dragSource.getDragItem(),o=null;t&&(o=i.columnsInSplit)||(o=i.columns);let r=e=>!e.getColDef().lockPinned||e.getPinned()==this.pinned;return o?o.filter(r):[]}getMoveColumnParams(e){let{allMovingColumns:t,isFromHeader:i,xPosition:o,fromLeft:r,fromEnter:s,fakeEvent:n}=e,{gos:l,colModel:a,colMoves:d,visibleCols:h}=this.beans;return{allMovingColumns:t,isFromHeader:i,fromLeft:r,xPosition:o,pinned:this.pinned,fromEnter:s,fakeEvent:n,gos:l,colModel:a,colMoves:d,visibleCols:h}}highlightHoveredColumn(e,t){let i,{gos:o,colModel:r}=this.beans,s=o.get("enableRtl"),n=r.getCols().filter(e=>e.isVisible()&&e.getPinned()===this.pinned),l=null,a=null,d=null;for(let e of n){if(a=e.getActualWidth(),null!=(l=this.getNormalisedColumnLeft(e,0,s))){let i=l+a;if(l<=t&&i>=t){d=e;break}}l=null,a=null}if(d)-1!==e.indexOf(d)&&(d=null);else{for(let e=n.length-1;e>=0;e--){let t=n[e],i=n[e].getParent();if(!i){d=t;break}let o=i?.getDisplayedLeafColumns();if(o.length){d=x(o);break}}if(!d)return;l=this.getNormalisedColumnLeft(d,0,s),a=d.getActualWidth()}if(null==d||null==l||null==a){this.lastHighlightedColumn?.column!==d&&this.clearHighlighted();return}if(t-l<a/2){let e=n.indexOf(d);0===e?i=0:(i=1,d=n[e-1])}else i=1;(this.lastHighlightedColumn?.column!==d||this.lastHighlightedColumn?.position!==i)&&this.clearHighlighted(),ls(d,i),this.lastHighlightedColumn={column:d,position:i}}getNormalisedXPositionInfo(e,t){let{gos:i,visibleCols:o}=this.beans,r=i.get("enableRtl"),{firstMovingCol:s,column:n,position:l}=this.getColumnMoveAndTargetInfo(e,t,r);if(!s||!n||null==l)return;let a=o.allCols,d=a.indexOf(s),h=a.indexOf(n),u=0===l,c=d<h||d===h&&!u,g=0;if(u?c&&(g-=1):c||(g+=1),h+g===d)return;let p=a[h+g];if(p)return{fromLeft:c,xPosition:this.getNormalisedColumnLeft(p,20,r)}}getColumnMoveAndTargetInfo(e,t,i){let o=this.lastHighlightedColumn||{},{firstMovingCol:r,lastMovingCol:s}=function(e){let t,i,o=e.length;for(let r=0;r<o;r++){if(!t){let i=e[r];null!=i.getLeft()&&(t=i)}if(!i){let t=e[o-1-r];null!=t.getLeft()&&(i=t)}if(t&&i)break}return{firstMovingCol:t,lastMovingCol:i}}(e);if(!r||!s||o.column||!t)return{firstMovingCol:r,...o};let n="left"===this.getPinDirection();return{firstMovingCol:r,position:+!!n,column:n!==i?r:s}}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:o,ctrlsSvc:r}=this.beans,s=e.getLeft();if(null==s)return null;let n=e.getActualWidth();return li({x:i?s+n-t:s+t,pinned:e.getPinned(),useHeaderRow:i,skipScrollPadding:!0,gos:o,ctrlsSvc:r})}isAttemptingToPin(e){let t=this.needToMoveLeft||this.needToMoveRight,i=this.failedMoveAttempts>7;return t&&i||e.some(e=>e.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){let{allMovingColumns:t,xPosition:i,fromEnter:o,fakeEvent:r,fromLeft:s}=e,{columns:n,toIndex:l}=le(this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:i,fromLeft:s,fromEnter:o,fakeEvent:r}))||{};n&&null!=l&&(this.lastMovedInfo={columns:n,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){let{lastHighlightedColumn:e}=this;e&&(ls(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){let t,i;if(!this.isCenterContainer)return;let o=this.beans.ctrlsSvc.get("center"),r=o.getCenterViewportScrollLeft(),s=r+o.getCenterWidth();this.gos.get("enableRtl")?(t=e<r+50,i=e>s-50):(i=e<r+50,t=e>s-50),this.needToMoveRight=t,this.needToMoveLeft=i,i||t?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.beans.dragAndDrop.setDragImageCompIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.setDragImageCompIcon(this.getIconName()))}moveInterval(){let e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);let t=null,i=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=i.scrollHorizontally(-e):this.needToMoveRight&&(t=i.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;let{pinnedCols:e,dragAndDrop:t,gos:i}=this.beans;if(this.failedMoveAttempts<=8||!e)return;if(t.setDragImageCompIcon("pinned"),!i.get("suppressMoveWhenColumnDragging")){let e=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(e,void 0,!0)}}}getPinDirection(){return this.needToMoveLeft||"left"===this.pinned?"left":this.needToMoveRight||"right"===this.pinned?"right":void 0}attemptToPinColumns(e,t,i=!1){let o=(e||[]).filter(e=>!e.getColDef().lockPinned);if(!o.length)return 0;i&&(t=this.getPinDirection());let{pinnedCols:r,dragAndDrop:s}=this.beans;return r?.setColsPinned(o,t,"uiColumnDragged"),i&&s.nudge(),o.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function ls(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}var ln=class extends e2{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){let{ctrlsSvc:e,dragAndDrop:t}=this.beans,i=this.pinned;e.whenReady(this,e=>{let t,o=e.gridBodyCtrl.eBodyViewport;switch(i){case"left":t=[[o,e.left.eContainer],[e.bottomLeft.eContainer],[e.topLeft.eContainer]];break;case"right":t=[[o,e.right.eContainer],[e.bottomRight.eContainer],[e.topRight.eContainer]];break;default:t=[[o,e.center.eViewport],[e.bottomCenter.eViewport],[e.topCenter.eViewport]]}this.eSecondaryContainers=t}),this.moveColumnFeature=this.createManagedBean(new lr(i)),this.bodyDropPivotTarget=this.createManagedBean(new n9(i)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return 1===e||0===e&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&0===e.dragSource.type}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()}},ll=class extends e2{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,i){let o=this.beans.colModel.getCols();if(!o)return;let r=o[e];this.moveColumns([r],t,i)}moveColumns(e,t,i,o=!0){let{colModel:r,colAnimation:s,visibleCols:n,eventSvc:l}=this.beans,a=r.getCols();if(!a)return;if(t>a.length-e.length)return void tM(30,{toIndex:t});s?.start();let d=r.getColsForKeys(e);this.doesMovePassRules(d,t)&&(T(r.getCols(),d,t),n.refresh(i),l.dispatchEvent({type:"columnMoved",columns:d,column:1===d.length?d[0]:null,toIndex:t,finished:o,source:i})),s?.finish()}doesMovePassRules(e,t){let i=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(i)}doesOrderPassRules(e){let{colModel:t,gos:i}=this.beans;return!!ij(e,t.getColTree())&&!!(e=>{let t=e=>e?"left"===e||!0===e?-1:1:0,o=i.get("enableRtl"),r=o?1:-1,s=!0;for(let i of e){let e=t(i.getColDef().lockPosition);o?e>r&&(s=!1):e<r&&(s=!1),r=e}return s})(e)}getProposedColumnOrder(e,t){let i=this.beans.colModel.getCols().slice();return T(i,e,t),i}createBodyDropTarget(e,t){return new ln(e,t)}moveHeader(e,t,i,o,r){let s,{ctrlsSvc:n,gos:l,colModel:a,visibleCols:d,focusSvc:h}=this.beans,u=t.getBoundingClientRect(),c=u.left,g=i1(i),p=g?u.width:i.getActualWidth(),f="left"===e!==l.get("enableRtl"),m=li({x:f?c-20:c+p+20,pinned:o,fromKeyboard:!0,gos:l,ctrlsSvc:n}),C=h.focusedHeader;if(lt({allMovingColumns:g?i.getLeafColumns():[i],isFromHeader:!0,fromLeft:"right"===e,xPosition:m,pinned:o,fromEnter:!1,fakeEvent:!1,gos:l,colModel:a,colMoves:this,visibleCols:d,finished:!0}),g){let e=i.getDisplayedLeafColumns();s=f?e[0]:x(e)}else s=i;if(n.getScrollFeature().ensureColumnVisible(s,"auto"),(!r.isAlive()||l.get("ensureDomOrder"))&&C){let e;if(g){let t=i.getGroupId(),o=i.getLeafColumns();if(!o.length)return;let r=o[0].getParent();if(!r)return;e=function(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}(r,t)}else e=i;e&&h.focusHeaderPosition({headerPosition:{...C,column:e}})}}setDragSourceForHeader(e,t,i){let{gos:o,colModel:r,dragAndDrop:s,visibleCols:n}=this.beans,l=!o.get("suppressDragLeaveHidesColumns"),a=i1(t),d=a?t.getProvidedColumnGroup().getLeafColumns():[t],h={type:1,eElement:e,getDefaultIconName:()=>l?"hide":"notAllowed",getDragItem:a?()=>(function(e,t){let i=e.getProvidedColumnGroup().getLeafColumns(),o={};for(let e of i)o[e.getId()]=e.isVisible();let r=[];for(let e of t)i.indexOf(e)>=0&&(r.push(e),M(i,e));for(let e of i)r.push(e);let s=[],n=e.getLeafColumns();for(let e of r)-1!==n.indexOf(e)&&s.push(e);return{columns:r,columnsInSplit:s,visibleState:o,containerType:s[0]?.pinned}})(t,n.allCols):()=>{var e;let i;return(i={})[(e=t).getId()]=e.isVisible(),{columns:[e],visibleState:i,containerType:e.pinned}},dragItemName:i,onDragStarted:()=>{l=!o.get("suppressDragLeaveHidesColumns"),lo(d,!0)},onDragStopped:()=>lo(d,!1),onDragCancelled:()=>lo(d,!1),onGridEnter:e=>{if(l){let{columns:t=[],visibleState:i}=e??{},o=a?e=>!i||i[e.getColId()]:()=>!0,s=t.filter(e=>!e.getColDef().lockVisible&&o(e));r.setColsVisible(s,!0,"uiColumnMoved")}},onGridExit:e=>{if(l){let t=e?.columns?.filter(e=>!e.getColDef().lockVisible)||[];r.setColsVisible(t,!1,"uiColumnMoved")}}};return s.addDragSource(h,!0),h}},la={moduleName:"AutoWidth",version:tv,beans:[class extends e2{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 o=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||o.push(i),this.getPreferredWidthForElements(o)}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 o=this.centerRowContainerCtrl.eContainer;for(let t of e)this.cloneItemIntoDummy(t,i);o.appendChild(i);let r=Math.ceil(i.getBoundingClientRect().width);return i.remove(),r+(t=t??this.gos.get("autoSizePadding"))}getHeaderCellForColumn(e){let t=null;for(let i of this.beans.ctrlsSvc.getHeaderRowContainerCtrls()){let o=i.getHtmlElementForColumnHeader(e);null!=o&&(t=o)}return t}cloneItemIntoDummy(e,t){let i=e.cloneNode(!0);i.style.width="",i.style.position="static",i.style.left="";let o=document.createElement("div"),r=o.classList;["ag-header-cell","ag-header-group-cell"].some(e=>i.classList.contains(e))?(r.add("ag-header","ag-header-row"),o.style.position="static"):r.add("ag-row");let s=e.parentElement;for(;s;){if(["ag-header-row","ag-row"].some(e=>s.classList.contains(e))){for(let e=0;e<s.classList.length;e++){let t=s.classList[e];"ag-row-position-absolute"!=t&&r.add(t)}break}s=s.parentElement}o.appendChild(i),t.appendChild(o)}}]},ld=class extends e2{constructor(e,t,i,o){super(),this.comp=e,this.eResize=t,this.pinned=i,this.columnGroup=o}postConstruct(){if(!this.columnGroup.isResizable())return void this.comp.setResizableDisplayed(!1);let{horizontalResizeSvc:e,gos:t,colAutosize:i}=this.beans,o=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(o),!t.get("suppressAutoSize")&&i&&this.addDestroyFunc(i.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){let{columnsToResize:t,resizeStartWidth:i,resizeRatios:o,groupAfterColumns:r,groupAfterStartWidth:s,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=i,this.resizeRatios=o,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=s,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,i="uiColumnResized"){let o=this.normaliseDragChange(t),r=this.resizeStartWidth+o;this.resizeColumnsFromLocalValues(r,i,e)}getInitialValues(e){let t=e=>e.reduce((e,t)=>e+t.getActualWidth(),0),i=(e,t)=>e.map(e=>e.getActualWidth()/t),o=this.getColumnsToResize(),r=t(o),s=i(o,r),n={columnsToResize:o,resizeStartWidth:r,resizeRatios:s},l=null;if(e&&(l=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),l){let e=n.groupAfterColumns=l.getDisplayedLeafColumns().filter(e=>e.isResizable()),o=n.groupAfterStartWidth=t(e);n.groupAfterRatios=i(e,o)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}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 o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(o,e,t,i)}resizeColumns(e,t,i,o=!0){let{columnsToResize:r,resizeStartWidth:s,resizeRatios:n,groupAfterColumns:l,groupAfterStartWidth:a,groupAfterRatios:d}=e,h=[];if(h.push({columns:r,ratios:n,width:t}),l){let e=t-s;h.push({columns:l,ratios:d,width:a-e})}this.beans.colResize?.resizeColumnSets({resizeSets:h,finished:o,source:i}),o&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.toggleCss("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(e=>e.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},lh=class extends e2{constructor(e,t,i,o,r){super(),this.pinned=e,this.column=t,this.eResize=i,this.comp=o,this.ctrl=r}postConstruct(){let e,t,i=[],o=()=>{if(ep(this.eResize,e),!e)return;let{horizontalResizeSvc:o,colAutosize:r}=this.beans,s=o.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});i.push(s),t&&r&&i.push(r.addColumnAutosizeListeners(this.eResize,this.column))},r=()=>{for(let e of i)e();i.length=0},s=()=>{let i=this.column.isResizable(),s=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(i!==e||s!==t)&&(e=i,t=s,r(),o())};s(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",s)}onResizing(e,t){let{column:i,lastResizeAmount:o,resizeStartWidth:r,beans:s}=this,n=this.normaliseResizeAmount(t),{pinnedCols:l,ctrlsSvc:a,colResize:d}=s;if(!(this.column.getPinned()&&(l?.leftWidth??0)+(l?.rightWidth??0)+(n-o)>ev(a.getGridBodyCtrl().eBodyViewport)-50))this.lastResizeAmount=n,d?.setColumnWidths([{key:i,newWidth:r+n}],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.column.resizing=e,this.comp.toggleCss("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e,i="left"!==this.pinned,o="right"===this.pinned;return this.gos.get("enableRtl")?i&&(t*=-1):o&&(t*=-1),t}},lu=class extends e2{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,i,o){let r=[],{colModel:s,gos:n,visibleCols:l}=this.beans;for(let i of e){let e=s.getColDefCol(i.key)||s.getCol(i.key);if(e&&(r.push({width:i.newWidth,ratios:[1],columns:[e]}),"shift"===n.get("colResizeDefault")&&(t=!t),t)){let t=l.getColAfter(e);if(!t)continue;let o=e.getActualWidth()-i.newWidth,s=t.getActualWidth()+o;r.push({width:s,ratios:[1],columns:[t]})}}0!==r.length&&this.resizeColumnSets({resizeSets:r,finished:i,source:o})}resizeColumnSets(e){let{resizeSets:t,finished:i,source:o}=e;if(!(!t||t.every(e=>(function(e){let{columns:t,width:i}=e,o=0,r=0,s=!0;for(let e of t){o+=e.getMinWidth()||0;let t=e.getMaxWidth();t>0?r+=t:s=!1}let n=i>=o,l=!s||i<=r;return n&&l})(e)))){if(i){let e=t&&t.length>0?t[0].columns:null;iY(this.eventSvc,e,i,o)}return}let r=[],s=[];for(let e of t){let{width:t,columns:i,ratios:n}=e,l={},a={};for(let e of i)s.push(e);let d=!0,h=0;for(;d;){if(++h>1e3){tT(31);break}d=!1;let e=[],o=0,r=t;i.forEach((t,i)=>{if(a[t.getId()])r-=l[t.getId()];else{e.push(t);let r=n[i];o+=r}});let s=1/o;e.forEach((i,o)=>{let h;o===e.length-1?h=r:(h=Math.round(n[o]*t*s),r-=h);let u=i.getMinWidth(),c=i.getMaxWidth();h<u?(h=u,a[i.getId()]=!0,d=!0):c>0&&h>c&&(h=c,a[i.getId()]=!0,d=!0),l[i.getId()]=h})}for(let e of i){let t=l[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,o),r.push(e))}}let n=r.length>0,l=[];if(n){let{colFlex:e,visibleCols:t,colViewport:i}=this.beans;l=e?.refreshFlexedColumns({resizingCols:s,skipSetLeft:!0})??[],t.setLeftValues(o),t.updateBodyWidths(),i.checkViewportColumns()}let a=s.concat(l);(n||i)&&iY(this.eventSvc,a,i,o,l)}resizeHeader(e,t,i){if(!e.isResizable())return;let o=Math.min(Math.max(e.getActualWidth()+t,e.getMinWidth()),e.getMaxWidth());this.setColumnWidths([{key:e,newWidth:o}],i,!0,"uiColumnResized")}createResizeFeature(e,t,i,o,r){return new lh(e,t,i,o,r)}createGroupResizeFeature(e,t,i,o){return new ld(e,t,i,o)}},lc=class extends e2{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);for(let t of this.columnGroup.getLeafColumns())t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})}removeListenersOnChildrenColumns(){for(let e of this.removeChildListenersFuncs)e();this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){let e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.toggleCss("ag-hidden",0===e)}},lg=class extends r${constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}wireComp(e,t,i,o,r){let{column:s,beans:n}=this,{context:l,colNames:a,colHover:d,rangeSvc:h,colResize:u}=n;this.comp=e,r=rH(this,l,r),this.setGui(t,r),this.displayName=a.getDisplayNameForColumnGroup(s,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(),this.refreshAnnouncement(),this.setupAutoHeight({wrapperElement:o,compBean:r}),this.setupUserComp(),this.addHeaderMouseListeners(r,o),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();let c=this.rowCtrl.pinned,g=s.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(r,g,t),h?.createRangeHighlightFeature(r,s,e),r.createManagedBean(new rO(s,t,n)),r.createManagedBean(new lc(e,s)),u?this.resizeFeature=r.createManagedBean(u.createGroupResizeFeature(e,i,c,s)):e.setResizableDisplayed(!1),r.createManagedBean(new rw(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>void 0,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,g),this.addManagedEventListeners({cellSelectionChanged:()=>this.refreshAnnouncement()}),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){let{column:e,beans:t}=this,i=e.getDefinition();return is(t.gos,{colDef:i,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){let{gos:e,comp:t}=this,i=e.get("groupHeaderHeight");null!=i?0===i?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,o=x(t)===e;if(!i&&!o)return;let r=e.getHighlighted(),s=!!this.rowCtrl.getHeaderCellCtrls().find(e=>e.column.isMoving()),n=!1,l=!1;if(s){let e=this.beans.gos.get("enableRtl"),t=1===r,s=0===r;i&&(e?l=t:n=s),o&&(e?n=s:l=t)}this.comp.toggleCss("ag-header-highlight-before",n),this.comp.toggleCss("ag-header-highlight-after",l)}resizeHeader(e,t){let{resizeFeature:i}=this;if(!i)return;let o=i.getInitialValues(t);i.resizeColumns(o,o.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){let e,{colGroupSvc:t,userCompFactory:i,gos:o,enterpriseMenuFactory:r}=this.beans,s=this.column,n=s.getProvidedColumnGroup(),l=is(o,{displayName:this.displayName,columnGroup:s,setExpanded:e=>{t.setColumnGroupOpened(n,e,"gridInitializing")},setTooltip:(e,t)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(e,t)},showColumnMenu:(e,t)=>r?.showMenuAfterButtonClick(n,e,"columnMenu",t),showColumnMenuAfterMouseClick:(e,t)=>r?.showMenuAfterMouseEvent(n,e,"columnMenu",t),eGridHeader:this.eGui}),a=(e=l.columnGroup.getColGroupDef(),i.getCompDetails(e,oT,"agColumnGroupHeader",l));a&&this.comp.setUserCompDetails(a)}addHeaderMouseListeners(e,t){let{column:i,comp:o,beans:{rangeSvc:r},gos:s}=this,n=e=>this.handleMouseOverChange("mouseenter"===e.type),l=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",i.getProvidedColumnGroup()),a=e=>this.handleContextMenuMouseEvent(e,void 0,i.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:n,mouseleave:n,click:l,contextmenu:a}),o.toggleCss("ag-header-group-cell-selectable",t5(s));let d=r?.createHeaderGroupCellMouseListenerFeature(this.column,t);d&&this.createManagedBean(d)}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=rN(t,this.gos,null,e);for(let o of(e.isPadding()?(i.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(e=>e.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))this.comp.toggleCss(o,!0)}setupMovingCss(e){let{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),o=()=>this.comp.toggleCss("ag-header-cell-moving",t.isMoving());for(let t of i)e.addManagedListeners(t,{movingChanged:o});o()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription())}handleKeyDown(e){if(super.handleKeyDown(e),!this.getWrapperHasFocus())return;let{column:t,expandable:i,gos:o,beans:r}=this,s=t5(o);if(e.key==i3){if(s&&!e.altKey)r.rangeSvc?.handleColumnSelection(t,e);else if(i){let e=!t.isExpanded();r.colGroupSvc.setColumnGroupOpened(t.getProvidedColumnGroup(),e,"uiColumnExpanded")}}}refreshAnnouncement(){let e,{gos:t,column:i,beans:o}=this;if(t5(t)){let t=this.getLocaleTextFunc(),r=o.rangeSvc?.isColumnInAnyRange(i);e=t("ariaColumnCellSelection",`Press CTRL+SPACE to ${r?"de":""}select all visible cells in this column group`)}this.ariaAnnouncement=e}announceAriaDescription(){let{beans:e,eGui:t,ariaAnnouncement:i}=this;i&&t.contains($(e))&&e.ariaAnnounce?.announceValue(i,"columnHeader")}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()}},lp=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){let t,i=this.existingIds[e];return t="number"!=typeof i?0:i+1,this.existingIds[e]=t,t}},lf=class extends e2{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.headerGroupRowCount=0,this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){let{colFlex:i,colModel:o,colGroupSvc:r,colViewport:s,selectionColSvc:n}=this.beans;t||this.buildTrees(o,r),r?.updateOpenClosedVisibility(),this.leftCols=lC(this.treeLeft),this.centerCols=lC(this.treeCenter),this.rightCols=lC(this.treeRight),n?.refreshVisibility(this.leftCols,this.centerCols,this.rightCols),this.joinColsAriaOrder(o),this.joinCols(),this.headerGroupRowCount=this.getHeaderRowCount(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(e=>e.isAutoHeight()),i?.refreshFlexedColumns(),this.updateBodyWidths(),this.setFirstRightAndLastLeftPinned(o,this.leftCols,this.rightCols,e),s.checkViewportColumns(!1),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}getHeaderRowCount(){if(!this.gos.get("hidePaddedHeaderRows"))return this.beans.colModel.cols.treeDepth;let e=0;for(let t of this.allCols){let i=t.getParent();for(;i;){if(!i.isPadding()){let t=i.getProvidedColumnGroup().getLevel()+1;t>e&&(e=t);break}i=i.getParent()}}return e}updateBodyWidths(){let e=ik(this.centerCols),t=ik(this.leftCols),i=ik(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,o){let r,s;for(let n of(this.gos.get("enableRtl")?(r=t?t[0]:null,s=i?x(i):null):(r=t?x(t):null,s=i?i[0]:null),e.getCols()))n.setLastLeftPinned(n===r,o),n.setFirstRightPinned(n===s,o)}buildTrees(e,t){let i=e.getColsToShow(),o=i.filter(e=>"left"==e.getPinned()),r=i.filter(e=>"right"==e.getPinned()),s=i.filter(e=>"left"!=e.getPinned()&&"right"!=e.getPinned()),n=new lp,l=e=>t?t.createColumnGroups(e):e.columns;this.treeLeft=l({columns:o,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=l({columns:r,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=l({columns:s,idCreator:n,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=[],o=[],r=[];for(let e of t){let t=e.getPinned();t?!0===t||"left"===t?i.push(e):r.push(e):o.push(e)}this.ariaOrderColumns=i.concat(o).concat(r)}getAriaColIndex(e){let t;return t=i1(e)?e.getLeafColumns()[0]:e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){for(let e of[this.treeLeft,this.treeRight,this.treeCenter])for(let t of e)i1(t)&&t.checkLeft()}setLeftValuesOfCols(e){let{colModel:t}=this.beans;if(!t.getColDefCols())return;let i=t.getCols().slice(0),o=this.gos.get("enableRtl");for(let t of[this.leftCols,this.rightCols,this.centerCols]){if(o){let i=ik(t);for(let o of t)i-=o.getActualWidth(),o.setLeft(i,e)}else{let i=0;for(let o of t)o.setLeft(i,e),i+=o.getActualWidth()}for(let e=0;e<t.length;e++){let o=i.indexOf(t[e]);o>=0&&(i[o]=i[i.length-1],i.pop())}}for(let t of i)t.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,o){let r=[],s=null;for(let n=0;n<t.length;n++){let l,a=t[n],d=t.length-n,h=Math.min(a.getColSpan(e),d),u=[a];if(h>1){let e=h-1;for(let i=1;i<=e;i++)u.push(t[n+i]);n+=e}if(i)for(let e of(l=!1,u))i(e)&&(l=!0);else l=!0;l&&(0===r.length&&s&&o&&o(a)&&r.push(s),r.push(a)),s=a}return r}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=e=>{this.colsAndGroupsMap[e.getUniqueId()]=e};lm(this.treeCenter,!1,e),lm(this.treeLeft,!1,e),lm(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 o=this[t[i]];if(o.length)return e?x(o):o[0]}return null}getColAfter(e){let t=this.allCols,i=t.indexOf(e);return i<t.length-1?t[i+1]:null}getColsLeftWidth(){return ik(this.leftCols)}getDisplayedColumnsRightWidth(){return ik(this.rightCols)}isColAtEdge(e,t){let i,o=this.allCols;if(!o.length)return!1;let r="first"===t;if(i1(e)){let t=e.getDisplayedLeafColumns();if(!t.length)return!1;i=r?t[0]:x(t)}else i=e;return(r?o[0]:x(o))===i}};function lm(e,t,i){if(e)for(let o=0;o<e.length;o++){let r=e[o];i1(r)&&lm(t?r.getDisplayedChildren():r.getChildren(),t,i),i(r)}}function lC(e){let t=[];return lm(e,!0,e=>{ih(e)&&t.push(e)}),t}var lw=class extends e2{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){let e=[];return i$(null,this.beans.colModel.getColTree(),t=>{iS(t)&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})}),e}resetColumnGroupState(e){let t=this.beans.colModel.getColDefColTree();if(!t)return;let i=[];i$(null,t,e=>{if(iS(e)){let t=e.getColGroupDef(),o={groupId:e.getGroupId(),open:t?t.openByDefault:void 0};i.push(o)}}),this.setColumnGroupState(i,e)}setColumnGroupState(e,t){let{colModel:i,colAnimation:o,visibleCols:r,eventSvc:s}=this.beans;if(!i.getColTree().length)return;o?.start();let n=[];for(let t of e){let e=t.groupId,i=t.open,o=this.getProvidedColGroup(e);o&&o.isExpanded()!==i&&(o.setExpanded(i),n.push(o))}r.refresh(t,!0),n.length&&s.dispatchEvent({type:"columnGroupOpened",columnGroup:1===n.length?n[0]:void 0,columnGroups:n}),o?.finish()}setColumnGroupOpened(e,t,i){let o;o=iS(e)?e.getId():e||"",this.setColumnGroupState([{groupId:o,open:t}],i)}getProvidedColGroup(e){let t=null;return i$(null,this.beans.colModel.getColTree(),i=>{iS(i)&&i.getId()===e&&(t=i)}),t}getGroupAtDirection(e,t){let i=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),o=e.getDisplayedLeafColumns(),r="After"===t?x(o):o[0],s=`getCol${t}`;for(;;){let t=this.beans.visibleCols[s](r);if(!t)return null;let o=this.getColGroupAtLevel(t,i);if(o!==e)return o}}getColGroupAtLevel(e,t){let i=e.getParent();for(;!(i.getProvidedColumnGroup().getLevel()+i.getPaddingLevel()<=t);)i=i.getParent();return i}updateOpenClosedVisibility(){lm(this.beans.visibleCols.getAllTrees(),!1,e=>{i1(e)&&e.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(i1(e))return e;let i=this.beans.visibleCols.getAllTrees(),o="number"==typeof t,r=null;return lm(i,!1,i=>{i1(i)&&(o?e===i.getGroupId()&&t===i.getPartId():e===i.getGroupId())&&(r=i)}),r}createColumnGroups(e){let{columns:t,idCreator:i,pinned:o,oldDisplayedGroups:r,isStandaloneStructure:s}=e,n=this.mapOldGroupsById(r),l=[],a=t;for(;a.length;){let e=a;a=[];let t=0,r=r=>{let d=t;t=r;let h=e[d],u=(i1(h)?h.getProvidedColumnGroup():h).getOriginalParent();if(null==u){for(let t=d;t<r;t++)l.push(e[t]);return}let c=this.createColumnGroup(u,i,n,o,s);for(let t=d;t<r;t++)c.addChild(e[t]);a.push(c)};for(let i=1;i<e.length;i++){let o=e[i],s=(i1(o)?o.getProvidedColumnGroup():o).getOriginalParent(),n=e[t];s!==(i1(n)?n.getProvidedColumnGroup():n).getOriginalParent()&&r(i)}t<e.length&&r(e.length)}return s||this.setupParentsIntoCols(l,null),l}createProvidedColumnGroup(e,t,i,o,r,s,n){let l=r.getUniqueKey(t.groupId||null,null),a=iP(this.beans,t,l),d=new iR(a,l,!1,i);this.createBean(d);let h=this.findExistingGroup(t,s);h&&s.splice(h.idx,1);let u=h?.group;u&&d.setExpanded(u.isExpanded());let c=iz(this.beans,a.children,i+1,e,o,r,s,n);return d.setChildren(c),d}balanceColumnTree(e,t,i,o){let r=[];for(let s=0;s<e.length;s++){let n=e[s];if(iS(n)){let e=this.balanceColumnTree(n.getChildren(),t+1,i,o);n.setChildren(e),r.push(n)}else{let s,l;for(let e=t;e<i;e++){let t=o.getUniqueKey(null,null),i=new iR(iP(this.beans,null,t),t,!0,e);this.createBean(i),l&&l.setChildren([i]),l=i,s||(s=l)}if(s&&l){if(r.push(s),e.some(e=>iS(e))){l.setChildren([n]);continue}l.setChildren(e);break}r.push(n)}}return r}findDepth(e){let t=0,i=e;for(;i?.[0]&&iS(i[0]);)t++,i=i[0].getChildren();return t}findMaxDepth(e,t){let i=t;for(let o=0;o<e.length;o++){let r=e[o];if(iS(r)){let e=this.findMaxDepth(r.getChildren(),t+1);i<e&&(i=e)}}return i}balanceTreeForAutoCols(e,t){let i=[];for(let o of e){let e=o;for(let i=t-1;i>=0;i--){let t=new iR(null,`FAKE_PATH_${o.getId()}_${i}`,!0,i);this.createBean(t),t.setChildren([e]),e.originalParent=t,e=t}0===t&&(o.originalParent=null),i.push(e)}return i}findExistingGroup(e,t){if(null!=e.groupId)for(let i=0;i<t.length;i++){let o=t[i];if(o.getColGroupDef()&&o.getId()===e.groupId)return{idx:i,group:o}}}createColumnGroup(e,t,i,o,r){let s=e.getGroupId(),n=t.getInstanceIdForKey(s),l=i[s+"_"+n];return l&&l.getProvidedColumnGroup()!==e&&(l=null),A(l)?l.reset():(l=new i2(e,s,n,o),r||this.createBean(l)),l}mapOldGroupsById(e){let t={},i=e=>{for(let o of e)i1(o)&&(t[o.getUniqueId()]=o,i(o.getChildren()))};return e&&i(e),t}setupParentsIntoCols(e,t){for(let i of e??[])i.parent!==t&&(this.beans.colViewport.colsWithinViewportHash=""),i.parent=t,i1(i)&&this.setupParentsIntoCols(i.getChildren(),i)}},lv=class extends e2{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents","rowNumbers","hidePaddedHeaderRows"],e=>this.refreshAll(iG(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),iG(e.source)))}createColsFromColDefs(e){let{beans:t}=this,{valueCache:i,colAutosize:o,rowGroupColsSvc:r,pivotColsSvc:s,valueColsSvc:n,visibleCols:l,eventSvc:a,groupHierarchyColSvc:d}=t,h=this.colDefs?iZ(t,e):void 0;i?.expire();let u=this.colDefCols?.list,c=this.colDefCols?.tree,g=function(e,t=null,i,o,r){var s;let n,l,a,d=new ix,{existingCols:h,existingGroups:u,existingColKeys:c}=(n=[],l=[],a=[],(s=o)&&i$(null,s,e=>{iS(e)?l.push(e):(a.push(e.getId()),n.push(e))}),{existingCols:n,existingGroups:l,existingColKeys:a});d.addExistingKeys(c);let g=iz(e,t,0,i,h,d,u,r),{colGroupSvc:p}=e,f=p?.findMaxDepth(g,0)??0,m=p?p.balanceColumnTree(g,0,f,d):g;return i$(null,m,iN),{columnTree:m,treeDepth:f}}(t,this.colDefs,!0,c,e);iA(t,this.colDefCols?.tree,g.columnTree);let p=g.columnTree,f=g.treeDepth,m=iT(p),C={};for(let e of m)C[e.getId()]=e;this.colDefCols={tree:p,treeDepth:f,list:m,map:C},this.createColumnsForService([d],this.colDefCols,e),r?.extractCols(e,u),s?.extractCols(e,u),n?.extractCols(e,u),this.ready=!0,this.changeEventsDispatching=!0,this.refreshCols(!0,e),this.changeEventsDispatching=!1,l.refresh(e),a.dispatchEvent({type:"columnEverythingChanged",source:e}),h&&(this.changeEventsDispatching=!0,h(),this.changeEventsDispatching=!1),a.dispatchEvent({type:"newColumnsLoaded",source:e}),"gridInitializing"===e&&o?.applyAutosizeStrategy()}refreshCols(e,t){var i;if(!this.colDefCols)return;let o=this.cols?.tree;this.saveColOrder();let{autoColSvc:r,selectionColSvc:s,rowNumbersSvc:n,quickFilter:l,pivotResultCols:a,showRowGroupCols:d,rowAutoHeight:h,visibleCols:u,colViewport:c,eventSvc:g,formula:p}=this.beans,f=this.selectCols(a,this.colDefCols);p?.setFormulasActive(f),this.createColumnsForService([r,s,n],f,t);let m=(i=this.gos,this.showingPivotResult?!i.get("enableStrictPivotColumnOrder"):i.get("maintainColumnOrder"));(!e||m)&&this.restoreColOrder(f),this.positionLockedCols(f),d?.refresh(),l?.refreshCols(),this.setColSpanActive(),h?.setAutoHeightActive(f),u.clear(),c.clear(),D(o,this.cols.tree)||g.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t,i){for(let o of e)o&&(o.createColumns(t,e=>{this.lastOrder=e(this.lastOrder),this.lastPivotOrder=e(this.lastPivotOrder)},i),o.addColumns(t))}selectCols(e,t){let i=e?.getPivotResultCols()??null;this.showingPivotResult=null!=i;let{map:o,list:r,tree:s,treeDepth:n}=i??t;return this.cols={list:r.slice(),map:{...o},tree:s.slice(),treeDepth:n},i&&(i.list.some(e=>this.cols?.map[e.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];let{beans:e,showingPivotResult:t,cols:i}=this,{valueColsSvc:o,selectionColSvc:r}=e,s=this.isPivotMode()&&!t,n=r?.isSelectionColumnEnabled(),l=function({gos:e,formula:t}){let i=e.get("rowNumbers");return i||!!t?.active&&!1!==i}(e),a=o?.columns;return i.list.filter(e=>{let t=iI(e);if(!s)return t||e.isVisible();{let i=a?.includes(e);return t||i||n&&iL(e)||l&&iB(e)}})}refreshAll(e){this.ready&&(this.refreshCols(!1,e),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,i){iQ(this.beans,{state:e.map(e=>({colId:"string"==typeof e?e:e.getColId(),hide:!t}))},i)}restoreColOrder(e){let t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;let i=t.filter(t=>null!=e.map[t.getId()]);if(0===i.length)return;if(i.length===e.list.length){e.list=i;return}let o=e=>{let t=e.getOriginalParent();return!!t&&(t.getChildren().length>1||o(t))};if(!i.some(e=>o(e))){let t=new Set(i);for(let o of e.list)t.has(o)||i.push(o);e.list=i;return}let r=new Map;for(let e=0;e<i.length;e++){let t=i[e];r.set(t,e)}let s=e.list.filter(e=>!r.has(e));if(0===s.length){e.list=i;return}let n=(e,t)=>{let i=t?t.getOriginalParent():e.getOriginalParent();if(!i)return null;let o=null,s=null;for(let n of i.getChildren())if(n!==t&&n!==e){if(n instanceof ig){let e=r.get(n);if(null==e)continue;(null==o||o<e)&&(o=e,s=n);continue}n.forEachLeafColumn(e=>{let t=r.get(e);null!=t&&(null==o||o<t)&&(o=t,s=e)})}return null==s?n(e,i):s},l=[],a=new Map;for(let e of s){let t=n(e,null);if(null==t){l.push(e);continue}let i=a.get(t);void 0===i?a.set(t,e):Array.isArray(i)?i.push(e):a.set(t,[i,e])}let d=Array(e.list.length),h=d.length-1;for(let e=l.length-1;e>=0;e--)d[h--]=l[e];for(let e=i.length-1;e>=0;e--){let t=i[e],o=a.get(t);if(o)if(Array.isArray(o))for(let e=o.length-1;e>=0;e--){let t=o[e];d[h--]=t}else d[h--]=o;d[h--]=t}e.list=d}positionLockedCols(e){e.list=iK(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(e){return this.colDefCols&&this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[],e)}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>null!=e.getColDef().colSpan)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1,t);let{visibleCols:i,eventSvc:o}=this.beans;i.refresh(t),o.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=iG(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){iA(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:o,groupHierarchyColSvc:r}=this.beans;if(!(E(this.colDefCols?.list,e)||E(i?.columns?.list,e)||E(o?.columns?.list,e))&&!E(r?.columns?.list,e)&&E(t?.getPivotResultCols()?.list,e))return}getColsForKeys(e){return e?e.map(e=>this.getCol(e)).filter(e=>null!=e):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return null==e?null:this.getColFromCollection(e,this.cols)}getColById(e){return this.cols?.map[e]??null}getColFromCollection(e,t){if(null==t)return null;let{map:i,list:o}=t;if("string"==typeof e&&i[e])return i[e];for(let t=0;t<o.length;t++)if(iH(o[t],e))return o[t];let{autoColSvc:r,selectionColSvc:s,groupHierarchyColSvc:n}=this.beans;return r?.getColumn(e)??s?.getColumn(e)??n?.getColumn(e)??null}},lb={tag:"div",cls:"ag-skeleton-container"},ly=class extends ow{constructor(){super(lb)}init(e){let t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>ee(e.eParentOfValue)),ee(e.eParentOfValue,t),e.deferRender?this.setupLoading(e):e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){let e=this.getLocaleTextFunc();this.getGui().textContent=e("loadingError","ERR");let t=e("ariaSkeletonCellLoadingFailed","Row failed to load");X(this.getGui(),t)}setupLoading(e){let t=eW({tag:"div",cls:"ag-skeleton-effect"}),i=e.node.rowIndex;if(null!=i){let e=75+25*(i%2==0?Math.sin(i):Math.cos(i));t.style.width=`${e}%`}this.getGui().appendChild(t);let o=this.getLocaleTextFunc(),r=e.deferRender?o("ariaDeferSkeletonCellLoading","Cell is loading"):o("ariaSkeletonCellLoading","Row data is loading");X(this.getGui(),r)}refresh(e){return!1}};function lS(e,t){if(!e)return;let i={};for(let o of Object.keys(e)){if(t&&t.indexOf(o)>=0||te.has(o))continue;let r=e[o];"object"==typeof r&&null!==r&&r.constructor===Object?i[o]=lS(r):i[o]=r}return i}var lR=class extends e2{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,i,o,r=!1){let s=e.slice();t?s.sort((e,t)=>i.indexOf(e)-i.indexOf(t)):(i||r)&&s.sort((e,t)=>o.indexOf(e)-o.indexOf(t));let n=this.rowGroupColsSvc?.columns,l=this.pivotColsSvc?.columns;return this.buildColumnDefs(s,n,l)}buildColumnDefs(e,t=[],i=[]){let o=[],r={};for(let s of e){let e=this.createDefFromColumn(s,t,i),n=!0,l=e,a=s.getOriginalParent(),d=null;for(;a;){let e=null;if(a.isPadding()){a=a.getOriginalParent();continue}let t=r[a.getGroupId()];if(t){t.children.push(l),n=!1;break}if((e=this.createDefFromGroup(a))&&(e.children=[l],r[e.groupId]=e,l=e,a=a.getOriginalParent()),null!=a&&d===a){n=!1;break}d=a}n&&o.push(l)}return o}createDefFromGroup(e){let t=lS(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,i){let o=lS(e.getColDef());return o.colId=e.getColId(),o.width=e.getActualWidth(),o.rowGroup=e.isRowGroupActive(),o.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,o.pivot=e.isPivotActive(),o.pivotIndex=e.isPivotActive()?i.indexOf(e):null,o.aggFunc=e.isValueActive()?e.getAggFunc():null,o.hide=!e.isVisible()||void 0,o.pinned=e.isPinned()?e.getPinned():null,o.sort=e.getSortDef(),o.sortIndex=null!=e.getSortIndex()?e.getSortIndex():null,o}},lF=class extends e2{constructor(){super(...arguments),this.beanName="colFlex",this.columnsHidden=!1}refreshFlexedColumns(e={}){let t=e.source??"flex";null!=e.viewportWidth&&(this.flexViewportWidth=e.viewportWidth);let i=this.flexViewportWidth,{visibleCols:o,colDelayRenderSvc:r}=this.beans,s=o.centerCols,n=-1;if(e.resizingCols){let t=new Set(e.resizingCols);for(let e=s.length-1;e>=0;e--)if(t.has(s[e])){n=e;break}}let l=!1,a=s.map((e,t)=>{let i=e.getFlex(),o=null!=i&&i>0&&t>n;return l||(l=o),{col:e,isFlex:o,flex:Math.max(0,i??0),initialSize:e.getActualWidth(),min:e.getMinWidth(),max:e.getMaxWidth(),targetSize:0}});if(l?(r?.hideColumns("colFlex"),this.columnsHidden=!0):this.columnsHidden&&this.revealColumns(r),!i||!l)return[];let d=a.length,h=a.reduce((e,t)=>e+t.flex,0),u=i,c=(e,i)=>{e.frozenSize=i,e.col.setActualWidth(i,t),u-=i,h-=e.flex,d-=1},g=e=>null!=e.frozenSize;for(let e of a)e.isFlex||c(e,e.initialSize);for(;d>0;){let e,t=Math.round(h<1?u*h:u),i=0,o=0;for(let r of a){if(g(r))continue;e=r;let s=Math.round((o+=t*(r.flex/h))-i);r.targetSize=s,i+=s}e&&(e.targetSize+=t-i);let r=0;for(let e of a){if(g(e))continue;let t=e.targetSize,i=Math.min(Math.max(t,e.min),e.max);r+=i-t,e.violationType=i===t?void 0:i<t?"max":"min",e.targetSize=i}let s=0===r?"all":r>0?"min":"max";for(let e of a)g(e)||("all"===s||e.violationType===s)&&c(e,e.targetSize)}e.skipSetLeft||o.setLeftValues(t),e.updateBodyWidths&&o.updateBodyWidths();let p=a.filter(e=>e.isFlex&&!e.violationType).map(e=>e.col);if(e.fireResizedEvent){let e=a.filter(e=>e.initialSize!==e.frozenSize).map(e=>e.col),i=a.filter(e=>e.flex).map(e=>e.col);iY(this.eventSvc,e,!0,t,i)}return this.revealColumns(r),p}revealColumns(e){this.columnsHidden&&(e?.revealColumns("colFlex"),this.columnsHidden=!1)}initCol(e){let{flex:t,initialFlex:i}=e.colDef;void 0!==t?e.flex=t:void 0!==i&&(e.flex=i)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},lP=e=>{let t;if("bigint"==typeof e)return e;if("number"==typeof e)t=e;else if("string"==typeof e&&(""===(t=e.trim())||(t.endsWith("n")&&(t=t.slice(0,-1)),!/^[+-]?\d+$/.test(t))))return null;if(null==t)return null;try{return BigInt(t)}catch{return null}},lx=RegExp("[T ]"),lD=RegExp("^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}\\D?)?");function lE(e,t){return e.toString().padStart(t,"0")}function lM(e,t=!0,i="T"){if(!e)return null;let o=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(e=>lE(e,2)).join("-");return t&&(o+=i+[e.getHours(),e.getMinutes(),e.getSeconds()].map(e=>lE(e,2)).join(":")),o}function lT(e,t=!0){return e?t?[String(e.getFullYear()),String(e.getMonth()+1),lE(e.getDate(),2),lE(e.getHours(),2),`:${lE(e.getMinutes(),2)}`,`:${lE(e.getSeconds(),2)}`]:[e.getFullYear(),e.getMonth()+1,lE(e.getDate(),2)].map(String):null}var lk=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"},lA=["January","February","March","April","May","June","July","August","September","October","November","December"],lI=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function lL(e,t=!1){return!!lB(e,t)}function lB(e,t=!1,i){if(!e||!i&&!lD.test(e))return null;let[o,r]=e.split(lx);if(!o)return null;let s=o.split("-").map(e=>Number.parseInt(e,10));if(3!==s.filter(e=>!isNaN(e)).length)return null;let[n,l,a]=s,d=new Date(n,l-1,a);if(d.getFullYear()!==n||d.getMonth()!==l-1||d.getDate()!==a||!r&&t)return null;if(!r||"00:00:00"===r)return d;let[h,u,c]=r.split(":").map(e=>Number.parseInt(e,10));if(h>=0&&h<24)d.setHours(h);else if(t)return null;if(u>=0&&u<60)d.setMinutes(u);else if(t)return null;if(c>=0&&c<60)d.setSeconds(c);else if(t)return null;return d}function lV(e,t,i){if(!t||!e)return;if(!i)return e[t];let o=t.split("."),r=e;for(let e=0;e<o.length;e++){if(null==r)return;r=r[o[e]]}return r}var lG=["dateTimeString","dateString","text","number","bigint","boolean","date"],lH=class extends e2{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[],this.columnDefinitionPropsPerDataType={number:()=>({cellEditor:"agNumberCellEditor"}),bigint:({filterModuleBean:e})=>e?{cellEditor:"agTextCellEditor"}:{cellEditor:"agTextCellEditor",comparator:{default:lW,absolute:lU}},boolean:()=>({cellEditor:"agCheckboxCellEditor",cellRenderer:"agCheckboxCellRenderer",getFindText:()=>null,suppressKeyboardEvent:({node:e,event:t,column:i})=>" "===t.key&&i.isCellEditable(e)}),date:({formatValue:e})=>({cellEditor:"agDateCellEditor",keyCreator:e}),dateString:({formatValue:e})=>({cellEditor:"agDateStringCellEditor",keyCreator:e}),dateTime(e){return this.date(e)},dateTimeString(e){return this.dateString(e)},object:({formatValue:e,colModel:t,colId:i})=>({cellEditorParams:{useFormatter:!0},comparator:(o,r)=>{let s=t.getColDefCol(i),n=s?.getColDef();if(!s||!n)return 0;let l=null==o?"":e({column:s,node:null,value:o}),a=null==r?"":e({column:s,node:null,value:r});return l===a?0:l>a?1:-1},keyCreator:e}),text:()=>({})}}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={},i={},o=e=>t=>{let{column:i,node:o,value:r}=t,s=i.getColDef().valueFormatter;return s===e.groupSafeValueFormatter&&(s=e.valueFormatter),this.beans.valueSvc.formatValue(i,o,r,s)};for(let r of Object.keys(e)){let s=e[r],n={...s,groupSafeValueFormatter:lz(s,this.gos)};t[r]=n,i[r]=o(n)}let r=this.gos.get("dataTypeDefinitions")??{},s={};for(let n of Object.keys(r)){let l=r[n],a=this.processDataTypeDefinition(l,r,[n],e);a&&(t[n]=a,l.dataTypeMatcher&&(s[n]=l.dataTypeMatcher),i[n]=o(a))}let{valueParser:n,valueFormatter:l}=e.object,{valueParser:a,valueFormatter:d}=t.object;this.hasObjectValueParser=a!==n,this.hasObjectValueFormatter=d!==l,this.formatValueFuncs=i,this.dataTypeDefinitions=t,this.dataTypeMatchers=this.sortKeysInMatchers(s,e)}sortKeysInMatchers(e,t){let i={...e};for(let o of lG)delete i[o],i[o]=e[o]??t[o].dataTypeMatcher;return i}processDataTypeDefinition(e,t,i,o){let r,s=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let i=o[s],n=t[s];if(i&&n&&(i=n),!lN(e,i,s))return;r=lO(i,e)}else{if(i.includes(s))return void tM(44);let n=t[s];if(!lN(e,n,s))return;let l=this.processDataTypeDefinition(n,t,[...i,s],o);if(!l)return;r=lO(l,e)}return{...r,groupSafeValueFormatter:lz(r,this.gos)}}updateColDefAndGetColumnType(e,t,i){let{cellDataType:o}=t;void 0===o&&(o=e.cellDataType);let{field:r}=t;if((null==o||!0===o)&&(o=!!this.canInferCellDataType(e,t)&&this.inferCellDataType(r,i)),this.addFormulaCellEditorToColDef(e,t),!o){e.cellDataType=!1;return}let s=this.dataTypeDefinitions[o];return s?(e.cellDataType=o,s.groupSafeValueFormatter&&(e.valueFormatter=s.groupSafeValueFormatter),s.valueParser&&(e.valueParser=s.valueParser),s.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,o,s,i),s.columnTypes):void tM(47,{cellDataType:o})}addFormulaCellEditorToColDef(e,t){(t.allowFormula??e.allowFormula)&&!t.cellEditor&&(e.cellEditor="agFormulaCellEditor")}addColumnListeners(e){if(!this.isPendingInference)return;let t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;let i=e=>{t.add(e.key)};e.__addEventListener("columnStateUpdated",i),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",i))}canInferCellDataType(e,t){let{gos:i}=this;if(!tL(i))return!1;let o={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(lK(t,o))return!1;let r=null===t.type?e.type:t.type;if(r){let e=i.get("columnTypes")??{};if(iV(r).some(t=>{let i=e[t.trim()];return i&&lK(i,o)}))return!1}return!lK(e,o)}inferCellDataType(e,t){let i;if(!e)return;let o=this.getInitialData();if(o){let t=e.includes(".")&&!this.gos.get("suppressFieldDotNotation");i=lV(o,e,t)}else this.initWaitForRowData(t);if(null!=i)return Object.keys(this.dataTypeMatchers).find(e=>this.dataTypeMatchers[e](i))??"object"}getInitialData(){let e=this.gos.get("rowData");if(e?.length)return e[0];{if(this.initialData)return this.initialData;let e=this.beans.rowModel.rootNode?._leafs;if(e?.length)return e[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:o}=this.beans;t&&i&&(i.shouldQueueResizeOperations=!0);let[r]=this.addManagedEventListeners({rowDataUpdateStarted:e=>{let{firstRowData:s}=e;s&&(r?.(),this.isPendingInference=!1,this.processColumnsPendingInference(s,t),this.columnStateUpdatesPendingInference={},t&&i?.processResizeOperations(),o.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;let i=[];this.destroyColumnStateUpdateListeners();let o={},r={};for(let e of Object.keys(this.columnStateUpdatesPendingInference)){let s=this.columnStateUpdatesPendingInference[e],n=this.colModel.getCol(e);if(!n)continue;let l=n.getColDef();if(!this.resetColDefIntoCol(n,"cellDataTypeInferred"))continue;let a=n.getColDef();if(t&&a.type&&a.type!==l.type){let t=function(e,t){let i=iX(e);for(let e of t)delete i[e],"rowGroup"===e?delete i.rowGroupIndex:"pivot"===e&&delete i.pivotIndex;return i}(n,s);t.rowGroup&&null==t.rowGroupIndex&&(o[e]=t),t.pivot&&null==t.pivotIndex&&(r[e]=t),i.push(t)}}t&&i.push(...this.generateColumnStateForRowGroupAndPivotIndexes(o,r)),i.length&&iQ(this.beans,{state:i},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){let i={},{rowGroupColsSvc:o,pivotColsSvc:r}=this.beans;return o?.restoreColumnOrder(i,e),r?.restoreColumnOrder(i,t),Object.values(i)}resetColDefIntoCol(e,t){let i=e.getUserProvidedColDef();if(!i)return!1;let o=iU(this.beans,i,e.getColId());return e.setColDef(o,i,t),!0}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}getDateIncludesTimeFlag(e){return"dateTime"===e||"dateTimeString"===e}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(null==t)return!0;let i=this.getDataTypeDefinition(e)?.dataTypeMatcher;return!!(!i||e.getColDef().allowFormula&&this.beans.formula?.isFormula(t))||i(t)}validateColDef(e){let t=e=>tM(48,{property:e});if("object"===e.cellDataType){let{object:i}=this.dataTypeDefinitions;e.valueFormatter!==i.groupSafeValueFormatter||this.hasObjectValueFormatter||t("Formatter"),e.editable&&e.valueParser===i.valueParser&&!this.hasObjectValueParser&&t("Parser")}}postProcess(e){let t=e.cellDataType;if(!t||"string"!=typeof t)return;let{dataTypeDefinitions:i,beans:o,formatValueFuncs:r}=this,s=i[t];s&&o.colFilter?.setColDefPropsForDataType(e,s,r[t])}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,i,o){let r=this.formatValueFuncs[t],s=this.columnDefinitionPropsPerDataType[i.baseDataType]({colDef:e,cellDataType:t,colModel:this.colModel,dataTypeDefinition:i,colId:o,formatValue:r,filterModuleBean:this.beans.filterManager});"agFormulaCellEditor"===e.cellEditor&&s.cellEditor!==e.cellEditor&&(s.cellEditor=e.cellEditor),Object.assign(e,s)}getDateObjectTypeDef(e){let t=this.getLocaleTextFunc(),i=this.getDateIncludesTimeFlag(e);return{baseDataType:e,valueParser:e=>lB(e.newValue&&String(e.newValue)),valueFormatter:e=>null==e.value?"":!(e.value instanceof Date)||isNaN(e.value.getTime())?t("invalidDate","Invalid Date"):lM(e.value,i)??"",dataTypeMatcher:e=>e instanceof Date}}getDateStringTypeDef(e){let t=this.getDateIncludesTimeFlag(e);return{baseDataType:e,dateParser:e=>lB(e)??void 0,dateFormatter:e=>lM(e??null,t)??void 0,valueParser:e=>lL(String(e.newValue))?e.newValue:null,valueFormatter:e=>lL(String(e.value))?String(e.value):"",dataTypeMatcher:e=>"string"==typeof e&&lL(e)}}getDefaultDataTypes(){let e=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:e=>e.newValue?.trim?.()===""?null:Number(e.newValue),valueFormatter:t=>null==t.value?"":"number"!=typeof t.value||isNaN(t.value)?e("invalidNumber","Invalid Number"):String(t.value),dataTypeMatcher:e=>"number"==typeof e},bigint:{baseDataType:"bigint",valueParser:e=>{let{newValue:t}=e;return null==t||"string"==typeof t&&""===t.trim()?null:lP(t)},valueFormatter:t=>null==t.value?"":"bigint"!=typeof t.value?e("invalidBigInt","Invalid BigInt"):String(t.value),dataTypeMatcher:e=>"bigint"==typeof e},text:{baseDataType:"text",valueParser:e=>""===e.newValue?null:L(e.newValue),dataTypeMatcher:e=>"string"==typeof e},boolean:{baseDataType:"boolean",valueParser:e=>null==e.newValue?e.newValue:e.newValue?.trim?.()===""?null:"true"===String(e.newValue).toLowerCase(),valueFormatter:e=>null==e.value?"":String(e.value),dataTypeMatcher:e=>"boolean"==typeof e},date:this.getDateObjectTypeDef("date"),dateString:this.getDateStringTypeDef("dateString"),dateTime:this.getDateObjectTypeDef("dateTime"),dateTimeString:{...this.getDateStringTypeDef("dateTimeString"),dataTypeMatcher:e=>"string"==typeof e&&lL(e,!0)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:e=>L(e.value)??""}}}destroyColumnStateUpdateListeners(){for(let e of this.columnStateUpdateListenerDestroyFuncs)e();this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function lO(e,t){let i={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(i.columnTypes=[...iV(e.columnTypes),...iV(t.columnTypes)]),i}function lN(e,t,i){return t?t.baseDataType===e.baseDataType||(tM(46),!1):(tM(45,{parentCellDataType:i}),!1)}function lz(e,t){if(e.valueFormatter)return i=>{let{node:o,colDef:r,column:s,value:n}=i;if(o?.group){let t=(r.pivotValueColumn??s).getAggFunc();if(t){if("first"===t||"last"===t)return e.valueFormatter(i);let{baseDataType:o}=e;if(("number"===o||"bigint"===o)&&"count"!==t){if("bigint"==typeof n||"number"==typeof n)return e.valueFormatter(i);if(null==n)return;if("object"==typeof n){if("function"==typeof n.toNumber)return e.valueFormatter({...i,value:n.toNumber()});if("value"in n)return e.valueFormatter({...i,value:n.value})}}return}}else if(t.get("groupHideOpenParents")&&i.column.isRowGroupActive()&&"string"==typeof i.value&&!e.dataTypeMatcher?.(i.value))return;return e.valueFormatter(i)}}function lW(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;let i=lP(e),o=lP(t);return null!=i&&null!=o?i===o?0:i>o?1:-1:0}function lU(e,t){if(null==e)return null==t?0:-1;if(null==t)return 1;let i=l$(e),o=l$(t);return null!=i&&null!=o?i===o?0:i>o?1:-1:0}function l$(e){let t=lP(e);return null==t?null:t<0n?-t:t}function lK(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([i,o])=>(function(e,t,i,o){if(!t[i])return!1;let r=e[i];return null===r?(t[i]=!1,!1):void 0===o?!!r:r===o})(e,t,i,o))}var lj={moduleName:"ColumnApi",version:tv,beans:[lR],apiFunctions:{getColumnDef:function(e,t){let i=e.colModel.getColDefCol(t);return i?i.getColDef():null},getDisplayNameForColumn:function(e,t,i){return e.colNames.getDisplayNameForColumn(t,i)||""},getColumn:function(e,t){return e.colModel.getColDefCol(t)},getColumns:function(e){return e.colModel.getColDefCols()},applyColumnState:function(e,t){return iQ(e,t,"api")},getColumnState:function(e){return iJ(e)},resetColumnState:function(e){!function(e,t){let{colModel:i,autoColSvc:o,selectionColSvc:r,eventSvc:s,gos:n}=e,l=i.getColDefCols();if(!l?.length)return;let a=iT(i.getColDefColTree()),d=[],h=1e3,u=1e3,c=e=>{let t=iX(e);I(t.rowGroupIndex)&&t.rowGroup&&(t.rowGroupIndex=h++),I(t.pivotIndex)&&t.pivot&&(t.pivotIndex=u++),d.push(t)};o?.getColumns()?.forEach(c),r?.getColumns()?.forEach(c),a?.forEach(c),iQ(e,{state:d},"api");let g=o?.getColumns()??[];iQ(e,{state:[...r?.getColumns()??[],...g,...l].map(e=>({colId:e.colId})),applyOrder:!0},"api"),s.dispatchEvent(is(n,{type:"columnsReset",source:"api"}))}(e,0)},isPinning:function(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()},isPinningLeft:function(e){return e.visibleCols.isPinningLeft()},isPinningRight:function(e){return e.visibleCols.isPinningRight()},getDisplayedColAfter:function(e,t){return e.visibleCols.getColAfter(t)},getDisplayedColBefore:function(e,t){return e.visibleCols.getColBefore(t)},setColumnsVisible:function(e,t,i){e.colModel.setColsVisible(t,i,"api")},setColumnsPinned:function(e,t,i){e.pinnedCols?.setColsPinned(t,i,"api")},getAllGridColumns:function(e){return e.colModel.getCols()},getDisplayedLeftColumns:function(e){return e.visibleCols.leftCols},getDisplayedCenterColumns:function(e){return e.visibleCols.centerCols},getDisplayedRightColumns:function(e){return e.visibleCols.rightCols},getAllDisplayedColumns:function(e){return e.visibleCols.allCols},getAllDisplayedVirtualColumns:function(e){return e.colViewport.getViewportColumns()},getColumnDefs:function(e){return e.colModel.getColumnDefs(!0)}}},l_=class extends e2{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,i=!1){if(!e)return null;let o=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:r}=this.beans;return i&&r?r.getHeaderName(e,o):o}getDisplayNameForProvidedColumnGroup(e,t,i){let o=t?.getColGroupDef();return o?this.getHeaderName(o,null,e,t,i):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,i,o,r){let s=e.headerValueGetter;if(s){let n=is(this.gos,{colDef:e,column:t,columnGroup:i,providedColumnGroup:o,location:r});if("function"==typeof s)return s(n);if("string"==typeof s)return this.beans.expressionSvc?.evaluate(s,n)??null}else if(null!=e.headerName)return e.headerName;else if(e.field){var n;return(n=e.field)&&null!=n?n.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map(e=>e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")).join(" "):null}return""}},lq=class extends e2{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.columnsToRenderLeft=[],this.columnsToRenderRight=[],this.columnsToRenderCenter=[]}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}getScrollPosition(){return this.scrollPosition}setScrollPosition(e,t,i=!1){let{visibleCols:o}=this,r=o.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!r)){if(this.scrollWidth=e,this.scrollPosition=t,o.isBodyWidthDirty=!0,this.gos.get("enableRtl")){let i=o.bodyWidth;this.viewportLeft=i-t-e,this.viewportRight=i-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(i)}}getColumnHeadersToRender(e){switch(e){case"left":return this.columnsToRenderLeft;case"right":return this.columnsToRenderRight;default:return this.columnsToRenderCenter}}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]}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||0===this.viewportRight}clear(){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},this.colsWithinViewportHash=""}isColumnInHeaderViewport(e){return!!(e.isAutoHeaderHeight()||function(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}(e))||this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;let t=e.getLeft()||0,i=t+e.getActualWidth(),o=this.viewportLeft-200,r=this.viewportRight+200;return!(t<o&&i<o)&&!(t>r&&i>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=e=>{let t=e.getLeft();return A(t)&&t>this.viewportLeft},i=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:o}=this,r=o.centerCols;return o.getColsForRow(e,r,i,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){let{leftCols:e,rightCols:t}=this.visibleCols;this.columnsToRenderLeft=e,this.columnsToRenderRight=t,this.columnsToRenderCenter=this.colsWithinViewport;let i=e=>{let t=new Set,i={};for(let o of e){let e=o.getParent(),r=o.isSpanHeaderHeight();for(;e&&!t.has(e);){if(r&&e.isPadding()){e=e.getParent();continue}let o=e.getProvidedColumnGroup().getLevel();i[o]??(i[o]=[]),i[o].push(e),t.add(e),e=e.getParent()}}return i};this.rowsOfHeadersToRenderLeft=i(e),this.rowsOfHeadersToRenderRight=i(t),this.rowsOfHeadersToRenderCenter=i(this.headerColsWithinViewport)}extractViewport(){this.extractViewportColumns();let e=this.getViewportColumns().map(e=>`${e.getId()}-${e.getPinned()||"normal"}`).join("#"),t=this.colsWithinViewportHash!==e;return t&&(this.colsWithinViewportHash=e,this.calculateHeaderRows()),t}},lY=class extends e2{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){return e.cellRenderer?class{refresh(){return!1}getGui(){return this.eGui}init(e){let i=t(e),o=typeof i;if("string"===o||"number"===o||"boolean"===o){this.eGui=eM("<span>"+i+"</span>");return}if(null==i){this.eGui=eW({tag:"span"});return}this.eGui=i}}:null}},lQ=class extends e1{constructor(){super(...arguments),this.beanName="registry"}registerDynamicBeans(e){if(e)for(let t of(this.dynamicBeans??(this.dynamicBeans={}),Object.keys(e)))this.dynamicBeans[t]=e[t]}createDynamicBean(e,t,...i){if(!this.dynamicBeans)throw Error(this.getDynamicError(e,!0));let o=this.dynamicBeans[e];if(null==o){if(t)throw Error(this.getDynamicError(e,!1));return}return new o(...i)}},lZ=class extends lQ{constructor(){super(...arguments),this.agGridDefaults={},this.agGridDefaultOverrides={},this.jsComps={},this.selectors={},this.icons={}}postConstruct(){let e=this.gos.get("components");if(null!=e)for(let t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){let{icons:t,userComponents:i,dynamicBeans:o,selectors:r}=e;if(i){let e=(e,t,i,o)=>{this.agGridDefaults[e]=t,(i||o)&&(this.agGridDefaultOverrides[e]={params:i,processParams:o})};for(let t of Object.keys(i)){var s;let o=i[t];if("object"==typeof(s=o)&&s.getComp&&(o=o.getComp(this.beans)),"object"==typeof o){let{classImp:i,params:r,processParams:s}=o;e(t,i,r,s)}else e(t,o)}}for(let e of(this.registerDynamicBeans(o),r??[]))this.selectors[e.selector]=e;if(t)for(let e of Object.keys(t))this.icons[e]=t[e]}getUserComponent(e,t){let i=(e,t,i,o)=>({componentFromFramework:t,component:e,params:i,processParams:o}),{frameworkOverrides:o}=this.beans,r=o.frameworkComponent(t,this.gos.get("components"));if(null!=r)return i(r,!0);let s=this.jsComps[t];if(s){let e=o.isFrameworkComponent(s);return i(s,e)}let n=this.agGridDefaults[t];if(n){let e=this.agGridDefaultOverrides[t];return i(n,!1,e?.params,e?.processParams)}return this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}getDynamicError(e,t){return t?tA(279,{name:e}):this.beans.validation?.missingDynamicBean(e)??tA(256)}},lJ=class extends e2{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{if(this.updateReady(),this.ready){for(let e of this.readyCallbacks)e(this.params);this.readyCallbacks.length=0}},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){let e=Object.values(this.params);this.ready=23===e.length&&e.every(e=>e?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{let e=this.readyCallbacks.indexOf(t);e>=0&&this.readyCallbacks.splice(e,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}},lX=!window?.document?.fonts?.forEach,l0=(e,t,i,o,r,s,n=!1)=>{let l;if(lX)return;o&&(e=`@layer ${CSS.escape(o).replaceAll("\\.",".")} { ${e} }`);let a=l5.map.get(t);if(a||(a=[],l5.map.set(t,a)),a.some(t=>t.css===e))return;let d=document.createElement("style");s&&d.setAttribute("nonce",s),d.dataset.agGlobalCss=i,d.textContent=e;let h={css:e,el:d,priority:r,isParams:n};for(let e of a){if(e.priority>r)break;l=e}if(l){l.el.after(d);let e=a.indexOf(l);a.splice(e+1,0,h)}else"STYLE"===t.nodeName?t.after(d):t.insertBefore(d,t.querySelector(":not(title, meta)")),a.push(h)},l1=(e,t,i,o)=>{l0(':where([class^=ag-]),:where([class^=ag-]):after,:where([class^=ag-]):before{box-sizing:border-box}:where([class^=ag-]):where(button){color:inherit}:where([class^=ag-]):where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none;&:where(.invalid){box-shadow:inset var(--ag-focus-error-shadow)}}:where([class^=ag-]) ::-ms-clear{display:none}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-tab-guard{display:block;height:0;position:absolute;width:0}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block}.ag-measurement-element-border:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}.ag-popup-child{top:0;z-index:5}.ag-popup-child:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-chart,.ag-dnd-ghost,.ag-external,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-disabled .ag-icon,[disabled] .ag-icon{opacity:.5}.ag-icon-grip.ag-disabled,.ag-icon-grip[disabled]{opacity:.35}.ag-resizer{pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}.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;position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}',e,"shared",t,0,i),o?.forEach((o,r)=>o.forEach(o=>l0(o,e,r,t,0,i)))},l2=(e,t=!1)=>{let i=new Set;for(let t of l5.grids.values())t.styleContainer===e&&i.add(t.paramsCss);let o=l5.map.get(e)??[];for(let e=o.length-1;e>=0;e--)(t||o[e].isParams&&!i.has(o[e].css))&&(o[e].el.remove(),o.splice(e,1))},l5=(R=window).agStyleInjectionState??(R.agStyleInjectionState={map:new WeakMap,grids:new Map}),l3=e=>new l8(e),l4="$default",l6=0,l8=class{constructor({feature:e,params:t,modeParams:i={},css:o,cssImports:r}){this.feature=e,this.css=o,this.cssImports=r,this.modeParams={[l4]:{...i[l4]??{},...t??{}},...i}}use(e,t,i){let o=this._inject;if(null==o){let{css:e}=this;if(e){let t=`ag-theme-${this.feature??"part"}-${++l6}`;for(let i of("function"==typeof e&&(e=e()),e=`:where(.${t}) {
2
- ${e}
3
- }
4
- `,this.cssImports??[]))e=`@import url(${JSON.stringify(i)});
5
- ${e}`;o={css:e,class:t}}else o=!1;this._inject=o}return o&&e&&l0(o.css,e,o.class,t,1,i),!!o&&o.class}},l7=e=>`--ag-${e.replace(/[A-Z]|\d+/g,e=>`-${e}`).toLowerCase()}`,l9=e=>`var(${l7(e)})`,ae=e=>({ref:"accentColor",mix:e}),at=e=>({ref:"foregroundColor",mix:e}),ai=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),ao={ref:"backgroundColor"},ar={ref:"foregroundColor"},as={ref:"accentColor"},an={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:at(.15),chromeBackgroundColor:ai(.02),browserColorScheme:"light"},al={...an,textColor:ar,accentColor:"#2196f3",invalidColor:"#e02525",fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],subtleTextColor:{ref:"textColor",mix:.5},borderWidth:1,borderRadius:4,spacing:8,fontSize:14,focusShadow:{spread:3,color:ae(.5)},focusErrorShadow:{spread:3,color:{ref:"invalidColor",onto:"backgroundColor",mix:.5}},popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},dragAndDropImageBackgroundColor:ao,dragAndDropImageBorder:!0,dragAndDropImageNotAllowedBorder:{color:{ref:"invalidColor",onto:"dragAndDropImageBackgroundColor",mix:.5}},dragAndDropImageShadow:{ref:"popupShadow"},iconSize:16,iconColor:"inherit",toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:as,toggleButtonOffBackgroundColor:ai(.3),toggleButtonSwitchBackgroundColor:ao,toggleButtonSwitchInset:2,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipErrorBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.1},tooltipTextColor:{ref:"textColor"},tooltipErrorTextColor:{ref:"invalidColor"},tooltipBorder:!0,tooltipErrorBorder:{color:{ref:"invalidColor",onto:"backgroundColor",mix:.25}},panelBackgroundColor:ao,panelTitleBarHeight:{ref:"headerHeight"},panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontFamily:{ref:"headerFontFamily"},panelTitleBarFontSize:{ref:"headerFontSize"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,dialogShadow:{ref:"popupShadow"},dialogBorder:{color:at(.2)},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},dataFontSize:{ref:"fontSize"},headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},headerFontSize:{ref:"fontSize"},headerFontWeight:500,headerTextColor:{ref:"textColor"},headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,menuBorder:{color:at(.2)},menuBackgroundColor:ai(.03),menuTextColor:ai(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"}},aa=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],ad=(h=e=>(e=e.toLowerCase(),aa.find(t=>e.endsWith(t.toLowerCase()))??"length"),i=new Map,e=>(i.has(e)||i.set(e,h(e)),i.get(e))),ah=e=>"object"==typeof e&&e?.ref?l9(e.ref):"string"==typeof e?e:"number"==typeof e&&String(e),au=e=>{if("string"==typeof e)return e;if("object"==typeof e&&e&&"ref"in e){let t=l9(e.ref);if(null==e.mix)return t;let i=e.onto?l9(e.onto):"transparent";return`color-mix(in srgb, ${i}, ${t} ${Math.max(0,Math.min(100,100*e.mix))}%)`}return!1},ac=e=>{if("string"==typeof e)return e;if("number"==typeof e)return`${e}px`;if("object"==typeof e&&e&&"calc"in e){let t=e.calc.replace(/ ?[*/+] ?/g," $& ");return`calc(${t.replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,e=>"-"===e[0]?e:" "+l9(e)+" ")})`}return"object"==typeof e&&!!e&&"ref"in e&&l9(e.ref)},ag=(e,t)=>"string"==typeof e?e:!0===e?ag({},t):!1===e?"columnBorder"===t?ag({color:"transparent"},t):"none":"object"==typeof e&&e&&"ref"in e?l9(e.ref):af(e.style??"solid")+" "+ac(e.width??{ref:"borderWidth"})+" "+au(e.color??{ref:"borderColor"}),ap=e=>[ac(e.offsetX??0),ac(e.offsetY??0),ac(e.radius??0),ac(e.spread??0),au(e.color??{ref:"foregroundColor"}),...e.inset?["inset"]:[]].join(" "),af=ah,am=e=>"string"==typeof e?e.includes(",")?e:aC(e):"object"==typeof e&&e&&"googleFont"in e?am(e.googleFont):"object"==typeof e&&e&&"ref"in e?l9(e.ref):!!Array.isArray(e)&&e.map(e=>("object"==typeof e&&"googleFont"in e&&(e=e.googleFont),aC(e))).join(", "),aC=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),aw=e=>"string"==typeof e?e:"object"==typeof e&&e&&"url"in e?`url(${JSON.stringify(e.url)})`:"object"==typeof e&&e&&"svg"in e?aw({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):"object"==typeof e&&!!e&&"ref"in e&&l9(e.ref),av={color:au,colorScheme:ah,length:ac,scale:ah,border:ag,borderStyle:af,shadow:e=>"string"==typeof e?e:!1===e?"none":"object"==typeof e&&e&&"ref"in e?l9(e.ref):Array.isArray(e)?e.map(ap).join(", "):ap(e),image:aw,fontFamily:am,fontWeight:ah,duration:(e,t,i)=>"string"==typeof e?e:"number"==typeof e?(e>=10&&i.warn(104,{value:e,param:t}),`${e}s`):"object"==typeof e&&!!e&&"ref"in e&&l9(e.ref)},ab=(e,t,i)=>av[ad(e)](t,e,i),ay=0,aS=class e{constructor(e,t=[]){this.params=e,this.parts=t}withPart(t){return("function"==typeof t&&(t=t()),t&&"object"==typeof t&&"feature"in t&&"modeParams"in t)?new e(this.params,[...this.parts,t]):(this.params.themeLogger.preInitErr(259,"Invalid part",{part:t}),this)}withoutPart(e){return this.withPart(l3({feature:e}))}withParams(e,t=l4){return this.withPart(l3({modeParams:{[t]:e}}))}_startUse({styleContainer:e,cssLayer:t,nonce:i,loadThemeGoogleFonts:o,moduleCss:r}){if(lX)return;ax(),l1(e,t,i,r);let s=aF(this);if(s.length>0)for(let e of s)o&&aD(e,i);for(let o of this.parts)o.use(e,t,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=aR(this.parts).map(e=>e.use(void 0,void 0,void 0)).filter(Boolean).concat(this._getParamsClassName()).join(" "))}_getParamsClassName(){return this._paramsClassName??(this._paramsClassName=`ag-theme-params-${++ay}`)}_getModeParams(){let e=this._paramsCache;if(!e){let t={[l4]:{...al}};for(let e of aR(this.parts))for(let i of Object.keys(e.modeParams)){let o=e.modeParams[i];if(o){let e=t[i]??(t[i]={}),r=new Set;for(let t of Object.keys(o)){let i=o[t];void 0!==i&&(e[t]=i,r.add(t))}if(i===l4)for(let e of Object.keys(t)){let i=t[e];if(e!==l4)for(let e of r)delete i[e]}}}this._paramsCache=e=t}return e}_getParamsCss(){if(!this._paramsCssCache){let e="",t="",i=this._getModeParams(),{overridePrefix:o,themeLogger:r}=this.params,s=o?`--ag-${o}-`:void 0;for(let o of Object.keys(i)){let n=i[o];if(o!==l4){let i="object"==typeof CSS?CSS.escape(o):o,r=`:where([data-ag-theme-mode="${i}"]) & {
6
- `;e+=r,t+=r}for(let i of Object.keys(n).sort()){let o=n[i],l=ab(i,o,r);if(!1===l)r.error(107,{key:i,value:o});else{let o=l7(i),r=s?o.replace("--ag-",s):o,n=o.replace("--ag-","--ag-inherited-");e+=` ${o}: var(${n}, ${l});
7
- `,t+=` ${n}: var(${r});
8
- `}}o!==l4&&(e+="}\n",t+="}\n")}let n=`:where(.${this._getParamsClassName()})`,l=`${n} {
9
- ${e}}
10
- `;l+=`:has(> ${n}):not(${n}) {
11
- ${t}}
12
- `,this._paramsCssCache=l}return this._paramsCssCache}},aR=e=>{let t=new Map;for(let i of e)t.set(i.feature,i);let i=[];for(let o of e)o.feature&&t.get(o.feature)!==o||i.push(o);return i},aF=e=>{let t=new Set,i=e=>{if(Array.isArray(e))e.forEach(i);else{let i=e?.googleFont;"string"==typeof i&&t.add(i)}};return Object.values(e._getModeParams()).flatMap(e=>Object.values(e)).forEach(i),Array.from(t).sort()},aP=!1,ax=()=>{if(!aP)for(let e of(aP=!0,Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]'))))e.remove()},aD=async(e,t)=>{l0(`@import url('https://${aE}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
13
- `,document.head,`googleFont:${e}`,void 0,0,t)},aE="fonts.googleapis.com",aM={changeKey:"listItemHeight",type:"length",defaultValue:24},aT=class extends e1{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.globalCSS=[]}wireBeans(e){this.eRootDiv=e.eRootDiv}postConstruct(){let{gos:e,eRootDiv:t}=this;e.setInstanceDomData(t);let i=e.get("themeStyleContainer"),o="u">typeof ShadowRoot,r=o&&t.getRootNode()instanceof ShadowRoot;this.eStyleContainer=("function"==typeof i?i():i)??(r?t:document.head),i||r||!o||aA(t,this.shadowRootError.bind(this),this.addDestroyFunc.bind(this)),this.cssLayer=e.get("themeCssLayer"),this.styleNonce=e.get("styleNonce"),this.addManagedPropertyListener("theme",()=>this.handleThemeChange()),this.handleThemeChange(),this.getSizeEl(aM),this.initVariables(),this.addDestroyFunc(()=>{let e;!(e=l5.grids.get(this)?.styleContainer)||(l5.grids.delete(this),Array.from(l5.grids.values()).some(t=>t.styleContainer===e)?l2(e):(l2(e,!0),l5.map.delete(e)))}),this.mutationObserver=new MutationObserver(()=>{this.fireStylesChangedEvent("theme")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}applyThemeClasses(e,t=[]){let{theme:i}=this,o=i?i._getCssClass():this.applyLegacyThemeClasses();for(let t of Array.from(e.classList))t.startsWith("ag-theme-")&&e.classList.remove(t);if(o){let i=e.className;e.className=`${i}${i?" ":""}${o}${t?.length?" "+t.join(" "):""}`}}applyLegacyThemeClasses(){let e="";this.mutationObserver.disconnect();let t=this.eRootDiv;for(;t;){let i=!1;for(let o of Array.from(t.classList))o.startsWith("ag-theme-")&&(i=!0,e=e?`${e} ${o}`:o);i&&this.mutationObserver.observe(t,{attributes:!0,attributeFilter:["class"]}),t=t.parentElement}return e}addGlobalCSS(e,t){this.theme?l0(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(aM)}getCSSVariablePixelValue(e){let t=this.lastKnownValues.get(e);if(null!=t)return t;let i=this.measureSizeEl(e);return"detached"===i||"no-styles"===i?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,i),i)}measureSizeEl(e){let t=this.getSizeEl(e);if(null==t.offsetParent)return"detached";let i=t.offsetWidth;return i===ak?"no-styles":(this.sizesMeasured=!0,i)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=eW({tag:"div",cls:"ag-measurement-container"}),this.eRootDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;let i=this.getMeasurementContainer();t=eW({tag:"div"});let o=this.setSizeElStyles(t,e);i.appendChild(t),this.sizeEls.set(e,t);let{type:r,noWarn:s}=e;if("length"!==r&&"border"!==r)return t;let n=this.measureSizeEl(e);"no-styles"!==n||s||this.varError(o,e.defaultValue);let l=eH(this.beans,t,()=>{let t=this.measureSizeEl(e);"detached"!==t&&"no-styles"!==t&&(this.lastKnownValues.set(e,t),t!==n&&(n=t,this.fireStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>l()),t}setSizeElStyles(e,t){let{changeKey:i,type:o}=t,r=l7(i);return"border"===o?(r.endsWith("-width")&&(r=r.slice(0,-6)),e.className="ag-measurement-element-border",e.style.setProperty("--ag-internal-measurement-border",`var(${r}, solid ${ak}px)`)):e.style.width=`var(${r}, ${ak}px)`,r}handleThemeChange(){let e,{gos:t,theme:i}=this,o=t.get("theme");if("legacy"===o)e=void 0;else{let t=o??this.getDefaultTheme();t&&"object"==typeof t&&"params"in t&&"parts"in t?e=t:this.themeError(t)}e!==i&&this.handleNewTheme(e),this.postProcessThemeChange(e,o)}handleNewTheme(e){let{gos:t,eRootDiv:i,globalCSS:o}=this,r=this.getAdditionalCss();if(e){for(let[e,t]of(l1(this.eStyleContainer,this.cssLayer,this.styleNonce,r),o))l0(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce);o.length=0}this.theme=e,e?._startUse({loadThemeGoogleFonts:t.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce,moduleCss:r}),((e,t,i,o,r,s)=>{if(lX)return;let n=l5.grids.get(e);n?n.paramsCss=t:l5.grids.set(e,{styleContainer:o,paramsCss:t}),l2(o),t&&i&&l0(t,o,i,r,2,s,!0)})(this,e?._getParamsCss()??null,e?._getParamsClassName()??null,this.eStyleContainer,this.cssLayer,this.styleNonce),this.applyThemeClasses(i),this.fireStylesChangedEvent("theme")}fireStylesChangedEvent(e){this.eventSvc.dispatchEvent({type:"stylesChanged",[`${e}Changed`]:!0})}},ak=15538,aA=(e,t,i)=>{let o=60,r=setInterval(()=>{"u">typeof ShadowRoot&&e.getRootNode()instanceof ShadowRoot&&(t(),clearInterval(r)),(eD(e)||--o<0)&&clearInterval(r)},1e3);i(()=>clearInterval(r))},aI={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:ao,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},cellFontFamily:{ref:"fontFamily"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:as,rangeSelectionBackgroundColor:ae(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:ae(.5),rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08,onto:"headerBackgroundColor"},rowNumbersSelectedColor:ae(.5),rowHoverColor:ae(.08),columnHoverColor:ae(.05),selectedRowBackgroundColor:ae(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},dataBackgroundColor:ao,oddRowBackgroundColor:{ref:"dataBackgroundColor"},wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,paginationPanelHeight:{ref:"rowHeight",calc:"max(rowHeight, 22px)"},dragHandleColor:at(.7),headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:at(.1),iconButtonActiveColor:as,iconButtonActiveBackgroundColor:ae(.28),iconButtonActiveIndicatorColor:as,setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:at(.8),cellEditingBorder:{color:as},cellEditingShadow:{ref:"cardShadow"},fullRowEditInvalidBackgroundColor:{ref:"invalidColor",onto:"backgroundColor",mix:.25},columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,columnDropCellBackgroundColor:at(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:at(.13)},selectCellBackgroundColor:at(.07),selectCellBorder:{color:at(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",filterPanelApplyButtonColor:ao,filterPanelApplyButtonBackgroundColor:as,filterPanelCardSubtleColor:{ref:"textColor",mix:.7},filterPanelCardSubtleHoverColor:{ref:"textColor"},findMatchColor:ar,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:ar,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:at(.15),statusBarLabelColor:ar,statusBarLabelFontWeight:500,statusBarValueColor:ar,statusBarValueFontWeight:500,pinnedSourceRowTextColor:{ref:"textColor"},pinnedSourceRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedSourceRowFontWeight:600,pinnedRowFontWeight:600,pinnedRowBackgroundColor:{ref:"dataBackgroundColor"},pinnedRowTextColor:{ref:"textColor"},rowDragIndicatorColor:{ref:"rangeSelectionBorderColor"},rowDragIndicatorWidth:2,columnDragIndicatorColor:{ref:"accentColor"},columnDragIndicatorWidth:2},aL={cellBatchEditBackgroundColor:"rgba(220 181 139 / 16%)",cellBatchEditTextColor:"#422f00",rowBatchEditBackgroundColor:{ref:"cellBatchEditBackgroundColor"},rowBatchEditTextColor:{ref:"cellBatchEditTextColor"}},aB={...aL,cellBatchEditTextColor:"#f3d0b3"},aV=l3({feature:"batchEditStyle",params:aL,css:".ag-cell-batch-edit{background-color:var(--ag-cell-batch-edit-background-color);color:var(--ag-cell-batch-edit-text-color);display:inherit}.ag-row-batch-edit{background-color:var(--ag-row-batch-edit-background-color);color:var(--ag-row-batch-edit-text-color)}"}),aG=":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);&: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)}}.ag-standard-button:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}",aH={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"}},aO=(l3({feature:"buttonStyle",params:aH,css:aG}),l3({feature:"buttonStyle",params:{...aH,buttonBackgroundColor:ao,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:as}},css:aG})),aN=(l3({feature:"buttonStyle",params:{...aH,buttonBackgroundColor:ao,buttonBorder:{color:as},buttonFontWeight:600,buttonTextColor:as,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBackgroundColor:as,buttonActiveTextColor:ao},css:aG}),l3({feature:"buttonStyle",params:{...aH,buttonBorder:{color:ar,width:2,style:"outset"},buttonActiveBorder:{color:ar,width:2,style:"inset"},buttonBackgroundColor:ai(.07),buttonHoverBackgroundColor:ao,buttonVerticalPadding:{calc:"spacing * 0.5"}},css:aG}),l3({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{align-items:center;border:dashed var(--ag-border-width);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}"})),az=(l3({feature:"columnDropStyle",css:".ag-column-drop-vertical-empty-message{color:var(--ag-subtle-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600;padding-top:var(--ag-spacing)}:where(.ag-ltr) .ag-column-drop-vertical-empty-message{padding-left:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing));padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-column-drop-vertical-empty-message{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-icon-size) + var(--ag-spacing) + var(--ag-widget-horizontal-spacing))}"}),l3({feature:"formulaStyle",params:{formulaToken1Color:"#3269c6",formulaToken1BackgroundColor:{ref:"formulaToken1Color",mix:.08},formulaToken1Border:{color:{ref:"formulaToken1Color"}},formulaToken2Color:"#c0343f",formulaToken2BackgroundColor:{ref:"formulaToken2Color",mix:.06},formulaToken2Border:{color:{ref:"formulaToken2Color"}},formulaToken3Color:"#8156b8",formulaToken3BackgroundColor:{ref:"formulaToken3Color",mix:.08},formulaToken3Border:{color:{ref:"formulaToken3Color"}},formulaToken4Color:"#007c1f",formulaToken4BackgroundColor:{ref:"formulaToken4Color",mix:.06},formulaToken4Border:{color:{ref:"formulaToken4Color"}},formulaToken5Color:"#b03e85",formulaToken5BackgroundColor:{ref:"formulaToken5Color",mix:.08},formulaToken5Border:{color:{ref:"formulaToken5Color"}},formulaToken6Color:"#b74900",formulaToken6BackgroundColor:{ref:"formulaToken6Color",mix:.06},formulaToken6Border:{color:{ref:"formulaToken6Color"}},formulaToken7Color:"#247492",formulaToken7BackgroundColor:{ref:"formulaToken7Color",mix:.08},formulaToken7Border:{color:{ref:"formulaToken7Color"}}}})),aW={warn:(...e)=>{tM(e[0],e[1])},error:(...e)=>{tT(e[0],e[1])},preInitErr:(...e)=>{tk(e[0],e[2],e[1])}},aU=l3({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:ao,checkboxUncheckedBorderColor:ai(.3),checkboxCheckedBackgroundColor:as,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:ao,checkboxIndeterminateBackgroundColor:ai(.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:ao,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:'.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(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color)}&:where(.ag-checked):after{background-color:var(--ag-checkbox-checked-shape-color)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input,.ag-radio-button-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)}.ag-checkbox-input-wrapper:after,.ag-radio-button-input-wrapper: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}.ag-checkbox-input-wrapper:where(:focus-within,:active),.ag-radio-button-input-wrapper:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}.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)}&:where(.ag-indeterminate):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-cell-editing-error .ag-checkbox-input-wrapper:focus-within{box-shadow:var(--ag-focus-error-shadow)}.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)}}'}),a$=()=>({...an,...aB,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:ai(.05),rowHoverColor:ae(.15),selectedRowBackgroundColor:ae(.2),menuBackgroundColor:ai(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",filterPanelApplyButtonColor:ar,findMatchColor:ao,findActiveMatchColor:ao,checkboxUncheckedBorderColor:ai(.4),toggleButtonOffBackgroundColor:ai(.4),rowBatchEditBackgroundColor:ai(.1),formulaToken1Color:"#4da3e5",formulaToken2Color:"#f55864",formulaToken3Color:"#b688f2",formulaToken4Color:"#24bb4a",formulaToken5Color:"#e772ba",formulaToken6Color:"#f69b5f",formulaToken7Color:"#a3e6ff"}),aK=l3({feature:"colorScheme",params:an,modeParams:{light:an,dark:a$(),"dark-blue":{...a$(),backgroundColor:"#1f2836"}}}),aj={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:'<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"/>',"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"/>',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"/>',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>',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"/>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>',"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"/>'},a_={aasc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13.2012 8.07928C13.6346 8.0793 14.0128 8.15365 14.3359 8.30193C14.6609 8.45018 14.9141 8.65595 15.0947 8.9201C15.2754 9.18439 15.3683 9.49109 15.374 9.83904H14.1904C14.1676 9.60898 14.0695 9.4303 13.8965 9.30291C13.7235 9.1756 13.4889 9.1115 13.1924 9.1115C12.9909 9.1115 12.8204 9.1404 12.6816 9.19744C12.543 9.25255 12.4364 9.32917 12.3623 9.42791C12.2901 9.52678 12.2539 9.63933 12.2539 9.76482C12.2501 9.8692 12.272 9.9604 12.3193 10.0383C12.3688 10.1162 12.4369 10.1843 12.5225 10.2414C12.6079 10.2964 12.7064 10.3451 12.8184 10.3869C12.9304 10.4268 13.0505 10.4609 13.1777 10.4894L13.7031 10.6144C13.9578 10.6715 14.1914 10.7479 14.4043 10.8429C14.6173 10.938 14.8021 11.0547 14.958 11.1935C15.1138 11.3323 15.2348 11.4957 15.3203 11.6838C15.4077 11.8719 15.4522 12.088 15.4541 12.3312C15.4522 12.6885 15.3611 12.9986 15.1807 13.2609C15.0019 13.5214 14.7427 13.7248 14.4043 13.8693C14.0678 14.0118 13.6617 14.0832 13.1865 14.0832C12.7153 14.0832 12.3048 14.0107 11.9551 13.8664C11.6071 13.7219 11.3345 13.5071 11.1387 13.2238C10.9449 12.9387 10.8435 12.5862 10.834 12.1662H12.0283C12.0416 12.362 12.0984 12.5252 12.1973 12.6564C12.298 12.7857 12.4323 12.8838 12.5996 12.9504C12.7688 13.0149 12.96 13.047 13.1729 13.047C13.3817 13.047 13.563 13.0169 13.7168 12.9562C13.8727 12.8954 13.9935 12.8106 14.0791 12.7023C14.1647 12.5939 14.208 12.469 14.208 12.3283C14.2079 12.1974 14.1686 12.0875 14.0908 11.9982C14.0148 11.9089 13.9022 11.8324 13.7539 11.7697C13.6076 11.707 13.4276 11.6501 13.2148 11.5988L12.5791 11.4387C12.0869 11.3189 11.6982 11.1318 11.4131 10.8771C11.128 10.6224 10.9855 10.2793 10.9873 9.84783C10.9854 9.49418 11.0804 9.18439 11.2705 8.9201C11.4625 8.65603 11.7261 8.45015 12.0605 8.30193C12.3951 8.15369 12.7754 8.07928 13.2012 8.07928Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 14.0002H4.48926L4.05664 12.6681H1.94824L1.51465 14.0002H0.19043L2.20703 8.15935H3.79883L5.8125 14.0002ZM2.26172 11.7043H3.74316L3.02539 9.49334H2.98047L2.26172 11.7043Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 8.15935C8.88165 8.15935 9.24031 8.22251 9.52734 8.34978C9.81445 8.47717 10.0303 8.65477 10.1748 8.88103C10.3192 9.10536 10.3916 9.36368 10.3916 9.65642C10.3916 9.88452 10.3461 10.085 10.2549 10.258C10.1637 10.4289 10.0384 10.5696 9.87891 10.6799C9.72117 10.7882 9.54024 10.8657 9.33691 10.9113V10.9679C9.55917 10.9775 9.76716 11.0406 9.96094 11.1564C10.1568 11.2724 10.3158 11.4356 10.4375 11.6447C10.5591 11.8519 10.6201 12.099 10.6201 12.3859C10.6201 12.6958 10.5427 12.9727 10.3887 13.216C10.2366 13.4573 10.0113 13.6486 9.71289 13.7892C9.41443 13.9299 9.04655 14.0002 8.60938 14.0002H6.11426V8.15935H8.45215ZM7.34863 12.9904H8.35547C8.69943 12.9904 8.95057 12.9252 9.1084 12.7941C9.26621 12.661 9.34473 12.4834 9.34473 12.2629C9.34468 12.1014 9.30643 11.9587 9.22852 11.8351C9.15056 11.7116 9.03903 11.6145 8.89453 11.5441C8.75195 11.4738 8.58148 11.4387 8.38379 11.4387H7.34863V12.9904ZM7.34863 10.6037H8.26465C8.43369 10.6036 8.58376 10.5737 8.71484 10.5148C8.84793 10.454 8.95227 10.3683 9.02832 10.258C9.10628 10.1477 9.14551 10.0155 9.14551 9.8615C9.14546 9.65055 9.07008 9.48001 8.91992 9.35076C8.77165 9.22169 8.56064 9.15741 8.28711 9.1574H7.34863V10.6037Z" fill="black"/><path d="M7.16602 0.377127C7.44584 0.189493 7.82551 0.20905 8.08496 0.442557L11.418 3.44256C11.7257 3.71966 11.7507 4.19428 11.4736 4.50213C11.1966 4.80961 10.7228 4.83441 10.415 4.55779L7.60938 2.03338L5.11328 4.53045C4.82042 4.82326 4.34562 4.82322 4.05273 4.53045C3.75986 4.23757 3.75989 3.7628 4.05273 3.4699L7.05273 0.4699L7.16602 0.377127Z" fill="black"/></svg>',adesc:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10.3867 11.4697C10.6796 11.1771 11.1544 11.1769 11.4473 11.4697C11.7399 11.7626 11.7399 12.2374 11.4473 12.5303L8.44727 15.5303L8.33398 15.623C8.05425 15.8106 7.67449 15.7909 7.41504 15.5576L4.08203 12.5576C3.77415 12.2805 3.74927 11.8059 4.02637 11.498C4.30342 11.1907 4.77722 11.1657 5.08496 11.4424L7.89062 13.9668L10.3867 11.4697Z" fill="black"/><path d="M13.2012 3.0791C13.6346 3.07912 14.0128 3.1535 14.3359 3.30176C14.6611 3.45006 14.9141 3.65661 15.0947 3.9209C15.2752 4.18513 15.3683 4.49104 15.374 4.83887H14.1904C14.1676 4.60882 14.0695 4.43012 13.8965 4.30273C13.7235 4.17546 13.4889 4.11133 13.1924 4.11133C12.9909 4.11133 12.8204 4.14023 12.6816 4.19727C12.5431 4.25236 12.4364 4.32902 12.3623 4.42773C12.2901 4.52659 12.2539 4.63919 12.2539 4.76465C12.2501 4.86901 12.272 4.96023 12.3193 5.03809C12.3688 5.11604 12.4369 5.18417 12.5225 5.24121C12.6079 5.29623 12.7064 5.34496 12.8184 5.38672C12.9304 5.42661 13.0505 5.46075 13.1777 5.48926L13.7031 5.61426C13.9578 5.67128 14.1914 5.74776 14.4043 5.84277C14.6172 5.93784 14.8021 6.05457 14.958 6.19336C15.1139 6.33216 15.2348 6.49633 15.3203 6.68457C15.4076 6.8727 15.4522 7.08885 15.4541 7.33203C15.4521 7.68929 15.3612 7.99944 15.1807 8.26172C15.0019 8.52216 14.7427 8.72465 14.4043 8.86914C14.0678 9.01165 13.6617 9.08301 13.1865 9.08301C12.7153 9.08299 12.3048 9.01057 11.9551 8.86621C11.6072 8.72173 11.3345 8.50786 11.1387 8.22461C10.9447 7.9394 10.8435 7.58622 10.834 7.16602H12.0283C12.0416 7.36176 12.0985 7.52509 12.1973 7.65625C12.298 7.78554 12.4323 7.88365 12.5996 7.9502C12.7688 8.01477 12.96 8.04785 13.1729 8.04785C13.3817 8.04781 13.5629 8.01678 13.7168 7.95605C13.8727 7.89522 13.9935 7.81051 14.0791 7.70215C14.1646 7.59387 14.2079 7.46965 14.208 7.3291C14.208 7.19796 14.1687 7.08739 14.0908 6.99805C14.0148 6.90868 13.9022 6.83228 13.7539 6.76953C13.6076 6.70685 13.4276 6.64993 13.2148 6.59863L12.5791 6.43848C12.0868 6.31871 11.6982 6.13163 11.4131 5.87695C11.1279 5.62221 10.9855 5.27916 10.9873 4.84766C10.9854 4.49404 11.0804 4.18517 11.2705 3.9209C11.4625 3.65661 11.7259 3.45006 12.0605 3.30176C12.3951 3.15353 12.7754 3.0791 13.2012 3.0791Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M5.8125 9H4.48926L4.05664 7.66797H1.94824L1.51465 9H0.19043L2.20703 3.15918H3.79883L5.8125 9ZM2.26172 6.7041H3.74316L3.02539 4.49414H2.98047L2.26172 6.7041Z" fill="black"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.45215 3.15918C8.88181 3.15918 9.24025 3.22322 9.52734 3.35059C9.81445 3.47798 10.0303 3.6546 10.1748 3.88086C10.3193 4.10518 10.3916 4.36351 10.3916 4.65625C10.3916 4.88432 10.3461 5.08484 10.2549 5.25781C10.1636 5.4289 10.0386 5.57039 9.87891 5.68066C9.72118 5.78898 9.54022 5.86549 9.33691 5.91113V5.96875C9.55913 5.9783 9.76719 6.04044 9.96094 6.15625C10.1568 6.27223 10.3158 6.43538 10.4375 6.64453C10.5591 6.85173 10.6201 7.09875 10.6201 7.38574C10.6201 7.69567 10.5427 7.97245 10.3887 8.21582C10.2366 8.45719 10.0113 8.64841 9.71289 8.78906C9.41442 8.9297 9.04658 8.99999 8.60938 9H6.11426V3.15918H8.45215ZM7.34863 7.99023H8.35547C8.69948 7.99023 8.95057 7.92504 9.1084 7.79395C9.26621 7.66085 9.34473 7.48325 9.34473 7.2627C9.34466 7.10125 9.3064 6.95844 9.22852 6.83496C9.15056 6.71143 9.03899 6.61427 8.89453 6.54395C8.75196 6.47365 8.58145 6.43848 8.38379 6.43848H7.34863V7.99023ZM7.34863 5.60352H8.26465C8.43369 5.60347 8.58376 5.57354 8.71484 5.51465C8.84791 5.45381 8.95228 5.36807 9.02832 5.25781C9.10623 5.14755 9.14551 5.01529 9.14551 4.86133C9.14542 4.65046 9.07002 4.48078 8.91992 4.35156C8.77163 4.22228 8.56087 4.15724 8.28711 4.15723H7.34863V5.60352Z" fill="black"/></svg>',"chevron-down":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 6L8 10L4 6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-left":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 12L6 8L10 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-right":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"chevron-up":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 10L8 6L12 10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>',"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>',edit:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.5 10.6262V12.5012H5.375L10.905 6.97122L9.03 5.09622L3.5 10.6262ZM12.355 5.52122C12.4014 5.47497 12.4381 5.42002 12.4632 5.35953C12.4883 5.29905 12.5012 5.23421 12.5012 5.16872C12.5012 5.10324 12.4883 5.0384 12.4632 4.97791C12.4381 4.91742 12.4014 4.86248 12.355 4.81622L11.185 3.64622C11.1387 3.59987 11.0838 3.5631 11.0233 3.53801C10.9628 3.51291 10.898 3.5 10.8325 3.5C10.767 3.5 10.7022 3.51291 10.6417 3.53801C10.5812 3.5631 10.5263 3.59987 10.48 3.64622L9.565 4.56122L11.44 6.43622L12.355 5.52122Z" fill="currentColor"/></svg>',"filter-add":'<svg width="16" height="16" viewBox="0 0 16 16" class="ag-icon" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.12126 7.75L10.8517 7.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M6.65934 11.748L9.32778 11.748" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M12.2943 1.04872V6.19184M14.9886 3.74341H9.68478" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><path d="M8.25488 3C8.04799 3.18323 7.91706 3.45099 7.91699 3.74902C7.91713 4.04868 8.04988 4.31681 8.25879 4.5H2C1.58579 4.5 1.25 4.16421 1.25 3.75C1.25 3.33579 1.58579 3 2 3H8.25488Z" fill="currentColor"/></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>',"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>',"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>',"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>'},aq=(e,t=1.5)=>{let i=a_[e];if(i)return i;let o=aj[e];if(!o)throw 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>`+o+"</svg>"},aY=((e={})=>l3({feature:"iconSet",css:()=>((e={})=>{let t="";for(let i of[...Object.keys(aj),...Object.keys(a_)]){let o=aq(i,e.strokeWidth);t+=`.ag-icon-${i}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(o)}'); }
14
- `}return t})(e)}))(),aQ=':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-ltr,.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:0 var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper),:where(.ag-filter-add-select),:where(.ag-filter-filter),:where(.ag-filter-toolpanel-search),:where(.ag-floating-filter-search-icon),:where(.ag-mini-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),:where(.ag-ltr) :where(.ag-filter-add-select),:where(.ag-ltr) :where(.ag-filter-filter),:where(.ag-ltr) :where(.ag-filter-toolpanel-search),:where(.ag-ltr) :where(.ag-floating-filter-search-icon),:where(.ag-ltr) :where(.ag-mini-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),:where(.ag-rtl) :where(.ag-filter-add-select),:where(.ag-rtl) :where(.ag-filter-filter),:where(.ag-rtl) :where(.ag-filter-toolpanel-search),:where(.ag-rtl) :where(.ag-floating-filter-search-icon),:where(.ag-rtl) :where(.ag-mini-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)}}',aZ={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"},colorPickerThumbSize:18,colorPickerTrackSize:12,colorPickerThumbBorderWidth:3,colorPickerTrackBorderRadius:12,colorPickerColorBorderRadius:4},aJ=l3({feature:"inputStyle",params:{...aZ,inputBackgroundColor:ao,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:as},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:ai(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>aQ+".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);&:where(.invalid),&:where(:invalid){box-shadow:var(--ag-focus-error-shadow)}}}"}),aX=(l3({feature:"inputStyle",params:{...aZ,inputBackgroundColor:"transparent",inputBorder:{width:2,color:at(.3)},inputPaddingStart:{ref:"spacing"},inputFocusBorder:"solid 2px var(--ag-accent-color)",inputDisabledTextColor:{ref:"textColor",mix:.5},inputDisabledBorder:"solid 1px var(--ag-border-color)",inputInvalidBorder:{width:2,color:{ref:"invalidColor",mix:.3}}},css:()=>aQ+".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){border-left:none;border-right:none;border-top:none}"}),'.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:solid var(--ag-border-width) var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:solid var(--ag-border-width) 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}.ag-tab:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}.ag-tab.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}:where(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:first-of-type)){border-left-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(.ag-ltr) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}:where(.ag-rtl) .ag-tab.ag-tab-selected:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}.ag-tab: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.ag-tab-selected:after{opacity:1}'),a0={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:{ref:"borderWidth"},tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},a1=l3({feature:"tabStyle",params:{...a0,tabBarBorder:!0,tabBarBackgroundColor:at(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ao},css:aX}),a2=(l3({feature:"tabStyle",params:{...a0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabSelectedUnderlineColor:{ref:"primaryColor"},tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:0},css:aX}),l3({feature:"tabStyle",params:{...a0,tabBarBorder:!0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabHoverTextColor:as,tabSelectedTextColor:as,tabSelectedUnderlineColor:as,tabSelectedUnderlineWidth:2,tabSelectedUnderlineTransitionDuration:"0.3s"},css:aX}),l3({feature:"tabStyle",params:{...a0,tabBarBackgroundColor:{ref:"chromeBackgroundColor"},tabBarHorizontalPadding:{ref:"spacing"},tabBarTopPadding:{ref:"spacing"},tabBarBorder:!0,tabHorizontalPadding:{calc:"spacing * 2"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:{ref:"spacing"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:ao},css:()=>aX+".ag-tab{border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;border-top:var(--ag-tab-selected-border-width) solid transparent;flex:none;&.ag-tab-selected{border-left-color:var(--ag-tab-selected-border-color);border-right-color:var(--ag-tab-selected-border-color);border-top-color:var(--ag-tab-selected-border-color);margin-bottom:-1px;padding-bottom:calc(var(--ag-tab-bottom-padding) + 1px)}}"}),new aS({themeLogger:aW,overridePrefix:void 0}).withParams(aI).withPart(aO).withPart(aN).withPart(aV).withPart(az).withPart(aU).withPart(aK).withPart(aY).withPart(a1).withPart(aJ).withPart(aN).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]})),a5=(l3({feature:"styleMaterial",css:".ag-dnd-ghost,.ag-filter-toolpanel-header,.ag-filter-toolpanel-search,.ag-multi-filter-group-title-bar,.ag-panel-title-bar-title,.ag-status-bar{color:var(--ag-header-text-color);font-size:calc(var(--ag-font-size) - 1px);font-weight:600}.ag-column-drop-horizontal{background-color:color-mix(in srgb,var(--ag-background-color),var(--ag-foreground-color) 8%)}.ag-cell.ag-cell-inline-editing{background-color:var(--ag-background-color);background-image:linear-gradient(0deg,var(--ag-input-background-color),var(--ag-input-background-color));border:var(--ag-input-border)!important;border-width:1px!important;height:calc(var(--ag-row-height) + var(--ag-spacing)*3);padding:var(--ag-spacing);:where(.ag-row-last:not(.ag-row-first)) &{bottom:0}:where(.ag-has-focus) &{border:var(--ag-input-focus-border)!important;border-width:1px!important}}.ag-advanced-filter-builder-button,.ag-standard-button{text-transform:uppercase}.ag-status-bar{border:solid var(--ag-border-width) var(--ag-border-color)}.ag-list-item-hovered:after{background-color:var(--ag-primary-color)}.ag-pill-button:hover{color:var(--ag-primary-color)}.ag-filter-add-button,.ag-filter-add-button:hover{border-bottom:2px solid var(--ag-primary-color)}",params:r={...o={tabSelectedUnderlineColor:{ref:"primaryColor"},sideButtonSelectedUnderlineColor:{ref:"primaryColor"},buttonTextColor:{ref:"primaryColor"},rangeSelectionBackgroundColor:{ref:"primaryColor",mix:.2},rangeSelectionBorderColor:{ref:"primaryColor"},rangeSelectionHighlightColor:{ref:"primaryColor",mix:.5},rangeHeaderHighlightColor:{ref:"foregroundColor",mix:.08},rowNumbersSelectedColor:{ref:"primaryColor",mix:.5},inputFocusBorder:{width:2,color:{ref:"primaryColor"}},pickerButtonFocusBorder:{width:1,color:{ref:"primaryColor"}},cellEditingBorder:{color:{ref:"primaryColor"}},menuBackgroundColor:{ref:"backgroundColor"},sideButtonBarBackgroundColor:ao,sideButtonSelectedBackgroundColor:"transparent",sideButtonBarTopPadding:{calc:"spacing * 4"},headerColumnResizeHandleColor:"none",headerBackgroundColor:{ref:"backgroundColor"},rowHoverColor:at(.08),columnHoverColor:at(.08),headerCellHoverBackgroundColor:at(.05),statusBarLabelColor:at(.63),statusBarLabelFontWeight:600,statusBarValueFontWeight:600,valueChangeValueHighlightBackgroundColor:"#00acc1",panelTitleBarIconColor:ar,advancedFilterBuilderButtonBarBorder:!1,filterPanelApplyButtonColor:{ref:"buttonTextColor"},filterPanelApplyButtonBackgroundColor:{ref:"buttonBackgroundColor"},colorPickerThumbSize:13,colorPickerTrackSize:11,colorPickerThumbBorderWidth:2,colorPickerTrackBorderRadius:2,colorPickerColorBorderRadius:2,rowDragIndicatorColor:{ref:"primaryColor"},columnDragIndicatorColor:{ref:"primaryColor"}},primaryColor:"#3f51b5",foregroundColor:"#000D",headerTextColor:"#0008",accentColor:"#ff4081",checkboxUncheckedBorderColor:ar,checkboxIndeterminateBackgroundColor:ar,toggleButtonOffBackgroundColor:ar,selectedRowBackgroundColor:"rgba(33, 150, 243, 0.3)"},modeParams:{light:r,dark:s={...o,primaryColor:"#3f51b5",foregroundColor:"#fffD",headerTextColor:"#fff8",accentColor:"#bb86fc",checkboxUncheckedBorderColor:ai(.5),checkboxIndeterminateBackgroundColor:ai(.5),toggleButtonOffBackgroundColor:ai(.5),selectedRowBackgroundColor:"#bb86fc33"},"dark-blue":s}}),(e,t,i,o,r)=>({changeKey:e,type:t,defaultValue:i,noWarn:o,cacheDefault:r})),a3=a5("cellHorizontalPadding","length",16),a4=a5("indentationLevel","length",0,!0,!0),a6=a5("rowGroupIndentSize","length",0),a8=a5("rowHeight","length",42),a7=a5("headerHeight","length",48),a9=a5("rowBorderWidth","border",1),de=a5("pinnedRowBorderWidth","border",1),dt=a5("headerRowBorderWidth","border",1),di=class extends aT{initVariables(){this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(a8),this.getSizeEl(a7),this.getSizeEl(a9),this.getSizeEl(de),this.refreshRowBorderWidthVariable()}getPinnedRowBorderWidth(){return this.getCSSVariablePixelValue(de)}getRowBorderWidth(){return this.getCSSVariablePixelValue(a9)}getHeaderRowBorderWidth(){return this.getCSSVariablePixelValue(dt)}getDefaultRowHeight(){return this.getCSSVariablePixelValue(a8)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(a7)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(a3)}getCellPaddingLeft(){let e=this.getDefaultCellHorizontalPadding(),t=this.getCSSVariablePixelValue(a4);return e-1+this.getCSSVariablePixelValue(a6)*t}getCellPadding(){let e=this.getDefaultCellHorizontalPadding()-1;return this.getCellPaddingLeft()+e}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}refreshRowHeightVariable(){let{eRootDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),i=this.gos.get("rowHeight");if(null==i||isNaN(i)||!isFinite(i))return null!==t&&e.style.setProperty("--ag-line-height",null),-1;let o=`${i}px`;return t!=o?(e.style.setProperty("--ag-line-height",o),i):""!=t?Number.parseFloat(t):-1}fireStylesChangedEvent(e){"rowBorderWidth"===e&&this.refreshRowBorderWidthVariable(),super.fireStylesChangedEvent(e)}refreshRowBorderWidthVariable(){let e=this.getCSSVariablePixelValue(a9);this.eRootDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}postProcessThemeChange(e,t){e&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&(t?tT(106):tT(239))}getAdditionalCss(){let e=new Map;for(let t of(e.set("core",['.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-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-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{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}.ag-body-viewport::-webkit-scrollbar,.ag-center-cols-viewport::-webkit-scrollbar,.ag-floating-bottom-viewport::-webkit-scrollbar,.ag-floating-top-viewport::-webkit-scrollbar,.ag-header-viewport::-webkit-scrollbar,.ag-sticky-bottom-viewport::-webkit-scrollbar,.ag-sticky-top-viewport::-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-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-left-sticky-bottom,.ag-pinned-right-cols-container,.ag-pinned-right-sticky-bottom,.ag-sticky-bottom-container,.ag-sticky-top-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-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-active),&:where(.ag-scrollbar-scrolling){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:not(.ag-allow-overflow),.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-data-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-sticky-bottom{box-sizing:content-box!important;:where(.ag-pinned-left-sticky-bottom),:where(.ag-pinned-right-sticky-bottom),:where(.ag-sticky-bottom-container){border-top:var(--ag-row-border);box-sizing:border-box}}.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;:where(.ag-column-group-closed-icon),:where(.ag-column-group-opened-icon){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)}}: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-data-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%;&.ag-row-editing-invalid{background-color:var(--ag-full-row-edit-invalid-background-color)}}: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-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-data-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)}.ag-drag-handle-disabled{opacity:.35;pointer-events:none}: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,.ag-row-highlight-inside:after{background-color:var(--ag-row-drag-indicator-color);border-radius:calc(var(--ag-row-drag-indicator-width)/2);content:"";height:var(--ag-row-drag-indicator-width);pointer-events:none;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after,:where(.ag-ltr) .ag-row-highlight-inside:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after,:where(.ag-rtl) .ag-row-highlight-inside:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-highlight-indent:after{display:block;width:auto}:where(.ag-ltr) .ag-row-highlight-indent:after{left:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size));right:1px}:where(.ag-rtl) .ag-row-highlight-indent:after{left:1px;right:calc((var(--ag-cell-widget-spacing) + var(--ag-icon-size))*2 + var(--ag-cell-horizontal-padding) + var(--ag-row-highlight-level)*var(--ag-row-group-indent-size))}.ag-row-highlight-inside:after{background-color:var(--ag-selected-row-background-color);border:1px solid var(--ag-range-selection-border-color);display:block;height:auto;inset:0;width:auto}.ag-body,.ag-floating-bottom,.ag-floating-top{background-color:var(--ag-data-background-color)}.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-data-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-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-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%{background-color:var(--ag-row-loading-skeleton-effect-color)}50%{background-color:color-mix(in srgb,transparent,var(--ag-row-loading-skeleton-effect-color) 40%)}to{background-color:var(--ag-row-loading-skeleton-effect-color)}}.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-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,:where(.ag-header-group-cell-selectable) .ag-header-cell-comp-wrapper{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)),:where(.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)):before,.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)}.ag-header-cell:where(:not(.ag-floating-filter)):where(:hover):before,.ag-header-group-cell:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}.ag-header-cell:where(:not(.ag-floating-filter)):where(.ag-header-cell-moving):before,.ag-header-group-cell: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-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-col-ref{margin-right:var(--ag-spacing)}.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-col-ref{margin-left:var(--ag-spacing)}.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{color:var(--ag-subtle-text-color)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-col-ref{margin-left:var(--ag-spacing)}.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-col-ref{margin-right:var(--ag-spacing)}.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-column-drag-indicator-color);border-radius:calc(var(--ag-column-drag-indicator-width)/2);content:"";height:100%;position:absolute;top:0;width:var(--ag-column-drag-indicator-width)}: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}:where(.ag-ltr) .ag-header-cell-resize{right:-3px}:where(.ag-rtl) .ag-header-cell-resize{left:-3px}.ag-header-cell-resize: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:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}:where(.ag-rtl) .ag-header-cell-resize: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{container-type:normal;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{container-type:normal;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-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);container-type:inline-size;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;:where(.ag-icon){color:var(--ag-drag-handle-color)}}.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)}.ag-chart-menu-icon:hover,.ag-chart-settings-next:hover,.ag-chart-settings-prev:hover,.ag-column-group-icons:hover,.ag-column-select-header-icon:hover,.ag-filter-toolpanel-expand:hover,.ag-floating-filter-button-button:hover,.ag-group-title-bar-icon:hover,.ag-header-cell-filter-button:hover,.ag-header-cell-menu-button:hover,.ag-header-expand-icon:hover,.ag-panel-title-bar-button-icon:hover,.ag-panel-title-bar-button:hover,.ag-set-filter-group-icons:hover,:where(.ag-group-contracted) .ag-icon:hover,:where(.ag-group-expanded) .ag-icon: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)}:where(.ag-filter-active),:where(.ag-filter-toolpanel-group-instance-header-icon),:where(.ag-filter-toolpanel-instance-header-icon){position:relative}:where(.ag-filter-active):after,:where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-filter-toolpanel-instance-header-icon):after{background-color:var(--ag-icon-button-active-indicator-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-ltr) :where(.ag-filter-active):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-ltr) :where(.ag-filter-toolpanel-instance-header-icon):after{right:-1px}:where(.ag-rtl) :where(.ag-filter-active):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-group-instance-header-icon):after,:where(.ag-rtl) :where(.ag-filter-toolpanel-instance-header-icon):after{left:-1px}.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);: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)}}']),Array.from(new Set(th)).sort((e,t)=>e.moduleName.localeCompare(t.moduleName)))){let i=t.css;i&&e.set(`module-${t.moduleName}`,i)}return e}getDefaultTheme(){return a2}varError(e,t){tM(9,{variable:{cssName:e,defaultValue:t}})}themeError(e){tT(240,{theme:e})}shadowRootError(){tT(293)}},dr=class extends e1{constructor(){super(...arguments),this.beanName="eventSvc",this.eventServiceType="global",this.globalSvc=new G}addListener(e,t,i){this.globalSvc.addEventListener(e,t,i)}removeListener(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)}dispatchEvent(e){this.globalSvc.dispatchEvent(this.gos.addCommon(e))}dispatchEventOnce(e){this.globalSvc.dispatchEventOnce(this.gos.addCommon(e))}},ds=class extends dr{postConstruct(){let{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}};function dn(e,t,i){let o=e.visibleCols.headerGroupRowCount;if(i>=o)return{column:t,headerRowIndex:i};let r=t.getParent();for(;r&&r.getProvidedColumnGroup().getLevel()>i;)r=r.getParent();let s=t.isSpanHeaderHeight();return!r||s&&r.isPadding()?{column:t,headerRowIndex:o}:{column:r,headerRowIndex:r.getProvidedColumnGroup().getLevel()}}var dl=class extends e2{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){let e=this.beans;e.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl});let t=K(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let i,{colModel:o,colGroupSvc:r,ctrlsSvc:s}=this.beans;if("string"==typeof e?(i=o.getCol(e))||(i=r?.getColumnGroup(e)??null):i=e,!i)return null;let n=s.getHeaderRowContainerCtrl(),l="filter"===x(n?.getAllCtrls()||[]).type,a=rM(this.beans)-1,d=-1,h=i;for(;h;)d++,h=h.getParent();let u=d;return t&&l&&u===a-1&&u++,-1===u?null:{headerRowIndex:u,column:i}}navigateVertically(e,t){let{focusSvc:i,visibleCols:o}=this.beans,{focusedHeader:r}=i;if(!r)return!1;let{headerRowIndex:s}=r,n=r.column,l=rM(this.beans),a=this.getHeaderRowType(s),d=o.headerGroupRowCount,{headerRowIndex:h,column:u,headerRowIndexWithoutSpan:c}="UP"===e?function(e,t,i){let o=i-1;if("filter"!==e){let e=t instanceof ig&&t.isSpanHeaderHeight(),i=t.getParent();for(;i&&(i.getProvidedColumnGroup().getLevel()>o||e&&i.isPadding());)i=i.getParent();if(i)if(e)return{column:i,headerRowIndex:i.getProvidedColumnGroup().getLevel(),headerRowIndexWithoutSpan:o};else return{column:i,headerRowIndex:o,headerRowIndexWithoutSpan:o}}return{column:t,headerRowIndex:o,headerRowIndexWithoutSpan:o}}(a,n,s):function(e,t,i){let o=t+1,r={column:e,headerRowIndex:o,headerRowIndexWithoutSpan:o};if(e instanceof i2){if(o>=i)return{column:e.getDisplayedLeafColumns()[0],headerRowIndex:i,headerRowIndexWithoutSpan:o};let t=e.getDisplayedChildren()[0];if(t instanceof i2&&t.isPadding()){let e=t.getDisplayedLeafColumns()[0];e.isSpanHeaderHeight()&&(t=e)}r.column=t,t instanceof ig&&t.isSpanHeaderHeight()&&(r.headerRowIndex=i,r.headerRowIndexWithoutSpan=o)}return r}(n,s,d),g=!1;return h<0&&(h=0,u=n,g=!0),h>=l?(h=-1,this.currentHeaderRowWithoutSpan=-1):void 0!==c&&(this.currentHeaderRowWithoutSpan=c),(!!g||!!u)&&i.focusHeaderPosition({headerPosition:{headerRowIndex:h,column:u},allowUserOverride:!0,event:t})}navigateHorizontally(e,t=!1,i){let o,r,{focusSvc:s,gos:n}=this.beans,l={...s.focusedHeader};-1!==this.currentHeaderRowWithoutSpan?l.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=l.headerRowIndex,r="LEFT"===e!==n.get("enableRtl")?"Before":"After",o=this.findHeader(l,r);let a=n.getCallback("tabToNextHeader");if(t&&a){let e=s.focusHeaderPositionFromUserFunc({userFunc:a,headerPosition:o,direction:r});if(e){let{headerRowIndex:e}=s.focusedHeader||{};null!=e&&e!=l.headerRowIndex&&(this.currentHeaderRowWithoutSpan=e)}return e}return o||!t?s.focusHeaderPosition({headerPosition:o,direction:r,fromTab:t,allowUserOverride:!0,event:i}):this.focusNextHeaderRow(l,r,i)}focusNextHeaderRow(e,t,i){let o,r=this.beans,s=e.headerRowIndex,n=null,l=rM(r),a=this.beans.visibleCols.allCols;if("Before"===t){if(s<=0)return!1;n=x(a),o=s-1,this.currentHeaderRowWithoutSpan-=1}else n=a[0],o=s+1,this.currentHeaderRowWithoutSpan<l?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1;let{column:d,headerRowIndex:h}=dn(this.beans,n,o);return h>=l&&(h=-1),r.focusSvc.focusHeaderPosition({headerPosition:{column:d,headerRowIndex:h},direction:t,fromTab:!0,allowUserOverride:!0,event:i})}scrollToColumn(e,t="After"){let i;if(!e.getPinned()){if(i1(e)){let o=e.getDisplayedLeafColumns();i="Before"===t?x(o):o[0]}else i=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(i)}}findHeader(e,t){let{colGroupSvc:i,visibleCols:o}=this.beans,r=e.column;if(r instanceof i2){let e=r.getDisplayedLeafColumns();r="Before"===t?e[0]:e[e.length-1]}let s="Before"===t?o.getColBefore(r):o.getColAfter(r);if(!s)return;let n=o.headerGroupRowCount;if(e.headerRowIndex>=n)return{headerRowIndex:e.headerRowIndex,column:s};let l=i?.getColGroupAtLevel(s,e.headerRowIndex);return l?l.isPadding()&&s.isSpanHeaderHeight()?{headerRowIndex:o.headerGroupRowCount,column:s}:{headerRowIndex:e.headerRowIndex,column:l??s}:{headerRowIndex:s instanceof ig&&s.isSpanHeaderHeight()?o.headerGroupRowCount:e.headerRowIndex,column:s}}getHeaderRowType(e){let t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}},da=class extends e2{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,t=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:t,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:t,columnRowGroupChanged:t}),this.addDestroyFunc((e=K(this.beans),rl>0||(e.addEventListener("keydown",ra),e.addEventListener("mousedown",ra)),rl++,()=>{--rl>0||(e.removeEventListener("keydown",ra),e.removeEventListener("mousedown",ra))}))}attemptToRecoverFocus(){this.needsFocusRestored=!0,null!=this.focusFallbackTimeout&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,null!=this.focusFallbackTimeout&&(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),rU)?this.focusedHeader:null}doesRowOrCellHaveBrowserFocus(){let e=$(this.beans);return!!this.isDomDataPresentInHierarchy(e,s1,!0)||this.isDomDataPresentInHierarchy(e,s2,!0)}isDomDataPresentInHierarchy(e,t,i){let o=e;for(;o;){let e=tW(this.gos,o,t);if(e){if(e.destroyed&&i)return this.attemptToRecoverFocus(),!1;return!0}o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){let{rowIndex:t,rowPinned:i,column:o}=e,r={rowIndex:t,rowPinned:i,column:o,isFullWidthCell:!1},s=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:i});return s&&(r.isFullWidthCell=s.isFullWidth()),r}clearFocusedCell(){if(null==this.focusedCell)return;let e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();let{column:t,rowIndex:i,rowPinned:o,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:s=!1,sourceEvent:n}=e,l=this.colModel.getCol(t);if(!l){this.focusedCell=null;return}this.focusedCell={rowIndex:i,rowPinned:k(o),column:l};let a=this.getFocusEventParams(this.focusedCell);this.eventSvc.dispatchEvent({type:"cellFocused",...a,...this.previousCellFocusParams&&{previousParams:this.previousCellFocusParams},forceBrowserFocus:r,preventScrollOnBrowserFocus:s,sourceEvent:n}),this.previousCellFocusParams=a}isCellFocused(e){return null!=this.focusedCell&&rb(e,this.focusedCell)}isHeaderWrapperFocused(e){if(null==this.focusedHeader)return!1;let{column:t,rowCtrl:{rowIndex:i,pinned:o}}=e,{column:r,headerRowIndex:s}=this.focusedHeader;return t===r&&i===s&&o==r.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),rx(this.beans))return!1;let{direction:t,fromTab:i,allowUserOverride:o,event:r,fromCell:s,rowWithoutSpanValue:n,scroll:l=!0}=e,{headerPosition:a}=e;if(s&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(o){let e=this.focusedHeader,o=rM(this.beans);if(i){let i=this.gos.getCallback("tabToNextHeader");i&&(a=this.getHeaderPositionFromUserFunc({userFunc:i,direction:t,currentPosition:e,headerPosition:a,headerRowCount:o}))}else{let t=this.gos.getCallback("navigateToNextHeader");t&&r&&(a=t({key:r.key,previousHeaderPosition:e,nextHeaderPosition:a,headerRowCount:o,event:r}))}}return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:r,fromCell:s,rowWithoutSpanValue:n,scroll:l})}focusHeaderPositionFromUserFunc(e){if(rx(this.beans))return!1;let{userFunc:t,headerPosition:i,direction:o,event:r}=e,s=this.focusedHeader,n=rM(this.beans),l=this.getHeaderPositionFromUserFunc({userFunc:t,direction:o,currentPosition:s,headerPosition:i,headerRowCount:n});return!!l&&this.focusProvidedHeaderPosition({headerPosition:l,direction:o,event:r})}getHeaderPositionFromUserFunc(e){let{userFunc:t,direction:i,currentPosition:o,headerPosition:r,headerRowCount:s}=e,n=t({backwards:"Before"===i,previousHeaderPosition:o,nextHeaderPosition:r,headerRowCount:s});return!0===n?o:!1===n?null:n}focusProvidedHeaderPosition(e){var t,i;let{headerPosition:o,direction:r,fromCell:s,rowWithoutSpanValue:n,event:l,scroll:a=!0}=e,{column:d,headerRowIndex:h}=o,{filterManager:u,ctrlsSvc:c,headerNavigation:g}=this.beans;if(this.focusedHeader&&(t=e.headerPosition,i=this.focusedHeader,t.headerRowIndex===i.headerRowIndex&&t.column===i.column))return!1;if(-1===h)return u?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(o):this.focusGridView({column:d,event:l});a&&g?.scrollToColumn(d,r);let p=c.getHeaderRowContainerCtrl(d.getPinned()),f=p?.focusHeader(o.headerRowIndex,d,l)||!1;return g&&f&&(null!=n||s)&&(g.currentHeaderRowWithoutSpan=n??-1),f}focusFirstHeader(){if(this.overlays?.exclusive&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;let t=dn(this.beans,e,0);return this.focusHeaderPosition({headerPosition:t,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.exclusive&&this.focusOverlay(!0))return!0;let t=rM(this.beans)-1,i=x(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 null!=this.focusedCell&&this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===k(t)}focusOverlay(e){let t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&rh(t,e)}focusGridView(e){let{backwards:t=!1,canFocusOverlay:i=!0,event:o}=e;if(this.overlays?.exclusive)return i&&this.focusOverlay(t);if(rD(this.beans))return t&&!rx(this.beans)?this.focusLastHeader():!!(i&&this.focusOverlay(t))||!t&&rE(this.beans,t);let r=t?function(e){let t,i=null,{pinnedRowModel:o,pageBounds:r}=e,s=o?.getPinnedBottomRowCount(),n=o?.getPinnedTopRowCount();return s?(i="bottom",t=s-1):e.rowModel.getRowCount()?t=r.getLastRow():n&&(i="top",t=n-1),void 0===t?null:{rowIndex:t,rowPinned:i}}(this.beans):function(e){let t,i=0,{pinnedRowModel:o,rowModel:r,pageBounds:s}=e;return o?.getPinnedTopRowCount()?t="top":r.getRowCount()?(t=null,i=s.getFirstRow()):o?.getPinnedBottomRowCount()&&(t="bottom"),void 0===t?null:{rowIndex:i,rowPinned:t}}(this.beans);if(r){let i=e.column??this.focusedHeader?.column,{rowIndex:s,rowPinned:n}=r,l=ry(this.beans,r);if(!i||!l||null==s)return!1;if(i.isSuppressNavigable(l)){let e,t=this.gos.get("enableRtl");return e=o&&"Tab"!==o.key?o.key:t?i6:i7,this.beans.navigation?.navigateToNextCell(null,e,{rowIndex:s,column:i,rowPinned:n||null},!0),!0}if(this.navigation?.ensureCellVisible({rowIndex:s,column:i,rowPinned:n}),t){let e=this.rowRenderer.getRowByPosition(r);if(e?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(r,t))return!0}return this.setFocusedCell({rowIndex:s,column:i,rowPinned:k(n),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:s,rowPinned:n,column:i}),!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:rM(this.beans)-1}}):this.focusGridView({column:i})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},dd=class extends e2{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){let{gos:e}=this;this.horizontalScrollShowing=!0===e.get("alwaysShowHorizontalScroll"),this.verticalScrollShowing=!0===e.get("alwaysShowVerticalScroll"),this.getScrollbarWidth();let t=this.updateScrollVisible.bind(this);this.addManagedEventListeners({displayedColumnsChanged:t,displayedColumnsWidthChanged:t,newColumnsLoaded:t})}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(null==this.scrollbarWidth){let e=this.gos.get("scrollbarWidth"),t="number"==typeof e&&e>=0?e:ro();null!=t&&(this.scrollbarWidth=t,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},dh=class extends e2{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()}},du=new Set(["gridPreDestroyed","fillStart","pasteStart"]),dc=["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","filterUiChanged","filterOpened","floatingFilterUiChanged","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","columnsReset","bulkEditingStarted","bulkEditingStopped","batchEditingStarted","batchEditingStopped"].reduce((e,t)=>(e[t]=t&&!(t.length<2)?"on"+t[0].toUpperCase()+t.substring(1):t,e),{}),dg={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",agExportingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agNoMatchingRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agBigIntColumnFilter:"BigIntFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agBigIntColumnFloatingFilter:"BigIntFilter",agDateColumnFloatingFilter:"DateFilter",agFormulaCellEditor:"Formula",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agNewFiltersToolPanel:"NewFiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"};function dp(e){return`"${e}"`}var df={allowFormula:"Formula",aggFunc:"SharedAggregation",autoHeight:"RowAutoHeight",cellClass:"CellStyle",cellClassRules:"CellStyle",cellEditor:({cellEditor:e,editable:t,...i})=>{let o=i.groupRowEditable;return t||o?"string"==typeof e?dg[e]??"CustomEditor":"CustomEditor":null},cellRenderer:({cellRenderer:e})=>"string"!=typeof e?null:dg[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&&"string"!=typeof e&&"boolean"!=typeof e?"CustomFilter":"string"==typeof e?dg[e]??"ColumnFilter":"ColumnFilter",floatingFilter:"ColumnFilter",getQuickFilterText:"QuickFilter",headerTooltip:"Tooltip",headerTooltipValueGetter:"Tooltip",mainMenuItems:"ColumnMenu",menuTabs:e=>{let t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(e=>t.includes(e))?"ColumnMenu":null},pivot:"SharedPivot",pivotIndex:"SharedPivot",rowDrag:"RowDrag",rowGroup:"SharedRowGrouping",rowGroupIndex:"SharedRowGrouping",tooltipField:"Tooltip",tooltipValueGetter:"Tooltip",tooltipComponentSelector:"Tooltip",spanRows:"CellSpan",groupHierarchy:"SharedRowGrouping"},dm={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,headerTooltipValueGetter:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,groupRowEditable:void 0,groupRowValueSetter: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,tooltipComponentSelector: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,rowGroupingHierarchy:void 0,groupHierarchy:void 0,allowFormula:void 0},dC=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","invalidEditValueMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce","renderingMode"],dw=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","activeOverlayParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","advancedFilterParams","formulaDataSource","formulaFuncs","initialState","autoSizeStrategy","selectionColumnDef","findOptions","filterHandlers","groupHierarchyConfig"],dv=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector","suppressOverlays"],db=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipSwitchShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns","rowDragInsertDelay"],dy=["theme","rowSelection"],dS=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild","enableRowPinning"],dR=["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","refreshAfterGroupEdit","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","enableFilterHandlers","suppressStartEditOnTab","hidePaddedHeaderRows","ssrmExpandAllAffectsAllRows","animateColumnResizing"],dF=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","overlayComponent","loadingOverlayComponent","noRowsOverlayComponent","overlayComponentSelector","activeOverlay","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getFullRowEditValidationErrors","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","isRowValidDropPosition"];function dP(e,t,i){return"number"==typeof t||null==t?null==t||t>=i?null:`${e}: value should be greater than or equal to ${i}`:`${e}: value should be a number`}var dx={alignedGrids:"AlignedGrids",allowContextMenuWithControlKey:"ContextMenu",autoSizeStrategy:"ColumnAutoSize",cellSelection:"CellSelection",columnHoverHighlight:"ColumnHover",datasource:"InfiniteRowModel",doesExternalFilterPass:"ExternalFilter",editType:"EditCore",invalidEditValueMode:"EditCore",enableAdvancedFilter:"AdvancedFilter",enableCellSpan:"CellSpan",enableCharts:"IntegratedCharts",enableRangeSelection:"CellSelection",enableRowPinning:"PinnedRow",findSearchValue:"Find",getFullRowEditValidationErrors:"EditCore",getContextMenuItems:"ContextMenu",getLocaleText:"Locale",getMainMenuItems:"ColumnMenu",getRowClass:"RowStyle",getRowStyle:"RowStyle",groupTotalRow:"SharedRowGrouping",grandTotalRow:"ClientSideRowModelHierarchy",initialState:"GridState",isExternalFilterPresent:"ExternalFilter",isRowPinnable:"PinnedRow",isRowPinned:"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",refreshAfterGroupEdit:["RowGrouping","TreeData"],rowGroupPanelShow:"RowGroupingPanel",rowNumbers:"RowNumbers",rowSelection:"SharedRowSelection",rowStyle:"RowStyle",serverSideDatasource:"ServerSideRowModel",sideBar:"SideBar",statusBar:"StatusBar",treeData:"SharedTreeData",undoRedoCellEditing:"UndoRedoEdit",valueCache:"ValueCache",viewportDatasource:"ViewportRowModel"},dD=0,dE=0,dM="__ag_grid_instance",dT=class extends e2{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.instanceId=dE++,this.gridReadyFired=!1,this.queueEvents=[],this.propEventSvc=new G,this.globalEventHandlerFactory=e=>(t,i)=>{if(!this.isAlive())return;let o=du.has(t);if(o&&!e||!o&&e||!dc[t])return;let r=(e,t)=>{let i=dc[e],o=this.gridOptions[i];"function"==typeof o&&this.beans.frameworkOverrides.wrapOutgoing(()=>o(t))};if(this.gridReadyFired)r(t,i);else if("gridReady"===t){for(let e of(r(t,i),this.gridReadyFired=!0,this.queueEvents))r(e.eventName,e.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.getId()}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:"optionsUpdated"})}})}destroy(){super.destroy(),this.queueEvents=[]}get(e){return this.gridOptions[e]??ts[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return A(this.gridOptions[e])}mergeGridCommonParams(e){return e?t=>e(this.addCommon(t)):e}updateGridOptions({options:e,force:t,source:i="api"}){let o={id:dD++,properties:[]},r=[],{gridOptions:s,validation:n}=this;for(let l of Object.keys(e)){let a=to.applyGlobalGridOption(l,e[l]);n?.warnOnInitialPropertyUpdate(i,l);let d=t||"object"==typeof a&&"api"===i,h=s[l];if(d||h!==a){s[l]=a;let e={type:l,currentValue:a,previousValue:h,changeSet:o,source:i};r.push(e)}}for(let e of(this.validateGridOptions(this.gridOptions),o.properties=r.map(e=>e.type),r))tl(this,`Updated property ${e.type} from`,e.previousValue," to ",e.currentValue),this.propEventSvc.dispatchEvent(e)}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addCommon(e){return e.api=this.api,e.context=this.gridOptionsContext,e}validateOptions(e,t){for(let i of Object.keys(e)){let o=e[i];if(null==o||!1===o)continue;let r=t[i];"function"==typeof r&&(r=r(e,this.gridOptions,this.beans)),r&&this.assertModuleRegistered(r,i)}}validateGridOptions(e){this.validateOptions(e,dx),this.validation?.processGridOptions(e)}validateColDef(e,t,i){(i||!this.beans.dataTypeSvc?.isColPendingInference(t))&&(this.validateOptions(e,df),this.validation?.validateColDef(e))}assertModuleRegistered(e,t){let i=Array.isArray(e)?e.some(e=>this.isModuleRegistered(e)):this.isModuleRegistered(e);return i||tT(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),i}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:tp,rowModelType:this.get("rowModelType"),isUmd:!1}}isModuleRegistered(e){return tm(e,this.gridId,this.get("rowModelType"))}setInstanceDomData(e){e[dM]=this.instanceId}isElementInThisInstance(e){let t=e;for(;t;){let e=t[dM];if(A(e))return e===this.instanceId;t=t.parentElement}return!1}},dk=class extends e2{constructor(e,t){super(),this.column=e,this.eGui=t,this.lastMovingChanged=0}postConstruct(){this.addManagedElementListeners(this.eGui,{click:e=>e&&this.onClick(e)}),this.addManagedListeners(this.column,{movingChanged:()=>{this.lastMovingChanged=Date.now()}})}onClick(e){let{sortSvc:t,rangeSvc:i,gos:o}=this.beans;if(!t5(o)||e.altKey){if(this.column.isSortable()){let i=this.column.isMoving(),o=Date.now()-this.lastMovingChanged<50;i||o||t?.progressSortFromEvent(this.column,e)}}else i?.handleColumnSelection(this.column,e)}},dA=class extends ow{constructor(){super(...arguments),this.eFilter=null,this.eFilterButton=null,this.eSortIndicator=null,this.eMenu=null,this.eLabel=null,this.eText=null,this.eColRef=null,this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,this.eSortAbsoluteAsc=null,this.eSortAbsoluteDesc=null,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||e.column.formulaRef!=this.currentRef||null!=this.currentSuppressMenuHide&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){let t={...e};tt(t,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(t)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){var i;let o,{formula:r}=this.beans,s=e.template;return s?s?.trim?s.trim():s:(i=!!r?.active,{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:o={"aria-hidden":"true"}},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:o},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[i?{tag:"span",ref:"eColRef",cls:"ag-header-col-ref"}:null,{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:o},t?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]})}init(e){this.params=e;let{sortSvc:t,touchSvc:i,rowNumbersSvc:o,userCompFactory:r}=this.beans,s=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!s),this.setTemplate(this.currentTemplate,s?[s]:void 0),this.eLabel&&(this.mouseListener??(this.mouseListener=this.createManagedBean(new dk(e.column,this.eLabel)))),i?.setupForHeader(this),this.setMenu(),this.setupSort(),this.setupColumnRefIndicator(),o?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(r,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){let i=e.getCompDetails(t,oE,void 0,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderComponent=e,this.eText&&this.eText.appendChild(e.getGui())):this.destroyBean(e))}))}setDisplayName(e){let{displayName:t}=e,i=this.currentDisplayName;this.currentDisplayName=t,!this.eText||i===t||this.innerHeaderComponent||this.isLoadingInnerComponent||(this.eText.textContent=N(t))}addInIcon(e,t,i){let o=og(e,this.beans,i);o&&t.appendChild(o)}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){ex(this.eMenu),this.eMenu=void 0;return}let{gos:e,eMenu:t,params:i}=this,o=ii(e);this.addInIcon(o?"menu":"menuAlt",t,i.column),t.classList.toggle("ag-header-menu-icon",!o);let r=this.shouldSuppressMenuHide();this.currentSuppressMenuHide=r,this.addManagedElementListeners(t,{click:()=>this.showColumnMenu(this.eMenu)}),this.toggleMenuAlwaysShow(r)}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:o,eMenu:r,eFilterButton:s}=this,n=t.column,l=ii(i);if(e&&!l){if(o.menuSvc?.isFilterMenuInHeaderEnabled(n))return t.showFilter(s??r??this.getGui()),!0}else if(t.enableMenu)return this.showColumnMenu(r??s??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:t,eSortOrder:i,eSortAsc:o,eSortDesc:r,eSortMixed:s,eSortNone:n,eSortAbsoluteAsc:l,eSortAbsoluteDesc:a}=this;t.attachCustomElements(i,o,r,s,n,l,a)}this.eSortIndicator.setupSort(i),this.currentSort&&e.setupHeader(this,i)}setupColumnRefIndicator(){let{eColRef:e,beans:{editModelSvc:t},params:i}=this;e&&(this.currentRef=i.column.formulaRef,e.textContent=this.currentRef,ep(e,!1),this.addManagedEventListeners({cellEditingStarted:()=>{let i=t?.getEditPositions();ep(e,!!this.currentRef&&!!i?.some(e=>e.column.isAllowFormula()))},cellEditingStopped:()=>{ep(e,!1)}}))}setupFilterIcon(){let{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,()=>{ep(e,t.column.isFilterActive(),{skipAriaHidden:!0})},"filterActive")}setupFilterButton(){let{eFilterButton:e,params:t}=this;e&&(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,o){if(!e)return ex(t),!1;let r=this.params.column;return this.addInIcon(o,t,r),this.addManagedListeners(r,{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.mouseListener=this.destroyBean(this.mouseListener)}},dI=class extends e2{constructor(e,t){super(),this.eLabel=e,this.columnGroup=t,this.isSticky=!1,this.left=null,this.right=null}postConstruct(){let{columnGroup:e,beans:t}=this,{ctrlsSvc:i}=t;i.whenReady(this,()=>{let t=this.refreshPosition.bind(this);null==e.getPinned()&&this.addManagedEventListeners({bodyScroll:e=>{"horizontal"===e.direction&&this.updateSticky(e.left)}}),this.addManagedListeners(e,{leftChanged:t,displayedChildrenChanged:t}),this.addManagedEventListeners({columnResized:t}),this.refreshPosition()})}refreshPosition(){let{columnGroup:e,beans:t}=this,i=e.getLeft(),o=e.getActualWidth();if(null==i||0===o){this.left=null,this.right=null,this.setSticky(!1);return}this.left=i,this.right=i+o;let r=t.colViewport.getScrollPosition();null!=r&&this.updateSticky(r)}updateSticky(e){let{beans:t,left:i,right:o}=this;if(null==i||null==o)return void this.setSticky(!1);let{gos:r,visibleCols:s}=t,n=r.get("enableRtl")?s.bodyWidth-e:e;this.setSticky(i<n&&o>n)}setSticky(e){let{isSticky:t,eLabel:i}=this;t!==e&&(this.isSticky=e,i.classList.toggle("ag-sticky-label",e))}},dL={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"}]},dB=class extends ow{constructor(){super(dL),this.agOpened=null,this.agClosed=null,this.agLabel=null,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&&tM(89)}workOutInnerHeaderGroupComponent(e,t){let i=e.getCompDetails(t,oM,void 0,t);i&&(this.isLoadingInnerComponent=!0,i.newAgStackInstance().then(e=>{this.isLoadingInnerComponent=!1,e&&(this.isAlive()?(this.innerHeaderGroupComponent=e,this.agLabel.appendChild(e.getGui())):this.destroyBean(e))}))}setupExpandIcons(){let{agOpened:e,agClosed:t,params:{columnGroup:i},beans:{colGroupSvc:o}}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);let r=e=>{if(rm(e))return;let t=!i.isExpanded();o.setColumnGroupOpened(i.getProvidedColumnGroup(),t,"uiColumnExpanded")};this.addTouchAndClickListeners(t,r),this.addTouchAndClickListeners(e,r);let s=e=>{rf(e)};this.addManagedElementListeners(t,{dblclick:s}),this.addManagedElementListeners(e,{dblclick:s}),this.addManagedElementListeners(this.getGui(),{dblclick:r}),this.updateIconVisibility();let n=i.getProvidedColumnGroup(),l=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:l,expandableChanged:l})}addTouchAndClickListeners(e,t){this.beans.touchSvc?.setupForHeaderGroupElement(this,e,t),this.addManagedElementListeners(e,{click:t})}updateIconVisibility(){let{agOpened:e,agClosed:t,params:{columnGroup:i}}=this;if(i.isExpandable()){let o=i.isExpanded();ep(e,o),ep(t,!o)}else ep(e,!1),ep(t,!1)}addInIcon(e,t){let i=og(e,this.beans,null);i&&t.appendChild(i)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){let{agOpened:e,agClosed:t}=this;ep(e,!1),ep(t,!1)}}setupLabel(e){let{displayName:t,columnGroup:i}=e,{innerHeaderGroupComponent:o,isLoadingInnerComponent:r}=this;A(t)&&!(o||r)&&(this.agLabel.textContent=N(t)),i.getColGroupDef()?.suppressStickyLabel||this.createManagedBean(new dI(this.getGui(),i))}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},dV=class extends e2{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,0===e&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){!1===this.active&&tM(92)}createTask(e,t,i,o,r=!1){this.verify();let s=i;o&&this.batchFrameworkComps&&(s="f1");let n={task:e,index:t,createOrder:++this.taskCount,deferred:r};this.addTaskToList(this[s],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((e,i)=>e.deferred!==i.deferred?e.deferred?-1:1:e.index!==i.index?t*(i.index-e.index):i.createOrder-e.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){let{p1:t,p2:i,f1:o,destroyTasks:r,beans:s}=this,{ctrlsSvc:n,frameworkOverrides:l}=s,a=t.list,d=i.list,h=o.list,u=Date.now(),c=0,g=e<=0,p=n.getScrollFeature();for(;g||c<e;){if(!p.scrollGridIfNeeded()){let s;if(a.length)this.sortTaskList(t),s=a.pop().task;else if(d.length)this.sortTaskList(i),s=d.pop().task;else if(h.length)l.wrapOutgoing(()=>{for(;(g||c<e)&&!p.scrollGridIfNeeded()&&h.length;){this.sortTaskList(o),(s=h.pop().task)();c=Date.now()-u}}),s=()=>{};else if(r.length)s=r.pop();else break;s()}c=Date.now()-u}a.length||d.length||h.length||r.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);eO(this.beans,e)}isQueueEmpty(){return!this.ticking}},dG=class extends e2{constructor(){super(...arguments),this.beanName="iconSvc"}createIconNoSpan(e,t){return og(e,this.beans,t?.column)}},dH=class extends e2{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(!rt())return;let t=(t,i,o)=>{let{rowCtrl:r,cellCtrl:s}=e.getControlsForEventTarget(o?.target??null);s?.column&&s.dispatchCellContextMenuEvent(o??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,o,r,s)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return!!(()=>{if(!rt()||ej("dblclick"))return!1;let t=Date.now(),i=t-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=t,i})()&&(e.onCellDoubleClicked(t),t.preventDefault(),!0)}setupForHeader(e){let{gos:t,sortSvc:i,menuSvc:o}=this.beans;if(t.get("suppressTouch"))return;let{params:r,eMenu:s,eFilterButton:n}=e,l=new sD(e.getGui(),!0);e.addDestroyFunc(()=>l.destroy());let a=e.shouldSuppressMenuHide(),d=a&&A(s)&&r.enableMenu,h=l;if(d&&(h=new sD(s,!0),e.addDestroyFunc(()=>h.destroy())),r.enableMenu||o?.isHeaderContextMenuEnabled(r.column)){let t=e=>r.showColumnMenuAfterMouseClick(e.touchStart);e.addManagedListeners(h,{[d?"tap":"longTap"]:t}),e.addManagedListeners(l,{longTap:t})}if(r.enableSorting&&e.addManagedListeners(l,{tap:e=>{let t=e.touchStart.target;a&&(s?.contains(t)||n?.contains(t))||i?.progressSort(r.column,!1,"uiColumnSorted")}}),r.enableFilterButton&&n){let t=new sD(n,!0);e.addManagedListeners(t,{tap:()=>r.showFilter(n)}),e.addDestroyFunc(()=>t.destroy())}}setupForHeaderGroup(e){let t=e.params;if(this.beans.menuSvc?.isHeaderContextMenuEnabled(t.columnGroup.getProvidedColumnGroup())){let i=new sD(t.eGridHeader,!0);e.addManagedListeners(i,{longTap:e=>t.showColumnMenuAfterMouseClick(e.touchStart)}),e.addDestroyFunc(()=>i.destroy())}}setupForHeaderGroupElement(e,t,i){let o=new sD(t,!0);e.addManagedListeners(o,{tap:i}),e.addDestroyFunc(()=>o.destroy())}mockContextMenu(e,t,i){if(!rt())return;let o=new sD(t),r=e=>{eY(this.beans,e.touchEvent)&&i(void 0,e.touchStart,e.touchEvent)};e.addManagedListeners(o,{longTap:r}),e.addDestroyFunc(()=>o.destroy())}},dO=class extends e2{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,o,r=e===i8,{pageBounds:s,gos:n,visibleCols:l,pinnedRowModel:a}=this.beans,{rowPinned:d}=t;if(r||e===i9)o=d&&a?r?0:"top"===d?a.getPinnedTopRowCount()-1:a.getPinnedBottomRowCount()-1:r?s.getFirstRow():s.getLastRow(),i=t.column;else{let r=n.get("enableRtl");o=t.rowIndex,i=(e===i6!==r?l.allCols:[...l.allCols].reverse()).find(e=>this.isCellGoodToFocusOn({rowIndex:o,rowPinned:null,column:e}))}return i?{rowIndex:o,rowPinned:d,column:i}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let i=t,o=!1;for(;!o;){switch(e){case i8:i=this.getCellAbove(i);break;case i9:i=this.getCellBelow(i);break;case i7:i=this.gos.get("enableRtl")?this.getCellToLeft(i):this.getCellToRight(i);break;case i6:i=this.gos.get("enableRtl")?this.getCellToRight(i):this.getCellToLeft(i);break;default:i=null,tM(8,{key:e})}o=!i||this.isCellGoodToFocusOn(i)}return i}isCellGoodToFocusOn(e){let t,i=e.column,{pinnedRowModel:o,rowModel:r}=this.beans;switch(e.rowPinned){case"top":t=o?.getPinnedTopRow(e.rowIndex);break;case"bottom":t=o?.getPinnedBottomRow(e.rowIndex);break;default:t=r.getRow(e.rowIndex)}return!!t&&!this.isSuppressNavigable(i,t)}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=rF(this.beans,t,!0);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=rR(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned},!0);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,o=t.allCols,r=e.rowIndex,s=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=o[0];let t=rF(this.beans,e,!0);if(I(t)||!t.rowPinned&&!(i?.isRowInPage(t.rowIndex)??!0))return null;r=t?t.rowIndex:null,s=t?t.rowPinned:null}return{rowIndex:r,column:n,rowPinned:s}}getNextTabbedCellBackwards(e){let{beans:t}=this,{visibleCols:i,pagination:o}=t,r=i.allCols,s=e.rowIndex,n=e.rowPinned,l=i.getColBefore(e.column);if(!l){l=x(r);let i=rR(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned},!0);if(I(i)||!i.rowPinned&&!(o?.isRowInPage(i.rowIndex)??!0))return null;s=i?i.rowIndex:null,n=i?i.rowPinned:null}return{rowIndex:s,column:l,rowPinned:n}}isSuppressNavigable(e,t){let{suppressNavigable:i}=e.colDef;return"boolean"==typeof i?i:"function"==typeof i&&i(e.createColumnFunctionCallbackParams(t))}};function dN(e){return e?.getFrameworkComponentInstance!=null?e.getFrameworkComponentInstance():e}var dz=class extends e2{constructor(){super(...arguments),this.beanName="editModelSvc",this.edits=new Map,this.cellValidations=new dW,this.rowValidations=new dU,this.suspendEdits=!1}suspend(e){this.suspendEdits=e}removeEdits({rowNode:e,column:t}){if(!this.hasEdits({rowNode:e})||!e)return;let i=this.getEditRow(e);t?i.delete(t):i.clear(),0===i.size&&this.edits.delete(e)}getEditRow(e,t={}){if(this.suspendEdits||0===this.edits.size)return;let i=e&&this.edits.get(e);if(i)return i;if(t.checkSiblings){let t=e.pinnedSibling;if(t)return this.getEditRow(t)}}getEditRowDataValue(e,{checkSiblings:t}={}){if(!e||0===this.edits.size)return;let i=this.getEditRow(e),o=e.pinnedSibling,r=t&&o&&this.getEditRow(o);if(!i&&!r)return;let s={...e.data},n=(e,t)=>e.forEach(({pendingValue:e},i)=>{e!==dq&&(t[i.getColId()]=e)});return i&&n(i,s),r&&n(r,s),s}getEdit(e={},t){let{rowNode:i,column:o}=e,r=this.edits;if(this.suspendEdits||0===r.size||!i||!o)return;let s=r.get(i)?.get(o);if(s)return s;if(t?.checkSiblings){let e=i.pinnedSibling;if(e)return r.get(e)?.get(o)}}getEditMap(e=!0){if(this.suspendEdits||0===this.edits.size)return new Map;if(!e)return this.edits;let t=new Map;return this.edits.forEach((e,i)=>{let o=new Map;e.forEach(({editorState:e,...t},i)=>o.set(i,{...t})),t.set(i,o)}),t}setEditMap(e){this.edits.clear(),e.forEach((e,t)=>{let i=new Map;e.forEach((e,t)=>i.set(t,{...e})),this.edits.set(t,i)})}setEdit(e,t){let i=this.edits;0!==i.size&&i.has(e.rowNode)||i.set(e.rowNode,new Map);let o={editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0},...this.getEdit(e),...t};return this.getEditRow(e.rowNode).set(e.column,o),o}clearEditValue(e){let{rowNode:t,column:i}=e;if(!t)return;let o=e=>{e.editorValue=void 0,e.pendingValue=e.sourceValue,e.state="changed"};if(!i)return void this.getEditRow(t)?.forEach(o);let r=this.getEdit(e);r&&o(r)}getState(e){if(!this.suspendEdits)return this.getEdit(e)?.state}getEditPositions(e){if(this.suspendEdits||0===(e??this.edits).size)return[];let t=[];return(e??this.edits).forEach((e,i)=>{for(let o of e.keys()){let{editorState:r,...s}=e.get(o);t.push({rowNode:i,column:o,...s})}}),t}hasRowEdits(e,t){return!this.suspendEdits&&0!==this.edits.size&&!!this.getEditRow(e,t)}hasEdits(e={},t={}){if(this.suspendEdits||0===this.edits.size)return!1;let{rowNode:i,column:o}=e,{withOpenEditor:r}=t;if(i){let s=this.getEditRow(i,t);return!!s&&(o?r?this.getEdit(e)?.state==="editing":s.has(o):0!==s.size&&(!r||Array.from(s.values()).some(({state:e})=>"editing"===e)))}return r?this.getEditPositions().some(({state:e})=>"editing"===e):this.edits.size>0}start(e){let t=this.getEditRow(e.rowNode)??new Map,{rowNode:i,column:o}=e;o&&!t.has(o)&&t.set(o,{editorValue:void 0,pendingValue:dq,sourceValue:this.beans.valueSvc.getValue(o,i,"data"),state:"editing",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}}),this.edits.set(i,t)}stop(e,t,i){if(this.hasEdits(e))if(t){let t=this.getEditRow(e.rowNode)?.get(e.column);t&&(t.pendingValue===dq||t.pendingValue===t.sourceValue)?this.removeEdits(e):t&&i&&(t.editorValue=void 0)}else this.removeEdits(e)}clear(){for(let e of this.edits.values())e.clear();this.edits.clear()}getCellValidationModel(){return this.cellValidations}getRowValidationModel(){return this.rowValidations}setCellValidationModel(e){this.cellValidations=e}setRowValidationModel(e){this.rowValidations=e}destroy(){super.destroy(),this.clear()}},dW=class{constructor(){this.cellValidations=new Map}getCellValidation(e){let{rowNode:t,column:i}=e||{};return this.cellValidations?.get(t)?.get(i)}hasCellValidation(e){return e?.rowNode&&e.column?!!this.getCellValidation(e):this.cellValidations.size>0}setCellValidation(e,t){let{rowNode:i,column:o}=e;this.cellValidations.has(i)||this.cellValidations.set(i,new Map),this.cellValidations.get(i).set(o,t)}clearCellValidation(e){let{rowNode:t,column:i}=e;this.cellValidations.get(t)?.delete(i)}setCellValidationMap(e){this.cellValidations=e}getCellValidationMap(){return this.cellValidations}clearCellValidationMap(){this.cellValidations.clear()}},dU=class{constructor(){this.rowValidations=new Map}getRowValidation(e){let{rowNode:t}=e||{};return this.rowValidations.get(t)}hasRowValidation(e){return e?.rowNode?!!this.getRowValidation(e):this.rowValidations.size>0}setRowValidation({rowNode:e},t){this.rowValidations.set(e,t)}clearRowValidation({rowNode:e}){this.rowValidations.delete(e)}setRowValidationMap(e){this.rowValidations=e}getRowValidationMap(){return this.rowValidations}clearRowValidationMap(){this.rowValidations.clear()}};function d$(e,t={}){let{rowIndex:i,rowId:o,rowCtrl:r,rowPinned:s}=t;if(r)return r;let{rowModel:n,rowRenderer:l}=e,{rowNode:a}=t;return a||(o?a=function(e,t,i){let o,{rowModel:r,pinnedRowModel:s}=e;return o??(o=r?.getRowNode(t)),i?o??(o=s?.getPinnedRowById(t,i)):(o??(o=s?.getPinnedRowById(t,"top")),o??(o=s?.getPinnedRowById(t,"bottom"))),o}(e,o,s):null!=i&&(a=n.getRow(i))),l.getRowCtrls(a?[a]:[])?.[0]}function dK(e,t={}){let{cellCtrl:i,colId:o,columnId:r,column:s}=t;if(i)return i;let n=e.colModel.getCol(o??r??d_(s)),l=t.rowCtrl??d$(e,t),a=l?.getCellCtrl(n)??void 0;if(a)return a;let d=t.rowNode??l?.rowNode;if(d)return e.rowRenderer.getCellCtrls([d],[n])?.[0]}function dj(e){let{editSvc:t}=e;t?.isBatchEditing()?(d1(e,{persist:!0}),d3(e)):t?.stopEditing(void 0,{source:"api"})}function d_(e){if(e)return"string"==typeof e?e:e.getColId()}var dq=Symbol("unedited");function dY({pendingValue:e,sourceValue:t}){return e===dq&&(e=t),e!==t}function dQ(e,t,i){let{key:o,event:r,cellStartedEdit:s,silent:n}=i??{},{editModelSvc:l,editSvc:a,gos:d,userCompFactory:h}=e,u=dK(e,t),c=u?.comp?.getCellEditor(),g=dJ(e,t,o,s&&!n),p=l?.getEdit(t),f=g.value??p?.sourceValue;if(c){l?.setEdit(t,{editorValue:d5(e,f,!0,t.column),state:"editing"}),c.refresh?.(g);return}let m=t.column.getColDef(),C=oU(h,m,g);if(!C)return;let{popupFromSelector:w,popupPositionFromSelector:v}=C,b=w??!!m.cellEditorPopup,y=v??m.cellEditorPopupPosition;if(d0(C.params,r),!u)return;let{rangeFeature:S,rowCtrl:R,comp:F,onEditorAttachedFuncs:P}=u;l?.setEdit(t,{editorValue:d5(e,f,!0,t.column),state:"editing"}),u.editCompDetails=C,P.push(()=>S?.unsetComp()),F?.setEditDetails(C,b,y,d.get("reactiveCustomComponents")),R?.refreshRow({suppressFlash:!0});let x=l?.getEdit(t);n||x?.editorState?.cellStartedEditing||(a?.dispatchCellEvent(t,r,"cellEditingStarted",{value:f}),l?.setEdit(t,{editorState:{cellStartedEditing:!0}}))}function dZ(e,t,i){let o={editorValueExists:!1};if(d7(e)){let e=t.getValidationErrors?.();if((e?.length??0)>0)return o}if(i?.isCancelling)return o;if(i?.isStopping){let e=t?.isCancelAfterEnd?.();if(e)return{...o,isCancelAfterEnd:e}}return{editorValue:t.getValue(),editorValueExists:!0}}function dJ(e,t,i,o){let{valueSvc:r,gos:s,editSvc:n}=e,l=e.gos.get("enableGroupEdit"),a=dK(e,t),d=t.rowNode?.rowIndex??void 0,h=n?.isBatchEditing(),u=e.colModel.getCol(t.column.getId()),{rowNode:c,column:g}=t,p=a.comp?.getCellEditor(),f=n?.getCellDataValue(t),m=void 0===f?p?dZ(e,p)?.editorValue:void 0:f,C=m===dq?r.getValueForDisplay({column:u,node:c,from:"edit"})?.value:m,w=l?m:C;return g.isAllowFormula()&&e.formula?.isFormula(w)&&(w=e.formula?.normaliseFormula(w,!0)??w),is(s,{value:w,eventKey:i??null,column:g,colDef:g.getColDef(),rowIndex:d,node:c,data:c.data,cellStartedEdit:!!o,onKeyDown:a?.onKeyDown.bind(a),stopEditing:i=>{n.stopEditing(t,{source:h?"ui":"api",suppressNavigateAfterEdit:i}),d4(e,t,{})},eGridCell:a?.eGui,parseValue:e=>r.parseValue(u,c,e,a?.value),formatValue:a?.formatValue.bind(a),validate:()=>{n?.validateEdit()}})}function dX(e,t){let{editModelSvc:i}=e;i?.getEditMap().forEach((e,o)=>{e.forEach((e,r)=>{(t||"editing"!==e.state&&e.pendingValue!==dq)&&!dY(e)&&("editing"!==e.state||t)&&i?.removeEdits({rowNode:o,column:r})})})}function d0(e,t){return t instanceof KeyboardEvent&&"agNumberCellEditor"===e.column.getColDef().cellEditor?e.suppressPreventDefault=["-","+",".","e"].includes(t?.key??"")||e.suppressPreventDefault:t?.preventDefault?.(),e}function d1(e,t){for(let i of e.editModelSvc?.getEditPositions()??[]){let o=dK(e,i);if(!o)continue;let r=o.comp?.getCellEditor();if(!r)continue;let{editorValue:s,editorValueExists:n,isCancelAfterEnd:l}=dZ(e,r,t);l&&e.editModelSvc?.setEdit(i,{editorState:{isCancelAfterEnd:l}}),d2(e,i,s,void 0,!n,t)}}function d2(e,t,i,o,r,s){let{editModelSvc:n,valueSvc:l}=e;if(!n)return;let{rowNode:a,column:d}=t;if(!(a&&d))return;let h=n.getEdit(t);if(h?.sourceValue===void 0){let i=h?d5(e,h.editorValue,!1,d):dq,o={sourceValue:l.getValue(d,a,"data"),pendingValue:i};s?.persist&&(o.state="changed"),h=n.setEdit(t,o)}n.setEdit(t,{editorValue:r?d5(e,h.sourceValue,!0,d):i}),s?.persist&&function(e,t){let{editModelSvc:i}=e,o=i?.getEdit(t),r={pendingValue:d5(e,o?.editorValue,!1,t.column)};o?.editorState?.cellStoppedEditing||o?.state==="editing"||(r.state="changed"),i?.setEdit(t,r)}(e,t)}function d5(e,t,i,o){let{formula:r}=e;return o.isAllowFormula()&&r?.isFormula(t)?r?.normaliseFormula(t,i)??t:t}function d3(e,t,i={}){if(t||(t=e.editModelSvc?.getEditPositions()),t)for(let o of t)d4(e,o,i)}function d4(e,t,i,o=dK(e,t)){let r,s=e.editModelSvc,n=s?.getEdit(t);if(r=n&&"editing"!==n.state&&n.editorState?.cellStoppedEditing?n.state:"changed",!o){n&&s?.setEdit(t,{state:r});return}let l=o.comp,a=l?.getCellEditor();if(l&&!a){if(o?.refreshCell(),n){s?.setEdit(t,{state:r});let o=e.gos.get("enableGroupEdit")?d6(n,i?.cancel):{valueChanged:!1,newValue:void 0,oldValue:n.sourceValue};d8(e,t,o,i)}return}if(d7(e)){let e=n&&a?.getValidationErrors?.(),i=s?.getCellValidationModel();e?.length?i?.setCellValidation(t,{errorMessages:e}):i?.clearCellValidation(t)}n&&s?.setEdit(t,{state:r}),l?.setEditDetails(),l?.refreshEditStyles(!1,!1),o?.refreshCell({force:!0,suppressFlash:!0});let d=s?.getEdit(t);if(d&&"editing"!==d.state){let o=i?.cancel,r=e.gos.get("enableGroupEdit")?d6(d,o):function(e,t,i){if(i||e.editorState.isCancelAfterEnd)return{valueChanged:!1,newValue:void 0,oldValue:e.sourceValue};let o=e.editorValue;return(null==o||o===dq)&&(o=t?.pendingValue),o===dq&&(o=void 0),{valueChanged:dY(e),newValue:o,oldValue:e.sourceValue}}(d,n,o);d8(e,t,r,i)}}function d6(e,t){let i,{sourceValue:o,pendingValue:r}=e;return t||r===dq||(i=r),{valueChanged:!t&&dY(e),newValue:i,oldValue:o,value:o}}function d8(e,t,i,{silent:o,event:r}={}){let{editSvc:s,editModelSvc:n}=e,{editorState:l}=n?.getEdit(t)||{},{isCancelBeforeStart:a}=l||{};o||a||(s?.dispatchCellEvent(t,r,"cellEditingStopped",i),n?.setEdit(t,{editorState:{cellStoppedEditing:!0}}))}function d7(e){return!!e.gos.get("getFullRowEditValidationErrors")||function(e){if(!e)return!1;for(let t=0,i=e.length;t<i;++t){let i=e[t],o=i.cellEditorParams;if(o&&(i.editable||i.groupRowEditable)&&(void 0!==o.minLength||void 0!==o.maxLength||void 0!==o.getValidationErrors||void 0!==o.min||void 0!==o.max))return!0}return!1}(e.colModel.getColumnDefs())||function(e){let t=e.rowRenderer.getCellCtrls();for(let e=0,i=t.length;e<i;++e){let i=t[e],o=i.comp?.getCellEditor();if(o){let e=dN(o);if(e.getValidationElement||e.getValidationErrors)return!0}}return!1}(e)}function d9(e,t){if(!(t||d7(e)))return;let i=new dW,{ariaAnnounce:o,localeSvc:r,editModelSvc:s,gos:n}=e,l="fullRow"===n.get("editType"),a=e0(r)("ariaValidationErrorPrefix","Cell Editor Validation"),d=new Set;for(let t of e.rowRenderer.getCellCtrls()){let e=t.comp?.getCellEditor();if(!e)continue;let r=dN(e),{rowNode:s,column:n}=t,l=r.getValidationErrors?.()??[],h=r.getValidationElement?.(!1)||!r.isPopup?.()&&t.eGui;if(h){let e=null!=l&&l.length>0,t=e?l.join(". "):"";et(h,e),e&&o.announceValue(`${a} ${l}`,"editorValidation"),h instanceof HTMLInputElement?h.setCustomValidity(t):h.classList.toggle("invalid",e)}l?.length>0&&i.setCellValidation({rowNode:s,column:n},{errorMessages:l}),d.add(t.rowCtrl)}if(d1(e,{persist:!1}),s?.setCellValidationModel(i),l){let t=he(e);s?.setRowValidationModel(t)}for(let e of d.values())for(let t of(e.rowEditStyleFeature?.applyRowStyles(),e.getAllCellCtrls()))t.tooltipFeature?.refreshTooltip(!0),t.editorTooltipFeature?.refreshTooltip(!0),t.editStyleFeature?.applyCellStyles?.()}var he=e=>{let t=new dU,i=e.gos.get("getFullRowEditValidationErrors"),o=e.editModelSvc?.getEditMap();if(!o)return t;for(let e of o.keys()){let r=o.get(e);if(!r)continue;let s=[],{rowIndex:n,rowPinned:l}=e;for(let e of r.keys()){let t=r.get(e);if(!t)continue;let{editorValue:i,pendingValue:o,sourceValue:a}=t,d=i??(o===dq?void 0:o)??a;s.push({column:e,colId:e.getColId(),rowIndex:n,rowPinned:l,oldValue:a,newValue:d})}let a=i?.({editorsState:s})??[];a.length>0&&t.setRowValidation({rowNode:e},{errorMessages:a})}return t};function ht(e){return!!(e.rowPinned&&e.pinnedSibling)}function hi(e,t,i,o){let r="top"===t;if(!i)return hi(e,t,r?e.getPinnedTopRow(0):e.getPinnedBottomRow(0),o);if(!o){let o=r?e.getPinnedTopRowCount():e.getPinnedBottomRowCount();return hi(e,t,i,r?e.getPinnedTopRow(o-1):e.getPinnedBottomRow(o-1))}let s=!1,n=!1,l=[];return e.forEachPinnedRow(t,e=>{if(e===i&&!s){s=!0,l.push(e);return}if(s&&e===o){n=!0,l.push(e);return}s&&!n&&l.push(e)}),l}var ho=class extends e2{constructor(e,t,i,o){super(),this.cellCtrl=e,this.rowNode=i,this.rowCtrl=o,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){let t=e.key;switch(t){case i3:this.onEnterKeyDown(e);break;case"F2":this.onF2KeyDown(e);break;case i4:this.onEscapeKeyDown(e);break;case"Tab":this.onTabKeyDown(e);break;case i5:case oe:this.onBackspaceOrDeleteKeyDown(t,e);break;case i9:case i8:case i7:case i6:this.onNavigationKeyDown(e,t)}}onNavigationKeyDown(e,t){let{cellCtrl:i,beans:o}=this;if(!o.editSvc?.isEditing(i,{withOpenEditor:!0})){if(e.shiftKey&&i.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{let r=i.getFocusedCellPosition();o.navigation?.navigateToNextCell(e,t,r,!0)}e.preventDefault()}}onShiftRangeSelect(e){let{rangeSvc:t,navigation:i}=this.beans;if(!t)return;let o=t.extendLatestRangeInDirection(e);o&&(e.key===i6||e.key===i7?i?.ensureColumnVisible(o.column):i?.ensureRowVisible(o.rowIndex))}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){let{cellCtrl:i,beans:o,rowNode:r}=this,{gos:s,rangeSvc:n,eventSvc:l,editSvc:a}=o;if(l.dispatchEvent({type:"keyShortcutChangedCellStart"}),function(e,t=!1){return e===oe||!t&&e===i5&&re()}(e,s.get("enableCellEditingOnBackspace"))&&!a?.isEditing(i,{withOpenEditor:!0})){if(n&&t2(s))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(i.isCellEditable()){let e=o.valueSvc.getDeleteValue(i.column,r);r.setDataValue(i.column,e,"cellClear")}}else a?.isEditing(i,{withOpenEditor:!0})||o.editSvc?.startEditing(i,{startedEdit:!0,event:t});l.dispatchEvent({type:"keyShortcutChangedCellEnd"})}onEnterKeyDown(e){let{cellCtrl:t,beans:i}=this,{editSvc:o,navigation:r}=i,s=o?.isEditing(t,{withOpenEditor:!0}),n=t.rowNode,l=o?.isRowEditing(n,{withOpenEditor:!0}),a=t=>{o?.startEditing(t,{startedEdit:!0,event:e,source:"edit"})&&e.preventDefault()};if(s||l){if(this.isCtrlEnter(e))return void o?.applyBulkEdit(t,i?.rangeSvc?.getCellRanges()||[]);if(d9(i),o?.checkNavWithValidation(void 0,e)==="block-stop")return;o?.isEditing(t,{withOpenEditor:!0})?o?.stopEditing(t,{event:e,source:"edit"}):l&&!t.isCellEditable()?o?.stopEditing({rowNode:n},{event:e,source:"edit"}):a(t)}else if(i.gos.get("enterNavigatesVertically")){let i=e.shiftKey?i8:i9;r?.navigateToNextCell(null,i,t.cellPosition,!1)}else{if(o?.hasValidationErrors())return;o?.hasValidationErrors(t)&&o.revertSingleCellEdit(t,!0),a(t)}}isCtrlEnter(e){return(e.ctrlKey||e.metaKey)&&e.key===i3}onF2KeyDown(e){let{cellCtrl:t,beans:{editSvc:i}}=this;i?.isEditing()&&(d9(this.beans),i?.checkNavWithValidation(void 0,e)==="block-stop")||i?.startEditing(t,{startedEdit:!0,event:e})}onEscapeKeyDown(e){let{cellCtrl:t,beans:{editSvc:i}}=this;i?.checkNavWithValidation(t,e)==="block-stop"&&i.revertSingleCellEdit(t),setTimeout(()=>{i?.stopEditing(t,{event:e,cancel:!0})})}processCharacter(e){let t=e.target!==this.eGui,{beans:{editSvc:i},cellCtrl:o}=this;if(!(t||i?.isEditing(o,{withOpenEditor:!0}))){if(" "===e.key)this.onSpaceKeyDown(e);else if(i?.isCellEditable(o,"ui")){if(i?.hasValidationErrors()&&!i?.hasValidationErrors(o))return;i?.startEditing(o,{startedEdit:!0,event:e,source:"api",editable:!0});let t=o.editCompDetails;t?.params?.suppressPreventDefault||e.preventDefault()}}}onSpaceKeyDown(e){let{gos:t,editSvc:i}=this.beans,{rowNode:o}=this.cellCtrl;!i?.isEditing(this.cellCtrl,{withOpenEditor:!0})&&tG(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,o,"spaceKey"),e.preventDefault()}},hr=class extends e2{constructor(e,t,i){super(),this.cellCtrl=e,this.column=i,this.beans=t}onMouseEvent(e,t){if(!rm(t))switch(e){case"click":this.onCellClicked(t);break;case"pointerdown":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)}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;let{eventSvc:t,rangeSvc:i,editSvc:o,editModelSvc:r,frameworkOverrides:s,gos:n}=this.beans,l=e.ctrlKey||e.metaKey,{cellCtrl:a}=this,{column:d,cellPosition:h,rowNode:u}=a,c=sJ(n,d,u,e);i&&l&&!c&&i.getCellRangeCount(h)>1&&i.intersectLastRange(!0);let g=a.createEvent(e,"cellClicked");g.isEventHandlingSuppressed=c,t.dispatchEvent(g);let p=d.getColDef();if(p.onCellClicked&&window.setTimeout(()=>{s.wrapOutgoing(()=>{p.onCellClicked(g)})},0),!c&&r?.getState(a)!=="editing"){let t=o?.isEditing(),i=o?.isRangeSelectionEnabledWhileEditing(),s=r?.getCellValidationModel().getCellValidationMap().size??0,n=r?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(i||s>0||n>0))return;o?.shouldStartEditing(a,e)?o?.startEditing(a,{event:e}):o?.shouldStopEditing(a,e)&&("fullRow"===this.beans.gos.get("editType")?o?.stopEditing(a,{event:e,source:"edit"}):o?.stopEditing(void 0,{event:e,source:"edit"}))}}onCellDoubleClicked(e){let{column:t,beans:i,cellCtrl:o}=this,{eventSvc:r,frameworkOverrides:s,editSvc:n,editModelSvc:l,gos:a}=i,d=sJ(a,o.column,o.rowNode,e),h=t.getColDef(),u=o.createEvent(e,"cellDoubleClicked");if(u.isEventHandlingSuppressed=d,r.dispatchEvent(u),"function"==typeof h.onCellDoubleClicked&&window.setTimeout(()=>{s.wrapOutgoing(()=>{h.onCellDoubleClicked(u)})},0),!d&&n?.shouldStartEditing(o,e)&&l?.getState(o)!=="editing"){let t=n?.isEditing(),i=n?.isRangeSelectionEnabledWhileEditing(),r=l?.getCellValidationModel().getCellValidationMap().size??0,s=l?.getRowValidationModel().getRowValidationMap().size??0;if(t&&(i||r>0||s>0))return;n?.startEditing(o,{event:e})}}onMouseDown(e){let{shiftKey:t}=e,i=e.target,{cellCtrl:o,beans:r}=this,{eventSvc:s,rangeSvc:n,rowNumbersSvc:l,focusSvc:a,gos:d,editSvc:h}=r,{column:u,rowNode:c,cellPosition:g}=o,p=sJ(d,u,c,e),f=()=>{let t=o.createEvent(e,"cellMouseDown");t.isEventHandlingSuppressed=p,s.dispatchEvent(t)};if(p)return void f();if(this.isRightClickInExistingRange(e))return;let m=n&&!n.isEmpty(),C=this.containsWidget(i),w=iB(u);if(!l||!w||l.handleMouseDownOnCell(g,e)){if(!t||!m){let t=h?.isEditing(o),r=d.get("enableCellTextSelection")&&e.defaultPrevented,s=(o7()||r)&&!t&&!eg(i)&&!C;o.focusCell(s,e)}if(t&&m&&!a.isCellFocused(g)){e.preventDefault();let t=a.getFocusedCell();if(t){let{column:i,rowIndex:o,rowPinned:r}=t,s=!!h?.isRangeSelectionEnabledWhileEditing?.();h?.isEditing(t)&&!s&&h?.stopEditing(t),s||a.setFocusedCell({column:i,rowIndex:o,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,sourceEvent:e})}}C||(n?.handleCellMouseDown(e,g),f())}}isRightClickInExistingRange(e){let{rangeSvc:t}=this.beans;if(t){let i=t.isCellInAnyRange(this.cellCtrl.cellPosition),o=function({gos:e},t){return 2===t.button||t.ctrlKey&&e.get("allowContextMenuWithControlKey")}(this.beans,e);if(i&&o)return!0}return!1}containsWidget(e){return em(e,"ag-selection-checkbox",3)||em(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),o=t.contains(e.relatedTarget);return i&&o}},hs=class extends e2{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();null!=t&&(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();D(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){null!=this.column.getColDef().colSpan&&(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),o=[];if(1===i)o.push(e);else{let t=e,r=e.getPinned();for(let e=0;t&&e<i&&(o.push(t),!(!(t=this.beans.visibleCols.getColAfter(t))||I(t))&&r===t.getPinned());e++);}return o}onLeftChanged(){if(!this.eSetLeft)return;let e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){return(this.beans.gos.get("enableRtl")&&this.colsSpanning?x(this.colsSpanning):this.column).getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||"left"===this.column.getPinned())return e;let{visibleCols:t}=this.beans,i=t.getColsLeftWidth();return"right"===this.column.getPinned()?i+t.bodyWidth+(e||0):i+(e||0)}_legacyApplyRowSpan(e){if(1===this.rowSpan&&!e)return;let t=tN(this.beans)*this.rowSpan;this.eContent.style.height=`${t}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},hn=0,hl=class extends e2{constructor(e,t,i,o){super(),this.column=e,this.rowNode=t,this.rowCtrl=o,this.rangeFeature=void 0,this.rowResizeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.editStyleFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.hasEdit=!1,this.tooltipFeature=void 0,this.editorTooltipFeature=void 0,this.beans=i,this.gos=i.gos,this.editSvc=i.editSvc,this.hasEdit=!!i.editSvc;const{colId:r}=e;this.instanceId=r+"-"+hn++,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){let{beans:e}=this;this.positionFeature=new hs(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this),this.editStyleFeature=e.editSvc?.createCellStyleFeature(this),this.mouseListener=new hr(this,e,this.column),this.keyboardListener=new ho(this,e,this.rowNode,this.rowCtrl),this.enableTooltipFeature();let{rangeSvc:t}=e;t&&t2(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(this)),iB(this.column)&&(this.rowResizeFeature=this.beans.rowNumbersSvc.createRowNumbersRowResizerFeature(this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){let e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.editorTooltipFeature=e.destroyBean(this.editorTooltipFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.editStyleFeature=e.destroyBean(this.editStyleFeature),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)}enableEditorTooltipFeature(e){this.editorTooltipFeature&&this.disableEditorTooltipFeature(),this.editorTooltipFeature=this.beans.tooltipSvc?.setupCellEditorTooltip(this,e),d9(this.beans)}disableEditorTooltipFeature(){this.editorTooltipFeature=this.beans.context.destroyBean(this.editorTooltipFeature)}setComp(e,t,i,o,r,s,n){this.comp=e,this.eGui=t,this.printLayout=r,n??(n=this),this.addDomData(n),this.addFeatures(),n.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(o,n),this.refreshFirstAndLastStyles(),this.checkFormulaError(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.editStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),this.rowResizeFeature?.refreshRowResizer();let l=s?this.isCellEditable():void 0,a=!l&&this.hasEdit&&this.editSvc?.isEditing(this,{withOpenEditor:!0});if(l||a?this.editSvc?.startEditing(this,{startedEdit:!1,source:"api",silent:!0,continueEditing:!0,editable:l}):this.showValue(!1,!0),this.onCompAttachedFuncs.length){for(let e of this.onCompAttachedFuncs)e();this.onCompAttachedFuncs=[]}}checkFormulaError(){let e=!!this.beans.formula?.getFormulaError(this.column,this.rowNode);this.eGui.classList.toggle("formula-error",e)}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 null!=e.cellRenderer||null!=e.cellRendererSelector}getValueToDisplay(){return this.valueFormatted??this.value}getDeferLoadingCellRenderer(){let{beans:e,column:t}=this,{userCompFactory:i,ctrlsSvc:o,eventSvc:r}=e,s=t.getColDef(),n=this.createCellRendererParams();n.deferRender=!0;let l=oW(i,s,n);if(o.getGridBodyCtrl()?.scrollFeature?.isScrolling()){let e,t=new ou(t=>{e=t}),[i]=this.addManagedListeners(r,{bodyScrollEnd:()=>{e(),i()}});return{loadingComp:l,onReady:t}}return{loadingComp:l,onReady:ou.resolve()}}showValue(e,t){let i,{beans:o,column:r,rowNode:s,rangeFeature:n}=this,{userCompFactory:l}=o,a=this.getValueToDisplay(),d=s.stub&&s.groupData?.[r.getId()]==null,h=r.getColDef();if(d||this.isCellRenderer()){let e=this.createCellRendererParams();i=!d||iB(r)?oz(l,h,e):oW(l,h,e)}if(!i&&!d&&o.findSvc?.isMatch(s,r)){let e=this.createCellRendererParams();i=oz(l,{...r.getColDef(),cellRenderer:"agFindCellRenderer"},e)}if(this.hasEdit&&this.editSvc.isBatchEditing()&&this.editSvc.isRowEditing(s,{checkSiblings:!0})){let e=this.editSvc.prepDetailsDuringBatch(this,{compDetails:i,valueToDisplay:a});e&&(e.compDetails?i=e.compDetails:e.valueToDisplay&&(a=e.valueToDisplay))}this.comp.setRenderDetails(i,a,e),this.customRowDragComp?.refreshVisibility(),!t&&n&&eO(o,()=>n?.refreshRangeStyleAndHandle()),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()}getCellValueClass(){let e="agCheckboxCellRenderer"===this.column.getColDef().cellRenderer,t="";return e&&(t=" ag-allow-overflow"),`ag-cell-value${t}`}isIncludeControl(e,t=!1){return(null==this.rowNode.rowPinned||t&&ht(this.rowNode))&&!!e}isCheckboxSelection(e){let{rowSelection:t,groupDisplayType:i}=this.beans.gridOptions,o=t0(t),r=iL(this.column);return("custom"!==i||"selectionColumn"===o||!r)&&(e.checkboxSelection||r&&"object"==typeof t&&tJ(t))}refreshShouldDestroy(){let e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e),!0),i=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),o=this.includeDndSource!=this.isIncludeControl(e.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return t||i||o||r}onPopupEditorClosed(){let{editSvc:e}=this.beans;e?.isEditing(this,{withOpenEditor:!0})&&e?.stopEditing(this,{source:e?.isBatchEditing()?"ui":"api"})}stopEditing(e=!1){let{editSvc:t}=this.beans;return t?.stopEditing(this,{cancel:e,source:t?.isBatchEditing()?"ui":"api"})??!1}createCellRendererParams(){let{value:e,valueFormatted:t,column:i,rowNode:o,comp:r,eGui:s,beans:{valueSvc:n,gos:l,editSvc:a}}=this;return is(l,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay({column:i,node:o,from:"edit"}).value,setValue:e=>a?.setDataValue({rowNode:o,column:i},e)||o.setDataValue(i,e),formatValue:this.formatValue.bind(this),data:o.data,node:o,pinned:i.getPinned(),colDef:i.getColDef(),column:i,refreshCell:this.refreshCell.bind(this),eGridCell:s,eParentOfValue:r.getParentOfValue(),registerRowDragger:(e,t,i,o)=>this.registerRowDragger(e,t,o),setTooltip:(e,t)=>{l.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(e,t),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){if(this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e),this.hasEdit&&this.editCompDetails){let{editSvc:e,comp:t}=this;!t?.getCellEditor()&&e.isEditing(this,{withOpenEditor:!0})&&e.startEditing(this,{startedEdit:!1,source:"api",silent:!0})}}refreshCell({force:e,suppressFlash:t,newData:i}={}){let{editStyleFeature:o,customStyleFeature:r,rowCtrl:{rowEditStyleFeature:s},beans:{cellFlashSvc:n,filterManager:l},column:a,comp:d,suppressRefreshCell:h,tooltipFeature:u}=this;if(h)return;let{field:c,valueGetter:g,showRowGroup:p,enableCellChangeFlash:f}=a.getColDef(),m=!!d,C=this.updateAndFormatValue(m),w=e||null==c&&null==g&&null==p||i||C;if(m){if(w){this.showValue(!!i,!1);let e=l?.isSuppressFlashingCellsBecauseFiltering();t||e||!f||n?.flashCell(this),o?.applyCellStyles?.(),r?.applyUserStyles(),r?.applyClassesFromColDef(),s?.applyRowStyles(),this.checkFormulaError()}u?.refreshTooltip(),r?.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:o,valueFormatted:r}=this.beans.valueSvc.getValueForDisplay({column:this.column,node:this.rowNode,includeValueFormatted:!0,from:"edit"});return this.value=o,this.valueFormatted=r,!e||!this.valuesAreEqual(t,this.value)||this.valueFormatted!=i}valuesAreEqual(e,t){let i=this.column.getColDef();return i.equals?i.equals(e,t):e===t}addDomData(e){let t=this.eGui;tU(this.beans.gos,t,s1,this),e.addDestroyFunc(()=>tU(this.beans.gos,t,s1,null))}createEvent(e,t){let{rowNode:i,column:o,value:r,beans:s}=this;return function(e,t,i,{rowNode:o,column:r},s){return is(e.gos,{type:i,node:o,data:o.data,value:s,column:r,colDef:r.getColDef(),rowPinned:o.rowPinned,event:t,rowIndex:o.rowIndex})}(s,e,t,{rowNode:i,column:o},r)}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;rz(e,t,i.visibleCols)}refreshAriaColIndex(){let e=this.beans.visibleCols.getAriaColIndex(this.column);el(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 null!=this.rangeFeature}focusCell(e=!1,t){let i=this.editSvc?.allowedFocusTargetOnValidation(this);i&&i!==this||this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e,sourceEvent:t})}restoreFocus(e=!1){let{beans:{editSvc:t,focusSvc:i},comp:o}=this;if(!o||t?.isEditing(this)||!this.isCellFocused()||!i.shouldTakeFocus())return;let r=()=>{if(!this.isAlive())return;let e=o.getFocusableElement();this.isCellFocused()&&e.focus({preventScroll:!0})};e?setTimeout(r,0):r()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged(),this.rowResizeFeature?.refreshRowResizer()}onSuppressCellFocusChanged(e){let t=this.eGui;t&&(iB(this.column)&&(e=!0),eG(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;let e=this.column.isFirstRightPinned();this.comp.toggleCss("ag-cell-first-right-pinned",e)}onLastLeftPinnedChanged(){if(!this.comp)return;let e=this.column.isLastLeftPinned();this.comp.toggleCss("ag-cell-last-left-pinned",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(rD(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}let i=this.isCellFocused(),o=t.editSvc?.isEditing(this)??!1;if(this.comp.toggleCss("ag-cell-focus",i),i&&(e?.forceBrowserFocus||!this.hasBrowserFocus()&&this.beans.focusSvc.shouldTakeFocus())){let i=this.comp.getFocusableElement();if(o){let e=rd(i,null,!0);e.length&&(i=e[0])}let r=!e||e.preventScrollOnBrowserFocus;i.focus({preventScroll:r}),function(e,t){if(!t.isContentEditable)return;let i=_(e).getSelection();if(!i)return;let o=K(e).createRange();o.selectNodeContents(t),o.collapse(!1),i.removeAllRanges(),i.addRange(o)}(t,i)}i&&this.focusEventWhileNotReady&&(this.focusEventWhileNotReady=null),i&&e&&this.rowCtrl.announceDescription()}createCellPosition(){let{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:k(t),column:this.column}}applyStaticCssClasses(){let{comp:e}=this;e.toggleCss("ag-cell",!0),e.toggleCss("ag-cell-not-inline-editing",!0);let t=!0==this.column.isAutoHeight();e.toggleCss("ag-cell-auto-height",t),e.toggleCss("ag-cell-normal-height",!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.editSvc?.isEditing(this)?this.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({force:!0,suppressFlash:!0}))}setWrapText(){let e=!0==this.column.getColDef().wrapText;this.comp.toggleCss("ag-cell-wrap-text",e)}dispatchCellContextMenuEvent(e){let t=this.column.getColDef(),i=this.createEvent(e,"cellContextMenu"),{beans:o}=this;o.eventSvc.dispatchEvent(i),t.onCellContextMenu&&window.setTimeout(()=>{o.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)return void this.customRowDragComp.setDragElement(e,t);let o=this.createRowDragComp(e,t,i);o&&(this.customRowDragComp=o,this.addDestroyFunc(()=>{this.beans.context.destroyBean(o),this.customRowDragComp=null}),o.refreshVisibility())}createRowDragComp(e,t,i){let o=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,i);if(o)return this.beans.context.createBean(o),o}cellEditorAttached(){for(let e of this.onEditorAttachedFuncs)e();this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}};function ha(e,t,i,o,r,s){if(null==i&&null==t)return;let n={},l={},a=(e,t)=>{for(let i of e.split(" "))""!=i.trim()&&t(i)};if(i){let t=Object.keys(i);for(let r=0;r<t.length;r++){let s,d=t[r],h=i[d];"string"==typeof h?s=!e||e.evaluate(h,o):"function"==typeof h&&(s=h(o)),a(d,e=>{s?n[e]=!0:l[e]=!0})}}if(t&&s)for(let e of Object.keys(t))a(e,e=>{n[e]||(l[e]=!0)});s&&Object.keys(l).forEach(s),Object.keys(n).forEach(r)}function hd(e){if(e.group)return e.level;let t=e.parent;return t?t.level+1:0}var hh=class extends e2{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){let i=this.gos,o=t=>{if("string"==typeof t)e.push(t);else if(Array.isArray(t))for(let i of t)e.push(i)},r=i.get("rowClass");r&&o(r);let s=i.getCallback("getRowClass");s&&o(s({data:t.data,node:t,rowIndex:t.rowIndex}))}preProcessRowClassRules(e,t){this.processRowClassRules(t,t=>{e.push(t)},()=>{})}processRowClassRules(e,t,i){let{gos:o,expressionSvc:r}=this.beans,s=is(o,{data:e.data,node:e,rowIndex:e.rowIndex});ha(r,void 0,o.get("rowClassRules"),s,t,i)}processStylesFromGridOptions(e){let t,i=this.gos,o=i.get("rowStyle"),r=i.getCallback("getRowStyle");if(r&&(t=r({data:e.data,node:e,rowIndex:e.rowIndex})),t||o)return Object.assign({},o,t)}},hu=0,hc=class extends e2{constructor(e,t,i,o,r){super(),this.rowNode=e,this.useAnimationFrameForCreate=o,this.printLayout=r,this.focusEventWhileNotReady=null,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+"-"+hu++,this.rowId=z(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=hd(this.rowNode),this.setRowType(),this.setAnimateFlags(i),this.rowStyles=this.processStylesFromGridOptions(),this.rowEditStyleFeature=t.editSvc?.createRowStyleFeature(this),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if("function"!=typeof this.businessKeyForNodeFunc)return;let e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=z(e)}updateGui(e,t){"left"===e?this.leftGui=t:"right"===e?this.rightGui=t:"fullWidth"===e?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,i,o){let{context:r,rowRenderer:s}=this.beans,n={rowComp:e,element:t,containerType:i,compBean:o=rH(this,r,o)};this.allRowGuis.push(n),this.updateGui(i,n),this.initialiseRowComp(n);let l=this.rowNode,a="FullWidthLoading"===this.rowType||l.stub,d=!l.data&&"infinite"===this.beans.rowModel.getType();a||d||l.rowPinned||s.dispatchFirstDataRenderedEvent(),this.setupFocus()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return"FullWidthDetail"===this.rowType&&this.gos.get("keepDetailRows")}setCached(e){let t=e?"none":"";for(let e of this.allRowGuis)e.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),tG(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);let i=e.rowComp;for(let t of this.getInitialRowClasses(e.containerType))i.toggleCss(t,!0);this.executeSlideAndFadeAnimations(e),this.rowNode.group&&eo(e.element,!0==this.rowNode.expanded),this.setRowCompRowId(i),this.setRowCompRowBusinessKey(i),tU(t,e.element,s2,this),e.compBean.addDestroyFunc(()=>tU(t,e.element,s2,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){null!=this.businessKey&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){let t=z(this.rowNode.id);this.rowId=t,null!=t&&e.setRowId(t)}executeSlideAndFadeAnimations(e){let{containerType:t}=e;this.slideInAnimation[t]&&(e8(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(e8(()=>{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(e=>e!==i),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,this.beans.context),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");e&&this.areAllContainersReady()&&e({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)})}areAllContainersReady(){let{leftGui:e,centerGui:t,rightGui:i,beans:{visibleCols:o}}=this,r=!!e||!o.isPinningLeft(),s=!!i||!o.isPinningRight();return r&&!!t&&s}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;let e=this.beans.gos.getCallback("isFullWidthRow");return!!e&&e({rowNode:this.rowNode})}setRowType(){let{rowNode:e,gos:t,beans:{colModel:i}}=this,o=e.stub&&!t.get("suppressServerSideFullWidthLoadingRow")&&!t.get("groupHideOpenParents"),r=this.isNodeFullWidthCell(),s=t.get("masterDetail")&&e.detail,n=tQ(t,e,i.isPivotMode());o?this.rowType="FullWidthLoading":s?this.rowType="FullWidthDetail":r?this.rowType="FullWidth":n?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;let{animationFrameSvc:i}=this.beans;!i?.active||e||this.printLayout?this.updateColumnListsImpl(t):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 hl(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,i=null){let o={list:[],map:{}},r=(e,t,i)=>{null!=i?o.list.splice(i,0,t):o.list.push(t),o.map[e]=t},s=[];for(let i of t){let t=i.getInstanceId(),o=e.map[t];o&&!this.isCorrectCtrlForSpan(o)&&(o.destroy(),o=void 0),o||(o=this.getNewCellCtrl(i)),o&&r(t,o)}for(let t of e.list){let e=t.column.getInstanceId();null==o.map[e]&&(this.isCellEligibleToBeRemoved(t,i)?t.destroy():s.push([e,t]))}if(s.length)for(let[e,t]of s){let i=o.list.findIndex(e=>e.column.getLeft()>t.column.getLeft());r(e,t,-1===i?void 0:Math.max(i-1,0))}let{focusSvc:n,visibleCols:l}=this.beans,a=n.getFocusedCell();if(a&&a.column.getPinned()==i){let e=a.column.getInstanceId();if(!o.map[e]&&l.allCols.includes(a.column)){let t=this.createFocusedCellCtrl();if(t){let i=o.list.findIndex(e=>e.column.getLeft()>t.column.getLeft());r(e,t,-1===i?void 0:Math.max(i-1,0))}}}return o}createFocusedCellCtrl(){let{focusSvc:e,rowSpanSvc:t}=this.beans,i=e.getFocusedCell();if(!i)return;let o=t?.getCellSpan(i.column,this.rowNode);if(o){if(o.firstNode!==this.rowNode||!o.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){for(let t of this.allRowGuis){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 o=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,o,"left");let r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){let{column:i}=e;if(i.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;let{visibleCols:o,editSvc:r}=this.beans,s=r?.isEditing(e),n=e.isCellFocused();return!s&&!n||!(o.allCols.indexOf(i)>=0)}getDomOrder(){return this.gos.get("ensureDomOrder")||tV(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=A(this.rowNode.oldRowTop),{visibleCols:i}=this.beans,o=i.isPinningLeft(),r=i.isPinningRight();if(t){let{slideInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){e.fullWidth=!0;return}e.center=!0,e.left=o,e.right=r}else{let{fadeInAnimation:e}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){e.fullWidth=!0;return}e.center=!0,e.left=o,e.right=r}}isFullWidth(){return"Normal"!==this.rowType}refreshFullWidth(){let e=(e,t)=>!e||e.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(e.element,t).params),t=e(this.fullWidthGui,null),i=e(this.centerGui,null),o=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&i&&o&&r}addListeners(){let{beans:e,gos:t,rowNode:i}=this,{expansionSvc:o,eventSvc:r,context:s,rowSpanSvc:n}=e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...o?.getRowExpandedListeners(this)??{}}),i.detail&&this.addManagedListeners(i.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(i,{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(r,{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()}),n&&this.addManagedListeners(n,{spannedCellsUpdated:({pinned:e})=>{(!e||i.rowPinned)&&this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,s),this.tooltipFeature=this.destroyBean(this.tooltipFeature,s),this.rowEditStyleFeature=this.destroyBean(this.rowEditStyleFeature,s)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(t.get("rowDragEntireRow")){for(let e of this.allRowGuis)this.addRowDraggerToRow(e);return}this.rowDragComps=this.destroyBeans(this.rowDragComps,s)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{for(let e of this.getAllCellCtrls())e.onRowIndexChanged()},cellChanged:e=>{for(let t of this.getAllCellCtrls())t.onCellChanged(e)}})}onRowPinned(){for(let e of this.allRowGuis)e.rowComp.toggleCss("ag-row-pinned-source",!!this.rowNode.pinnedSibling)}onRowNodeDataChanged(e){this.refreshRow({suppressFlash:!e.update,newData:!e.update})}refreshRow(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell())return void this.beans.rowRenderer.redrawRow(this.rowNode);if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}for(let t of this.getAllCellCtrls())t.refreshCell(e);for(let e of this.allRowGuis)this.setRowCompRowId(e.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(e.rowComp);this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.rowEditStyleFeature?.applyRowStyles(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){let e=this.beans.rowDropHighlightSvc,t=e?.row===this.rowNode?e.position:"none",i="above"===t,o="inside"===t,r="below"===t,s="none"!==t,n=i||r,l=this.rowNode.uiLevel,a=n&&l>0,d=a?l.toString():"0";for(let e of this.allRowGuis){let t=e.rowComp;t.toggleCss("ag-row-highlight-above",i),t.toggleCss("ag-row-highlight-inside",o),t.toggleCss("ag-row-highlight-below",r),t.toggleCss("ag-row-highlight-indent",a),s?e.element.style.setProperty("--ag-row-highlight-level",d):e.element.style.removeProperty("--ag-row-highlight-level")}}postProcessRowDragging(){let e=this.rowNode.dragging;for(let t of this.allRowGuis)t.rowComp.toggleCss("ag-row-dragging",e)}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:k(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){let t=this.findFullWidthInfoForEvent(e);if(!t)return;let{rowGui:i,column:o}=t;if(i.element!==e.target)return;let r=this.rowNode,{focusSvc:s,navigation:n}=this.beans,l=s.getFocusedCell(),a={rowIndex:r.rowIndex,rowPinned:r.rowPinned,column:l?.column??o};n?.navigateToNextCell(e,e.key,a,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||rm(e))return;let t=this.allRowGuis.find(t=>t.element.contains(e.target)),i=t?t.element:null,o=i===e.target,r=$(this.beans),s=!1;i&&r&&(s=i.contains(r)&&r.classList.contains("ag-cell"));let n=null;o||s||(n=ru(this.beans,i,!1,e.shiftKey)),(this.isFullWidth()&&o||!n)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){let e=this.allRowGuis.find(e=>eE(e.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){let t=this.isFullWidth()&&e?void 0:this.gos.get("tabIndex");for(let e of this.allRowGuis)eG(e.element,"tabindex",t)}setupFocus(){this.isFullWidth()&&(this.restoreFullWidthFocus(!0),this.onFullWidthRowFocused(this.focusEventWhileNotReady??void 0))}restoreFullWidthFocus(e=!1){let{focusSvc:t,editSvc:i}=this.beans;if(i?.isEditing(this)||!t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)||!t.shouldTakeFocus())return;let o=this.getFullWidthRowGuiForFocus();if(!o)return;let r=()=>{this.isAlive()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)&&o.element.focus({preventScroll:!0})};e?setTimeout(r,0):r()}getFullWidthRowGuiForFocus(e){if(this.fullWidthGui)return this.fullWidthGui;let t=this.beans.focusSvc.getFocusedCell(),i=this.beans.colModel.getCol(e?.column??t?.column);if(!i)return;let o=i?.pinned;return"right"===o?this.rightGui:"left"===o?this.leftGui:this.centerGui}setFullWidthRowFocusedClass(e,t){this.forEachGui(void 0,i=>{i.element.classList.toggle("ag-full-width-focus",t&&i===e)})}onFullWidthRowFocused(e){let{focusSvc:t}=this.beans;if(!(this.isFullWidth()&&t.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned)))return void this.setFullWidthRowFocusedClass(void 0,!1);let i=this.getFullWidthRowGuiForFocus(e);if(!i){e&&(this.focusEventWhileNotReady=e),this.setFullWidthRowFocusedClass(void 0,!1);return}this.setFullWidthRowFocusedClass(i,!0),this.focusEventWhileNotReady=null,e?.forceBrowserFocus&&i.element.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:{}};for(let o of e.list)o!==t&&(i.list.push(o),i.map[o.column.getInstanceId()]=o);return i}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"pointerdown":case"touchstart":case"mousedown":this.onRowMouseDown(t)}}createRowEvent(e,t){let{rowNode:i}=this;return is(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){if(rm(e))return;let t=this.createRowEventWithSource("rowDoubleClicked",e);t.isEventHandlingSuppressed=this.isSuppressMouseEvent(e),this.beans.eventSvc.dispatchEvent(t)}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=em(e.target,"ag-row-drag",3),!this.isFullWidth()||this.isSuppressMouseEvent(e))return;let{rangeSvc:t,focusSvc:i}=this.beans;t?.removeAllCellRanges();let o=this.findFullWidthInfoForEvent(e);if(!o)return;let{rowGui:r,column:s}=o,n=r.element,l=e.target,a=this.rowNode,d=e.defaultPrevented||o7();n&&n.contains(l)&&eg(l)&&(d=!1),i.setFocusedCell({rowIndex:a.rowIndex,column:s,rowPinned:a.rowPinned,forceBrowserFocus:d})}isSuppressMouseEvent(e){let{gos:t,rowNode:i}=this;if(this.isFullWidth()){var o;let r=this.findFullWidthRowGui(e.target);return o=r?.rowComp.getFullWidthCellRendererParams(),sX(t,void 0,i,e,o?.suppressMouseEventHandling)}let r=s0(t,e.target,s1);return null!=r&&sJ(t,r.column,i,e)}onRowClick(e){if(rm(e)||this.lastMouseDownOnDragger)return;let t=this.isSuppressMouseEvent(e),{eventSvc:i,selectionSvc:o}=this.beans,r=this.createRowEventWithSource("rowClicked",e);r.isEventHandlingSuppressed=t,i.dispatchEvent(r),t||o?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){"FullWidthDetail"===this.rowType&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){let{gos:i,rowNode:o}=this,r=is(i,{fullWidth:!0,data:o.data,node:o,value:o.key,valueFormatted:o.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(e,t,i,o)=>this.addFullWidthRowDragging(e,t,i,o),setTooltip:(e,t)=>{i.assertModuleRegistered("Tooltip",3),this.setupFullWidthRowTooltip(e,t)}}),s=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return s.getCompDetailsFromGridOptions(oN,"agDetailCellRenderer",r,!0);case"FullWidthGroup":{let{value:e,valueFormatted:t}=this.beans.valueSvc.getValueForDisplay({node:this.rowNode,includeValueFormatted:!0,from:"edit"});return r.value=e,r.valueFormatted=t,s.getCompDetailsFromGridOptions(oO,"agGroupRowRenderer",r,!0)}case"FullWidthLoading":return s.getCompDetailsFromGridOptions(oH,"agLoadingCellRenderer",r,!0);default:return s.getCompDetailsFromGridOptions(oG,void 0,r,!0)}}setupFullWidthRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.setupFullWidthRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,i="",o){let{rowDragSvc:r,context:s}=this.beans;if(!r||!this.isFullWidth())return;let n=r.createRowDragComp(()=>i,this.rowNode,void 0,e,t,o);this.createBean(n,s),this.addDestroyFunc(()=>{this.destroyBean(n,s)})}onUiLevelChanged(){let e=hd(this.rowNode);if(this.rowLevel!=e){let t="ag-row-level-"+e,i="ag-row-level-"+this.rowLevel;for(let e of this.allRowGuis)e.rowComp.toggleCss(t,!0),e.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();if(this.firstRowOnPage!==e)for(let t of(this.firstRowOnPage=e,this.allRowGuis))t.rowComp.toggleCss("ag-row-first",e);if(this.lastRowOnPage!==t)for(let e of(this.lastRowOnPage=t,this.allRowGuis))e.rowComp.toggleCss("ag-row-last",t)}getAllCellCtrls(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){let e=[];if(this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length)for(let t of e)for(let e of this.allRowGuis)e.rowComp.toggleCss(t,!0)}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{for(let t of this.allRowGuis)t.rowComp.toggleCss(e,!0)},e=>{for(let t of this.allRowGuis)t.rowComp.toggleCss(e,!1)})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,e=>e.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return"left"===e||"right"===e?e:null}getInitialRowClasses(e){let t=this.getPinnedForContainer(e),i=this.isFullWidth(),{rowNode:o,beans:r}=this,s=[];s.push("ag-row"),s.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&s.push("ag-opacity-zero"),s.push(o.rowIndex%2==0?"ag-row-even":"ag-row-odd"),o.isRowPinned()&&(s.push("ag-row-pinned"),r.pinnedRowModel?.isManual()&&s.push("ag-row-pinned-manual")),!o.isRowPinned()&&o.pinnedSibling&&s.push("ag-row-pinned-source"),o.isSelected()&&s.push("ag-row-selected"),o.footer&&s.push("ag-row-footer"),s.push("ag-row-level-"+this.rowLevel),o.stub&&s.push("ag-row-loading"),i&&s.push("ag-full-width-row"),r.expansionSvc?.addExpandedCss(s,o),o.dragging&&s.push("ag-row-dragging");let{rowStyleSvc:n}=r;return n&&(n.processClassesFromGridOptions(s,o),n.preProcessRowClassRules(s,o)),s.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&s.push("ag-row-first"),this.isLastRowOnPage()&&s.push("ag-row-last"),i&&("left"===t&&s.push("ag-cell-last-left-pinned"),"right"===t&&s.push("ag-cell-first-right-pinned")),s}processStylesFromGridOptions(){return this.beans.rowStyleSvc?.processStylesFromGridOptions(this.rowNode)??this.emptyStyle}onRowSelected(e){this.beans.selectionSvc?.onRowCtrlSelected(this,e=>{(e===this.centerGui||e===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:o,beans:r,gos:s}=this;i.addManagedListeners(t,{pointerenter:e=>{"mouse"===e.pointerType&&o.dispatchRowEvent("mouseEnter")},pointerleave:e=>{"mouse"===e.pointerType&&o.dispatchRowEvent("mouseLeave")}}),i.addManagedListeners(o,{mouseEnter:()=>{r.dragSvc?.dragging||s.get("suppressRowHoverHighlight")||(t.classList.add("ag-row-hover"),o.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){for(let t of e?[e]:this.allRowGuis.map(e=>e.element))t.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){let t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition();return Math.min(Math.max(this.applyPaginationOffset(t.top,!0)-100,e),this.applyPaginationOffset(t.bottom,!0)+100)}forEachGui(e,t){if(e)t(e);else for(let e of this.allRowGuis)t(e)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(null==this.rowNode.rowHeight)return;let t=this.rowNode.rowHeight,i=this.beans.environment.getDefaultRowHeight(),o=tH(this.gos)?tO(this.beans,this.rowNode).height:void 0,r=o?`${Math.min(i,o)-2}px`:void 0;this.forEachGui(e,e=>{e.element.style.height=`${t}px`,r&&e.element.style.setProperty("--ag-line-height",r)})}destroyFirstPass(e=!1){this.active=!1;let{rowNode:t}=this;if(!e&&t$(this.gos)&&!t.sticky)if(null!=t.rowTop){let e=this.roundRowTopToBounds(t.rowTop);this.setRowTop(e)}else for(let e of this.allRowGuis)e.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;let e=e=>{for(let t of e.list)t.destroy();return{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,e=>{e.rowComp.toggleCss("ag-row-focus",this.rowFocused),e.rowComp.toggleCss("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){let{focusSvc:e}=this.beans,t=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);t!==this.rowFocused&&(this.rowFocused=t,this.setFocusedClasses())}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){return this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.pageBounds.getPixelOffset()*(t?1:-1)}setRowTop(e){if(!this.printLayout&&A(e)){let t=this.applyPaginationOffset(e),i=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t),o=`${i}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){let t;if(this.printLayout)return"";let i=this.rowNode;if(i.sticky)t=i.stickyRowTop;else{let o=this.slideInAnimation[e]?this.roundRowTopToBounds(i.oldRowTop):i.rowTop,r=this.applyPaginationOffset(o);t=i.isRowPinned()?r:this.beans.rowContainerHeight.getRealPixelPosition(r)}return t+"px"}setRowTopStyle(e){for(let t of this.allRowGuis)this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`)}getCellCtrl(e,t=!1){let i=null;for(let t of this.getAllCellCtrls())t.column==e&&(i=t);if(null!=i||t)return i;for(let t of this.getAllCellCtrls())t?.getColSpanningList().indexOf(e)>=0&&(i=t);return i}onRowIndexChanged(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){let t=this.rowNode.getRowIndexString();if(null===t)return;let i=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),o=this.rowNode.rowIndex%2==0,r=i+this.rowNode.rowIndex+1;this.forEachGui(e,e=>{e.rowComp.setRowIndex(t),e.rowComp.toggleCss("ag-row-even",o),e.rowComp.toggleCss("ag-row-odd",!o),es(e.element,r)})}},hg=class extends e2{constructor(){super(),this.beanName="navigation",this.onPageDown=e9(this.onPageDown,100),this.onPageUp=e9(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){var i,o;let r=e.key,s=e.altKey,n=e.ctrlKey||e.metaKey,l=!!this.beans.rangeSvc&&e.shiftKey,a=(i=this.gos,o=e,s0(i,o.target,s1)?.getFocusedCellPosition()??null),d=!1;switch(r){case oo:case"End":n||s||(this.onHomeOrEndKey(r),d=!0);break;case i6:case i7:case i8:case i9:if(!a)return!1;!n||s||l||(this.onCtrlUpDownLeftRight(r,a),d=!0);break;case oi:case ot:n||s||(d=this.handlePageUpDown(r,a,t))}return d&&e.preventDefault(),d}handlePageUpDown(e,t,i){return i&&(t=this.beans.focusSvc.getFocusedCell()),!!t&&(e===ot?this.onPageUp(t):this.onPageDown(t),!0)}navigateTo({scrollIndex:e,scrollType:t,scrollColumn:i,focusIndex:o,focusColumn:r,isAsync:s,rowPinned:n}){let{scrollFeature:l}=this.gridBodyCon;A(i)&&!i.isPinned()&&l.ensureColumnVisible(i),A(e)&&l.ensureIndexVisible(e,t),s||l.ensureIndexVisible(o);let{focusSvc:a,rangeSvc:d}=this.beans;a.setFocusedCell({rowIndex:o,column:r,rowPinned:n,forceBrowserFocus:!0}),d?.setRangeToCell({rowIndex:o,rowPinned:n,column:r})}onPageDown(e){let t=this.beans,i=hp(t),o=this.getViewportHeight(),{pageBounds:r,rowModel:s,rowAutoHeight:n}=t,l=r.getPixelOffset(),a=i.top+o,d=s.getRowIndexAtPixel(a+l);n?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){let t=this.beans,i=hp(t),{pageBounds:o,rowModel:r,rowAutoHeight:s}=t,n=o.getPixelOffset(),l=i.top,a=r.getRowIndexAtPixel(l+n);s?.active?this.navigateToNextPageWithAutoHeight(e,a,!0):this.navigateToNextPage(e,a,!0)}navigateToNextPage(e,t,i=!1){let o,{pageBounds:r,rowModel:s}=this.beans,n=this.getViewportHeight(),l=r.getFirstRow(),a=r.getLastRow(),d=r.getPixelOffset(),h=s.getRow(e.rowIndex),u=i?h?.rowHeight-n-d:n-d,c=h?.rowTop+u,g=s.getRowIndexAtPixel(c+d);g===e.rowIndex&&(t=g=e.rowIndex+(i?-1:1)),i?(o="bottom",g<l&&(g=l),t<l&&(t=l)):(o="top",g>a&&(g=a),t>a&&(t=a)),this.isRowTallerThanView(s.getRow(g))&&(t=g,o="top"),this.navigateTo({scrollIndex:t,scrollType:o,scrollColumn:null,focusIndex:g,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 o=this.getNextFocusIndexForAutoHeight(e,i);this.navigateTo({scrollIndex:t,scrollType:i?"bottom":"top",scrollColumn:null,focusIndex:o,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){let i=t?-1:1,o=this.getViewportHeight(),{pageBounds:r,rowModel:s}=this.beans,n=r.getLastRow(),l=0,a=e.rowIndex;for(;a>=0&&a<=n;){let e=s.getRow(a);if(e){let t=e.rowHeight??0;if(l+t>o)break;l+=t}a+=i}return Math.max(0,Math.min(a,n))}getViewportHeight(){let e=this.beans,t=hp(e),i=this.beans.scrollVisibleSvc.getScrollbarWidth(),o=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(o-=i),o}isRowTallerThanView(e){if(!e)return!1;let t=e.rowHeight;return"number"==typeof t&&t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){let i=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:o,rowPinned:r,column:s}=this.getNormalisedPosition(i)??i;this.navigateTo({scrollIndex:o,scrollType:null,scrollColumn:s,focusIndex:o,focusColumn:s,rowPinned:r})}onHomeOrEndKey(e){let t=e===oo,{visibleCols:i,pageBounds:o,rowModel:r}=this.beans,s=i.allCols,n=t?o.getFirstRow():o.getLastRow(),l=r.getRow(n);if(!l)return;let a=(t?s:[...s].reverse()).find(e=>!e.isSuppressNavigable(l));a&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:a,focusIndex:n,focusColumn:a})}onTabKeyDown(e,t){let i=t.shiftKey,o=this.tabToNextCellCommon(e,i,t),r=this.beans,{ctrlsSvc:s,pageBounds:n,focusSvc:l,gos:a}=r;if(!1!==o)return void(o?t.preventDefault():null===o&&s.get("gridCtrl").allowFocusForNextCoreContainer(i));if(i){let{rowIndex:i,rowPinned:o}=e.getRowPosition();(o?0===i:i===n.getFirstRow())&&(0===a.get("headerHeight")||rx(r)?rE(r,!0,!0):(t.preventDefault(),l.focusPreviousFromFirstCell(t)))}else e instanceof hl&&e.focusCell(!0),(l.focusOverlay(!1)||rE(r,i))&&t.preventDefault()}tabToNextCell(e,t){let i=this.beans,{focusSvc:o,rowRenderer:r}=i,s=o.getFocusedCell();if(!s)return!1;let n=rS(i,s);return(!!n||(n=r.getRowByPosition(s),!!n?.isFullWidth()))&&!!this.tabToNextCellCommon(n,e,t,"api")}tabToNextCellCommon(e,t,i,o="ui"){let r,{editSvc:s,focusSvc:n}=this.beans,l=e instanceof hl?e:e.getAllCellCtrls()?.[0];return null===(r=s?.isEditing()?s?.moveToNextCell(l,t,i,o):this.moveToNextCellNotEditing(e,t,i))?r:r||!!n.focusedHeader}moveToNextCellNotEditing(e,t,i){let o,r=this.beans.visibleCols.allCols;if(e instanceof hc){if(o={...e.getRowPosition(),column:t?r[0]:x(r)},this.gos.get("embedFullWidthRows")&&i){let t=e.findFullWidthInfoForEvent(i);t&&(o.column=t.column)}}else o=e.getFocusedCellPosition();let s=this.findNextCellToFocusOn(o,{backwards:t,startEditing:!1});if(!1===s)return null;if(s instanceof hl)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s,t);return A(s)}findNextCellToFocusOn(e,{backwards:t,startEditing:i,skipToNextEditableCell:o}){let r=e,s=this.beans,{cellNavigation:n,gos:l,focusSvc:a,rowRenderer:d,rangeSvc:h}=s;for(;;){e!==r&&(e=r),t||(r=this.getLastCellOfColSpan(r)),r=n.getNextTabbedCell(r,t);let u=l.getCallback("tabToNextCell");if(A(u)){let o=u({backwards:t,editing:i,previousCellPosition:e,nextCellPosition:r||null});if(!0===o)r=e;else{if(!1===o)return!1;r={rowIndex:o.rowIndex,column:o.column,rowPinned:o.rowPinned}}}if(!r)return null;if(r.rowIndex<0){let e=rM(s);return a.focusHeaderPosition({headerPosition:{headerRowIndex:e+r.rowIndex,column:r.column},fromCell:!0}),null}let c="fullRow"===l.get("editType");if(i&&(!c||o)&&!this.isCellEditable(r))continue;this.ensureCellVisible(r);let g=rS(s,r);if(!g){let e=d.getRowByPosition(r);if(!e||!e.isFullWidth()||i)continue;return{...e.getRowPosition(),column:r?.column}}if(!n.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(r),h?.setRangeToCell(r),g}}isCellEditable(e){let t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){let{pinnedRowModel:i,rowModel:o}=this.beans;return"top"===t?i?.getPinnedTopRow(e):"bottom"===t?i?.getPinnedBottomRow(e):o.getRow(e)}navigateToNextCell(e,t,i,o){let r=i,s=!1,n=this.beans,{cellNavigation:l,focusSvc:a,gos:d}=n;for(;r&&(r===i||!this.isValidNavigateCell(r));)d.get("enableRtl")?t===i6&&(r=this.getLastCellOfColSpan(r)):t===i7&&(r=this.getLastCellOfColSpan(r)),s=I(r=l.getNextCellToFocus(t,r));if(s&&e&&e.key===i8&&(r={rowIndex:-1,rowPinned:null,column:i.column}),o){let o=d.getCallback("navigateToNextCell");if(A(o)){let s=o({key:t,previousCellPosition:i,nextCellPosition:r||null,event:e});r=A(s)?{rowPinned:s.rowPinned,rowIndex:s.rowIndex,column:s.column}:null}}if(!r)return;if(r.rowIndex<0){let t=rM(n);a.focusHeaderPosition({headerPosition:{headerRowIndex:t+r.rowIndex,column:i.column},event:e||void 0,fromCell:!0});return}let h=this.getNormalisedPosition(r);h?this.focusPosition(h):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){if(this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);let t=rS(this.beans,e);return t?(e=t.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){let{visibleCols:i,rowRenderer:o,focusSvc:r,eventSvc:s}=this.beans,n=i.allCols,l=o.getRowByPosition(e);if(!l?.isFullWidth())return!1;let a=r.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?x(n):n[0])};this.focusPosition(d);let h=null==t?null!=a&&function(e,t){switch(e.rowPinned){case"top":if("top"!==t.rowPinned)return!0;break;case"bottom":if("bottom"!==t.rowPinned)return!1;break;default:if(A(t.rowPinned))return"top"!==t.rowPinned}return e.rowIndex<t.rowIndex}(d,a):t;return s.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:h}),!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!!ry(this.beans,e)}getLastCellOfColSpan(e){let t=rS(this.beans,e);if(!t)return e;let i=t.getColSpanningList();return 1===i.length?e:{rowIndex:e.rowIndex,column:x(i),rowPinned:e.rowPinned}}ensureCellVisible(e){let t=tK(this.gos),i=this.beans.rowModel.getRow(e.rowIndex),o=t&&i?.sticky,{scrollFeature:r}=this.gridBodyCon;!o&&I(e.rowPinned)&&r.ensureIndexVisible(e.rowIndex),e.column.isPinned()||r.ensureColumnVisible(e.column)}ensureColumnVisible(e){let t=this.gridBodyCon.scrollFeature;e.isPinned()||t.ensureColumnVisible(e)}ensureRowVisible(e){this.gridBodyCon.scrollFeature.ensureIndexVisible(e)}};function hp(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var hf=class extends e2{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)}},hm=class extends e2{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?Math.max(t.rowTop+t.rowHeight-e.rowTop,0):0}getCurrentPagePixelRange(){let{topRowBounds:e,bottomRowBounds:t}=this;return{pageFirstPixel:e?.rowTop??0,pageLastPixel:t?t.rowTop+t.rowHeight:0}}calculateBounds(e,t){let{rowModel:i}=this.beans,o=i.getRowBounds(e);o&&(o.rowIndex=e),this.topRowBounds=o;let r=i.getRowBounds(t);r&&(r.rowIndex=t),this.bottomRowBounds=r,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){let e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},hC=class extends e2{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&&(ep(i,t),eI(i,e))}},hw=class extends e2{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.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,o=tV(e,"print"),r=o?0:t.getColsLeftWidth(),s=o?0:t.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,i.dispatchEvent({type:"leftPinnedWidthChanged"})),s!=this.rightWidth&&(this.rightWidth=s,i.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){let e=ev(this.gridBodyCtrl.eBodyViewport);if(e<=50)return;let t=this.getPinnedColumnsOverflowingViewport(e-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:o,hasLockedPinned:r}=t,s=o;(s.length||r)&&(i&&(s=i({columns:s,viewportWidth:e})),s?.length&&(s=s.filter(e=>!iB(e)),this.setColsPinned(s,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new hC(e,t)}setColsPinned(e,t,i){let o,{colModel:r,colAnimation:s,visibleCols:n,gos:l}=this.beans;if(!r.cols||!e?.length)return;if(tV(l,"print"))return void tM(37);s?.start(),o=!0===t||"left"===t?"left":"right"===t?"right":null;let a=[];for(let t of e){if(!t)continue;let e=r.getCol(t);e&&e.getPinned()!==o&&(this.setColPinned(e,o),a.push(e))}a.length&&(n.refresh(i),iq(this.eventSvc,a,i)),s?.finish()}initCol(e){let{pinned:t,initialPinned:i}=e.colDef;void 0!==t?this.setColPinned(e,t):this.setColPinned(e,i)}setColPinned(e,t){!0===t||"left"===t?e.pinned="left":"right"===t?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){let{scrollVisibleSvc:t}=this.beans;if(null==e.pinned)return;let i="left"===e.pinned,o="right"===e.pinned;e.hidden=!0;let r=()=>{let r=i?this.leftWidth:this.rightWidth;if(null==r)return;let s=0==r,n=e.hidden!==s,l=this.gos.get("enableRtl"),a=t.getScrollbarWidth(),d=t.verticalScrollShowing&&(l&&i||!l&&o);e.comp.setPinnedContainerWidth(`${d?r+a:r}px`),e.comp.setDisplayed(!s),n&&(e.hidden=s,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:r,scrollbarWidthChanged:r})}getHeaderResizeDiff(e,t){if(t.getPinned()){let{leftWidth:t,rightWidth:i}=this,o=ev(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(t+i+e>o)if(!(o>t+i))return 0;else e=o-t-i}return e}getPinnedColumnsOverflowingViewport(e){let t=(this.rightWidth??0)+(this.leftWidth??0),i=!1;if(t<e)return{columns:[],hasLockedPinned:i};let{visibleCols:o}=this.beans,r=[...o.leftCols],s=[...o.rightCols],n=0,l=0,a=[],d=t-0-e;for(;(l<r.length||n<s.length)&&d>0;){if(n<s.length){let e=s[n++];if(e.colDef.lockPinned){i=!0;continue}d-=e.getActualWidth(),a.push(e)}if(l<r.length&&d>0){let e=r[l++];if(e.colDef.lockPinned){i=!0;continue}d-=e.getActualWidth(),a.push(e)}}return{columns:a,hasLockedPinned:i}}},hv=class extends e1{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=e7(this,this.updateAnnouncement.bind(this),200)}postConstruct(){let e=this.beans,t=K(e),i=this.descriptionContainer=t.createElement("div");i.classList.add("ag-aria-description-container"),Y(i,"live","polite"),Y(i,"relevant","additions text"),Y(i,"atomic",!0),e.eRootDiv.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(()=>{this.handleAnnouncementUpdate(e)},50)}handleAnnouncementUpdate(e){if(!this.isAlive()||!this.descriptionContainer)return;let t=e;if(null==t||""==t.replace(/[ .]/g,"")){this.lastAnnouncement="";return}this.lastAnnouncement===t&&(t=`${t}\u200B`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}destroy(){super.destroy();let{descriptionContainer:e}=this;e&&(eP(e),e.remove()),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},hb="ag-delay-render",hy=class extends e2{constructor(){super(...arguments),this.beanName="colDelayRenderSvc",this.hideRequested=!1,this.alreadyRevealed=!1,this.timesRetried=0,this.requesters=new Set}hideColumns(e){!(this.alreadyRevealed||this.requesters.has(e))&&(this.requesters.add(e),this.hideRequested||(this.beans.ctrlsSvc.whenReady(this,e=>{e.gridBodyCtrl.eGridBody.classList.add(hb)}),this.hideRequested=!0))}revealColumns(e){if(this.alreadyRevealed||!this.isAlive()||(this.requesters.delete(e),this.requesters.size>0))return;let{renderStatus:t,ctrlsSvc:i}=this.beans;if(t){if(!t.areHeaderCellsRendered()&&this.timesRetried<5){this.timesRetried++,setTimeout(()=>this.revealColumns(e));return}this.timesRetried=0}i.getGridBodyCtrl().eGridBody.classList.remove(hb),this.alreadyRevealed=!0}},hS={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"}]}]},hR=class extends ow{constructor(){super(hS),this.eOverlayWrapper=null,this.activeOverlay=null,this.activePromise=null,this.activeCssClass=null,this.elToFocusAfter=null,this.overlayExclusive=!1,this.oldWrapperPadding=null,this.registerCSS(".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-exporting-wrapper,.ag-overlay-loading-wrapper,.ag-overlay-modal-wrapper{pointer-events:all}.ag-overlay-exporting-center,.ag-overlay-loading-center{background:var(--ag-background-color);border:solid var(--ag-border-width) var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);display:flex;padding:var(--ag-spacing)}")}handleKeyDown(e){if("Tab"!==e.key||e.defaultPrevented||rm(e))return;let{beans:t,eOverlayWrapper:i}=this;if(!(i&&ru(t,i,!1,e.shiftKey)))(e.shiftKey?t.focusSvc.focusGridView({column:x(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):rE(t,!1))&&e.preventDefault()}updateLayoutClasses(e,t){let i=this.eOverlayWrapper;if(!i)return;let o=i.classList,{AUTO_HEIGHT:r,NORMAL:s,PRINT:n}=sB;o.toggle(r,t.autoHeight),o.toggle(s,t.normal),o.toggle(n,t.print)}postConstruct(){this.createManagedBean(new sV(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setWrapperComp(this,!1),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)}),this.addManagedEventListeners({gridSizeChanged:this.refreshWrapperPadding.bind(this)})}setWrapperTypeClass(e){let t=this.eOverlayWrapper?.classList;if(!t){this.activeCssClass=null;return}this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,i){if(this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,this.overlayExclusive=i,!e)return this.refreshWrapperPadding(),ou.resolve();if(this.setWrapperTypeClass(t),this.setDisplayed(!0,{skipAriaHidden:!0}),this.refreshWrapperPadding(),i&&this.isGridFocused()){let e=$(this.beans);e&&!j(this.beans)&&(this.elToFocusAfter=e)}return e.then(t=>{let o=this.eOverlayWrapper;if(!o)return void this.destroyBean(t);if(this.activePromise!==e){this.activeOverlay!==t&&(this.destroyBean(t),t=null);return}this.activePromise=null,t&&(this.activeOverlay!==t&&(o.appendChild(t.getGui()),this.activeOverlay=t),i&&this.isGridFocused()&&rh(o))}),e}refreshWrapperPadding(){if(!this.eOverlayWrapper){this.oldWrapperPadding=null;return}let e=!!this.activeOverlay||!!this.activePromise,t=0;e&&!this.overlayExclusive&&(t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0),t!==this.oldWrapperPadding&&(this.oldWrapperPadding=t,this.eOverlayWrapper.style.setProperty("padding-top",`${t}px`))}destroyActiveOverlay(){this.activePromise=null;let e=this.activeOverlay;if(!e){this.overlayExclusive=!1,this.elToFocusAfter=null,this.refreshWrapperPadding();return}let t=this.elToFocusAfter;this.elToFocusAfter=null,this.activeOverlay=null,this.overlayExclusive=!1,t&&!this.isGridFocused()&&(t=null),this.destroyBean(e);let i=this.eOverlayWrapper;i&&eP(i),t?.focus?.({preventScroll:!0}),this.refreshWrapperPadding()}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.setWrapperComp(this,!0),super.destroy(),this.eOverlayWrapper=null}},hF={selector:"AG-OVERLAY-WRAPPER",component:hR},hP=["refresh"],hx=e=>({name:e,optionalMethods:hP}),hD={id:"agLoadingOverlay",overlayType:"loading",comp:hx("loadingOverlayComponent"),wrapperCls:"ag-overlay-loading-wrapper",exclusive:!0,compKey:"loadingOverlayComponent",paramsKey:"loadingOverlayComponentParams",isSuppressed:e=>{let t=e.get("loading");return!1===t||!0===e.get("suppressLoadingOverlay")&&!0!==t}},hE={id:"agNoRowsOverlay",overlayType:"noRows",comp:hx("noRowsOverlayComponent"),wrapperCls:"ag-overlay-no-rows-wrapper",compKey:"noRowsOverlayComponent",paramsKey:"noRowsOverlayComponentParams",isSuppressed:e=>e.get("suppressNoRowsOverlay")},hM={id:"agNoMatchingRowsOverlay",overlayType:"noMatchingRows",comp:hx("noMatchingRowsOverlayComponent"),wrapperCls:"ag-overlay-no-matching-rows-wrapper"},hT={id:"agExportingOverlay",overlayType:"exporting",comp:hx("exportingOverlayComponent"),wrapperCls:"ag-overlay-exporting-wrapper",exclusive:!0},hk={id:"activeOverlay",comp:hx("activeOverlay"),wrapperCls:"ag-overlay-modal-wrapper",exclusive:!0},hA=class extends e2{constructor(){super(...arguments),this.beanName="overlays",this.eWrapper=void 0,this.exclusive=!1,this.oldExclusive=!1,this.currentDef=null,this.showInitialOverlay=!0,this.userForcedNoRows=!1,this.exportsInProgress=0,this.newColumnsLoadedCleanup=null}postConstruct(){let e=this.gos;this.showInitialOverlay=tL(e);let t=()=>{this.userForcedNoRows||this.updateOverlay(!1)},[i,o,r,s]=this.addManagedEventListeners({newColumnsLoaded:t,rowCountReady:()=>{this.disableInitialOverlay(),t(),o()},rowDataUpdated:t,modelUpdated:t});this.newColumnsLoadedCleanup=i,this.addManagedPropertyListeners(["loading","activeOverlay","activeOverlayParams","overlayComponentParams","loadingOverlayComponentParams","noRowsOverlayComponentParams"],e=>this.onPropChange(new Set(e.changeSet?.properties)))}destroy(){this.doHideOverlay(),super.destroy(),this.eWrapper=void 0}setWrapperComp(e,t){this.isAlive()&&(t?this.eWrapper===e&&(this.eWrapper=void 0):this.eWrapper=e,this.updateOverlay(!1))}isVisible(){return!!this.currentDef}showLoadingOverlay(){this.showInitialOverlay=!1;let e=this.gos;if(!this.eWrapper||e.get("activeOverlay")||this.isDisabled(hD))return;let t=e.get("loading");(t||void 0===t)&&this.doShowOverlay(hD)}showNoRowsOverlay(){this.showInitialOverlay=!1;let e=this.gos;!this.eWrapper||e.get("activeOverlay")||e.get("loading")||this.isDisabled(hE)||(this.userForcedNoRows=!0,this.doShowOverlay(hE))}async showExportOverlay(e){let{gos:t,beans:i}=this;if(!this.eWrapper||t.get("activeOverlay")||t.get("loading")||this.isDisabled(hT)||this.userForcedNoRows&&this.currentDef===hE)return void e();let o=this.getDesiredDefWithOverride(hT);if(!o)return void e();this.exportsInProgress++,this.focusedCell=i.focusSvc.getFocusedCell(),await this.doShowOverlay(o),await new Promise(e=>setTimeout(()=>e()));let r=Date.now();try{e()}finally{let e=Math.max(0,300-(Date.now()-r)),t=()=>{this.exportsInProgress--,0===this.exportsInProgress&&(this.updateOverlay(!1),function(e,t){let i=e.focusSvc,o=i.getFocusedCell();if(o&&t&&rb(o,t)){let{rowIndex:o,rowPinned:r,column:s}=t;j(e)&&i.setFocusedCell({rowIndex:o,column:s,rowPinned:r,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!rn})}}(i,this.focusedCell),this.focusedCell=null)};e>0?setTimeout(()=>t(),e):t()}}hideOverlay(){let e=this.gos;this.showInitialOverlay=!1;let t=this.userForcedNoRows;(this.userForcedNoRows=!1,e.get("loading"))?tM(99):e.get("activeOverlay")?tM(296):this.currentDef===hM?tM(297):(this.doHideOverlay(),t&&this.getOverlayDef()!==hE&&this.updateOverlay(!1))}getOverlayWrapperSelector(){return hF}getOverlayWrapperCompClass(){return hR}onPropChange(e){let t=e.has("activeOverlay");if((t||e.has("loading"))&&this.updateOverlay(t))return;let i=this.currentDef,o=this.eWrapper?.activeOverlay;if(o&&i){let t=e.has("activeOverlayParams");if(i===hk)t&&o.refresh?.(this.makeCompParams(!0));else{let t=i.paramsKey;(e.has("overlayComponentParams")||t&&e.has(t))&&o.refresh?.(this.makeCompParams(!1,t,i.overlayType))}}}updateOverlay(e){let t=this.eWrapper;if(!t)return this.currentDef=null,!1;let i=this.getDesiredDefWithOverride(),o=this.currentDef,r=i===hk&&e;return i!==o?i?(this.doShowOverlay(i),!0):(this.disableInitialOverlay(),this.doHideOverlay()):r&&i?(t.hideOverlay(),this.doShowOverlay(i),!0):(i||this.disableInitialOverlay(),!1)}getDesiredDefWithOverride(e){var t;let{gos:i}=this,o=(t=i.get("activeOverlay"))?({agLoadingOverlay:hD,agNoRowsOverlay:hE,agNoMatchingRowsOverlay:hM,agExportingOverlay:hT})[t]??hk:null;return!o&&(o=e??this.getOverlayDef())&&this.isDisabled(o)&&(o=null),o}getOverlayDef(){var e;let{gos:t,beans:i}=this,{rowModel:o}=i,r=t.get("loading");if(void 0!==r){if(this.disableInitialOverlay(),r)return hD}else if(this.showInitialOverlay){if(!this.isDisabled(hD)&&(!t.get("columnDefs")||!t.get("rowData")))return hD;this.disableInitialOverlay()}else this.disableInitialOverlay();return(e=o.getOverlayType())?({loading:hD,noRows:hE,noMatchingRows:hM,exporting:hT})[e]:null}disableInitialOverlay(){this.showInitialOverlay=!1,this.newColumnsLoadedCleanup?.(),this.newColumnsLoadedCleanup=null}doShowOverlay(e){let t,i,{gos:o,beans:r}=this,{userCompFactory:s}=r;this.currentDef=e;let n=e!==hk,l=!!e.exclusive;this.exclusive=l,(e.paramsKey&&o.get(e.paramsKey)||e.compKey&&o.get(e.compKey))&&(t=e.paramsKey),n&&(o.get("overlayComponent")||o.get("overlayComponentSelector"))&&(i=s.getCompDetailsFromGridOptions({name:"overlayComponent",optionalMethods:["refresh"]},void 0,this.makeCompParams(!1,e.paramsKey,e.overlayType))),i??(i=s.getCompDetailsFromGridOptions(e.comp,n?e.id:void 0,this.makeCompParams(!n,t,e.overlayType),!1));let a=i?.newAgStackInstance()??null,d=this.eWrapper?this.eWrapper.showOverlay(a,e.wrapperCls,l):ou.resolve();return this.eWrapper?.refreshWrapperPadding(),this.setExclusive(l),d}makeCompParams(e,t,i){let{gos:o}=this,r=e?o.get("activeOverlayParams"):{...o.get("overlayComponentParams"),...t&&o.get(t)||null,overlayType:i};return is(o,r??{})}doHideOverlay(){let e=!1;this.currentDef&&(this.currentDef=null,e=!0),this.exclusive=!1;let t=this.eWrapper;return t&&(t.hideOverlay(),t.refreshWrapperPadding(),this.setExclusive(!1)),e}setExclusive(e){this.oldExclusive!==e&&(this.oldExclusive=e,this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"}))}isDisabled(e){let{gos:t}=this;return e.overlayType&&t.get("suppressOverlays")?.includes(e.overlayType)||e.isSuppressed?.(t)===!0}},hI=class extends e2{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=function(){if(void 0!==v)return v;if(!document.body)return -1;let e=1e6,t=o9()?6e6:1e9,i=document.createElement("div");for(document.body.appendChild(i);;){let o=2*e;if(i.style.height=o+"px",o>t||i.clientHeight!==o)break;e=o}return i.remove(),v=e,e}(),tl(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;tl(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="number"==typeof e?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=null!=e&&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();return this.maxScrollY*(e/t)}},hL=class extends e2{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=()=>{for(let e of this.getAllCellCtrls())e.onCellSelectionChanged()},t=()=>{for(let e of this.getAllCellCtrls())e.updateRangeBordersIfRangeCount()},i=()=>{this.eventSvc.addListener("cellSelectionChanged",e),this.eventSvc.addListener("columnMoved",t),this.eventSvc.addListener("columnPinned",t),this.eventSvc.addListener("columnVisible",t)},o=()=>{this.eventSvc.removeListener("cellSelectionChanged",e),this.eventSvc.removeListener("columnMoved",t),this.eventSvc.removeListener("columnPinned",t),this.eventSvc.removeListener("columnVisible",t)};this.addDestroyFunc(()=>o()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{t2(this.gos)?i():o()}),t2(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,this.editSvc=e.editSvc}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",e=>this.onSuppressCellFocusChanged(e.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:e,previousValue:t})=>{(!t&&e||t&&!e)&&this.redrawRows()});let{stickyRowSvc:e,gos:t,showRowGroupCols:i}=this.beans;if(i&&this.addManagedPropertyListener("showOpenedGroup",()=>{let e=i.columns;e.length&&this.refreshCells({columns:e,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{let e=this.gridBodyCtrl;e.setStickyTopHeight(0),e.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=tV(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){let e=this.getKeepDetailRowsCount();this.cachedRowCtrls=new hB(null!=e?e:3)}}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.isFullWidth()||!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!i.getCellCtrl(t)||!i.isRowRendered():!!i}updateCellFocus(e){for(let t of this.getAllCellCtrls())t.onCellFocused(e);for(let t of this.getFullWidthRowCtrls())t.onFullWidthRowFocused(e)}onCellFocusChanged(e){if(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){for(let t of this.getAllCellCtrls())t.onSuppressCellFocusChanged(e);for(let t of this.getFullWidthRowCtrls())t.onSuppressCellFocusChanged(e)}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{let{cellFlashSvc:t}=this.beans;if(t)for(let i of this.getAllCellCtrls())t.onFlashCells(i,e)},columnHoverChanged:()=>{for(let e of this.getAllCellCtrls())e.onColumnHover()},displayedColumnsChanged:()=>{for(let e of this.getAllCellCtrls())e.onDisplayedColumnsChanged()},displayedColumnsWidthChanged:()=>{if(this.printLayout)for(let e of this.getAllCellCtrls())e.onLeftChanged()}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){for(let e of this.destroyFuncsForColumnListeners)e();this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){for(let e of(this.removeGridColumnListeners(),this.colModel.getCols())){let t=t=>{for(let i of this.getAllCellCtrls())i.column===e&&t(i)},i=()=>{t(e=>e.onLeftChanged())},o=()=>{t(e=>e.onWidthChanged())},r=()=>{t(e=>e.onFirstRightPinnedChanged())},s=()=>{t(e=>e.onLastLeftPinnedChanged())},n=()=>{t(e=>e.onColDefChanged())};e.__addEventListener("leftChanged",i),e.__addEventListener("widthChanged",o),e.__addEventListener("firstRightPinnedChanged",r),e.__addEventListener("lastLeftPinnedChanged",s),e.__addEventListener("colDefChanged",n),this.destroyFuncsForColumnListeners.push(()=>{e.__removeEventListener("leftChanged",i),e.__removeEventListener("widthChanged",o),e.__removeEventListener("firstRightPinnedChanged",r),e.__removeEventListener("lastLeftPinnedChanged",s),e.__removeEventListener("colDefChanged",n)})}}onDomLayoutChanged(){let e=tV(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=[];for(let i of this.getAllRowCtrls()){let o=i.getCellCtrl(e,!0)?.eGui;o&&t.push(o)}return t}refreshFloatingRowComps(e=!0){this.refreshFloatingRows(this.topRowCtrls,"top",e),this.refreshFloatingRows(this.bottomRowCtrls,"bottom",e)}refreshFloatingRows(e,t,i){let{pinnedRowModel:o,beans:r,printLayout:s}=this,n=Object.fromEntries(e.map(e=>[e.rowNode.id,e]));o?.forEachPinnedRow(t,(l,a)=>{let d=e[a];d&&void 0===o.getPinnedRowById(d.rowNode.id,t)&&(d.destroyFirstPass(),d.destroySecondPass()),l.id in n&&i?(e[a]=n[l.id],delete n[l.id]):e[a]=new hc(l,r,!1,!1,s)}),e.length=("top"===t?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0}onPinnedRowDataChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}onPinnedRowsChanged(){this.redrawAfterModelUpdate({recycleRows:!0})}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else{if(this.cachedRowCtrls?.has(e))return void this.cachedRowCtrls.removeRow(e);let t=t=>{let i=t[e.rowIndex];i&&i.rowNode===e&&(i.destroyFirstPass(),i.destroySecondPass(),t[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":t(this.topRowCtrls);break;case"bottom":t(this.bottomRowCtrls);break;default:t(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){let{editSvc:t}=this.beans;if(t?.isEditing()&&(t.isBatchEditing()?t.cleanupEditors():t.stopEditing(void 0,{source:"api"})),null!=e){for(let t of e??[])this.redrawRow(t,!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,o=e.animate&&t$(this.gos),r=i?this.getRowsToRecycle():null;i||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();let{stickyRowFeature:s,gos:n}=this;if(s){s.checkStickyRows();let e=s.extraTopHeight+s.extraBottomHeight;e&&this.updateContainerHeights(e)}this.recycleRows(r,o),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(n.get("enableRowPinning")?i:void 0),this.dispatchDisplayedRowsChanged(),null!=t&&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)return void t.setModelHeight(null);let i=this.pageBounds.getCurrentPageHeight();0===i&&(i=1),t.setModelHeight(i+e)}getLockOnRefresh(){if(this.refreshInProgress)throw Error(tA(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);i?e.rowIndex!==i.rowIndex||e.rowPinned!=i.rowPinned?t.setFocusedCell({...i,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0}):t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(is(this.gos,{...i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"})):t.focusHeaderPosition({headerPosition:{headerRowIndex:rM(this.beans)-1,column:e.column}})}findPositionToFocus(e){let{pagination:t,pageBounds:i}=this.beans,o=e;for(null==o.rowPinned&&t&&i&&!t.isRowInPage(o.rowIndex)&&(o={rowPinned:null,rowIndex:i.getFirstRow()});o;){if(null==o.rowPinned&&i)if(o.rowIndex<i.getFirstRow()){if(!(o=rR(this.beans,{rowPinned:null,rowIndex:0})))break}else o.rowIndex>i.getLastRow()&&(o={rowPinned:null,rowIndex:i.getLastRow()});let t=this.getRowByPosition(o);if(t?.isAlive())return{...t.getRowPosition(),column:e.column};o=rR(this.beans,o)}return null}getAllCellCtrls(){let e=[],t=this.getAllRowCtrls(),i=t.length;for(let o=0;o<i;o++){let i=t[o].getAllCellCtrls(),r=i.length;for(let t=0;t<r;t++)e.push(i[t])}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 o=this.rowCtrlsByRowIndex[t];o&&o.addEventListener(e,i)}refreshCells({rowNodes:e,columns:t,force:i,suppressFlash:o}={}){let r={force:i,newData:!1,suppressFlash:o};for(let i of this.getCellCtrls(e,t))i.refreshOrDestroyCell(r);this.refreshFullWidth(e)}refreshRows(e={}){for(let t of this.getRowCtrls(e.rowNodes))t.refreshRow(e);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(let i of this.getRowCtrls(e))i.isFullWidth()&&(i.refreshFullWidth()||(t=!0,this.redrawRow(i.rowNode,!0)));t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){let t=hV(e),i=this.getAllRowCtrls();return e&&t?i.filter(e=>hG(e.rowNode,t)):i}getCellCtrls(e,t){let i;A(t)&&(i={},t.forEach(e=>{let t=this.colModel.getCol(e);A(t)&&(i[t.getId()]=!0)}));let o=[];for(let t of this.getRowCtrls(e))for(let e of t.getAllCellCtrls()){let t=e.column.getId();i&&!i[t]||o.push(e)}return o}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 t of Object.keys(this.rowCtrlsByRowIndex))null==this.rowCtrlsByRowIndex[t].rowNode.id&&e.push(t);this.removeRowCtrls(e);let t={};for(let e of Object.values(this.rowCtrlsByRowIndex))t[e.rowNode.id]=e;return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){for(let i of e){let e=this.rowCtrlsByRowIndex[i];e&&(e.destroyFirstPass(t),e.destroySecondPass()),delete this.rowCtrlsByRowIndex[i]}}onBodyScroll(e){"vertical"===e.direction&&this.redraw({afterScroll:!0})}redraw(e={}){let t,{focusSvc:i,animationFrameSvc:o}=this.beans,{afterScroll:r}=e,s=this.stickyRowFeature;s&&(t=i?.getFocusCellToUseAfterRefresh()||void 0);let n=this.firstRenderedRow,l=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let a=!1;if(s){a=s.checkStickyRows();let e=s.extraTopHeight+s.extraBottomHeight;e&&this.updateContainerHeights(e)}let d=this.firstRenderedRow!==n||this.lastRenderedRow!==l;if((!r||a||d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,r),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(r&&!a),null!=t)){let e=i?.getFocusCellToUseAfterRefresh();null!=t&&null==e&&(o?.flushAllFrames(),this.restoreFocusedCell(t))}}removeRowCompsNotToDraw(e,t){let i={};for(let t of e)i[t]=!0;let o=Object.keys(this.rowCtrlsByRowIndex).filter(e=>!i[e]);this.removeRowCtrls(o,t)}calculateIndexesToDraw(e){let t=[];for(let e=this.firstRenderedRow;e<=this.lastRenderedRow;e++)t.push(e);let i=this.beans.pagination,o=this.beans.focusSvc?.getFocusedCell()?.rowIndex;null!=o&&(o<this.firstRenderedRow||o>this.lastRenderedRow)&&(!i||i.isRowInPage(o))&&o<this.rowModel.getRowCount()&&t.push(o);let r=e=>{let i=e.rowNode.rowIndex;null!=i&&i!==o&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(e)&&t.push(i)};for(let e of Object.values(this.rowCtrlsByRowIndex))r(e);if(e)for(let t of Object.values(e))r(t);t.sort((e,t)=>e-t);let s=[];for(let e=0;e<t.length;e++){let i=t[e],o=this.rowModel.getRow(i);o&&!o.sticky&&s.push(i)}return s}recycleRows(e,t=!1,i=!1){let o=this.calculateIndexesToDraw(e);for(let r of((this.printLayout||i)&&(t=!1),this.removeRowCompsNotToDraw(o,!t),o))this.createOrUpdateRowCtrl(r,e,t,i);if(e){let{animationFrameSvc:o}=this.beans;o?.active&&i&&!this.printLayout?o.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=[];for(let t of this.getFullWidthRowCtrls()){let i=t.rowNode.rowIndex;e.push(i.toString())}this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){let t=hV(e);return this.getAllRowCtrls().filter(e=>{if(!e.isFullWidth())return!1;let i=e.rowNode;return null==t||!!hG(i,t)})}createOrUpdateRowCtrl(e,t,i,o){let r,s=this.rowCtrlsByRowIndex[e];if(!s&&A(r=this.rowModel.getRow(e))&&A(t)&&t[r.id]&&r.alreadyRendered&&(s=t[r.id],t[r.id]=null),!s){if(r||(r=this.rowModel.getRow(e)),!A(r))return;s=this.createRowCon(r,i,o)}r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=s}destroyRowCtrls(e,t){let i=[];if(e){for(let o of Object.values(e))if(o){if(this.cachedRowCtrls&&o.isCacheable()){this.cachedRowCtrls.addRow(o);continue}if(o.destroyFirstPass(!t),t){let e=o.instanceId;this.zombieRowCtrls[e]=o,i.push(()=>{o.destroySecondPass(),delete this.zombieRowCtrls[e]})}else o.destroySecondPass()}}t&&(i.push(()=>{this.isAlive()&&(this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged())}),window.setTimeout(()=>{for(let e of i)e()},400))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){return this.getRowBuffer()*tN(this.beans)}workOutFirstAndLastRowsToRender(){let e,t,{rowContainerHeight:i,pageBounds:o,rowModel:r}=this;if(i.updateOffset(),r.isRowsToRender())if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),e=o.getFirstRow(),t=o.getLastRow();else{let s,n,l=this.getRowBufferInPixels(),a=this.ctrlsSvc.getScrollFeature(),d=this.gos.get("suppressRowVirtualisation"),h=!1;do{let e=o.getPixelOffset(),{pageFirstPixel:t,pageLastPixel:r}=o.getCurrentPagePixelRange(),u=i.divStretchOffset,c=a.getVScrollPosition(),g=c.top,p=c.bottom;d?(s=t+u,n=r+u):(s=Math.max(g+e-l,t)+u,n=Math.min(p+e+l,r)+u),this.firstVisibleVPixel=Math.max(g+e,t)+u,this.lastVisibleVPixel=Math.min(p+e,r)+u,h=this.ensureAllRowsInRangeHaveHeightsCalculated(s,n)}while(h)let u=r.getRowIndexAtPixel(s),c=r.getRowIndexAtPixel(n),g=o.getFirstRow(),p=o.getLastRow();u<g&&(u=g),c>p&&(c=p),e=u,t=c}else e=0,t=-1;let s=tV(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),l=Math.max(this.getRowBuffer(),500);s&&!n&&t-e>l&&(t=e+l);let a=e!==this.firstRenderedRow,d=t!==this.lastRenderedRow;(a||d)&&(this.firstRenderedRow=e,this.lastRenderedRow=t,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:e,lastRow:t}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,eO(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){let i=this.pinnedRowModel?.ensureRowHeightsValid(),o=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:r,rowModel:s}=this,n=s.ensureRowHeightsValid(e,t,r.getFirstRow(),r.getLastRow());return(n||o)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),(!!o||!!n||!!i)&&(this.updateContainerHeights(),!0)}doNotUnVirtualiseRow(e){let t=e.rowNode,i=this.focusSvc.isRowFocused(t.rowIndex,t.rowPinned),o=this.editSvc?.isEditing(e),r=t.detail;return!!(i||o||r)&&!!this.isRowPresent(t)}isRowPresent(e){return!!this.rowModel.isRowPresent(e)&&(this.beans.pagination?.isRowInPage(e.rowIndex)??!0)}createRowCon(e,t,i){let o=this.cachedRowCtrls?.getRow(e)??null;if(o)return o;let r=i&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new hc(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){let e=Object.values(this.rowCtrlsByRowIndex).map(e=>e.rowNode);return[...this.getStickyTopRowCtrls().map(e=>e.rowNode),...e,...this.getStickyBottomRowCtrls().map(e=>e.rowNode)]}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=this.getStickyTopRowCtrls().find(e=>e.rowNode.rowIndex===i)||null)||(t=this.getStickyBottomRowCtrls().find(e=>e.rowNode.rowIndex===i)||null))}return t}isRangeInRenderedViewport(e,t){if(null==e||null==t)return!1;let i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},hB=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 e=this.entriesList[0];e.destroyFirstPass(),e.destroySecondPass(),this.removeFromCache(e)}}getRow(e){if(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 null!=this.entriesMap[e.id]}removeRow(e){let t=e.id,i=this.entriesMap[t];delete this.entriesMap[t],M(this.entriesList,i)}removeFromCache(e){let t=e.rowNode.id;delete this.entriesMap[t],M(this.entriesList,e)}getEntries(){return this.entriesList}};function hV(e){if(!e)return;let t={top:{},bottom:{},normal:{}};for(let i of e){let e=i.id;switch(i.rowPinned){case"top":t.top[e]=i;break;case"bottom":t.bottom[e]=i;break;default:t.normal[e]=i}}return t}function hG(e,t){let i=e.id;switch(e.rowPinned){case"top":return null!=t.top[i];case"bottom":return null!=t.bottom[i];default:return null!=t.normal[i]}}var hH=class extends e2{constructor(){super(...arguments),this.beanName="rowNodeSorter",this.accentedSort=!1,this.primaryColumnsSortGroups=!1,this.pivotActive=!1}postConstruct(){this.firstLeaf=tL(this.gos)?nY:hO,this.addManagedPropertyListeners(["accentedSort","autoGroupColumnDef","treeData"],this.updateOptions.bind(this));let e=this.updatePivotModeState.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,columnPivotChanged:e}),this.updateOptions(),e()}updateOptions(){this.accentedSort=!!this.gos.get("accentedSort"),this.primaryColumnsSortGroups=tj(this.gos)}updatePivotModeState(){this.pivotActive=this.beans.colModel.isPivotActive()}doFullSortInPlace(e,t){return e.sort((e,i)=>this.compareRowNodes(t,e,i))}compareRowNodes(e,t,i){if(t===i)return 0;let o=this.accentedSort;for(let r=0,s=e.length;r<s;++r){let s,n=e[r],l="desc"===n.sort,a=this.getValue(t,n.column),d=this.getValue(i,n.column),h=this.getComparator(n,t);if(h?s=h(a,d,t,i,l):("absolute"===n.type&&(a=hN(a),d=hN(d)),s=V(a,d,o)),s)return"asc"===n.sort?s:-s}return 0}getComparator(e,t){let i=e.column.getColDef(),o=this.getComparatorFromColDef(i,e);if(o)return o;if(!i.showRowGroup)return;let r=!t.group&&i.field;if(!r)return;let s=this.beans.colModel.getColDefCol(r);if(s)return this.getComparatorFromColDef(s.getColDef(),e)}getComparatorFromColDef(e,t){let i=e.comparator;if(null!=i)return"object"==typeof i?i[iy(t.type)]:i}getValue(e,t){let i=this.beans;if(this.primaryColumnsSortGroups){if(e.rowGroupColumn===t)return this.getGroupDataValue(e,t);if(e.group&&t.getColDef().showRowGroup)return}let o=i.valueSvc.getValue(t,e,"data");if(t.isAllowFormula()){let r=i.formula;if(r?.isFormula(o))return r.resolveValue(t,e)}return o}getGroupDataValue(e,t){if(tY(this.gos,this.pivotActive)){let i=this.firstLeaf(e);return i&&this.beans.valueSvc.getValue(t,i,"data")}let i=this.beans.showRowGroupCols?.getShowRowGroupCol(t.getId());return i?e.groupData?.[i.getId()]:void 0}},hO=e=>{if(e.data)return e;let t=e.childrenAfterGroup;for(;t?.length;){let e=t[0];if(e.data)return e;t=e.childrenAfterGroup}},hN=e=>{if(!e)return e;if("bigint"==typeof e)return e<0n?-e:e;let t=Number(e);return isNaN(t)?e:Math.abs(t)},hz=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),hW={tag:"span",cls:"ag-sort-indicator-container",children:[hz("Order","order"),hz("Asc","ascending-icon"),hz("Desc","descending-icon"),hz("Mixed","mixed-icon"),hz("AbsoluteAsc","absolute-ascending-icon"),hz("AbsoluteDesc","absolute-descending-icon"),hz("None","none-icon")]},hU=class extends ow{constructor(e){super(),this.eSortOrder=null,this.eSortAsc=null,this.eSortDesc=null,this.eSortMixed=null,this.eSortNone=null,this.eSortAbsoluteAsc=null,this.eSortAbsoluteDesc=null,e||this.setTemplate(hW)}attachCustomElements(e,t,i,o,r,s,n){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=i,this.eSortMixed=o,this.eSortNone=r,this.eSortAbsoluteAsc=s,this.eSortAbsoluteDesc=n}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),this.addInIcon("sortAbsoluteAscending",this.eSortAbsoluteAsc,e),this.addInIcon("sortAbsoluteDescending",this.eSortAbsoluteDesc,e);let i=this.updateIcons.bind(this),o=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",i),this.addManagedEventListeners({newColumnsLoaded:i,sortChanged:o,columnRowGroupChanged:o}),this.onSortChanged()}addInIcon(e,t,i){if(null==t)return;let o=og(e,this.beans,i);o&&t.appendChild(o)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){let e,t,i,o,r,{eSortAsc:s,eSortDesc:n,eSortAbsoluteAsc:l,eSortAbsoluteDesc:a,eSortNone:d,column:h,gos:u,beans:c}=this,{isDefaultSortAllowed:g,isAbsoluteSortAllowed:p,isAbsoluteSort:f,isDefaultSort:m,isAscending:C,isDescending:w,direction:v}=(e=c.sortSvc.getDisplaySortForColumn(h),t=iy(e?.type),i=ib(e?.direction),r=(o=h.getAvailableSortTypes()).has("default"),{isDefaultSortAllowed:r,isAbsoluteSortAllowed:o.has("absolute"),isAbsoluteSort:"absolute"===t,isDefaultSort:"default"===t,isAscending:"asc"===i,isDescending:"desc"===i,direction:i});s&&ep(s,C&&m&&g,{skipAriaHidden:!0}),n&&ep(n,w&&m&&g,{skipAriaHidden:!0}),d&&ep(d,!(!h.getColDef().unSortIcon&&!u.get("unSortIcon"))&&!v,{skipAriaHidden:!0}),l&&ep(l,C&&f&&p,{skipAriaHidden:!0}),a&&ep(a,w&&f&&p,{skipAriaHidden:!0})}setupMultiSortIndicator(){let{eSortMixed:e,column:t,gos:i}=this;this.addInIcon("sortUnSort",e,t);let o=t.getColDef().showRowGroup;tj(i)&&o&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){let{eSortMixed:e,beans:t,column:i}=this;e&&ep(e,t.sortSvc.getDisplaySortForColumn(i)?.direction==="mixed",{skipAriaHidden:!0})}updateSortOrder(){let{eSortOrder:e,column:t,beans:{sortSvc:i}}=this;if(!e)return;let o=i.getColumnsWithSortingOrdered(),r=i.getDisplaySortIndexForColumn(t)??-1,s=o.some(e=>i.getDisplaySortIndexForColumn(e)??!1);ep(e,r>=0&&s,{skipAriaHidden:!0}),r>=0?e.textContent=(r+1).toString():eP(e)}},h$={selector:"AG-SORT-INDICATOR",component:hU},hK={moduleName:"Sort",version:tv,beans:[class extends e2{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,i){let o=this.getNextSortDirection(e);this.setSortForColumn(e,o,t,i)}progressSortFromEvent(e,t){let i="ctrl"===this.gos.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,i,o){let{gos:r,showRowGroupCols:s}=this.beans,n=tj(r),l=[e];if(n&&e.getColDef().showRowGroup){let t=s?.getSourceColumnsForGroupColumn?.(e),i=t?.filter(e=>e.isSortable());i&&(l=[e,...i])}for(let e of l)this.setColSort(e,t,o);let a=(i||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort"),d=[];if(!a){let e=this.clearSortBarTheseColumns(l,o);d.push(...e)}this.updateSortIndex(e),d.push(...l),this.dispatchSortChangedEvents(o,d)}updateSortIndex(e){let{gos:t,colModel:i,showRowGroupCols:o}=this.beans,r=tj(t),s=o?.getShowRowGroupCol(e.getId()),n=r&&s||e,l=this.getColumnsWithSortingOrdered();i.forAllCols(e=>this.setColSortIndex(e,null));let a=l.filter(e=>(!r||!e.getColDef().showRowGroup)&&e!==n);(n.getSortDef()?[...a,n]:a).forEach((e,t)=>this.setColSortIndex(e,t))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{if(t.getSortDef())return e=!0,!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(o=>{e.includes(o)||(o.getSortDef()&&i.push(o),this.setColSort(o,void 0,t))}),i}getNextSortDirection(e){let t=e.getSortingOrder(),i=e.getSortDef(),o=t.findIndex(e=>iv(e,i))+1;return o>=t.length&&(o=0),ip(t[o])}getIndexedSortMap(){let{gos:e,colModel:t,showRowGroupCols:i,rowGroupColsSvc:o}=this.beans,r=[];if(t.forAllCols(e=>{e.getSortDef()&&r.push(e)}),t.isPivotMode()){let t=tj(e);r=r.filter(e=>{let o=!!e.getAggFunc(),r=!e.isPrimary(),s=t?i?.getShowRowGroupCol(e.getId()):e.getColDef().showRowGroup;return o||r||s})}let s=o?.columns.filter(e=>!!e.getSortDef())??[],n={};r.forEach((e,t)=>n[e.getId()]=t),r.sort((e,t)=>{let i=e.getSortIndex(),o=t.getSortIndex();return null!=i&&null!=o?i-o:null==i&&null==o?n[e.getId()]>n[t.getId()]?1:-1:null==o?-1:1});let l=tj(e)&&!!s.length;l&&(r=[...new Set(r.map(e=>i?.getShowRowGroupCol(e.getId())??e))]);let a=new Map;if(r.forEach((e,t)=>a.set(e,t)),l)for(let e of s){let t=i.getShowRowGroupCol(e.getId());a.set(e,a.get(t))}return a}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}collectSortItems(e=!1){let t=[];for(let i of this.getColumnsWithSortingOrdered()){let o=i.getSortDef()?.direction;if(!o)continue;let r={sort:o,type:iy(i.getSortDef()?.type)};e?r.colId=i.getId():r.column=i,t.push(r)}return t}getSortModel(){return this.collectSortItems(!0)}getSortOptions(){return this.collectSortItems()}canColumnDisplayMixedSort(e){let t=tj(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.getSortDef();let i=null!=e.getColDef().field||e.getColDef().valueGetter?[e,...t]:t,o=i[0].getSortDef();return i.every(e=>iv(e.getSortDef(),o))?o:{type:iy(e.getSortDef()?.type),direction:"mixed"}}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t){let i=()=>{let{type:i,direction:o}=ip(t.getSortDef());if(e.toggleCss("ag-header-cell-sorted-asc","asc"===o),e.toggleCss("ag-header-cell-sorted-desc","desc"===o),e.toggleCss("ag-header-cell-sorted-abs-asc","absolute"===i&&"asc"===o),e.toggleCss("ag-header-cell-sorted-abs-desc","absolute"===i&&"desc"===o),e.toggleCss("ag-header-cell-sorted-none",!o),t.getColDef().showRowGroup){let i=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t),r=i?.every(e=>o==e.getSortDef()?.direction);e.toggleCss("ag-header-cell-sorted-mixed",!r)}};e.addManagedEventListeners({sortChanged:i,columnPinned:i,columnRowGroupChanged:i,displayedColumnsChanged:i})}initCol(e){let{sortIndex:t,initialSortIndex:i}=e.colDef,o=iO(e.colDef);o&&e.setSortDef(o,!0),void 0!==t?null!==t&&(e.sortIndex=t):null!==i&&(e.sortIndex=i)}updateColSort(e,t,i){void 0!==t&&this.setColSort(e,ip(t),i)}setColSort(e,t,i){iv(e.getSortDef(),t)||(e.setSortDef(ip(t),void 0===t),e.dispatchColEvent("sortChanged",i)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new hU(e)}getSortIndicatorSelector(){return h$}},hH],apiFunctions:{onSortChanged:function(e){e.sortSvc?.onSortChanged("api")}},userComponents:{agSortIndicator:hU},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none",sortAbsoluteAscending:"aasc",sortAbsoluteDescending:"adesc"}},hj=class extends e2{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"}),tl(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,iG(e.source))}}},h_=class extends e2{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){let{gos:e,rowModel:t}=this.beans;tL(e,t)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){let{gos:t,rowRenderer:i}=this.beans;if("paste"===e.source||t.get("suppressChangeDetection"))return;let o=e.node,r=[o],s=this.clientSideRowModel,n=s?.rootNode;if(n&&!o.isRowPinned()){let i=new nZ(t.get("aggregateOnlyChangedColumns"),n);i.addParentNode(o.parent,[e.column]),s.doAggregate(i),i.forEachChangedNodeDepthFirst(e=>{r.push(e),e.sibling&&r.push(e.sibling)})}i.refreshCells({rowNodes:r})}},hq=class extends e2{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if("string"==typeof e)return this.evaluateExpression(e,t);tT(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 tT(16,{expression:e,params:t,e:i}),null}}createExpressionFunction(e){let t=this.cache;if(t[e])return t[e];let i=Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",this.createFunctionBody(e));return t[e]=i,i}createFunctionBody(e){return e.includes("return")?e:"return "+e+";"}},hY=class extends e2{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 o=this.cacheVersion;e.__cacheVersion!==o&&(e.__cacheVersion=o,e.__cacheData={}),e.__cacheData[t]=i}}getValue(e,t){if(this.active&&e.__cacheVersion===this.cacheVersion)return e.__cacheData[t]}},hQ={moduleName:"CommunityCore",version:tv,beans:[dh,nM,lZ,oF,hI,lf,ds,dT,lv,hm,hf,hL,class extends e2{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,this.editSvc=e.editSvc,this.formulaDataSvc=e.formulaDataSvc}postConstruct(){this.initialised||this.init()}init(){let{gos:e,valueCache:t}=this;this.executeValueGetter=t?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=tB(e),this.cellExpressions=e.get("enableCellExpressions"),this.isTreeData=e.get("treeData"),this.initialised=!0;let i=e=>this.callColumnCellValueChangedHandler(e);this.eventSvc.addListener("cellValueChanged",i,!0),this.addDestroyFunc(()=>this.eventSvc.removeListener("cellValueChanged",i,!0)),this.addManagedPropertyListener("treeData",e=>this.isTreeData=e.currentValue)}getValueForDisplay(e){let t=this.beans,i=e.column,o=e.node,r=t.showRowGroupColValueSvc,s=!i&&o.group,n=i?.colDef.showRowGroup,l=!this.isTreeData||o.footer;if(r&&l&&(s||n)){let t=r.getGroupValue(o,i,this.displayIgnoresAggData(o));return null==t?{value:null,valueFormatted:null}:{value:t.value,valueFormatted:e.includeValueFormatted?r.formatAndPrefixGroupColValue(t,i,e.exporting):null}}if(!i)return{value:o.key,valueFormatted:null};let a=this.getValue(i,o,e.from,this.displayIgnoresAggData(o)),d=a,h=t.formula;return i.isAllowFormula()&&h?.isFormula(a)&&(e.useRawFormula?(a=h.normaliseFormula(a,!0),d=h.resolveValue(i,o)):d=a=h.resolveValue(i,o)),{value:a,valueFormatted:e.includeValueFormatted&&!(e.exporting&&!1===i.colDef.useValueFormatterForExport)?this.formatValue(i,o,d):null}}getValue(e,t,i,o=!1){if(this.initialised||this.init(),!t)return;let r=e.getColDef();if(!t.group){let t=r.pivotValueColumn;t&&(e=t)}let s=this.editSvc?.getPendingEditValue(t,e,i);if(void 0!==s)return s;let n=r.showRowGroup;if("string"==typeof n&&(this.beans.rowGroupColsSvc?.getColumnIndex(n)??-1)>t.level)return null;let l=this.resolveValue(e,t,o);if(this.cellExpressions&&W(l)){let i=l.substring(1);l=this.executeValueGetter(i,t.data,e,t)}return l}getFormulaFromDataSource(e,t){let i=this.formulaDataSvc;if(!i?.hasDataSource()||!e.isAllowFormula())return;let o=i.getFormula({column:e,rowNode:t});return W(o)?o:void 0}displayIgnoresAggData(e){return!(!e.group||!e.expanded||e.footer||e.leafGroup&&this.colModel.isPivotMode())&&!!e.sibling&&!this.gos.get("groupSuppressBlankHeader")}resolveValue(e,t,i){let o=e.getColDef(),r=e.getColId(),s=this.isTreeData,n=this.getFormulaFromDataSource(e,t);if(void 0!==n)return n;let l=!i&&t.aggData&&void 0!==t.aggData[r];if(s&&l)return t.aggData[r];let a=t.data,d=o.field;if(s&&o.valueGetter)return this.executeValueGetter(o.valueGetter,a,e,t);if(s&&d&&a)return lV(a,d,e.isFieldContainsDots());let h=t.groupData;if(h&&r in h)return t.groupData[r];if(l)return t.aggData[r];let u=o.showRowGroup,c="string"!=typeof u||!t.group,g=this.isSsrm&&i&&!!o.aggFunc,p=this.isSsrm&&t.footer&&t.field&&(!0===u||u===t.field);if(o.valueGetter&&!g){if(!c)return;return this.executeValueGetter(o.valueGetter,a,e,t)}if(p)return lV(a,t.field,e.isFieldContainsDots());if(d&&a&&!g){if(!c)return;return lV(a,d,e.isFieldContainsDots())}}parseValue(e,t,i,o){let r=e.getColDef();if(r.allowFormula&&this.beans.formula?.isFormula(i))return i;let s=r.valueParser;if(A(s)){let n=is(this.gos,{node:t,data:t?.data,oldValue:o,newValue:i,colDef:r,column:e});return"function"==typeof s?s(n):this.expressionSvc?.evaluate(s,n)}return i}getDeleteValue(e,t){return A(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay({column:e,node:t,from:"edit"}).value)??null:null}formatValue(e,t,i,o,r=!0){let s,{expressionSvc:n}=this.beans,l=null,a=e.getColDef();if(o?s=o:r&&(s=a.valueFormatter),s){let o=t?t.data:null,r=is(this.gos,{value:i,node:t,data:o,colDef:a,column:e});l="function"==typeof s?s(r):n?n.evaluate(s,r):null}else if(a.refData)return a.refData[i]||"";return null==l&&Array.isArray(i)&&(l=i.join(", ")),l}setValue(e,t,i,o){let r=t.getColDef();if(!e.data&&this.canCreateRowNodeData(e,r)&&(e.data={}),!this.isSetValueSupported({column:t,newValue:i,colDef:r}))return!1;let s=this.getValue(t,e,"data"),n=is(this.gos,{node:e,data:e.data,oldValue:s,newValue:i,colDef:r,column:t}),l=e.group?r.groupRowValueSetter:void 0,a=!1,d=!1;if(e.data){let s=this.handleExternalFormulaChange({column:t,eventSource:o,newValue:i,setterParams:n,rowNode:e});if(null!==s)return s;a=this.computeValueChange({column:t,rowNode:e,newValue:i,params:n,rowData:e.data,valueSetter:r.valueSetter,field:r.field})??!0}return l&&(d=l(is(this.gos,{node:e,data:e.data,oldValue:s,newValue:i,colDef:r,column:t,eventSource:o,valueChanged:a||i!==s,aggregatedChildren:this.beans.aggStage?.getAggregatedChildren(e,t)??[]}))??!0),(!!a||!!d)&&this.finishValueChange(e,t,n,o)}canCreateRowNodeData(e,t){return!e.group||null==t.groupRowValueSetter&&null==t.groupRowEditable&&!t.pivotValueColumn}finishValueChange(e,t,i,o){e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();let r=this.getValue(t,e,"data");return this.dispatchCellValueChangedEvent(e,i,r,o),e.pinnedSibling&&this.dispatchCellValueChangedEvent(e.pinnedSibling,i,r,o),!0}isSetValueSupported(e){let{column:t,newValue:i,colDef:o}=e,{field:r,valueSetter:s}=o,n=this.beans.formula,l=t.isAllowFormula()&&n?.isFormula(i),a=!!this.formulaDataSvc?.hasDataSource();return I(r)&&I(s)&&!(a&&l)?(tM(17),!1):!this.dataTypeSvc||!!this.dataTypeSvc.checkType(t,i)||(tM(135),!1)}handleExternalFormulaChange(e){let{column:t,rowNode:i,newValue:o,eventSource:r,setterParams:s}=e,n=this.beans.formula,l=this.formulaDataSvc;if(!l?.hasDataSource()||!t.isAllowFormula())return null;let a=n?.isFormula(o),d=l.getFormula({column:t,rowNode:i});if(a){if(d===o)return!1;l.setFormula({column:t,rowNode:i,formula:o});let e=n?.resolveValue(t,i),a=t.getColDef();if(A(a.valueSetter)||!I(a.field)){let o={...s,newValue:e};this.computeValueChange({column:t,rowNode:i,newValue:e,params:o,rowData:i.data,valueSetter:a.valueSetter,field:a.field})}return this.finishValueChange(i,t,s,r)}return void 0!==d&&l.setFormula({column:t,rowNode:i,formula:void 0}),null}computeValueChange(e){let{valueSetter:t,params:i,rowData:o,field:r,column:s,newValue:n}=e;return A(t)?"function"==typeof t?t(i):this.expressionSvc?.evaluate(t,i):!!o&&this.setValueUsingField(o,r,n,s.isFieldContainsDots())}dispatchCellValueChangedEvent(e,t,i,o){this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:t.column,colDef:t.colDef,data:e.data,node:e,oldValue:t.oldValue,newValue:i,value:i,source:o})}callColumnCellValueChangedHandler(e){let t=e.colDef.onCellValueChanged;"function"==typeof t&&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,o){if(!t)return!1;let r=!1;if(o){let o=t.split("."),s=e;for(;o.length>0&&s;){let e=o.shift();0===o.length?(r=s[e]===i)||(s[e]=i):s=s[e]}}else(r=e[t]===i)||(e[t]=i);return!r}executeValueGetterWithValueCache(e,t,i,o){let r=i.getColId(),s=this.valueCache.getValue(o,r);if(void 0!==s)return s;let n=this.executeValueGetterWithoutValueCache(e,t,i,o);return this.valueCache.setValue(o,r,n),n}executeValueGetterWithoutValueCache(e,t,i,o){let r=is(this.gos,{data:t,node:o,column:i,colDef:i.getColDef(),getValue:e=>this.getValueCallback(o,e)});return"function"==typeof e?e(r):this.expressionSvc?.evaluate(e,r)}getValueCallback(e,t){let i=this.colModel.getColDefCol(t);return i?this.getValue(i,e,"data"):null}getKeyForNode(e,t){let i=this.getValue(e,t,"data"),o=e.getColDef().keyCreator,r=i;return o&&(r=o(is(this.gos,{value:i,colDef:e.getColDef(),column:e,node:t,data:t.data}))),"string"==typeof r||null==r||"[object Object]"===(r=String(r))&&tM(121),r}},da,di,dd,lJ,hj,l_,lq,dG],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:function(e){return e.context.getId()},destroy:function(e){e.gridDestroySvc.destroy()},isDestroyed:function(e){return e.gridDestroySvc.destroyCalled},getGridOption:function(e,t){return e.gos.get(t)},setGridOption:function(e,t,i){nT(e,{[t]:i})},updateGridOptions:nT,isModuleRegistered:function(e,t){let i=t.replace(/Module$/,"");return e.gos.isModuleRegistered(i)}},dependsOn:[{moduleName:"DataType",version:tv,beans:[lH],dependsOn:[{moduleName:"CheckboxCellRenderer",version:tv,userComponents:{agCheckboxCellRenderer:so}}]},{moduleName:"ColumnMove",version:tv,beans:[ll,n7],apiFunctions:{moveColumnByIndex:function(e,t,i){e.colMoves?.moveColumnByIndex(t,i,"api")},moveColumns:function(e,t,i){e.colMoves?.moveColumns(t,i,"api")}},dependsOn:[n8],css:[":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}}"]},{moduleName:"ColumnResize",version:tv,beans:[lu],apiFunctions:{setColumnWidths:function(e,t,i=!0,o="api"){e.colResize?.setColumnWidths(t,!1,i,o)}},dependsOn:[{moduleName:"HorizontalResize",version:tv,beans:[nU],dependsOn:[n6]},la]},hK,{moduleName:"ColumnHeaderComp",version:tv,userComponents:{agColumnHeader:dA},icons:{menu:"menu",menuAlt:"menu-alt"}},{moduleName:"ColumnGroup",version:tv,dynamicBeans:{headerGroupCellCtrl:lg},beans:[lw],apiFunctions:{getAllDisplayedColumnGroups:function(e){return e.visibleCols.getAllTrees()},getCenterDisplayedColumnGroups:function(e){return e.visibleCols.treeCenter},getColumnGroup:function(e,t,i){return e.colGroupSvc?.getColumnGroup(t,i)??null},getColumnGroupState:function(e){return e.colGroupSvc?.getColumnGroupState()??[]},getDisplayNameForColumnGroup:function(e,t,i){return e.colNames.getDisplayNameForColumnGroup(t,i)||""},getLeftDisplayedColumnGroups:function(e){return e.visibleCols.treeLeft},getProvidedColumnGroup:function(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null},getRightDisplayedColumnGroups:function(e){return e.visibleCols.treeRight},resetColumnGroupState:function(e){e.colGroupSvc?.resetColumnGroupState("api")},setColumnGroupOpened:function(e,t,i){e.colGroupSvc?.setColumnGroupOpened(t,i,"api")},setColumnGroupState:function(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}}},{moduleName:"ColumnGroupHeaderComp",version:tv,userComponents:{agColumnGroupHeader:dB},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},{moduleName:"Overlay",version:tv,userComponents:{agLoadingOverlay:r2,agNoRowsOverlay:r6,agNoMatchingRowsOverlay:r3,agExportingOverlay:r0},apiFunctions:{showLoadingOverlay:function(e){e.overlays?.showLoadingOverlay()},showNoRowsOverlay:function(e){e.overlays?.showNoRowsOverlay()},hideOverlay:function(e){e.overlays?.hideOverlay()}},icons:{overlayLoading:"loading",overlayExporting:"loading"},beans:[hA]},{moduleName:"ChangeDetection",version:tv,beans:[h_]},{moduleName:"AnimationFrame",version:tv,beans:[dV]},{moduleName:"KeyboardNavigation",version:tv,beans:[hg,dO,dl],apiFunctions:{getFocusedCell:function(e){return e.focusSvc.getFocusedCell()},clearFocusedCell:function(e){return e.focusSvc.clearFocusedCell()},setFocusedCell:function(e,t,i,o){e.focusSvc.setFocusedCell({rowIndex:t,column:i,rowPinned:o,forceBrowserFocus:!0})},setFocusedHeader:function(e,t,i=!1){let o=e.headerNavigation?.getHeaderPositionForColumn(t,i);o&&e.focusSvc.focusHeaderPosition({headerPosition:o})},tabToNextCell:function(e,t){return e.navigation?.tabToNextCell(!1,t)??!1},tabToPreviousCell:function(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}}},{moduleName:"PinnedColumn",version:tv,beans:[hw],css:[".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}"]},{moduleName:"Aria",version:tv,beans:[class extends hv{}]},{moduleName:"Touch",version:tv,beans:[dH]},{moduleName:"CellRendererFunction",version:tv,beans:[lY]},{moduleName:"ColumnFlex",version:tv,beans:[lF]},{moduleName:"Expression",version:tv,beans:[hq]},{moduleName:"SkeletonCellRenderer",version:tv,userComponents:{agSkeletonCellRenderer:ly}},{moduleName:"ColumnDelayRender",version:tv,beans:[hy],css:[":where(.ag-delay-render){.ag-cell,.ag-header-cell,.ag-header-group-cell,.ag-row,.ag-spanned-cell-wrapper{visibility:hidden}}"]}]};function hZ(e){let{inputValue:t,allSuggestions:i,hideIrrelevant:o,filterByPercentageOfBestMatch:r}=e,s=(i??[]).map((e,i)=>({value:e,relevance:function(e,t){let i,o=e.length,r=t.length;if(0===r)return o||0;let s=e.toLocaleLowerCase(),n=t.toLocaleLowerCase();e.length<t.length&&(i=n,n=s,s=i,i=t,t=e,e=i);let l=new Uint16Array(r+1),a=new Uint16Array(r+1);for(let e=0;e<=r;e++)l[e]=e;let d=0,h=o/2-10;for(let u=1;u<=o;u++){let o=e[u-1],c=s[u-1];a[0]=u;for(let i=1;i<=r;i++){let r=t[i-1];if(c!==n[i-1]){let e=a[i-1],t=l[i],o=l[i-1],r=e<t?e:t;o<r&&(r=o),a[i]=r+1|0;continue}if(d++,o===r&&d++,u>1&&i>1){let o=e[u-2],r=s[u-2],l=t[i-2];r===n[i-2]&&(d++,o===l&&d++)}u<h&&d++,a[i]=l[i-1]}i=l,l=a,a=i}return l[r]/(d+1)}(t,e),idx:i}));if(s.sort((e,t)=>e.relevance-t.relevance),o&&(s=s.filter(e=>e.relevance<Math.max(e.value.length,t.length))),s.length>0&&r&&r>0){let e=s[0].relevance*r;s=s.filter(t=>e-t.relevance<0)}let n=[],l=[];for(let e of s)n.push(e.value),l.push(e.idx);return{values:n,indices:l}}var hJ={AdvancedFilter:1,AiToolkit:1,AllEnterprise:1,BatchEdit: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,NewFiltersToolPanel: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,Formula:1},hX=["TextFilter","NumberFilter","BigIntFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],h0={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:hX,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],RowModelSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...hX,"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:[...hX,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},h1={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"},h2=()=>`No AG Grid modules are registered! It is recommended to start with all Community features via the AllCommunityModule:
15
-
16
- import { ModuleRegistry, AllCommunityModule } from 'ag-grid-community';
17
-
18
- ModuleRegistry.registerModules([ AllCommunityModule ]);
19
- `;function h5(e,t=!1){return t&&("IntegratedCharts"===e||"Sparklines"===e)?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function h3({moduleName:e,rowModelType:t}){return`To use the ${e}Module you must set the gridOption "rowModelType='${t}'"`}var h4=({reasonOrId:e,moduleName:t,gridScoped:i,gridId:o,rowModelType:r,additionalText:s,isUmd:n})=>{let l,a=function(e,t){let i=[];for(let o of Array.isArray(e)?e:[e]){let e=h0[o];if(e)for(let o of e){let e=h1[o];e&&e!==t||i.push(o)}else i.push(o)}return i}(t,r),d="string"==typeof e?e:h9[e];if(n){let e,t;return e=a.filter(e=>"IntegratedCharts"===e||"Sparklines"===e),t="",!globalThis?.agCharts&&e.length>0?t=`Unable to use ${d} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
20
- `:a.some(e=>hJ[e])&&(t+=`Unable to use ${d} as that requires the ag-grid-enterprise script to be included.
21
- `),t}let h=a.filter(e=>"IntegratedCharts"===e||"Sparklines"===e),u=h.length>0?`${h.map(e=>h5(e)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"",c=`Unable to use ${d} as ${a.length>1?"one of "+a.map(e=>h5(e)).join(", "):h5(a[0])} is not registered${i?" for gridId: "+o:""}. ${u} Check if you have registered the module:
22
- `;return`${c}
23
- ${l=a.map(e=>`import { ${h5(e)} } from '${hJ[e]?"ag-grid-enterprise":"ag-grid-community"}';`),a.some(e=>"IntegratedCharts"===e||"Sparklines"===e)&&l.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
24
- ${l.join(" \n")}
25
-
26
- ModuleRegistry.registerModules([ ${a.map(e=>h5(e,!0)).join(", ")} ]);
27
-
28
- For more info see: ${tS}/modules/`}`+(s?`
29
-
30
- ${s}`:"")},h6=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
31
-
32
- import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
33
- import { ModuleRegistry } from 'ag-grid-community';
34
- import { ${e} } from 'ag-grid-enterprise';
35
-
36
- ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
37
- `,h8={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:
38
- "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.
39
- Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
40
- 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}
41
- AG Grid: Unable to use the Clipboard API (navigator.clipboard.${t}()). 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.`,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:o})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${i?"":" the default"} paginationPageSizeSelector=[${o?.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.",101:({propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})=>{let r=[],s=hZ({inputValue:t,allSuggestions:[...Object.keys(i??[]).filter(e=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(e)),...Object.keys(o??[]).filter(e=>!!o[e])],hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return r.push(`Could not find '${t}' component. It was configured as "${e}: '${t}'" but it wasn't found in the list of registered components.
42
- `),s.length>0&&r.push(` Did you mean: [${s.slice(0,3)}]?
43
- `),r.push("If using a custom component check it has been registered correctly."),r},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: ${tS}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({inputValue:e,allSuggestions:t})=>{let i=hZ({inputValue:e,allSuggestions:t,hideIrrelevant:!0,filterByPercentageOfBestMatch:.8}).values;return[`Could not find '${e}' aggregate function. It was configured as "aggFunc: '${e}'" but it wasn't found in the list of registered aggregations.`,i.length>0?` Did you mean: [${i.slice(0,3)}]?`:"","If using a custom aggregation function check it has been registered correctly."].join("\n")},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.
44
- 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:e=>`getRowId callback must be provided for Server Side Row Model ${e?.feature||"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:h4,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 ${tS}/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}`,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.
45
- 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. \nYour code probably called a grid API method while the grid was in the render stage. \nTo overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0). \nTo 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:()=>h6("IntegratedChartsModule"),258:()=>h6("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:o,rowModelType:r})=>h4({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:dg[t],gridId:o,gridScoped:i,rowModelType:r}),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 ${tS}/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:()=>h2(),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."}return t},275:h3,276:()=>"Row Numbers Row Resizer cannot be used when Grid Columns have `autoHeight` enabled.",277:({colId:e})=>`'enableFilterHandlers' is set to true, but column '${e}' does not have 'filter.doesFilterPass' or 'filter.handler' set.`,278:({colId:e})=>`Unable to create filter handler for column '${e}'`,279:e=>{},280:({colId:e})=>`'name' must be provided for custom filter components for column '${e}`,281:({colId:e})=>`Filter for column '${e}' does not have 'filterParams.buttons', but the new Filters Tool Panel has buttons configured. Either configure buttons for the filter, or disable buttons on the Filters Tool Panel.`,282:()=>"New filter tool panel requires `enableFilterHandlers: true`.",283:()=>"As of v34, use the same method on the filter handler (`api.getColumnFilterHandler(colKey)`) instead.",284:()=>"As of v34, filters are active when they have a model. Use `api.getColumnFilterModel()` instead.",285:()=>"As of v34, use (`api.getColumnFilterModel()`) instead.",286:()=>"As of v34, use (`api.setColumnFilterModel()`) instead.",287:()=>"`api.doFilterAction()` requires `enableFilterHandlers = true",288:()=>"`api.getColumnFilterModel(key, true)` requires `enableFilterHandlers = true",289:({rowModelType:e})=>`Row Model '${e}' is not supported with Batch Editing`,290:({rowIndex:e,rowPinned:t})=>`Row with index '${e}' and pinned state '${t}' not found`,291:()=>"License Key being set multiple times with different values. This can result in an incorrect license key being used,",292:({colId:e})=>`The Multi Filter for column '${e}' has buttons configured against the child filters. When 'enableFilterHandlers=true', buttons must instead be provided against the parent Multi Filter params. The child filter buttons will be ignored.`,293:()=>"The grid was initialised detached from the DOM and was then inserted into a Shadow Root. Theme styles are probably broken. Pass the themeStyleContainer grid option to let the grid know where in the document to insert theme CSS.",294:()=>"When using the `agRichSelectCellEditor` setting `filterListAsync = true` requires `allowTyping = true` and the `values()` callback must return a Promise of filtered values.",295:({blockedService:e})=>`colDef.allowFormula is not supported with ${e}. Formulas has been turned off.`,296:()=>"Since v35, `api.hideOverlay()` does not hide the overlay when `activeOverlay` is set. Set `activeOverlay=null` instead.",297:()=>'`api.hideOverlay()` does not hide the no matching rows overlay as it is only controlled by grid state. Set `suppressOverlays=["noMatchingRows"] to not show it.'};function h7(e,t){let i=h8[e];if(!i)return[`Missing error text for error id ${e}!`];let o=i(t),r=tD(e,t),s=`
46
- See ${r}`;return Array.isArray(o)?o.concat(s):[o,s]}var h9={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},ue=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=e=>e(),this.wrapOutgoing=e=>e(),this.baseDocLink=`${tn}/${this.frameworkName}-data-grid`,function(e){tS=e}(this.baseDocLink)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return this.baseDocLink+(e?"/"+e:"")}},ut=new WeakMap,ui=new WeakMap,uo=1,ur=class{create(e,t,i,o,r,s){let n=to.applyGlobalGridOptions(t),l=n.gridId??String(uo++),a=this.getRegisteredModules(r,l,n.rowModelType),d=this.createBeansList(n.rowModelType,a,l),h=this.createProvidedBeans(e,n,r);if(!d)return;let u=new sT({providedBeanInstances:h,beanClasses:d,id:l,beanInitComparator:sI,beanDestroyComparator:sL,derivedBeans:[sk],destroyCallback:()=>{ui.delete(c),ut.delete(e),delete tc[l],s?.()}});this.registerModuleFeatures(u,a),i(u),u.getBean("syncSvc").start(),o?.(u);let c=u.getBean("gridApi");return ut.set(e,c),ui.set(c,e),c}getRegisteredModules(e,t,i){var o;let r;return tf(hQ,void 0,!0),e?.modules?.forEach(e=>tf(e,t)),o=us(i),r=tc[t]??{},[...Object.values(tu.all??{}),...Object.values(r.all??{}),...Object.values(tu[o]??{}),...Object.values(r[o]??{})]}registerModuleFeatures(e,t){let i=e.getBean("registry"),o=e.getBean("apiFunctionSvc");for(let e of t){i.registerModule(e);let t=e.apiFunctions;if(t)for(let e of Object.keys(t))o?.addFunction(e,t[e])}}createProvidedBeans(e,t,i){let o=i?i.frameworkOverrides:null;I(o)&&(o=new ue);let r={gridOptions:t,eGridDiv:e,eRootDiv:e,globalListener:i?i.globalListener:null,globalSyncListener:i?i.globalSyncListener:null,frameworkOverrides:o};return i?.providedBeanInstances&&Object.assign(r,i.providedBeanInstances),r}createBeansList(e,t,i){let o={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"},r=us(e),s=o[r];if(!s)return void tk(201,{rowModelType:r},`Unknown rowModelType ${r}.`);if(!tg)return void tk(272,void 0,h2());if(!e){let e=Object.entries(o).filter(([e,t])=>tm(t,i,e));if(1==e.length){let[t,i]=e[0];if(t!==r){let e={moduleName:i,rowModelType:t};tk(275,e,h3(e));return}}}if(!tm(s,i,r)){let e=`rowModelType = '${r}'`,t=`Missing module ${s}Module for rowModelType ${r}.`;tk(200,{reasonOrId:e,moduleName:s,gridScoped:tp,gridId:i,rowModelType:r,isUmd:!1},t);return}let n=new Set;for(let e of t)for(let t of e.beans??[])n.add(t);return Array.from(n)}};function us(e){return e??"clientSide"}function un(e){return e.filter(e=>void 0!=e)}var ul=class extends e2{constructor(){super(...arguments),this.beanName="alignedGridsSvc",this.consuming=!1}getAlignedGridApis(){let e=this.gos.get("alignedGrids")??[],t="function"==typeof e;return"function"==typeof e&&(e=e()),e.map(e=>{if(!e){tT(18),t||tT(20);return}return this.isGridApi(e)?e:"current"in e?e.current?.api:(e.api||tT(19),e.api)}).filter(e=>!!e&&!e.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:e})=>this.onColumnEvent(e),alignedGridScroll:({event:e})=>this.onScrollEvent(e)})}fireEvent(e){if(!this.consuming)for(let t of this.getAlignedGridApis())t.isDestroyed()||t.dispatchEvent(e)}onEvent(e){this.consuming=!0,e(),this.consuming=!1}fireColumnEvent(e){this.fireEvent({type:"alignedGridColumn",event:e})}fireScrollEvent(e){"horizontal"===e.direction&&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(e=>{i.push(t(e))}):e.column&&i.push(t(e.column)),i}getMasterColumns(e){return this.extractDataFromEvent(e,e=>e)}getColumnIds(e){return this.extractDataFromEvent(e,e=>e.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":tM(21)}})}processGroupOpenedEvent(e){let{colGroupSvc:t}=this.beans;if(t)for(let i of e.columnGroups){let e=null;i&&(e=t.getProvidedColGroup(i.getGroupId())),(!i||e)&&t.setColumnGroupOpened(e,i.isExpanded(),"alignedGridChanged")}}processColumnEvent(e){let t=e.column,i=null,o=this.beans,{colResize:r,ctrlsSvc:s,colModel:n}=o;if(t&&(i=n.getColDefCol(t.getColId())),t&&!i)return;let l=this.getMasterColumns(e);switch(e.type){case"columnMoved":iQ(o,{state:e.api.getColumnState().map(e=>({colId:e.colId})),applyOrder:!0},"alignedGridChanged");break;case"columnVisible":iQ(o,{state:e.api.getColumnState().map(e=>({colId:e.colId,hide:e.hide}))},"alignedGridChanged");break;case"columnPinned":iQ(o,{state:e.api.getColumnState().map(e=>({colId:e.colId,pinned:e.pinned}))},"alignedGridChanged");break;case"columnResized":{let t={};for(let e of l)t[e.getId()]={key:e.getColId(),newWidth:e.getActualWidth()};for(let i of e.flexColumns??[])t[i.getId()]&&delete t[i.getId()];r?.setColumnWidths(Object.values(t),!1,e.finished,"alignedGridChanged")}}let a=s.getGridBodyCtrl().isVerticalScrollShowing();for(let e of this.getAlignedGridApis())e.setGridOption("alwaysShowVerticalScroll",a)}};function ua(e,t,i="auto"){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureColumnVisible(t,i),"ensureVisible")}function ud(e,t,i){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureIndexVisible(t,i),"ensureVisible")}function uh(e){e.rowModel?.onRowHeightChanged()}function uu(e){e.rowAutoHeight?.active?tM(3):e.rowModel?.resetRowHeights()}var uc=class extends e2{constructor(e){super(),this.rootNode=e,this.nextId=0,this.allNodesMap={},up(e)}getRowNode(e){return this.allNodesMap[e]}setNewRowData(e){this.dispatchRowDataUpdateStarted(e),this.destroyAllNodes();let t=up(this.rootNode),i=Array(e.length);t._leafs=i;let o=0,r=this.beans.groupStage?.getNestedDataGetter(),s=r?new Set:null,n=(e,t)=>{let l=e.level+1;for(let a=0,d=t.length;a<d;++a){let d=t[a];if(!d)continue;let h=this.createRowNode(d,l,o);if(i[o++]=h,s&&!s.has(d)){s.add(d),h.treeParent=e;let t=r(d);t&&n(h,t)}}};n(t,e),i.length=o}destroyAllNodes(){let{selectionSvc:e,pinnedRowModel:t,groupStage:i}=this.beans;e?.reset("rowDataChanged"),t?.isManual()&&t.reset(),i?.clearNonLeafs();let o=this.rootNode._leafs;if(o)for(let e=0,t=o.length;e<t;++e)o[e]._destroy(!1);this.allNodesMap=Object.create(null),this.nextId=0}setImmutableRowData(e,t){let{rootNode:i,gos:o}=this;this.dispatchRowDataUpdateStarted(t);let r=tZ(o),s=e.changedRowNodes,{adds:n,updates:l}=s,a=new Set,d=[],h=this.beans.groupStage?.getNestedDataGetter(),u=!!o.get("suppressMaintainUnsortedOrder")&&void 0,c=-1,g=!1,p=(e,t)=>{if(!u&&void 0!==u){let t=e.sourceRowIndex;u=t<=c,c=t}e.data!==t&&(e.updateData(t),n.has(e)||l.add(e),!e.selectable&&e.isSelected()&&d.push(e))},f=(e,t,i)=>{for(let o=0,s=t.length;o<s;++o){let s=t[o];if(!s)continue;let l=this.getRowNode(r({data:s,level:i}));if(l?(p(l,s),g||(g=!!h&&l.treeParent!==e)):(l=this.createRowNode(s,i),n.add(l)),!h||a.has(l)){a.add(l);continue}a.add(l),l.treeParent=e;let d=h(s);d&&f(l,d,i+1)}};f(i,t,0);let m=this.deleteUnusedNodes(a,s,d,!!e.animate)||u||n.size>0;if(m){let e=i._leafs??(i._leafs=[]);void 0===u?uw(e,a,s):uC(e,a)&&(s.reordered=!0)}(m||g||l.size)&&(e.rowDataUpdated=!0,this.deselect(d))}deleteUnusedNodes(e,{removals:t},i,o){let r=this.rootNode._leafs;for(let s=0,n=r.length;s<n;s++){let n=r[s];!e.has(n)&&this.destroyNode(n,o)&&(t.push(n),n.isSelected()&&i.push(n))}return t.length>0}updateRowData(e,t,i){if(this.dispatchRowDataUpdateStarted(e.add),this.beans.groupStage?.getNestedDataGetter())return tM(268),{remove:[],update:[],add:[]};let o=[],r=tZ(this.gos),s=this.executeRemove(r,e,t,o,i),n=this.executeUpdate(r,e,t,o),l=this.executeAdd(e,t);return this.deselect(o),{remove:s,update:n,add:l}}executeRemove(e,{remove:t},{adds:i,updates:o,removals:r},s,n){let l=this.rootNode._leafs,a=l?.length,d=t?.length;if(!d||!a)return[];let h=0,u=a,c=0,g=Array(d);for(let l=0;l<d;++l){let a=this.lookupNode(e,t[l]);if(!a)continue;let d=a.sourceRowIndex;d<u&&(u=d),d>c&&(c=d),g[h++]=a,this.destroyNode(a,n)&&(a.isSelected()&&s.push(a),i.delete(a)||(o.delete(a),r.push(a)))}return g.length=h,h&&um(l,u,c),g}executeUpdate(e,{update:t},{adds:i,updates:o},r){let s=t?.length;if(!s)return[];let n=Array(s),l=0;for(let a=0;a<s;a++){let s=t[a],d=this.lookupNode(e,s);d&&(d.updateData(s),!d.selectable&&d.isSelected()&&r.push(d),n[l++]=d,i.has(d)||o.add(d))}return n.length=l,n}executeAdd(e,t){var i;let o=(i=this.rootNode)._leafs??(i._leafs=[]),r=o.length,s=e.add,n=s?.length;if(!n)return[];let l=r+n,a=this.sanitizeAddIndex(o,e.addIndex);if(a<r){for(let e=r-1,t=l-1;e>=a;--e){let i=o[e];i.sourceRowIndex=t,o[t--]=i}t.reordered=!0}o.length=l;let d=Array(n),h=t.adds;for(let e=0;e<n;e++){let t=this.createRowNode(s[e],0,a);h.add(t),o[a]=t,d[e]=t,a++}return d}dispatchRowDataUpdateStarted(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselect(e){let t="rowDataChanged",i=this.beans.selectionSvc;e.length&&i?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),i?.updateGroupsFromChildrenSelections?.(t),e.length&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:i?.getSelectedNodes()??null,serverSideState:null})}createRowNode(e,t,i){let o=new sa(this.beans);o.parent=this.rootNode,o.level=t,o.group=!1,o.expanded=!1,null!=i&&(o.sourceRowIndex=i),o.setDataAndId(e,String(this.nextId++));let r=o.id,s=this.allNodesMap;return s[r]&&tM(2,{nodeId:r}),s[r]=o,o}destroyNode(e,t){if(!e._destroy(t))return!1;let i=e.id,o=this.allNodesMap;return o[i]===e&&delete o[i],!0}lookupNode(e,t){if(!e)return uf(this.rootNode._leafs,t);let i=e({data:t,level:0}),o=this.allNodesMap[i];return o||(tT(4,{id:i}),null)}sanitizeAddIndex(e,t){let i=e.length;if("number"!=typeof t||t<0||t>=i||Number.isNaN(t))return i;t=Math.ceil(t);let o=this.gos;return t>0&&o.get("treeData")&&o.get("getDataPath")&&(t=ug(e,t)),t}},ug=(e,t)=>{for(let i=0,o=e.length;i<o;i++){let o=e[i];if(o?.rowIndex==t-1)return i+1}return t},up=e=>{e.group=!0,e.level=-1,e.id="ROOT_NODE_ID",e._leafs?.length!==0&&(e._leafs=[]);let t=[],i=[],o=[],r=[];e.childrenAfterGroup=t,e.childrenAfterSort=i,e.childrenAfterAggFilter=o,e.childrenAfterFilter=r;let s=e.sibling;return s&&(s.childrenAfterGroup=t,s.childrenAfterSort=i,s.childrenAfterAggFilter=o,s.childrenAfterFilter=r,s.childrenMapped=e.childrenMapped),e.updateHasChildren(),e},uf=(e,t)=>{if(e)for(let i=0,o=e.length;i<o;i++){let o=e[i];if(o.data===t)return o}return tT(5,{data:t}),null},um=(e,t,i)=>{t=Math.max(0,t);for(let o=t,r=e.length;o<r;++o){let r=e[o];o<=i&&r.destroyed||(r.sourceRowIndex=t,e[t++]=r)}e.length=t},uC=(e,t)=>{e.length=t.size;let i=0,o=!1,r=!1;for(let s of t){let t=s.sourceRowIndex;t===i?r||(r=o):(t>=0?r=!0:o=!0,s.sourceRowIndex=i,e[i]=s),++i}return r},uw=(e,t,{adds:i})=>{let o=e.length,r=t.size;r>o&&(e.length=r);let s=0;for(let t=0;t<o;++t){let i=e[t];!i.destroyed&&(s!==t&&(i.sourceRowIndex=s,e[s]=i),++s)}for(let t of i)t.sourceRowIndex<0&&(t.sourceRowIndex=s,e[s++]=t);e.length=s};function uv(e){let t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter)}var ub=class extends e2{constructor(){super(...arguments),this.beanName="filterStage",this.step="filter",this.refreshProps=["excludeChildrenWhenTreeDataFiltering"]}wireBeans(e){this.filterManager=e.filterManager}execute(e){let t=!!this.filterManager?.isChildFilterPresent();this.beans.formula?.active?this.softFilter(t,e):this.filterNodes(t,e)}filterNodes(e,t){let i=(t,i)=>{t.hasChildren()&&e&&!i?t.childrenAfterFilter=t.childrenAfterGroup.filter(e=>{let t=e.childrenAfterFilter&&e.childrenAfterFilter.length>0,i=e.data&&this.filterManager.doesRowPassFilter({rowNode:e});return t||i}):t.childrenAfterFilter=t.childrenAfterGroup,uv(t)};if(this.doingTreeDataFiltering()){let e=(t,o)=>{if(t.childrenAfterGroup)for(let r=0;r<t.childrenAfterGroup.length;r++){let s=t.childrenAfterGroup[r],n=o||this.filterManager.doesRowPassFilter({rowNode:s});s.childrenAfterGroup?e(t.childrenAfterGroup[r],n):i(s,n)}i(t,o)};t.executeFromRootNode(t=>e(t,!1))}else t.forEachChangedNodeDepthFirst(e=>i(e,!1),!0)}softFilter(e,t){let i=t=>{if(t.childrenAfterFilter=t.childrenAfterGroup,t.hasChildren())for(let i of t.childrenAfterGroup)i.softFiltered=e&&!(i.data&&this.filterManager.doesRowPassFilter({rowNode:i}));uv(t)};t.forEachChangedNodeDepthFirst(i,!0)}doingTreeDataFiltering(){let{gos:e}=this;return e.get("treeData")&&!e.get("excludeChildrenWhenTreeDataFiltering")}},uy=e=>{let t=e.childrenAfterSort,i=e.sibling;if(i&&(i.childrenAfterSort=t),t)for(let e=0,i=t.length-1;e<=i;e++){let o=t[e],r=0===e,s=e===i;o.firstChild!==r&&(o.firstChild=r,o.dispatchRowEvent("firstChildChanged")),o.lastChild!==s&&(o.lastChild=s,o.dispatchRowEvent("lastChildChanged")),o.childIndex!==e&&(o.childIndex=e,o.dispatchRowEvent("childIndexChanged"))}},uS=class extends e2{constructor(){super(...arguments),this.beanName="sortStage",this.step="sort",this.refreshProps=["postSortRows","groupDisplayType","accentedSort"]}execute(e,t){let i,o=this.beans.sortSvc.getSortOptions(),r=o.length>0&&!!t&&this.gos.get("deltaSort"),{gos:s,colModel:n,rowGroupColsSvc:l,rowNodeSorter:a,rowRenderer:d,showRowGroupCols:h}=this.beans,u=s.get("groupMaintainOrder"),c=n.getCols().some(e=>e.isRowGroupActive()),g=l?.columns,p=n.isPivotMode(),f=s.getCallback("postSortRows"),m=!1,C=s=>{let n=p&&s.leafGroup,l=u&&c&&!s.leafGroup;l&&(i??(i=this.shouldSortContainsGroupCols(o)),l&&(l=!i));let d=null;if(l){let e=!1;if(g){let t=s.level+1;t<g.length&&(e=g[t].wasSortExplicitlyRemoved)}e||(d=uR(s))}else!o.length||n||(d=r&&t?((e,t,i,o,r)=>{let s=t.childrenAfterSort,n=t.childrenAfterAggFilter;if(!n)return s&&s.length>0?s:[];let l=n.length;if(l<=1)return s?.length===l&&(0===l||s[0]===n[0])?s:n.slice();if(!s||l<=4)return e.doFullSortInPlace(n.slice(),r);let a=new Map,{updates:d,adds:h}=i,u=[];for(let e=0;e<l;++e){let t=n[e];d.has(t)||h.has(t)||!o.canSkip(t)?(a.set(t,~e),u.push(t)):a.set(t,e)}let c=u.length;return 0===c?l===s.length?s:((e,t,i)=>{let o=0;i.length=t.size;for(let r=0,s=e.length;r<s;++r){let s=e[r];t.has(s)&&(i[o++]=s)}return i.length=o,i})(s,a,u):(u.sort((t,i)=>e.compareRowNodes(r,t,i)||~a.get(t)-~a.get(i)),c===l)?u:((e,t,i,o,r,s)=>{let n,l=Array(s),a=0,d=i[0],h=-1,u=0,c=0,g=i.length,p=o.length;for(;;){if(h<0){if(u>=p)break;if(n=o[u++],(h=r.get(n)??-1)<0)continue}if(0>(e.compareRowNodes(t,d,n)||~r.get(d)-h)){if(l[c++]=d,++a>=g)break;d=i[a]}else l[c++]=n,h=-1}for(;a<g;)l[c++]=i[a++];if(h<0)return l;for(l[c++]=n;u<p;){let e=o[u++];r.get(e)>=0&&(l[c++]=e)}return l})(e,r,u,s,a,l)})(a,s,t,e,o):a.doFullSortInPlace(s.childrenAfterAggFilter.slice(),o));d||(d=s.childrenAfterAggFilter?.slice()??[]),m||(m=s.childrenAfterSort?.[0]!==d[0]),s.childrenAfterSort=d,uy(s),f&&f({nodes:s.childrenAfterSort})};if(e?.forEachChangedNodeDepthFirst(C),m&&s.get("groupHideOpenParents")){let e=h?.columns;e?.length&&d.refreshCells({columns:e,force:!0})}}shouldSortContainsGroupCols(e){let t=e.length;if(!t)return!1;if(tj(this.gos)){for(let i=0;i<t;++i){let t=e[i].column;if(t.isPrimary()&&t.isRowGroupActive())return!0}return!1}for(let i=0;i<t;++i)if(e[i].column.getColDef().showRowGroup)return!0;return!1}},uR=e=>{let t=e.childrenAfterSort,i=e.childrenAfterAggFilter,o=t?.length,r=i?.length;if(!o||!r)return null;let s=Array(r),n=new Set;for(let e=0;e<r;++e)n.add(i[e]);let l=0;for(let e=0;e<o;++e){let i=t[e];n.delete(i)&&(s[l++]=i)}if(0===n.size&&l===o)return t;for(let e of n)s[l++]=e;return s.length=l,s},uF=class extends e2{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowCountReady=!1,this.nodeManager=void 0,this.rowsToDisplay=[],this.formulaRows=[],this.stages=null,this.asyncTransactions=null,this.asyncTransactionsTimer=0,this.started=!1,this.refreshingData=!1,this.rowDataUpdatedPending=!1,this.refreshingModel=!1,this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1,this.rowNodesCountReady=!1,this.stagesRefreshProps=new Map,this.onRowHeightChanged_debounced=e7(this,this.onRowHeightChanged.bind(this),100)}postConstruct(){let e=new sa(this.beans);this.rootNode=e,this.nodeManager=this.createBean(new uc(e));let t=()=>{this.beans.groupStage?.invalidateGroupCols(),this.refreshModel({step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")})};this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:t,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:()=>this.refreshModel({step:"pivot"}),columnPivotModeChanged:()=>this.refreshModel({step:"group"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),stylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this),rowExpansionStateChanged:this.onRowGroupOpened.bind(this)}),this.addPropertyListeners()}addPropertyListeners(){let{beans:e,stagesRefreshProps:t}=this,i=[e.groupStage,e.filterStage,e.pivotStage,e.aggStage,e.sortStage,e.filterAggStage,e.flattenStage].filter(e=>!!e);this.stages=i;for(let e=i.length-1;e>=0;--e)for(let o of i[e].refreshProps)t.set(o,e);this.addManagedPropertyListeners([...t.keys(),"rowData"],e=>{let t=e.changeSet?.properties;t&&this.onPropChange(t)}),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,o){let r,s=!1;do{r=!1;let n=this.getRowIndexAtPixel(e),l=this.getRowIndexAtPixel(t),a=Math.max(n,i),d=Math.min(l,o);for(let e=a;e<=d;e++){let t=this.getRow(e);if(t.rowHeightEstimated){let e=tO(this.beans,t);t.setRowHeight(e.height),r=!0,s=!0}}r&&this.setRowTopAndRowIndex()}while(r)return s}onPropChange(e){let t,{nodeManager:i,gos:o,beans:r}=this,s=r.groupStage;if(!i)return;let n=new Set(e),l=s?.onPropChange(n);n.has("rowData")?t=o.get("rowData"):l&&(t=s?.extractData()),t&&!Array.isArray(t)&&(t=null,tM(1));let a={step:"nothing",changedProps:n};if(t){let e=!l&&!this.isEmpty()&&t.length>0&&o.exists("getRowId")&&!o.get("resetRowDataOnUpdate");this.refreshingData=!0,e?(a.keepRenderedRows=!0,a.animate=!o.get("suppressAnimationFrame"),a.changedRowNodes=new nq,i.setImmutableRowData(a,t)):(a.rowDataUpdated=!0,a.newData=!0,i.setNewRowData(t),this.rowNodesCountReady=!0)}let d=a.rowDataUpdated?"group":this.getRefreshedStage(e);d&&(a.step=d,this.refreshModel(a))}getRefreshedStage(e){let{stages:t,stagesRefreshProps:i}=this;if(!t)return null;let o=t.length,r=o;for(let t=0,o=e.length;t<o&&r;++t)r=Math.min(r,i.get(e[t])??r);return r<o?t[r].step:null}setRowTopAndRowIndex(e){let{beans:t,rowsToDisplay:i}=this,o=t.environment.getDefaultRowHeight(),r=0,s=tV(this.gos,"normal");for(let n=0,l=i.length;n<l;++n){let l=i[n],a=l.id;if(null!=a&&e?.add(a),null==l.rowHeight){let e=tO(t,l,s,o);l.setRowHeight(e.height,e.estimated)}l.setRowTop(r),l.setRowIndex(n),r+=l.rowHeight}if(this.beans.formula?.active){let e=this.formulaRows;for(let t=0,i=e.length;t<i;++t)e[t].formulaRowIndex=t}}clearRowTopAndRowIndex(e,t){let i=e.active,o=e=>{e?.id==null||t.has(e.id)||e.clearRowTopAndRowIndex()},r=e=>{o(e),o(e.detailNode),o(e.sibling);let t=e.childrenAfterGroup;if(!e.hasChildren()||!t)return;let s=-1==e.level;if(!(i&&!s&&!e.expanded))for(let e=0,i=t.length;e<i;++e)r(t[e])},s=this.rootNode;s&&r(s)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay.length}getTopLevelRowCount(){let{rootNode:e,rowsToDisplay:t}=this;if(!e||!t.length)return 0;if(t[0]===e)return 1;let i=+!!e.sibling?.displayed;return(e.childrenAfterSort?.length??0)+i}getTopLevelRowDisplayedIndex(e){let{beans:t,rootNode:i,rowsToDisplay:o}=this;if(!i||!o.length||o[0]===i)return e;let r=i.childrenAfterSort,s=e=>{let t=r[e];if(this.gos.get("groupHideOpenParents"))for(;t.expanded&&t.childrenAfterSort&&t.childrenAfterSort.length>0;)t=t.childrenAfterSort[0];return t.rowIndex},n=t.footerSvc;return n?n?.getTopDisplayIndex(o,e,r,s):s(e)}getTopLevelIndexFromDisplayedIndex(e){let{rootNode:t,rowsToDisplay:i}=this;if(!t||!i.length||i[0]===t)return e;let o=this.getRow(e);o.footer&&(o=o.sibling);let r=o.parent;for(;r&&r!==t;)r=(o=r).parent;let s=t.childrenAfterSort?.indexOf(o)??-1;return s>=0?s:e}getRowBounds(e){let t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){this.refreshModel({step:"map",keepRenderedRows:!0,animate:t$(this.gos)})}onFilterChanged({afterDataChange:e,columns:t}){if(!e){let e=0===t.length||t.some(e=>e.isPrimary());this.refreshModel({step:e?"filter":"filter_aggregates",keepRenderedRows:!0,animate:t$(this.gos)})}}onSortChanged(){this.refreshModel({step:"sort",keepRenderedRows:!0,animate:t$(this.gos)})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.beans.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){let t=new nZ(!1,this.rootNode);return t.active=e,t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;let{changedRowNodes:t,newData:i,rowDataUpdated:o}=e;return!!t&&!i&&!!o&&!t.removals.length&&!t.adds.size}reMapRows(){if(this.refreshingModel||this.refreshingData){this.noKeepRenderedRows=!0,this.noKeepUndoRedoStack=!0,this.noAnimate=!0;return}this.refreshModel({step:"map",keepRenderedRows:!1,keepUndoRedoStack:!1,animate:!1})}refreshModel(e){let{nodeManager:t,eventSvc:i,started:o}=this;if(!t)return;let r=!!e.rowDataUpdated,s=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&r));if(o&&r&&i.dispatchEvent({type:"rowDataUpdated"}),this.deferRefresh(e)){this.setPendingRefreshFlags(e),this.rowDataUpdatedPending||(this.rowDataUpdatedPending=r);return}this.rowDataUpdatedPending&&(this.rowDataUpdatedPending=!1,e.step="group"),this.updateRefreshParams(e);let n=!1;this.refreshingModel=!0;try{this.executeRefresh(e,s,r),n=!0}finally{this.refreshingData=!1,this.refreshingModel=!1,n||this.setPendingRefreshFlags(e)}this.clearPendingRefreshFlags(),i.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}executeRefresh(e,t,i){let{beans:o}=this;switch(o.masterDetailSvc?.refreshModel(e),i&&"group"!==e.step&&o.colFilter?.refreshModel(),e.step){case"group":this.doGrouping(e);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(t,e.changedRowNodes);case"map":this.doRowsToDisplay()}let r=new Set;this.setRowTopAndRowIndex(r),this.clearRowTopAndRowIndex(t,r),this.updateRefreshParams(e)}deferRefresh(e){return!!this.refreshingModel||!!this.beans.colModel.changeEventsDispatching||(this.isSuppressModelUpdateAfterUpdateTransaction(e)?(this.started&&(this.refreshingData=!1),!0):!this.started)}setPendingRefreshFlags(e){this.pendingNewData||(this.pendingNewData=!!e.newData),this.noKeepRenderedRows||(this.noKeepRenderedRows=!e.keepRenderedRows),this.noKeepUndoRedoStack||(this.noKeepUndoRedoStack=!e.keepUndoRedoStack),this.noAnimate||(this.noAnimate=!e.animate)}clearPendingRefreshFlags(){this.pendingNewData=!1,this.noKeepRenderedRows=!1,this.noKeepUndoRedoStack=!1,this.noAnimate=!1}updateRefreshParams(e){e.newData=this.pendingNewData||!!e.newData,e.keepRenderedRows=!this.noKeepRenderedRows&&!!e.keepRenderedRows,e.keepUndoRedoStack=!this.noKeepUndoRedoStack&&!!e.keepUndoRedoStack,e.animate=!this.noAnimate&&!!e.animate}isEmpty(){return!this.rootNode?._leafs?.length||!this.beans.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getOverlayType(){let{beans:e,gos:t}=this;if(this.rootNode?._leafs?.length){if(e.filterManager?.isAnyFilterPresent()&&0===this.getRowCount())return"noMatchingRows"}else if(this.rowCountReady||(t.get("rowData")?.length??0)==0)return"noRows";return null}getNodesInRangeForSelection(e,t){let i=!1,o=!1,r=[],s=ie(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(!o){if(i&&(n===t||n===e)&&(o=!0,s&&n.group))return void uP(r,n);if(!i){if(n!==t&&n!==e)return;i=!0,t===e&&(o=!0)}n.group&&s||r.push(n)}}),r}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}getFormulaRow(e){return this.formulaRows[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){let t=this.rowsToDisplay,i=t.length;if(this.isEmpty()||0===i)return -1;let o=0,r=i-1;if(e<=0)return 0;if(t[r].rowTop<=e)return r;let s=-1,n=-1;for(;;){let i=Math.floor((o+r)/2),l=t[i];if(this.isRowInPixel(l,e)||(l.rowTop<e?o=i+1:l.rowTop>e&&(r=i-1),s===o&&n===r))return i;s=o,n=r}}isRowInPixel(e,t){let i=e.rowTop,o=i+e.rowHeight;return i<=t&&o>t}forEachLeafNode(e){let t=this.rootNode?._leafs;if(t)for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){let t=this.rowsToDisplay;for(let i=0,o=t.length;i<o;++i)e(t[i],i)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,e=>e.childrenAfterSort)}forEachPivotNode(e,t,i){let{colModel:o,rowGroupColsSvc:r}=this.beans;if(!o.isPivotMode())return;if(!r?.columns.length)return void e(this.rootNode,0);let s=i?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,e=>e.leafGroup?null:e[s])}depthFirstSearchRowNodes(e,t=!1,i=e=>e.childrenAfterGroup,o=this.rootNode,r=0){let s=r;if(!o)return s;let n=o===this.rootNode;if(n||e(o,s++),o.hasChildren()&&!o.footer){let r=i(o);if(r){let l=this.beans.footerSvc;for(let a of(s=l?.addTotalRows(s,o,e,t,n,"top")??s,r))s=this.depthFirstSearchRowNodes(e,t,i,a,s);return l?.addTotalRows(s,o,e,t,n,"bottom")??s}}return s}doAggregate(e){this.rootNode&&this.beans.aggStage?.execute(e)}doFilterAggregates(e){let t=this.rootNode,i=this.beans.filterAggStage;i?i.execute(e):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){let i=this.beans.sortStage;i?i.execute(e,t):e.forEachChangedNodeDepthFirst(e=>{e.childrenAfterSort=e.childrenAfterAggFilter.slice(0),uy(e)})}doGrouping(e){let t=this.rootNode;if(!t)return;let i=this.beans.groupStage,o=i?.execute(e);if(void 0===o){let e=t._leafs;t.childrenAfterGroup=e,t.updateHasChildren();let i=t.sibling;i&&(i.childrenAfterGroup=e)}(o||e.rowDataUpdated)&&this.beans.colFilter?.refreshModel(),!this.rowCountReady&&this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){let t=this.beans.filterStage;t?t.execute(e):e.forEachChangedNodeDepthFirst(e=>{e.childrenAfterFilter=e.childrenAfterGroup,uv(e)},!0)}doPivot(e){this.beans.pivotStage?.execute(e)}getRowNode(e){let t=this.nodeManager?.getRowNode(e);return"object"==typeof t?t:this.beans.groupStage?.getNonLeaf(e)}batchUpdateRowData(e,t){if(!this.asyncTransactionsTimer){this.asyncTransactions=[];let e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimer=setTimeout(()=>this.executeBatchUpdateRowData(),e)}this.asyncTransactions.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){let e=this.asyncTransactionsTimer;e&&(clearTimeout(e),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){let{nodeManager:e,beans:t,eventSvc:i,asyncTransactions:o}=this;if(!e)return;t.valueCache?.onDataChanged();let r=[],s=[],n=new nq,l=!this.gos.get("suppressAnimationFrame");for(let{rowDataTransaction:t,callback:i}of o??[]){this.rowNodesCountReady=!0,this.refreshingData=!0;let o=e.updateRowData(t,n,l);r.push(o),i&&s.push(i.bind(null,o))}this.commitTransactions(n,l),s.length>0&&setTimeout(()=>{for(let e=0,t=s.length;e<t;e++)s[e]()},0),r.length>0&&i.dispatchEvent({type:"asyncTransactionsFlushed",results:r}),this.asyncTransactionsTimer=0,this.asyncTransactions=null}updateRowData(e){let t=this.nodeManager;if(!t)return null;this.beans.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;let i=new nq,o=!this.gos.get("suppressAnimationFrame");this.refreshingData=!0;let r=t.updateRowData(e,i,o);return this.commitTransactions(i,o),r}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,keepRenderedRows:!0,animate:t,changedRowNodes:e,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){let{rootNode:e,beans:t}=this;if(t.formula?.active){let t=e?.childrenAfterSort??[];for(let e of(this.formulaRows=t,this.rowsToDisplay=t.filter(e=>!e.softFiltered),this.rowsToDisplay))e.setUiLevel(0);return}let i=t.flattenStage;if(i){this.rowsToDisplay=i.execute();return}let o=this.rootNode.childrenAfterSort??[];for(let e of o)e.setUiLevel(0);this.rowsToDisplay=o}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);let i=e.sibling;i?.setRowHeight(i.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);let i=t.detailNode;i?.setRowHeight(i.rowHeight,!0);let o=t.sibling;o?.setRowHeight(o.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){e.rowHeightChanged&&!this.beans.rowAutoHeight?.active&&this.resetRowHeights()}onGridReady(){this.started||this.setInitialData()}destroy(){super.destroy(),this.nodeManager=this.destroyBean(this.nodeManager),this.started=!1,this.rootNode=null,this.rowsToDisplay=[],this.asyncTransactions=null,this.stages=null,this.stagesRefreshProps.clear(),clearTimeout(this.asyncTransactionsTimer)}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}},uP=(e,t)=>{let i=t.childrenAfterGroup;if(i)for(let t=0,o=i.length;t<o;++t){let o=i[t];o.data&&e.push(o),o.group&&uP(e,o)}};function ux({colAutosize:e,visibleCols:t},i,o){Array.isArray(i)?e?.autoSizeCols({colKeys:i,skipHeader:o,source:"api"}):e?.autoSizeCols({...i,colKeys:i.colIds??t.allCols,source:"api"})}var uD=class extends e2{constructor(){super(...arguments),this.beanName="colAutosize",this.timesDelayed=0,this.shouldQueueResizeOperations=!1,this.resizeOperationQueue=[]}postConstruct(){let{gos:e}=this,t=e.get("autoSizeStrategy");if(t){let i=!1,o=t.type;if("fitGridWidth"===o||"fitProvidedWidth"===o)i=!0;else if("fitCellContents"===o){this.addManagedEventListeners({firstDataRendered:()=>this.onFirstDataRendered(t)});let o=e.get("rowData");i=null!=o&&o.length>0&&tL(e)}i&&this.beans.colDelayRenderSvc?.hideColumns(o)}}autoSizeCols(e){let{eventSvc:t,visibleCols:i,colModel:o}=this.beans;uT(this.beans,!0),this.innerAutoSizeCols(e).then(r=>{let s=e=>iY(t,Array.from(e),!0,"autosizeColumns");if(!e.scaleUpToFitGridWidth)return uT(this.beans,!1),s(r);let n=uE(this.beans),l=e.colKeys.filter(e=>!o.getCol(e)?.getColDef().suppressAutoSize&&!iB(e)&&!i.leftCols.some(t=>iH(t,e))&&!i.rightCols.some(t=>iH(t,e)));this.sizeColumnsToFit(n,e.source,!0,{defaultMaxWidth:e.defaultMaxWidth,defaultMinWidth:e.defaultMinWidth,columnLimits:e.columnLimits?.map(e=>({...e,key:e.colId})),colKeys:l,onlyScaleUp:!0,animate:!1}),uT(this.beans,!1),s(r)})}innerAutoSizeCols(e){return new Promise((t,i)=>{if(this.shouldQueueResizeOperations)return this.pushResizeOperation(()=>this.innerAutoSizeCols(e).then(t,i));let{colKeys:o,skipHeader:r,skipHeaderGroups:s,stopAtGroup:n,defaultMaxWidth:l,defaultMinWidth:a,columnLimits:d=[],source:h="api"}=e,{animationFrameSvc:u,renderStatus:c,colModel:g,autoWidthCalc:p,visibleCols:f}=this.beans;if(u?.flushAllFrames(),this.timesDelayed<5&&c&&(!c.areHeaderCellsRendered()||!c.areCellsRendered())){this.timesDelayed++,setTimeout(()=>{this.isAlive()&&this.innerAutoSizeCols(e).then(t,i)});return}this.timesDelayed=0;let m=new Set,C=-1,w=Object.fromEntries(d.map(({colId:e,...t})=>[e,t])),v=r??this.gos.get("skipHeaderOnAutoSize"),b=s??v;for(;0!==C;){C=0;let e=[];for(let t of o){var y;if(!t||iL(y=t)||iB(y))continue;let i=g.getCol(t);if(!i||m.has(i)||i.getColDef().suppressAutoSize)continue;let o=p.getPreferredWidthForColumn(i,v);if(o>0){let e=w[i.colId]??{};e.minWidth??(e.minWidth=a),e.maxWidth??(e.maxWidth=l);let t=function(e,t,i={}){let o=i.minWidth??e.getMinWidth();t<o&&(t=o);let r=i.maxWidth??e.getMaxWidth();return t>r&&(t=r),t}(i,o,e);i.setActualWidth(t,h),m.add(i),C++}e.push(i)}e.length&&f.refresh(h)}b||this.autoSizeColumnGroupsByColumns(o,h,n),t(m)})}autoSizeColumn(e,t,i){this.autoSizeCols({colKeys:[e],skipHeader:i,skipHeaderGroups:!0,source:t})}autoSizeColumnGroupsByColumns(e,t,i){let o,{colModel:r,ctrlsSvc:s}=this.beans,n=new Set;for(let t of r.getColsForKeys(e)){let e=t.getParent();for(;e&&e!=i;)e.isPadding()||n.add(e),e=e.getParent()}for(let e of n){for(let t of s.getHeaderRowContainerCtrls())if(o=t.getHeaderCtrlForColumn(e))break;o?.resizeLeafColumnsToFit(t)}}autoSizeAllColumns(e){this.shouldQueueResizeOperations?this.pushResizeOperation(()=>this.autoSizeAllColumns(e)):this.autoSizeCols({colKeys:this.beans.visibleCols.allCols,...e})}addColumnAutosizeListeners(e,t){let i=this.gos.get("skipHeaderOnAutoSize"),o=()=>{this.autoSizeColumn(t,"uiColumnResized",i)};e.addEventListener("dblclick",o);let r=new sD(e);return r.addEventListener("doubleTap",o),()=>{e.removeEventListener("dblclick",o),r.destroy()}}addColumnGroupResize(e,t,i){let o=this.gos.get("skipHeaderOnAutoSize"),r=()=>{let e=[];for(let i of t.getDisplayedLeafColumns())i.getColDef().suppressAutoSize||e.push(i.getColId());e.length>0&&this.autoSizeCols({colKeys:e,skipHeader:o,stopAtGroup:t,source:"uiColumnResized"}),i()};return e.addEventListener("dblclick",r),()=>e.removeEventListener("dblclick",r)}sizeColumnsToFitGridBody(e,t){if(!this.isAlive())return;let i=uE(this.beans);i>0?this.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,100)},0):100===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,500)},100):500===t?window.setTimeout(()=>{this.sizeColumnsToFitGridBody(e,-1)},500):tM(29)}sizeColumnsToFit(e,t="sizeColumnsToFit",i,o){if(this.shouldQueueResizeOperations)return void this.pushResizeOperation(()=>this.sizeColumnsToFit(e,t,i,o));let{beans:r}=this,s=o?.animate??!0;s&&uT(r,!0);let n={};for(let{key:e,...t}of o?.columnLimits??[])n["string"==typeof e?e:e.getColId()]=t;let l=r.visibleCols.allCols;if(e<=0||!l.length)return;let a=ik(l);if(o?.onlyScaleUp&&a>e||e===a&&l.every(e=>{if(e.colDef.suppressSizeToFit)return!0;let t=n?.[e.getId()],i=t?.minWidth??o?.defaultMinWidth,r=t?.maxWidth??o?.defaultMaxWidth,s=e.getActualWidth();return(null==i||s>=i)&&(null==r||s<=r)}))return;let d=[],h=[];for(let e of l){let t=o?.colKeys?.some(t=>iH(e,t))??!0;e.getColDef().suppressSizeToFit||!t?h.push(e):d.push(e)}let u=d.slice(0),c=!1,g=e=>{M(d,e),h.push(e)},p={};for(let e of d){o?.onlyScaleUp&&(p[e.getColId()]=e.getActualWidth()),e.resetActualWidth(t);let i=n?.[e.getId()],r=i?.minWidth??o?.defaultMinWidth??-1/0,s=i?.maxWidth??o?.defaultMaxWidth??1/0,l=e.getActualWidth(),a=Math.max(Math.min(l,s),r);a!=l&&e.setActualWidth(a,t,!0)}for(;!c;){c=!0;let i=e-ik(h);if(i<=0)for(let e of d){let i=n?.[e.getId()]?.minWidth??o?.defaultMinWidth??e.minWidth;e.setActualWidth(i,t,!0)}else{let e=i/ik(d),r=i;for(let i=d.length-1;i>=0;i--){let s=d[i],l=s.getColId(),a=p[l],h=n?.[l],u=h?.minWidth??o?.defaultMinWidth??a,f=h?.maxWidth??o?.defaultMaxWidth,m=Math.max(u??-1/0,s.getMinWidth()),C=Math.min(f??1/0,s.getMaxWidth()),w=Math.round(s.getActualWidth()*e);w<m?(w=m,g(s),c=!1):w>C?(w=C,g(s),c=!1):0===i&&(w=r),s.setActualWidth(w,t,!0),r-=w}}}for(let e of u)e.fireColumnWidthChangedEvent(t);let f=r.visibleCols;f.setLeftValues(t),f.updateBodyWidths(),!i&&(iY(this.eventSvc,u,!0,t),s&&uT(r,!1))}applyAutosizeStrategy(){let{gos:e,colDelayRenderSvc:t}=this.beans,i=e.get("autoSizeStrategy");(i?.type==="fitGridWidth"||i?.type==="fitProvidedWidth")&&setTimeout(()=>{if(!this.isAlive())return;let e=i.type;if("fitGridWidth"===e){let{columnLimits:e,defaultMinWidth:t,defaultMaxWidth:o}=i,r=e?.map(({colId:e,minWidth:t,maxWidth:i})=>({key:e,minWidth:t,maxWidth:i}));this.sizeColumnsToFitGridBody({defaultMinWidth:t,defaultMaxWidth:o,columnLimits:r})}else"fitProvidedWidth"===e&&this.sizeColumnsToFit(i.width,"sizeColumnsToFit");t?.revealColumns(e)})}onFirstDataRendered({colIds:e,...t}){setTimeout(()=>{if(!this.isAlive())return;let i="autosizeColumns";e?this.autoSizeCols({...t,source:i,colKeys:e}):this.autoSizeAllColumns({...t,source:i}),this.beans.colDelayRenderSvc?.revealColumns(t.type)})}processResizeOperations(){for(let e of(this.shouldQueueResizeOperations=!1,this.resizeOperationQueue))e();this.resizeOperationQueue=[]}pushResizeOperation(e){this.resizeOperationQueue.push(e)}destroy(){this.resizeOperationQueue.length=0,super.destroy()}};function uE({ctrlsSvc:e,scrollVisibleSvc:t}){let i=e.getGridBodyCtrl(),o=i.isVerticalScrollShowing()?t.getScrollbarWidth():0;return ev(i.eGridBody)-o}var uM="ag-animate-autosize";function uT({ctrlsSvc:e,gos:t},i){if(!t.get("animateColumnResizing")||t.get("enableRtl")||!e.isAlive())return;let o=e.getGridBodyCtrl().eGridBody.classList;i?o.add(uM):o.remove(uM)}var uk=class extends e2{constructor(e,t){super(),this.columns=e,this.element=t,this.destroyManagedListeners=[],this.enableFeature=e=>{let{beans:t,gos:i,element:o,columns:r}=this,s=t.colHover;if(e??!!i.get("columnHoverHighlight"))this.destroyManagedListeners=this.addManagedElementListeners(o,{mouseover:s.setMouseOver.bind(s,r),mouseout:s.clearMouseOver.bind(s)});else{for(let e of this.destroyManagedListeners)e();this.destroyManagedListeners=[]}}}postConstruct(){this.addManagedPropertyListener("columnHoverHighlight",({currentValue:e})=>{this.enableFeature(e)}),this.enableFeature()}destroy(){super.destroy(),this.destroyManagedListeners=null}},uA=class extends e2{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 o=()=>{let e=this.isHovered(i);t.toggleCss("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:o}),o()}onCellColumnHover(e,t){if(!t)return;let i=this.isHovered(e);t.toggleCss("ag-column-hover",i)}addHeaderFilterColumnHoverListener(e,t,i,o){this.createHoverFeature(e,[i],o);let r=()=>{let e=this.isHovered(i);t.toggleCss("ag-column-hover",e)};e.addManagedEventListeners({columnHoverChanged:r}),r()}createHoverFeature(e,t,i){e.createManagedBean(new uk(t,i))}updateState(e){this.selectedColumns=e,this.eventSvc.dispatchEvent({type:"columnHoverChanged"})}},uI=class extends e2{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:o,skipRowGroups:r,exportRowNumbers:s}=t,n=this.getColumnsToExport({allColumns:i,skipRowGroups:r,columnKeys:o,exportRowNumbers:s});return[this.prepareSession(n),this.prependContent(t),this.exportColumnGroups(t,n),this.exportHeaders(t,n),this.processPinnedTopRows(t,n),this.processRows(t,n),this.processPinnedBottomRows(t,n),this.appendContent(t)].reduce((e,t)=>t(e),e).parse()}processRow(e,t,i,o){var r;let s,n=t.shouldRowBeSkipped||(()=>!1),l=null!=t.rowPositions||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!l,d=this.colModel.isPivotMode()?o.leafGroup:!o.group,h=!!o.footer,u=1===o.allChildrenCount&&o.childrenAfterGroup?.length===1&&(r=this.gos,!!(!0===(s=r.get("groupHideParentOfSingleChild"))||"leafGroupsOnly"===s&&o.leafGroup||r.get("groupRemoveSingleChildren")||r.get("groupRemoveLowestSingleChildren")&&o.leafGroup));if(!d&&!h&&(t.skipRowGroups||u||a)||t.onlySelected&&!o.isSelected()||t.skipPinnedTop&&"top"===o.rowPinned||t.skipPinnedBottom&&"bottom"===o.rowPinned||o.stub||-1===o.level&&!d&&!h||n(is(this.gos,{node:o})))return;let c=e.onNewBodyRow(o);if(i.forEach((e,t)=>{c.onColumn(e,t,o)}),t.getCustomContentBelowRow){let i=t.getCustomContentBelowRow(is(this.gos,{node:o}));i&&e.addCustomContent(i)}}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 o=new lp,{colGroupSvc:r}=this.beans,s=r?r.createColumnGroups({columns:t,idCreator:o,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(s,i,e.processGroupHeaderCallback)}return i}}exportHeaders(e,t){return i=>{if(!e.skipColumnHeaders){let e=i.onNewHeaderRow();t.forEach((t,i)=>{e.onColumn(t,i,void 0)})}return i}}processPinnedTopRows(e,t){return i=>{let o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"top"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedTopRow(e.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("top",o),i}}processRows(e,t){return i=>{let o=this.rowModel,r=tL(this.gos,o),s=tB(this.gos,o),n=!r&&e.onlySelected,l=this.processRow.bind(this,i,e,t),{exportedRows:a="filteredAndSorted"}=e;if(e.rowPositions)e.rowPositions.filter(e=>null==e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>o.getRow(e.rowIndex)).forEach(l);else if(this.colModel.isPivotMode())r?o.forEachPivotNode(l,!0,"filteredAndSorted"===a):s?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);else if(e.onlySelectedAllPages||n){let e=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(e),e.forEach(l)}else"all"===a?o.forEachNode(l):r||s?o.forEachNodeAfterFilterAndSort(l,!0):o.forEachNode(l);return i}}replicateSortedOrder(e){let{sortSvc:t,rowNodeSorter:i}=this.beans;if(!t||!i)return;let o=t.getSortOptions(),r=(e,t)=>null!=e.rowIndex&&null!=t.rowIndex?e.rowIndex-t.rowIndex:e.level===t.level?e.parent?.id===t.parent?.id?i.compareRowNodes(o,e,t)||(e.rowIndex??-1)-(t.rowIndex??-1):r(e.parent,t.parent):e.level>t.level?r(e.parent,t):r(e,t.parent);e.sort(r)}processPinnedBottomRows(e,t){return i=>{let o=this.processRow.bind(this,i,e,t);return e.rowPositions?e.rowPositions.filter(e=>"bottom"===e.rowPinned).sort((e,t)=>e.rowIndex-t.rowIndex).map(e=>this.pinnedRowModel?.getPinnedBottomRow(e.rowIndex)).forEach(o):this.pinnedRowModel?.isManual()||this.pinnedRowModel?.forEachPinnedRow("bottom",o),i}}getColumnsToExport(e){let{allColumns:t=!1,skipRowGroups:i=!1,exportRowNumbers:o=!1,columnKeys:r}=e,{colModel:s,gos:n,visibleCols:l}=this,a=s.isPivotMode(),d=e=>!iL(e)&&(!iB(e)||o);if(r?.length)return s.getColsForKeys(r).filter(d);let h=n.get("treeData");return(t&&!a?s.getCols():l.allCols).filter(e=>d(e)&&(!i||!!h||!iI(e)))}recursivelyAddHeaderGroups(e,t,i){let o=[];for(let t of e)if(t.getChildren)for(let e of t.getChildren()??[])o.push(e);e.length>0&&i1(e[0])&&this.doAddHeaderHeader(t,e,i),o&&o.length>0&&this.recursivelyAddHeaderGroups(o,t,i)}doAddHeaderHeader(e,t,i){let o=e.onNewHeaderGroupingRow(),r=0;for(let e of t){let t;t=i?i(is(this.gos,{columnGroup:e})):this.beans.colNames.getDisplayNameForColumnGroup(e,"header");let s=(e.isExpandable()?e.getLeafColumns():[]).reduce((e,t,i,o)=>{let r=x(e);return"open"===t.getColumnGroupShow()?r&&null==r[1]||(r=[i],e.push(r)):r&&null==r[1]&&(r[1]=i-1),i===o.length-1&&r&&null==r[1]&&(r[1]=i),e},[]);o.onColumn(e,t||"",r++,e.getLeafColumns().length-1,s)}}},uL=class extends e2{getFileName(e){let t=this.getDefaultFileExtension();return e?.length||(e=this.getDefaultFileName()),e.includes(".")?e:`${e}.${t}`}getData(e){return this.beans.gridSerializer.serialize(this.createSerializingSession(e),e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},uB=class{constructor(e){this.valueFrom="data";const{colModel:t,rowGroupColsSvc:i,colNames:o,valueSvc:r,gos:s,processCellCallback:n,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,valueFrom:h}=e;this.colModel=t,this.rowGroupColsSvc=i,this.colNames=o,this.valueSvc=r,this.gos=s,this.processCellCallback=n,this.processHeaderCallback=l,this.processGroupHeaderCallback=a,this.processRowGroupCallback=d,h&&(this.valueFrom=h)}prepare(e){}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e){let{column:t,node:i,currentColumnIndex:o,accumulatedRowIndex:r,type:s,useRawFormula:n}=e,l=0===o&&tQ(this.gos,i,this.colModel.isPivotMode());if(this.processRowGroupCallback&&(this.gos.get("treeData")||i.group)&&(t.isRowGroupDisplayed(i.rowGroupColumn?.getColId()??"")||l))return{value:this.processRowGroupCallback(is(this.gos,{column:t,node:i}))??""};if(this.processCellCallback)return{value:this.processCellCallback(is(this.gos,{accumulatedRowIndex:r,column:t,node:i,value:this.valueSvc.getValueForDisplay({column:t,node:i,from:this.valueFrom}).value,type:s,parseValue:e=>this.valueSvc.parseValue(t,i,e,this.valueSvc.getValue(t,i,this.valueFrom)),formatValue:e=>this.valueSvc.formatValue(t,i,e)??e}))??""};let a=this.gos.get("treeData"),d=this.valueSvc,h=-1===i.level&&i.footer,u=!0===t.colDef.showRowGroup&&(i.group||a);if(!h&&(l||u)){let e="",o=i;for(;o&&-1!==o.level;){let{value:i,valueFormatted:r}=d.getValueForDisplay({column:l?void 0:t,node:o,includeValueFormatted:!0,exporting:!0,from:this.valueFrom});e=` -> ${r??i??""}${e}`,o=o.parent}return{value:e,valueFormatted:e}}let{value:c,valueFormatted:g}=d.getValueForDisplay({column:t,node:i,includeValueFormatted:!0,exporting:!0,useRawFormula:n,from:this.valueFrom});return{value:c??"",valueFormatted:g}}getHeaderName(e,t){return e?e(is(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}},uV=class extends uB{constructor(e){super(e),this.config=e,this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:i}=e;this.suppressQuotes=t,this.columnSeparator=i}addCustomContent(e){e&&("string"==typeof e?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,"\r\n"),this.result+=e):e.forEach(e=>{this.beginNewLine(),e.forEach((e,t)=>{0!==t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(e.data.value||""),e.mergeAcross&&this.appendEmptyCells(e.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,i,o){0!=i&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(o)}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){0!=t&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,i){0!=t&&(this.result+=this.columnSeparator);let o=this.extractRowCellValue({column:e,node:i,currentColumnIndex:t,accumulatedRowIndex:t,type:"csv",useRawFormula:!1});this.result+=this.putInQuotes(o.valueFormatted??o.value)}putInQuotes(e){let t;return this.suppressQuotes?e:null==e?'""':("string"==typeof e?t=e:"function"==typeof e.toString?t=e.toString():(tM(53),t=""),'"'+t.replace(/"/g,'""')+'"')}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+="\r\n"),this.isFirstLine=!1}},uG=class extends uL{constructor(){super(...arguments),this.beanName="csvCreator"}getMergedParams(e){return Object.assign({},this.gos.get("defaultCsvExportParams"),e)}export(e){if(this.isExportSuppressed())return void tM(51);let t=()=>{let t=this.getMergedParams(e),i=new Blob(["\uFEFF",this.getData(t)],{type:"text/plain"}),o=t.fileName,r="function"==typeof o?o(is(this.gos,{})):o;!function(e,t){let i=document.defaultView||window;if(!i)return tM(52);let o=document.createElement("a"),r=i.URL.createObjectURL(t);o.setAttribute("href",r),o.setAttribute("download",e),o.style.display="none",document.body.appendChild(o),o.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:i})),o.remove(),i.setTimeout(()=>{i.URL.revokeObjectURL(r)},0)}(this.getFileName(r),i)},{overlays:i}=this.beans;i?i.showExportOverlay(t):t()}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:o,valueSvc:r,gos:s}=this.beans,{processCellCallback:n,processHeaderCallback:l,processGroupHeaderCallback:a,processRowGroupCallback:d,suppressQuotes:h,columnSeparator:u,valueFrom:c}=e;return new uV({colModel:t,colNames:i,valueSvc:r,gos:s,processCellCallback:n||void 0,processHeaderCallback:l||void 0,processGroupHeaderCallback:a||void 0,processRowGroupCallback:d||void 0,suppressQuotes:h||!1,columnSeparator:u||",",rowGroupColsSvc:o,valueFrom:c})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}},uH=class extends e1{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e,t){let i="title",o=this.ctrl.getGui();o&&(null!=e&&(""!=e||t)?o.setAttribute(i,e):o.removeAttribute(i))}updateTooltipText(){let{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){if(null==this.tooltipManager){let e=this.beans.registry.createDynamicBean("tooltipStateManager",!0,this.ctrl,()=>this.tooltip);e&&(this.tooltipManager=this.createBean(e,this.beans.context))}}attemptToShowTooltip(){this.tooltipManager?.prepareToShowTooltip()}attemptToHideTooltip(){this.tooltipManager?.hideTooltip()}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(e){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(e?"":null,e),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},uO=!1,uN=class extends e1{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}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");let e=this.tooltipCtrl.getGui();0===this.tooltipTrigger&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),1===this.tooltipTrigger&&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){return Math.max(200,this.gos.get(e))}getTooltipDelay(e){return this.tooltipCtrl[`getTooltip${e}DelayOverride`]?.()??this.getGridOptionsTooltipDelay(`tooltip${e}Delay`)}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){let e=this.gos.get("tooltipTrigger");return e&&"hover"!==e?1:0}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),rt()||(uO?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},100):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&2===this.state&&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(),o=this.tooltipComp?.getGui();this.isInteractingWithTooltip||i.contains(t)||this.interactionEnabled&&o?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(0!=this.state||uO)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?this.getTooltipDelay("SwitchShow"):this.getTooltipDelay("Show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-F<1e3}setToDoNothing(e){e||2!==this.state||this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.clearEventHandlers(),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(!A(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip())return void this.setToDoNothing();let i=this.gos.addCommon({location:t.getLocation?.()??"UNKNOWN",value:e,hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()});this.state=2,this.tooltipInstanceCount++;let o=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);this.createTooltipComp(i,o)}hideTooltip(e){(e||!this.isInteractingWithTooltip)&&(this.tooltipComp&&(this.destroyTooltipComp(),F=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(2!==this.state||this.tooltipInstanceCount!==e)return void this.destroyBean(t);let i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),0===this.tooltipTrigger&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");let o=this.getLocaleTextFunc(),r=this.popupSvc?.addPopup({eChild:i,ariaLabel:o("ariaLabelTooltip","Tooltip")});if(r&&(this.tooltipPopupDestroyFunc=r.hideFunc),this.positionTooltip(),1===this.tooltipTrigger){let e=()=>this.setToDoNothing();[this.onBodyScrollEventCallback]=this.addManagedEventListeners({bodyScroll:e}),this.setEventHandlers(e)}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(K(this.beans),{keydown:e=>{i.contains(e?.target)||this.onKeyDown()}}),1===this.tooltipTrigger&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(i,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:i,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({...e,mouseEvent:this.lastMouseEvent}):this.popupSvc?.positionPopupByComponent({...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=1e3*(0===this.tooltipTrigger);window.setTimeout(()=>{e(),this.destroyBean(t)},i),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){for(let e of[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener])e&&e();this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){uO=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},100)}unlockService(){uO=!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()}},uz=class extends uH{constructor(e,t,i){super(e,i),this.highlightTracker=t,this.onHighlight=this.onHighlight.bind(this)}postConstruct(){super.postConstruct(),this.wireHighlightListeners()}wireHighlightListeners(){this.addManagedPropertyListener("tooltipTrigger",({currentValue:e})=>{this.setTooltipMode(e)}),this.setTooltipMode(this.gos.get("tooltipTrigger")),this.highlightTracker.addEventListener("itemHighlighted",this.onHighlight)}onHighlight(e){1===this.tooltipMode&&(e.highlighted?this.attemptToShowTooltip():this.attemptToHideTooltip())}setTooltipMode(e="focus"){this.tooltipMode=+("focus"===e)}destroy(){this.highlightTracker.removeEventListener("itemHighlighted",this.onHighlight),super.destroy()}},uW=class extends rQ{constructor(){super({tag:"div",cls:"ag-tooltip"})}init(e){let{value:t}=e,i=this.getGui();i.textContent=N(t);let o=e.location.replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase();i.classList.add(`ag-${o}-tooltip`)}},uU=0,u$=class extends e1{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.addManagedEventListeners({stylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){let e=this.gos.get("popupParent");return e||this.getDefaultPopupParent()}positionPopupUnderMouseEvent(e){let{ePopup:t,nudgeX:i,nudgeY:o,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,e.type,e.ePopup,null,e.mouseEvent)})}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:o,keepWithinBounds:r,eventSource:s,alignSide:n="left",position:l="over",type:a}=e,d=s.getBoundingClientRect(),h=this.getParentRect();this.setAlignedTo(s,t);let u=()=>{let i,r=d.left-h.left;return"right"===n&&(r-=t.offsetWidth-d.width),"over"===l?(i=d.top-h.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),i="under"===this.shouldRenderUnderOrAbove(t,d,h,e.nudgeY||0)?d.top-h.top+d.height:d.top-t.offsetHeight-2*(o||0)-h.top),{x:r,y:i}};this.positionPopup({ePopup:t,nudgeX:i,nudgeY:o,keepWithinBounds:r,updatePosition:u,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,a,t,s,null)})}positionPopupForMenu(e){let{eventSource:t,ePopup:i,event:o}=e,r=t.getBoundingClientRect(),s=this.getParentRect();this.setAlignedTo(t,i);let n=!1,l=()=>{let e,t=this.keepXYWithinBounds(i,r.top-s.top,0),o=i.clientWidth>0?i.clientWidth:200;n||(i.style.minWidth=`${o}px`,n=!0);let l=s.right-s.left-o;return this.gos.get("enableRtl")?((e=d())<0&&(e=a(),this.setAlignedStyles(i,"left")),e>l&&(e=0,this.setAlignedStyles(i,"right"))):((e=a())>l&&(e=d(),this.setAlignedStyles(i,"right")),e<0&&(e=0,this.setAlignedStyles(i,"left"))),{x:e,y:t};function a(){return r.right-s.left-2}function d(){return r.left-s.left-o}};this.positionPopup({ePopup:i,keepWithinBounds:!0,updatePosition:l,postProcessCallback:()=>this.callPostProcessPopup(e.additionalParams,"subMenu",i,t,o instanceof MouseEvent?o:void 0)})}shouldRenderUnderOrAbove(e,t,i,o){let r=i.bottom-t.bottom,s=t.top-i.top,n=e.offsetHeight+o;return r>n?"under":s>n||s>r?"above":"under"}setAlignedStyles(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let{alignedToElement:o}=this.popupList[i];if(o){for(let t of["right","left","over","above","under"])o.classList.remove(`ag-has-popup-positioned-${t}`),e.classList.remove(`ag-popup-positioned-${t}`);t&&(o.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}}setAlignedTo(e,t){let i=this.getPopupIndex(t);-1!==i&&(this.popupList[i].alignedToElement=e)}positionPopup(e){let{ePopup:t,keepWithinBounds:i,nudgeX:o,nudgeY:r,skipObserver:s,updatePosition:n}=e,l={width:0,height:0},a=(s=!1)=>{let{x:a,y:d}=n();(!s||t.clientWidth!==l.width||t.clientHeight!==l.height)&&(l.width=t.clientWidth,l.height=t.clientHeight,o&&(a+=o),r&&(d+=r),i&&(a=this.keepXYWithinBounds(t,a,1),d=this.keepXYWithinBounds(t,d,0)),t.style.left=`${a}px`,t.style.top=`${d}px`,e.postProcessCallback&&e.postProcessCallback())};if(a(),!s){let e=eH(this.beans,t,()=>a(!0));setTimeout(()=>e(),200)}}getParentRect(){let e=K(this.beans),t=this.getPopupParent();return t===e.body?t=e.documentElement:"static"===getComputedStyle(t).position&&(t=t.offsetParent),eS(t)}keepXYWithinBounds(e,t,i){let o=0===i,r=o?"top":"left",s=K(this.beans),n=s.documentElement,l=this.getPopupParent(),a=e.getBoundingClientRect(),d=l.getBoundingClientRect(),h=s.documentElement.getBoundingClientRect(),u=l===s.body,c=Math.ceil(a[o?"height":"width"]),g=u?(o?eb:ey)(n)+n[o?"scrollTop":"scrollLeft"]:l[o?"clientHeight":"clientWidth"];return u&&(g-=Math.abs(h[r]-d[r])),Math.min(Math.max(t,0),Math.max(g-c,0))}addPopup(e){let{eChild:t,ariaLabel:i,ariaOwns:o,alwaysOnTop:r,positionCallback:s,anchorToElement:n}=e,l=this.getPopupIndex(t);if(-1!==l)return{hideFunc:this.popupList[l].hideFunc};this.initialisePopupPosition(t);let a=this.createPopupWrapper(t,!!r,i,o),d=this.addEventListenersToPopup({...e,wrapperEl:a});return s&&s(),this.addPopupToPopupList(t,a,d,n),{hideFunc:d}}initialisePopupPosition(e){let t=this.getPopupParent().getBoundingClientRect();A(e.style.top)||(e.style.top=`${-1*t.top}px`),A(e.style.left)||(e.style.left=`${-1*t.left}px`)}createPopupWrapper(e,t,i,o){let r=this.getPopupParent(),{environment:s,gos:n}=this.beans,l=eW({tag:"div"});return(s.applyThemeClasses(l),l.classList.add("ag-popup"),e.classList.add(n.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||J(e,"dialog"),i)?X(e,i):o&&(e.id||(e.id=`popup-component-${uU}`),Y(o,"owns",e.id)),l.appendChild(e),r.appendChild(l),t?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),l}addEventListenersToPopup(e){let t=this.beans,i=K(t),{wrapperEl:o,eChild:r,closedCallback:s,afterGuiAttached:n,closeOnEsc:l,modal:a,ariaOwns:d}=e,h=!1,u=e=>{!o.contains($(t))||e.key!==i4||this.isStopPropagation(e)||p({keyboardEvent:e})},c=e=>p({mouseEvent:e}),g=e=>p({touchEvent:e}),p=(e={})=>{let{mouseEvent:t,touchEvent:n,keyboardEvent:l,forceHide:a}=e;!a&&(this.isEventFromCurrentPopup({mouseEvent:t,touchEvent:n},r)||h)||(h=!0,o.remove(),i.removeEventListener("keydown",u),i.removeEventListener("mousedown",c),i.removeEventListener("touchstart",g),i.removeEventListener("contextmenu",c),this.eventSvc.removeListener("dragStarted",c),s&&s(t||n||l),this.removePopupFromPopupList(r,d))};return n&&n({hidePopup:p}),window.setTimeout(()=>{l&&i.addEventListener("keydown",u),a&&(i.addEventListener("mousedown",c),this.eventSvc.addListener("dragStarted",c),i.addEventListener("touchstart",g),i.addEventListener("contextmenu",c))},0),p}addPopupToPopupList(e,t,i,o){this.popupList.push({element:e,wrapper:t,hideFunc:i,instanceId:uU,isAnchored:!!o}),o&&this.setPopupPositionRelatedToElement(e,o),uU+=1}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){let i=this.getPopupIndex(e);if(-1===i)return;let o=this.popupList[i];if(o.stopAnchoringPromise&&o.stopAnchoringPromise.then(e=>e&&e()),o.stopAnchoringPromise=void 0,o.isAnchored=!1,!t)return;let r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:o.hideFunc});return o.stopAnchoringPromise=r,o.isAnchored=!0,r}removePopupFromPopupList(e,t){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),t&&Y(t,"owns",null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){let t=this.getPopupParent(),i=t.getBoundingClientRect(),{element:o,ePopup:r}=e,s=o.getBoundingClientRect(),n=e=>Number.parseInt(e.substring(0,e.length-1),10),l=(e,t)=>{let o=i[e]-s[e],l=n(r.style[e]);return{initialDiff:o,lastDiff:o,initial:l,last:l,direction:t}},a=l("top",0),d=l("left",1),h=this.beans.frameworkOverrides;return new ou(i=>{h.wrapIncoming(()=>{var s;(s=()=>{let i=t.getBoundingClientRect(),s=o.getBoundingClientRect();if(0==s.top&&0==s.left&&0==s.height&&0==s.width)return void e.hidePopup();let l=(e,t)=>{let o=n(r.style[t]);e.last!==o&&(e.initial=o,e.last=o);let l=i[t]-s[t];if(l!=e.lastDiff){let i=this.keepXYWithinBounds(r,e.initial+e.initialDiff-l,e.direction);r.style[t]=`${i}px`,e.last=i}e.lastDiff=l};l(a,"top"),l(d,"left")},new ou(e=>{e(window.setInterval(s,200))})).then(e=>{i(()=>{null!=e&&window.clearInterval(e)})})},"popupPositioning")})}isEventFromCurrentPopup(e,t){let{mouseEvent:i,touchEvent:o}=e,r=i||o;if(!r)return!1;let s=this.getPopupIndex(t);if(-1===s)return!1;for(let e=s;e<this.popupList.length;e++){var n;if(n=this.popupList[e].element,r&&n&&(function(e){if(e.path)return e.path;if(e.composedPath)return e.composedPath();let t=[],i=e.target;for(;i;)t.push(i),i=i.parentElement;return t})(r).indexOf(n)>=0)return!0}return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(e){let t=K(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||null===e.parentElement)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")),o=i.length,r=this.getWrapper(e);if(!r||o<=1||!t.contains(e))return;let s=[],n=[];for(let e of i)e!==r&&(e.classList.contains("ag-always-on-top")?n.push(e):s.push(e));let l=[],a=n.length,d=r.classList.contains("ag-always-on-top")||!a?[...s,...n,r]:[...s,r,...n];for(let e=0;e<=o;e++){let o=d[e];if(i[e]!==d[e]&&o!==r){for(let e of o.querySelectorAll("div"))0!==e.scrollTop&&l.push([e,e.scrollTop]);0===e?t.prepend(o):d[e-1].after(o)}}for(;l.length;){let e=l.pop();e[0].scrollTop=e[1]}}handleThemeChange(e){if(e.themeChanged){let e=this.beans.environment;for(let t of this.popupList)e.applyThemeClasses(t.wrapper)}}},uK={moduleName:"Popup",version:tv,beans:[class extends u${getDefaultPopupParent(){return this.beans.ctrlsSvc.get("gridCtrl").getGui()}callPostProcessPopup(e,t,i,o,r){let s=this.gos.getCallback("postProcessPopup");if(s){let{column:n,rowNode:l}=e??{};s({column:n,rowNode:l,ePopup:i,type:t,eventSource:o,mouseEvent:r})}}getActivePopups(){return this.popupList.map(e=>e.element)}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isStopPropagation(e){return rm(e)}}]};function uj(e){return"whenTruncated"===e.get("tooltipShowMode")}var u_=(e,t,i)=>{let{editModelSvc:o}=e,r=o?.getCellValidationModel()?.getCellValidation(t)?.errorMessages,s=o?.getRowValidationModel().getRowValidation(t)?.errorMessages,n=r||s;return n?.length?n.join(i("tooltipValidationErrorSeparator",". ")):void 0},uq={moduleName:"Tooltip",version:tv,beans:[class extends e2{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,i,o){e&&t.destroyBean(e);let r=this.gos,s=uj(r),{column:n,eGui:l}=t,a=n.getColDef();o||!s||a.headerComponent||(o=eT(()=>l.querySelector(".ag-header-cell-text")));let d="header",h=this.beans.colNames.getDisplayNameForColumn(n,"header",!0),u=i??h,c={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(is(r,{location:d,colDef:a,column:n,value:u,valueFormatted:h}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>({column:n,colDef:n.getColDef()})},g=this.createTooltipFeature(c);return g&&(g=t.createBean(g),t.setRefreshFunction("tooltip",()=>g.refreshTooltip())),g}setupHeaderGroupTooltip(e,t,i,o){e&&t.destroyBean(e);let r=this.gos,s=uj(r),{column:n,eGui:l}=t,a=n.getColGroupDef();o||!s||a?.headerGroupComponent||(o=eT(()=>l.querySelector(".ag-header-group-text")));let d="headerGroup",h=this.beans.colNames.getDisplayNameForColumnGroup(n,"header"),u=i??h,c={getGui:()=>l,getLocation:()=>d,getTooltipValue:()=>i??a?.headerTooltipValueGetter?.(is(r,{location:d,colDef:a,column:n,value:u,valueFormatted:h}))??a?.headerTooltip,shouldDisplayTooltip:o,getAdditionalParams:()=>{let e={column:n};return a&&(e.colDef=a),e}},g=this.createTooltipFeature(c);return g?t.createBean(g):g}enableCellTooltipFeature(e,t,i){let{beans:o}=this,{column:r,rowNode:s}=e,n=((e,t,i)=>{let{editSvc:o}=e,{column:r}=t,s=((e,t)=>{if(uj(e.gos)){if(t.isCellRenderer()){let e=t.column.getColDef();if(!(e.showRowGroup||"agGroupCellRenderer"===e.cellRenderer))return;return eT(()=>{let e=t.eGui;return e.querySelector(".ag-group-value")||e.querySelector(".ag-cell-value")||e})}return eT(()=>{let e=t.eGui;return 0===e.children.length?e:e.querySelector(".ag-cell-value")})}})(e,t),n=()=>!o?.isEditing(t)&&(!s||!!r.isTooltipEnabled()&&s());return{shouldDisplayDefault:n,shouldDisplayColumnTooltip:n,shouldDisplayCustomTooltip:i??n}})(o,e,i),l=this.getLocaleTextFunc(),a=null,d=()=>a=(({beans:e,ctrl:t,value:i,displayFunctions:o,translate:r})=>{let{editSvc:s,formula:n,gos:l}=e,{column:a,rowNode:d}=t;if(n?.active&&a.isAllowFormula()){let e=n.getFormulaError(a,d);if(e)return{value:"function"==typeof e.getTranslatedMessage?e.getTranslatedMessage(r):e.message,location:"cellFormula",shouldDisplay:()=>!!n?.getFormulaError(a,d)}}if(!s?.isEditing(t)){let i=u_(e,t,r);if(i)return{value:i,location:"cellEditor",shouldDisplay:()=>!s?.isEditing(t)&&!!u_(e,t,r)}}let{shouldDisplayCustomTooltip:h,shouldDisplayColumnTooltip:u}=o;if(null!=i)return{value:i,location:"cell",shouldDisplay:h};let c=a.getColDef(),g=d.data;if(c.tooltipField&&A(g))return{value:lV(g,c.tooltipField,a.isTooltipFieldContainsDots()),location:"cell",shouldDisplay:u};let p=c.tooltipValueGetter;return p?{value:p(is(l,{location:"cell",colDef:a.getColDef(),column:a,rowIndex:t.cellPosition.rowIndex,node:d,data:d.data,value:t.value,valueFormatted:t.valueFormatted})),location:"cell",shouldDisplay:u}:null})({beans:o,ctrl:e,value:t,displayFunctions:n,translate:l});return this.createTooltipFeature({getGui:()=>e.eGui,getLocation:()=>a?.location??"cell",getTooltipValue:()=>d()?.value,shouldDisplayTooltip:()=>{let e=a??d();return!!e&&(!e.shouldDisplay||e.shouldDisplay())},getAdditionalParams:()=>({column:r,colDef:r.getColDef(),rowIndex:e.cellPosition.rowIndex,node:s,data:s.data,valueFormatted:e.valueFormatted})},o)}setupFullWidthRowTooltip(e,t,i,o){let r=this.beans,s=r.context;e&&t.destroyBean(e,s);let n=this.createTooltipFeature({getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>i,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:o},r);if(n)return t.createBean(n,s)}setupCellEditorTooltip(e,t){let{beans:i}=this,{context:o}=i,r=t.getValidationElement?.(!0)||!t.isPopup?.()&&e.eGui;if(!r)return;let s=this.createTooltipFeature({getGui:()=>r,getTooltipValue:()=>u_(i,e,this.getLocaleTextFunc()),getLocation:()=>"cellEditor",shouldDisplayTooltip:()=>{let{editModelSvc:e}=i,t=e?.getRowValidationModel()?.getRowValidationMap(),o=e?.getCellValidationModel()?.getCellValidationMap(),r=!!t&&t.size>0,s=!!o&&o.size>0;return r||s}},i);if(s)return e.createBean(s,o)}initCol(e){let{colDef:t}=e;e.tooltipEnabled=A(t.tooltipField)||A(t.tooltipValueGetter)||A(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}}],dynamicBeans:{tooltipFeature:uH,highlightTooltipFeature:uz,tooltipStateManager:class extends uN{createTooltipComp(e,t){var i;let o=(i=this.beans.userCompFactory,i.getCompDetails(e.colDef,oL,"agTooltipComponent",e,!0));o?.newAgStackInstance().then(t)}setEventHandlers(e){[this.onColumnMovedEventCallback]=this.addManagedEventListeners({columnMoved:e})}clearEventHandlers(){this.onColumnMovedEventCallback?.(),this.onColumnMovedEventCallback=void 0}}},userComponents:{agTooltipComponent:uW},dependsOn:[uK],css:[".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;white-space:normal;z-index:99999;&:where(.ag-cell-editor-tooltip),&:where(.ag-cell-formula-tooltip){background-color:var(--ag-tooltip-error-background-color);border:var(--ag-tooltip-error-border);color:var(--ag-tooltip-error-text-color);font-weight:500}}.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}"]},uY=class{constructor(e){this.cellValueChanges=e}},uQ=class extends uY{constructor(e,t,i,o){super(e),this.initialRange=t,this.finalRange=i,this.ranges=o}},uZ=class{constructor(e){this.actionStack=[],this.maxStackSize=e||10,this.actionStack=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}},uJ=class extends e2{constructor(){super(...arguments),this.beanName="undoRedo",this.cellValueChanges=[],this.activeCellEdit=null,this.activeRowEdit=null,this.isPasting=!1,this.isRangeInAction=!1,this.batchEditing=!1,this.bulkEditing=!1,this.onCellValueChanged=e=>{var t;let i={column:e.column,rowIndex:e.rowIndex,rowPinned:e.rowPinned},o=null!==this.activeCellEdit&&rb(this.activeCellEdit,i),r=null!==this.activeRowEdit&&(t=this.activeRowEdit,!t&&!i||!!t&&!!i&&t.rowIndex===i.rowIndex&&t.rowPinned==i.rowPinned);if(!(o||r||this.isPasting||this.isRangeInAction))return;let{rowPinned:s,rowIndex:n,column:l,oldValue:a,value:d}=e,h={rowPinned:s,rowIndex:n,columnId:l.getColId(),newValue:d,oldValue:a};this.cellValueChanges.push(h)},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 uZ(i),this.redoStack=new uZ(i),this.addListeners();let o=this.clearStacks.bind(this);this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this),modelUpdated:e=>{e.keepUndoRedoStack||this.clearStacks()},columnPivotModeChanged:o,newColumnsLoaded:o,columnGroupOpened:o,columnRowGroupChanged:o,columnMoved:o,columnPinned:o,columnVisible:o,rowDragEnd:o}),t.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl})}getCurrentUndoStackSize(){return this.undoStack?.getCurrentStackSize()??0}getCurrentRedoStackSize(){return this.redoStack?.getCurrentStackSize()??0}undo(e){let{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"undoStarted",source:e});let r=this.undoRedo(i,o,"initialRange","oldValue","undo");t.dispatchEvent({type:"undoEnded",source:e,operationPerformed:r})}redo(e){let{eventSvc:t,undoStack:i,redoStack:o}=this;t.dispatchEvent({type:"redoStarted",source:e});let r=this.undoRedo(o,i,"finalRange","newValue","redo");t.dispatchEvent({type:"redoEnded",source:e,operationPerformed:r})}undoRedo(e,t,i,o,r){if(!e)return!1;let s=e.pop();return!!s?.cellValueChanges&&(this.processAction(s,e=>e[o],r),s instanceof uQ?this.processRange(s.ranges||[s[i]]):this.processCell(s.cellValueChanges),t.push(s),!0)}processAction(e,t,i){for(let o of e.cellValueChanges){let{rowIndex:e,rowPinned:r,columnId:s}=o,n={rowIndex:e,rowPinned:r},l=ry(this.beans,n);l.displayed&&l.setDataValue(s,t(o),i)}}processRange(e){let t,i=this.beans.rangeSvc;i.removeAllCellRanges(!0),e.forEach((o,r)=>{if(!o)return;let s=o.startRow,n=o.endRow;r===e.length-1&&(t={rowPinned:s.rowPinned,rowIndex:s.rowIndex,columnId:o.startColumn.getColId()},this.setLastFocusedCell(t));let l={rowStartIndex:s.rowIndex,rowStartPinned:s.rowPinned,rowEndIndex:n.rowIndex,rowEndPinned:n.rowPinned,columnStart:o.startColumn,columns:o.columns};i.addCellRange(l)})}processCell(e){let t=e[0],{rowIndex:i,rowPinned:o}=t,r=ry(this.beans,{rowIndex:i,rowPinned:o}),s={rowPinned:t.rowPinned,rowIndex:r.rowIndex,columnId:t.columnId};this.setLastFocusedCell(s)}setLastFocusedCell(e){let{rowIndex:t,columnId:i,rowPinned:o}=e,{colModel:r,focusSvc:s,rangeSvc:n}=this.beans,l=r.getCol(i);if(!l)return;let{scrollFeature:a}=this.gridBodyCtrl;a.ensureIndexVisible(t),a.ensureColumnVisible(l);let d={rowIndex:t,column:l,rowPinned:o};s.setFocusedCell({...d,forceBrowserFocus:!0}),n?.setRangeToCell(d)}addListeners(){this.addManagedEventListeners({rowEditingStarted:e=>{this.activeRowEdit={rowIndex:e.rowIndex,rowPinned:e.rowPinned}},rowEditingStopped:()=>{let e=new uY(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 e=new uY(this.cellValueChanges);this.pushActionsToUndoStack(e)}},pasteStart:()=>{this.isPasting=!0},pasteEnd:()=>{let e=new uY(this.cellValueChanges);this.pushActionsToUndoStack(e),this.isPasting=!1},fillStart:()=>{this.isRangeInAction=!0},fillEnd:e=>{let t=new uQ(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;e=t&&t2(i)?new uQ(this.cellValueChanges,void 0,void 0,[...t.getCellRanges()]):new uY(this.cellValueChanges),this.pushActionsToUndoStack(e),this.isRangeInAction=!1},batchEditingStarted:()=>this.startBigChange("batchEditing"),batchEditingStopped:({changes:e})=>this.stopBigChange("batchEditing",e),bulkEditingStarted:()=>this.startBigChange("bulkEditing"),bulkEditingStopped:({changes:e})=>this.stopBigChange("bulkEditing",e)})}startBigChange(e){this.updateBigChange(e,!0)}updateBigChange(e,t){"bulkEditing"===e?this.bulkEditing=t:this.batchEditing=t}stopBigChange(e,t){if("bulkEditing"===e&&!this.bulkEditing||"batchEditing"===e&&!this.batchEditing||(this.updateBigChange(e,!1),t?.length===0))return;let i=new uY(t??[]);this.pushActionsToUndoStack(i),this.cellValueChanges=[]}pushActionsToUndoStack(e){this.undoStack.push(e),this.cellValueChanges=[],this.redoStack.clear()}},uX={tag:"div",cls:"ag-cell-wrapper ag-cell-edit-wrapper ag-checkbox-edit",children:[{tag:"ag-checkbox",ref:"eEditor",role:"presentation"}]},u0=class extends rZ{constructor(){super(uX,[st]),this.eEditor=null}initialiseEditor(e){let t=e.value??void 0,i=this.eEditor;i.setValue(t),i.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListeners(i,{fieldValueChanged:e=>this.setAriaLabel(e.selected)})}getValue(){return this.eEditor.getValue()}focusIn(){this.eEditor.getFocusableElement().focus()}afterGuiAttached(){this.params.cellStartedEdit&&this.focusIn()}isPopup(){return!1}setAriaLabel(e){let t=this.getLocaleTextFunc(),i=eu(t,e),o=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eEditor.setInputAriaLabel(`${o} (${i})`)}getValidationElement(e){return e?this.params.eGridCell:this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{getValidationErrors:t}=e,i=this.getValue();return t?t({value:i,internalErrors:null,cellEditorParams:e}):null}},u1=class extends r9{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=A(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}setCustomValidity(e){let t=this.eInput,i=e.length>0;t.setCustomValidity(e),i&&t.reportValidity(),et(t,i)}preventDisallowedCharacters(){let e=RegExp(`[${this.config.allowedCharPattern}]`);this.addManagedListeners(this.eInput,{keydown:t=>{sZ(t)&&t.key&&!e.test(t.key)&&t.preventDefault()},paste:t=>{let i=t.clipboardData?.getData("text");i?.split("").some(t=>!e.test(t))&&t.preventDefault()}})}},u2={selector:"AG-INPUT-TEXT-FIELD",component:u1},u5={selector:"AG-INPUT-DATE-FIELD",component:class extends u1{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();let e=o7();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?lM(e??null,!!this.includeTime)??void 0:e;return this.min===t||(this.min=t,eG(this.eInput,"min",t)),this}setMax(e){let t=e instanceof Date?lM(e??null,!!this.includeTime)??void 0:e;return this.max===t||(this.max=t,eG(this.eInput,"max",t)),this}setStep(e){return this.step===e||(this.step=e,eG(this.eInput,"step",e)),this}setIncludeTime(e){return this.includeTime===e||(this.includeTime=e,super.setInputType(e?"datetime-local":"date"),e&&this.setStep(1)),this}getDate(){if(this.eInput.validity.valid)return lB(this.getValue())??void 0}setDate(e,t){this.setValue(lM(e??null,this.includeTime),t)}}},u3=class extends rZ{constructor(e){super(),this.cellEditorInput=e,this.eEditor=null}initialiseEditor(e){let t,{cellEditorInput:i}=this;this.setTemplate({tag:"div",cls:"ag-cell-edit-wrapper",children:[i.getTemplate()]},i.getAgComponents());let{eEditor:o}=this,{cellStartedEdit:r,eventKey:s,suppressPreventDefault:n}=e;o.getInputElement().setAttribute("title",""),i.init(o,e);let l=!0;r?(this.focusAfterAttached=!0,s===i5||s===oe?t="":s&&1===s.length?n?l=!1:t=s:(t=i.getStartValue(),"F2"!==s&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=i.getStartValue()),l&&null!=t&&o.setStartValue(t),this.addGuiEventListener("keydown",e=>{let{key:t}=e;(t===ot||t===oi)&&e.preventDefault()})}afterGuiAttached(){let e=this.getLocaleTextFunc(),t=this.eEditor;if(t.setInputAriaLabel(e("ariaInputEditor","Input Editor")),!this.focusAfterAttached)return;o7()||t.getFocusableElement().focus();let i=t.getInputElement();this.highlightAllOnFocus?i.select():this.cellEditorInput.setCaret?.()}focusIn(){let{eEditor:e}=this,t=e.getFocusableElement(),i=e.getInputElement();t.focus(),i.select()}getValue(){return this.cellEditorInput.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){return this.cellEditorInput.getValidationErrors()}},u4={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},u6=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return u4}getAgComponents(){return[u5]}init(e,t){this.eEditor=e,this.params=t;let{min:i,max:o,step:r,colDef:s}=t;null!=i&&e.setMin(i),null!=o&&e.setMax(o),null!=r&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(s.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let e=this.eEditor.getInputElement().valueAsDate,{params:t}=this,{min:i,max:o,getValidationErrors:r}=t,s=[],n=this.getLocaleTextFunc();if(e instanceof Date&&!isNaN(e.getTime())){if(i){let t=i instanceof Date?i:new Date(i);if(e<t){let e=t.toLocaleDateString();s.push(n("minDateValidation",`Date must be after ${e}`,[e]))}}if(o){let t=o instanceof Date?o:new Date(o);if(e>t){let e=t.toLocaleDateString();s.push(n("maxDateValidation",`Date must be before ${e}`,[e]))}}}return(s.length||(s=null),r)?r({value:e,cellEditorParams:t,internalErrors:s}):s}getValue(){let{eEditor:e,params:t}=this,i=e.getDate();return A(i)||A(t.value)?i??null:t.value}getStartValue(){let{value:e}=this.params;if(e instanceof Date)return lM(e,this.includeTime??!1)}},u8={tag:"ag-input-date-field",ref:"eEditor",cls:"ag-cell-editor"},u7=class{constructor(e,t){this.getDataTypeService=e,this.getLocaleTextFunc=t}getTemplate(){return u8}getAgComponents(){return[u5]}init(e,t){this.eEditor=e,this.params=t;let{min:i,max:o,step:r,colDef:s}=t;null!=i&&e.setMin(i),null!=o&&e.setMax(o),null!=r&&e.setStep(r),this.includeTime=t.includeTime??this.getDataTypeService()?.getDateIncludesTimeFlag?.(s.cellDataType),null!=this.includeTime&&e.setIncludeTime(this.includeTime)}getValidationErrors(){let{eEditor:e,params:t}=this,i=e.getInputElement().value,o=this.formatDate(this.parseDate(i??void 0)),{min:r,max:s,getValidationErrors:n}=t,l=[];if(o){let e=new Date(o),t=this.getLocaleTextFunc();if(r){let i=new Date(r);if(e<i){let e=i.toLocaleDateString();l.push(t("minDateValidation",`Date must be after ${e}`,[e]))}}if(s){let i=new Date(s);if(e>i){let e=i.toLocaleDateString();l.push(t("maxDateValidation",`Date must be before ${e}`,[e]))}}}return(l.length||(l=null),n)?n({value:this.getValue(),cellEditorParams:t,internalErrors:l}):l}getValue(){let{params:e,eEditor:t}=this,i=this.formatDate(t.getDate());return A(i)||A(e.value)?e.parseValue(i??""):e.value}getStartValue(){return lM(this.parseDate(this.params.value??void 0)??null,this.includeTime??!1)}parseDate(e){let t=this.getDataTypeService();return t?t.getDateParserFunction(this.params.column)(e):lB(e)??void 0}formatDate(e){let t=this.getDataTypeService();return t?t.getDateFormatterFunction(this.params.column)(e):lM(e??null,this.includeTime??!1)??void 0}},u9={selector:"AG-INPUT-TEXT-AREA",component:class extends r9{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}}},ce={tag:"div",cls:"ag-large-text",children:[{tag:"ag-input-text-area",ref:"eEditor",cls:"ag-large-text-input"}]},ct=class extends rZ{constructor(){super(ce,[u9]),this.eEditor=null}initialiseEditor(e){let t,{eEditor:i}=this,{cellStartedEdit:o,eventKey:r,maxLength:s,cols:n,rows:l}=e;this.focusAfterAttached=o,i.getInputElement().setAttribute("title",""),i.setMaxLength(s||200).setCols(n||60).setRows(l||10),o?(this.focusAfterAttached=!0,r===i5||r===oe?t="":r&&1===r.length?t=r:(t=this.getStartValue(e),"F2"!==r&&(this.highlightAllOnFocus=!0))):(this.focusAfterAttached=!1,t=this.getStartValue(e)),null!=t&&i.setValue(t,!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()}getStartValue(e){let{value:t}=e;return t?.toString()??t}onKeyDown(e){let t=e.key;(t===i6||t===i8||t===i7||t===i9||e.shiftKey&&t===i3)&&e.stopPropagation()}afterGuiAttached(){let{eEditor:e,focusAfterAttached:t,highlightAllOnFocus:i}=this,o=this.getLocaleTextFunc();e.setInputAriaLabel(o("ariaInputEditor","Input Editor")),t&&(e.getFocusableElement().focus(),i&&e.getInputElement().select())}getValue(){let{eEditor:e,params:t}=this,{value:i}=t,o=e.getValue();return A(o)||A(i)?t.parseValue(o):i}getValidationElement(){return this.eEditor.getInputElement()}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getLocaleTextFunc(),r=this.getValue(),s=[];return("string"==typeof r&&null!=t&&r.length>t&&s.push(o("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),s.length||(s=null),i)?i({value:r,internalErrors:s,cellEditorParams:e}):s}},ci=class extends u1{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();let e=this.eInput;this.addManagedListeners(e,{blur:()=>{let t=Number.parseFloat(e.value),i=isNaN(t)?"":this.normalizeValue(t.toString());this.value!==i&&this.setValue(i)},wheel:this.onWheel.bind(this)}),e.step="any";let{precision:t,min:i,max:o,step:r}=this.config;"number"==typeof t&&this.setPrecision(t),"number"==typeof i&&this.setMin(i),"number"==typeof o&&this.setMax(o),"number"==typeof r&&this.setStep(r)}onWheel(e){$(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){return""===e?"":(null!=this.precision&&(e=this.adjustPrecision(e)),e)}adjustPrecision(e,t){let i=this.precision;if(null==i)return e;if(t)return Number.parseFloat(Number.parseFloat(e).toFixed(i)).toString();let o=String(e).split(".");if(o.length>1){if(o[1].length<=i)return e;else if(i>0)return`${o[0]}.${o[1].slice(0,i)}`}return o[0]}setMin(e){return this.min===e||(this.min=e,eG(this.eInput,"min",e)),this}setMax(e){return this.max===e||(this.max=e,eG(this.eInput,"max",e)),this}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e||(this.step=e,eG(this.eInput,"step",e)),this}setValue(e,t){return this.setValueOrInputValue(e=>super.setValue(e,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(e=>super.setValue(e,!0),e=>{this.eInput.value=e},e)}setValueOrInputValue(e,t,i){if(A(i)){let o=this.isScientificNotation(i);if(o&&this.eInput.validity.valid)return e(i);if(!o){i=this.adjustPrecision(i);let e=this.normalizeValue(i);o=i!=e}if(o)return t(i)}return e(i)}getValue(e=!1){let t=this.eInput;if(!t.validity.valid&&!e)return;let i=t.value;return this.isScientificNotation(i)?this.adjustPrecision(i,!0):super.getValue()}isScientificNotation(e){return"string"==typeof e&&e.includes("e")}},co={selector:"AG-INPUT-NUMBER-FIELD",component:ci},cr={tag:"ag-input-number-field",ref:"eEditor",cls:"ag-cell-editor"},cs=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return cr}getAgComponents(){return[co]}init(e,t){this.eEditor=e,this.params=t;let{max:i,min:o,precision:r,step:s}=t;null!=i&&e.setMax(i),null!=o&&e.setMin(o),null!=r&&e.setPrecision(r),null!=s&&e.setStep(s);let n=e.getInputElement();t.preventStepping?e.addManagedElementListeners(n,{keydown:this.preventStepping}):t.showStepperButtons&&n.classList.add("ag-number-field-input-stepper")}getValidationErrors(){let{params:e}=this,{min:t,max:i,getValidationErrors:o}=e,r=this.eEditor.getInputElement().valueAsNumber,s=this.getLocaleTextFunc(),n=[];return("number"==typeof r&&(null!=t&&r<t&&n.push(s("minValueValidation",`Must be greater than or equal to ${t}.`,[String(t)])),null!=i&&r>i&&n.push(s("maxValueValidation",`Must be less than or equal to ${i}.`,[String(i)]))),n.length||(n=null),o)?o({value:r,cellEditorParams:e,internalErrors:n}):n}preventStepping(e){(e.key===i8||e.key===i9)&&e.preventDefault()}getValue(){let{eEditor:e,params:t}=this,i=e.getValue();if(!A(i)&&!A(t.value))return t.value;let o=t.parseValue(i);if(null==o)return o;if("string"==typeof o){if(""===o)return null;o=Number(o)}return isNaN(o)?null:o}getStartValue(){return this.params.value}setCaret(){o7()&&this.eEditor.getInputElement().focus({preventScroll:!0})}},cn=class extends om{constructor(e,t,i){super(((e,t)=>({tag:"div",cls:`ag-list-item ag-${e}-list-item`,attrs:{role:"option"},children:[{tag:"span",cls:`ag-list-item-text ag-${e}-list-item-text`,ref:"eText",children:t}]}))(e,t)),this.label=t,this.value=i,this.eText=null}postConstruct(){this.createTooltip(),this.addEventListeners()}setHighlighted(e){let t=this.getGui();t.classList.toggle("ag-active-item",e),eh(t,e),this.dispatchLocalEvent({type:"itemHighlighted",highlighted:e})}getHeight(){return this.getGui().clientHeight}setIndex(e,t){let i=this.getGui();Q(i,"posinset",e),Q(i,"setsize",t)}createTooltip(){let e=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("highlightTooltipFeature",!1,{getTooltipValue:()=>this.label,getGui:()=>this.getGui(),getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>ek(this.eText)},this));e&&(this.tooltipFeature=e)}addEventListeners(){let e=this.getParentComponent();e&&(this.addGuiEventListener("mouseover",()=>{e.highlightItem(this)}),this.addGuiEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),e.setValue(this.value)}))}},cl=class extends om{constructor(e="default"){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.options=[],this.listItems=[],this.highlightedItem=null,this.registerCSS(".ag-list-item{align-items:center;display:flex;height:var(--ag-list-item-height);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}")}postConstruct(){let e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()})}handleKeyDown(e){let t=e.key;switch(t){case i3:if(this.highlightedItem){let e=this.listItems.indexOf(this.highlightedItem);this.setValueByIndex(e)}else this.setValue(this.getValue());break;case i9:case i8:e.preventDefault(),this.navigate(t);break;case oi:case ot:case oo:case"End":e.preventDefault(),this.navigateToPage(t)}}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){let{value:t,text:i}=e,o=i??t;return this.options.push({value:t,text:o}),this.renderOption(t,o),this.updateIndices(),this}clearOptions(){for(let e of(this.options=[],this.reset(!0),this.listItems))e.destroy();eP(this.getGui()),this.listItems=[],this.refreshAriaRole()}updateOptions(e){let t=this.options!==e;return t&&(this.clearOptions(),this.addOptions(e)),t}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(t),this;let i=this.options.findIndex(t=>t.value===e);if(-1!==i){let e=this.options[i];this.value=e.value,this.displayValue=e.text,this.highlightItem(this.listItems[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(e=>e.value===this.value);-1!==e&&this.highlightItem(this.listItems[e])}highlightItem(e){let t=e.getGui();if(!eE(t))return;this.clearHighlighted(),e.setHighlighted(!0),this.highlightedItem=e;let{scrollTop:i,clientHeight:o}=this.getGui(),{offsetTop:r,offsetHeight:s}=t;(r+s>i+o||r<i)&&t.scrollIntoView({block:"nearest"})}hideItemTooltip(){this.highlightedItem?.tooltipFeature?.attemptToHideTooltip()}destroy(){this.hideItemTooltip(),super.destroy()}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}clearHighlighted(){this.highlightedItem?.setHighlighted(!1),this.highlightedItem=null}renderOption(e,t){let i=new cn(this.cssIdentifier,t,e);i.setParentComponent(this);let o=this.createManagedBean(i);this.listItems.push(o),this.getGui().appendChild(o.getGui())}navigate(e){let t,i=e===i9,{listItems:o,highlightedItem:r}=this;if(r){let e=o.indexOf(r)+(i?1:-1);e=Math.min(Math.max(e,0),o.length-1),t=o[e]}else t=i?o[0]:x(o);this.highlightItem(t)}navigateToPage(e){let{listItems:t,highlightedItem:i}=this;if(!i||0===t.length)return;let o=t.indexOf(i),r=this.options.length-1,s=t[0].getHeight(),n=Math.floor(this.getGui().clientHeight/s),l=-1;e===oo?l=0:"End"===e?l=r:e===oi?l=Math.min(o+n,r):e===ot&&(l=Math.max(o-n,0)),-1!==l&&this.highlightItem(t[l])}refreshAriaRole(){J(this.getGui(),0===this.options.length?"presentation":"listbox")}updateIndices(){this.refreshAriaRole();let e=this.listItems,t=e.length;e.forEach((e,i)=>{e.setIndex(i+1,t)})}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},ca={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"}}]}]},cd=class extends r7{constructor(e){if(super(e,e?.template||ca,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=null,this.eWrapper=null,this.eDisplayField=null,this.eIcon=null,this.registerCSS(".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:where(.invalid){background-color:var(--ag-input-invalid-background-color);border:var(--ag-input-invalid-border);color:var(--ag-input-invalid-text-color)}}.ag-picker-field-wrapper:where(.ag-picker-has-focus),.ag-picker-field-wrapper:where(:focus-within){background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow);&:where(.invalid){box-shadow:var(--ag-focus-error-shadow)}}.ag-picker-field-wrapper:disabled{opacity:.5}"),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:i,variableWidth:o,minPickerWidth:r,maxPickerWidth:s}=e;null!=t&&(this.pickerGap=t),this.variableWidth=!!o,null!=i&&this.setPickerMaxHeight(i),null!=r&&this.setPickerMinWidth(r),null!=s&&this.setPickerMaxWidth(s)}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:o}=this.config;if(i){let e=this.beans.iconSvc.createIconNoSpan(i);e&&this.eIcon.appendChild(e)}null!=o&&this.setInputWidth(o)}setupAria(){let e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),eo(e,!1),this.ariaRole&&J(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 i8:case i9:case i3:case" ":e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case i4:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}}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:o,modalPicker:r=!0},maxPickerHeight:s,minPickerWidth:n,maxPickerWidth:l,variableWidth:a,beans:d,eWrapper:h}=this,u={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{let e=j(d);this.beforeHidePicker(),e&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(i,o),anchorToElement:h};e.style.position="absolute";let c=d.popupSvc,g=c.addPopup(u);a?(n&&(e.style.minWidth=n),e.style.width=eB(ey(h)),l&&(e.style.maxWidth=l)):eA(e,l??ey(h));let p=s??`${ew(c.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:o},eWrapper:r,pickerComponent:s}=this,n=o.get("enableRtl")?"right":"left";i.positionPopupByComponent({type:t,eventSource:r,ePopup:s.getGui(),position:"under",alignSide:n,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;eo(this.getAriaElement(),e);let t=this.eWrapper.classList;t.toggle("ag-picker-expanded",e),t.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&&(this.hideCurrentPicker(),this.dispatchLocalEvent({type:"pickerHidden"}))}setInputWidth(e){return eA(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return"number"==typeof e&&(e=`${e}px`),this.minPickerWidth=null==e?void 0:e,this}setPickerMaxWidth(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerWidth=null==e?void 0:e,this}setPickerMaxHeight(e){return"number"==typeof e&&(e=`${e}px`),this.maxPickerHeight=null==e?void 0:e,this}destroy(){this.hidePicker(),super.destroy()}},ch=class extends cd{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}.ag-select:where(:not(.ag-cell-editor,.ag-label-align-top)){min-height:var(--ag-list-item-height)}:where(.ag-select){.ag-picker-field-wrapper{cursor:default;padding-left:var(--ag-spacing);padding-right:var(--ag-spacing)}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:where(.ag-ltr) .ag-select-list-item{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-select-list-item{padding-right:var(--ag-spacing)}.ag-select-list-item-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}")}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:eT(()=>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;null!=e&&this.addOptions(e),null!=t&&this.setValue(t,!0),i&&null==t&&(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 cl("select"));this.listComponent=e,e.setParentComponent(this);let t=e.getAriaElement(),i=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",i);var o=this.getAriaElement();Y(o,"controls",t.id),ee(t,o.id),e.addManagedElementListeners(e.getGui(),{mousedown:e=>{e?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}beforeHidePicker(){this.listComponent?.hideItemTooltip(),super.beforeHidePicker()}onKeyDown(e){let{key:t}=e;switch("Tab"===t&&this.hidePicker(),t){case i3:case i8:case i9:case ot:case oi:case oo:case"End":e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case i4:super.onKeyDown(e);break;case" ":this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e)}}showPicker(){let e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){for(let t of e)this.addOption(t);return this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}updateOptions(e){return this.listComponent?.updateOptions(e)&&this.setValue(void 0,!0),this}setValue(e,t,i){let{listComponent:o,config:{placeholder:r},eDisplayField:s,tooltipFeature:n}=this;if(this.value===e||!o||(i||o.setValue(e,!0),o.getValue()===this.getValue()))return this;let l=o.getDisplayValue();return null==l&&r&&(l=r),s.textContent=l,n?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},cu={selector:"AG-SELECT",component:ch},cc={tag:"div",cls:"ag-cell-edit-wrapper",children:[{tag:"ag-select",ref:"eEditor",cls:"ag-cell-editor"}]},cg=class extends rZ{constructor(){super(cc,[cu]),this.eEditor=null,this.startedByEnter=!1}wireBeans(e){this.valueSvc=e.valueSvc}initialiseEditor(e){this.focusAfterAttached=e.cellStartedEdit;let{eEditor:t,valueSvc:i,gos:o}=this,{values:r,value:s,eventKey:n}=e;if(I(r))return void tM(58);this.startedByEnter=null!=n&&n===i3;let l=!1;r.forEach(o=>{let r={value:o},n=i.formatValue(e.column,null,o);r.text=null!=n?n:o,t.addOption(r),l=l||s===o}),l?t.setValue(e.value,!0):e.values.length&&t.setValue(e.values[0],!0);let{valueListGap:a,valueListMaxWidth:d,valueListMaxHeight:h}=e;null!=a&&t.setPickerGap(a),null!=h&&t.setPickerMaxHeight(h),null!=d&&t.setPickerMaxWidth(d),"fullRow"!==o.get("editType")&&this.addManagedListeners(this.eEditor,{selectedItem:()=>e.stopEditing()})}afterGuiAttached(){this.focusAfterAttached&&this.eEditor.getFocusableElement().focus(),this.startedByEnter&&setTimeout(()=>{this.isAlive()&&this.eEditor.showPicker()})}focusIn(){this.eEditor.getFocusableElement().focus()}getValue(){return this.eEditor.getValue()}isPopup(){return!1}getValidationElement(){return this.eEditor.getAriaElement()}getValidationErrors(){let{params:e}=this,{values:t,getValidationErrors:i}=e,o=this.getValue(),r=[];if(t&&!t.includes(o)){let e=this.getLocaleTextFunc();r.push(e("invalidSelectionValidation","Invalid selection."))}else r=null;return i?i({value:o,internalErrors:r,cellEditorParams:e}):r}},cp={tag:"ag-input-text-field",ref:"eEditor",cls:"ag-cell-editor"},cf=class{constructor(e){this.getLocaleTextFunc=e}getTemplate(){return cp}getAgComponents(){return[u2]}init(e,t){this.eEditor=e,this.params=t;let i=t.maxLength;null!=i&&e.setMaxLength(i)}getValidationErrors(){let{params:e}=this,{maxLength:t,getValidationErrors:i}=e,o=this.getValue(),r=this.getLocaleTextFunc(),s=[];return(null!=t&&"string"==typeof o&&o.length>t&&s.push(r("maxLengthValidation",`Must be ${t} characters or fewer.`,[String(t)])),s.length||(s=null),i)?i({value:o,cellEditorParams:e,internalErrors:s}):s}getValue(){let{eEditor:e,params:t}=this,i=e.getValue();return A(i)||A(t.value)?t.parseValue(i):t.value}getStartValue(){let e=this.params;return e.useFormatter||e.column.getColDef().refData?e.formatValue(e.value):e.value}setCaret(){o7()&&this.eEditor.getInputElement().focus({preventScroll:!0});let e=this.eEditor,t=e.getValue(),i=A(t)&&t.length||0;i&&e.getInputElement().setSelectionRange(i,i)}},cm=class extends u3{constructor(){super(new cf(()=>this.getLocaleTextFunc()))}},cC={tag:"div",cls:"ag-popup-editor",attrs:{tabindex:"-1"}},cw=class extends rQ{constructor(e){super(cC),this.params=e}postConstruct(){tU(this.gos,this.getGui(),"popupEditorWrapper",!0),this.addKeyDownListener()}addKeyDownListener(){let e=this.getGui(),t=this.params,i=e=>{s5(this.gos,e,t.node,t.column,!0)||t.onKeyDown(e)};this.addManagedElementListeners(e,{keydown:i})}};function cv(e,t){return e.editModelSvc?.hasEdits(t,{withOpenEditor:!0})??!1}function cb(e,t){let i=t.column,o=t.rowNode,r=i.getColDef();if(!o)return cv(e,t);let s=r.editable;if(o.group){let s=r.groupRowEditable;if(null!=s)return!!i.isColumnFunc(o,s)||cv(e,t)}return!!i.isColumnFunc(o,s)||cv(e,t)}var cy=(e,t=!1)=>{if(void 0!==e)return dY(e)||t&&"editing"===e.state};function cS(e,t,i=!1){return cy(e.editModelSvc?.getEdit(t),i)}var cR=(e,t,i)=>{if(e)for(let o=0,r=e.length;o<r;++o){let r=e[o];if(r.data&&(cy(t?.getEdit({rowNode:r,column:i}))||cy(t?.getEdit({rowNode:r.pinnedSibling,column:i})))||cR(r.childrenAfterGroup,t,i))return!0}};function cF(e,t){let{column:i,rowNode:o}=t;return(!e.gos.get("groupTotalRow")||!!o?.footer)&&cR(o?.childrenAfterGroup,e.editModelSvc,i)}function cP(e,{rowNode:t,column:i}){if(t=t.pinnedSibling)return cy(e.editModelSvc?.getEdit({rowNode:t,column:i}))}var cx=class extends e2{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}setComp(e){this.cellComp=e,this.applyCellStyles()}applyCellStyles(){let{cellCtrl:e,editSvc:t,beans:i}=this;if(t?.isBatchEditing()&&t.isEditing()){let t=cS(i,e)||cF(i,e)||cP(i,e);this.applyBatchingStyle(t)}else this.applyBatchingStyle(!1);let o=!!this.editModelSvc?.getCellValidationModel().hasCellValidation(this.cellCtrl);this.cellComp.toggleCss("ag-cell-editing-error",o)}applyBatchingStyle(e){this.cellComp.toggleCss("ag-cell-editing",e??!1),this.cellComp.toggleCss("ag-cell-batch-edit",(e&&this.editSvc?.isBatchEditing())??!1)}},cD=class extends e2{constructor(e,t){super(),this.rowCtrl=e,this.beans=t,this.gos=t.gos,this.editSvc=t.editSvc,this.editModelSvc=t.editModelSvc}applyRowStyles(){let{rowCtrl:e,editModelSvc:t,beans:i}=this,o=e.rowNode,r=t?.getEditRow(o),s=this.editModelSvc?.getRowValidationModel().hasRowValidation({rowNode:o});if(!r&&o.pinnedSibling&&(o=o.pinnedSibling,r=t?.getEditRow(o)),r){let e=Array.from(r.keys()).some(e=>{let t={rowNode:o,column:e};return cS(i,t,!0)||cF(i,t)||cP(i,t)});this.applyStyle(s,e);return}this.applyStyle(s)}applyStyle(e=!1,t=!1){let i=!!this.editSvc?.isBatchEditing(),o="fullRow"===this.gos.get("editType");this.rowCtrl?.forEachGui(void 0,({rowComp:r})=>{r.toggleCss("ag-row-editing",o&&t),r.toggleCss("ag-row-batch-edit",o&&t&&i),r.toggleCss("ag-row-inline-editing",t),r.toggleCss("ag-row-not-inline-editing",!t),r.toggleCss("ag-row-editing-invalid",o&&t&&e)})}},cE=new Set(["undo","redo","paste","bulk","rangeSvc"]),cM=new Set(["ui","api"]),cT={paste:"api",rangeSvc:"api",fillHandle:"api",cellClear:"api",bulk:"api"},ck=new Set(Object.keys(cT)),cA=new Set(["paste","rangeSvc","cellClear","redo","undo"]),cI={cancel:!0,source:"api"},cL={cancel:!1,source:"api"},cB={checkSiblings:!0},cV={force:!0,suppressFlash:!0},cG=class extends e2{constructor(){super(...arguments),this.beanName="editSvc",this.committing=!1,this.batch=!1,this.batchStartDispatched=!1,this.stopping=!1,this.rangeSelectionWhileEditing=0}postConstruct(){let{beans:e}=this;this.model=e.editModelSvc,this.valueSvc=e.valueSvc,this.rangeSvc=e.rangeSvc,this.addManagedPropertyListener("editType",({currentValue:e})=>{this.stopEditing(void 0,cI),this.createStrategy(e)});let t=()=>{let t=new Set(e.colModel.getCols()),i=new Set(e.editModelSvc.getEditMap(!0).keys());(({editModelSvc:e},t,i)=>{for(let o of t)e?.getEditRow(o)?.forEach((t,r)=>!i.has(r)&&e.removeEdits({rowNode:o,column:r}))})(e,(({rowModel:e,pinnedRowModel:t,editModelSvc:i},o)=>{let r=new Set;for(let s of(e.forEachNode(e=>o.has(e)&&r.add(e)),t?.forEachPinnedRow("top",e=>o.has(e)&&r.add(e)),t?.forEachPinnedRow("bottom",e=>o.has(e)&&r.add(e)),o))r.has(s)||i.removeEdits({rowNode:s});return r})(e,i),t)},i=()=>{let t=this.model.getCellValidationModel().getCellValidationMap().size>0,i=this.model.getRowValidationModel().getRowValidationMap().size>0;return t||i?this.stopEditing(void 0,cI):this.isEditing()&&(this.batch?d3(e,this.model.getEditPositions()):this.stopEditing(void 0,cL)),!1};this.addManagedEventListeners({columnPinned:t,columnVisible:t,columnRowGroupChanged:t,rowExpansionStateChanged:t,pinnedRowsChanged:t,displayedRowsChanged:t,sortChanged:i,filterChanged:i,cellFocused:this.onCellFocused.bind(this)})}isBatchEditing(){return this.batch}startBatchEditing(){this.batch||(this.batch=!0,this.batchStartDispatched=!1,this.stopEditing(void 0,cI))}stopBatchEditing(e){this.batch&&(e&&this.stopEditing(void 0,e),this.batchStartDispatched&&this.dispatchBatchStopped(new Map,!1),this.batch=!1,this.batchStartDispatched=!1)}ensureBatchStarted(){this.batch&&!this.batchStartDispatched&&(this.batchStartDispatched=!0,this.dispatchBatchEvent("batchEditingStarted",new Map))}createStrategy(e){let{beans:t,gos:i,strategy:o}=this,r=cH(i,e);if(o){if(o.beanName===r)return o;this.destroyStrategy()}return this.strategy=this.createOptionalManagedBean(t.registry.createDynamicBean(r,!0))}destroyStrategy(){this.strategy&&(this.strategy.destroy(),this.strategy=this.destroyBean(this.strategy))}shouldStartEditing(e,t,i,o="ui"){let r=function(e,{column:t},i,o,r="ui"){var s,n;if(i instanceof KeyboardEvent&&("Tab"===i.key||i.key===i3||"F2"===i.key||i.key===i5&&o))return!0;if(i?.shiftKey&&e.rangeSvc?.getCellRanges().length!=0)return!1;let l=t?.getColDef(),a=(s=e.gos,n=l,!0===s.get("suppressClickEdit")?0:!0===s.get("singleClickEdit")||n?.singleClickEdit?1:2),d=i?.type;return"click"===d&&i?.detail===1&&1===a||"dblclick"===d&&i?.detail===2&&2===a||"api"===r&&!!o}(this.beans,e,t,i,o);return r&&(this.strategy??(this.strategy=this.createStrategy())),r}shouldStopEditing(e,t,i="ui"){return this.strategy?.shouldStop(e,t,i)??null}shouldCancelEditing(e,t,i="ui"){return this.strategy?.shouldCancel(e,t,i)??null}validateEdit(){var e=this.beans;d9(e,!0);let t=e.editModelSvc?.getCellValidationModel().getCellValidationMap();if(!t)return null;let i=[];return t.forEach((e,t)=>{e.forEach(({errorMessages:e},o)=>{i.push({column:o,rowIndex:t.rowIndex,rowPinned:t.rowPinned,messages:e??null})})}),i}isEditing(e,t){return this.model.hasEdits(e??void 0,t??cB)}isRowEditing(e,t){return!!e&&this.model.hasRowEdits(e,t)}enableRangeSelectionWhileEditing(){this.beans.rangeSvc&&this.gos.get("cellSelection")&&this.rangeSelectionWhileEditing++}disableRangeSelectionWhileEditing(){this.rangeSelectionWhileEditing=Math.max(0,this.rangeSelectionWhileEditing-1)}isRangeSelectionEnabledWhileEditing(){return this.rangeSelectionWhileEditing>0}startEditing(e,t){let{startedEdit:i=!0,event:o=null,source:r="ui",ignoreEventKey:s=!1,silent:n}=t;if(this.strategy??(this.strategy=this.createStrategy()),!(t.editable??this.isCellEditable(e,"api")))return;let l=dK(this.beans,e);if(l&&!l.comp){t.editable=void 0,l.onCompAttachedFuncs.push(()=>this.startEditing(e,t));return}let a=this.shouldStartEditing(e,o,i,r);if(!1===a&&"api"!==r){this.isEditing(e)&&this.stopEditing();return}!this.batch&&this.shouldStopEditing(e,void 0,r)&&!t.continueEditing&&this.stopEditing(void 0,{source:r}),a&&this.ensureBatchStarted(),this.strategy.start({position:e,event:o,source:r,ignoreEventKey:s,startedEdit:i,silent:n})}stopEditing(e,t){let i=this.prepareStopContext(e,t);if(!i)return!1;this.stopping=!0;let o=!1,{edits:r}=i;try{let s=this.processStopRequest(i);return o||(o=s.res),r=s.edits,this.finishStopEditing({...i,edits:r,params:t,position:e,res:o}),o}finally{this.rangeSelectionWhileEditing=0,this.stopping=!1}}prepareStopContext(e,t){let{event:i=null,cancel:o=!1,source:r="ui",forceCancel:s=!1,forceStop:n=!1,commit:l=!1}=t||{};if(ck.has(r)&&this.batch)return this.bulkRefresh(e),null;let a=this.committing?cT[r]:r;if(!(this.committing||this.isEditing(e)||this.batch&&this.model.hasEdits(e,cB))||!this.strategy||this.stopping)return null;let d=dK(this.beans,e);d&&(d.onEditorAttachedFuncs=[]);let h=!o&&(!!this.shouldStopEditing(e,i,a)||(this.committing||"paste"===r)&&!this.batch)||n,u=o&&!!this.shouldCancelEditing(e,i,a)||s;return{cancel:o,cellCtrl:d,edits:this.model.getEditMap(!0),event:i??null,forceCancel:s,forceStop:n,commit:l,position:e,source:r,treatAsSource:a,willCancel:u,willStop:h}}processStopRequest(e){let{event:t,position:i,willCancel:o,willStop:r}=e;return r||o?this.handleStopOrCancel(e):this.shouldHandleMidBatchKey(t,i)?{res:!1,edits:this.handleMidBatchKey(t,i,e)}:(d1(this.beans,{persist:!0}),this.batch&&this.strategy?.cleanupEditors(i),{res:!1,edits:this.model.getEditMap()})}handleStopOrCancel(e){let{beans:t,model:i}=this,{cancel:o,commit:r,edits:s,event:n,source:l,willCancel:a,willStop:d}=e;d1(t,{persist:!this.batch||!a,isCancelling:a||o,isStopping:d});let h=i.getEditMap(),u=a||this.batch&&!r?[]:this.processEdits(h,l);for(let t of(o?this.strategy?.stopCancelled(e.forceCancel):this.strategy?.stopCommitted(n,r),this.clearValidationIfNoOpenEditors(),u))i.clearEditValue(t);for(let e of(this.bulkRefresh(void 0,s),i.getEditPositions(h))){let i=dK(t,e),o=dY(e);i?.refreshCell({force:!0,suppressFlash:!o})}return{res:d,edits:h}}shouldHandleMidBatchKey(e,t){return e instanceof KeyboardEvent&&this.batch&&!!this.strategy?.midBatchInputsAllowed(t)&&this.isEditing(t,{withOpenEditor:!0})}handleMidBatchKey(e,t,i){let{beans:o,model:r}=this,{cellCtrl:s,edits:n}=i,{key:l}=e,a=l===i3,d=l===i4,h="Tab"===l;if(a||h||d){if(a||h)d1(o,{persist:!0});else if(d&&s){let{rowNode:e,column:t}=s;if(this.batch&&e&&t){let i={rowNode:e,column:t};d3(o,[i],{silent:!0}),this.model.stop(i,!0,!0),dK(o,i)?.refreshCell(cV)}else this.revertSingleCellEdit(s)}return this.batch?this.strategy?.cleanupEditors():d3(o,r.getEditPositions(),{event:e,cancel:d}),e.preventDefault(),this.bulkRefresh(t,n,{suppressFlash:!0}),r.getEditMap()}return n}finishStopEditing({cellCtrl:e,edits:t,params:i,position:o,res:r,commit:s,forceCancel:n,willCancel:l,willStop:a}){let d=this.beans;r&&o&&(!this.batch||s)&&this.model.removeEdits(o),this.navigateAfterEdit(i,e?.cellPosition),dX(d),this.clearValidationIfNoOpenEditors(),this.bulkRefresh();let{rowRenderer:h,formula:u}=d;if(l&&h.refreshRows({rowNodes:Array.from(t.keys())}),this.batch){u?u.refreshFormulas(!0):h.refreshRows({suppressFlash:!0,force:!0});let e=a&&s;(e||l&&n)&&this.dispatchBatchStopped(t,e)}}dispatchBatchStopped(e,t){let i;t&&(i=function(e){let t=new Map;for(let[i,o]of e){let e=new Map;for(let[t,i]of o)dY(i)&&e.set(t,i);e.size>0&&t.set(i,e)}return t}(e)).size>0&&this.ensureBatchStarted(),this.batchStartDispatched&&(this.batchStartDispatched=!1,this.dispatchBatchEvent("batchEditingStopped",i??new Map))}clearValidationIfNoOpenEditors(){this.model.hasEdits(void 0,{withOpenEditor:!0})||(this.model.getCellValidationModel().clearCellValidationMap(),this.model.getRowValidationModel().clearRowValidationMap())}navigateAfterEdit(e,t){if(!e||!t)return;let{event:i,suppressNavigateAfterEdit:o}=e;if(!(i instanceof KeyboardEvent)||o)return;let{key:r,shiftKey:s}=i,n=this.gos.get("enterNavigatesVerticallyAfterEdit");r===i3&&n&&this.beans.navigation?.navigateToNextCell(null,s?i8:i9,t,!1)}processEdits(e,t){let i=Array.from(e.keys()),o=this.model.getCellValidationModel().getCellValidationMap().size>0||this.model.getRowValidationModel().getRowValidationMap().size>0,r=[];for(let s of i){let i=e.get(s);for(let e of i.keys()){let n=i.get(e),l={rowNode:s,column:e};if(dY(n)&&!o){let i=dK(this.beans,l);this.setNodeDataValue(s,e,n.pendingValue,i,t)||r.push(l)}}}return r}setNodeDataValue(e,t,i,o,r="edit"){let s=cM.has(r)?"edit":r;o&&(o.suppressRefreshCell=!0),this.committing=!0;try{return e.setDataValue(t,i,s)}finally{this.committing=!1,o&&(o.suppressRefreshCell=!1)}}syncEditAfterCommit(e,t){let i=this.model.getEdit(e);i&&"editing"!==i.state&&(t?this.beans.editModelSvc?.setEdit(e,{sourceValue:this.valueSvc.getValue(e.column,e.rowNode,"data")}):this.model.clearEditValue(e))}setEditMap(e,t){var i;this.strategy??(this.strategy=this.createStrategy()),this.strategy?.setEditMap(e,t),this.bulkRefresh();let o=cV;t?.forceRefreshOfEditCellsOnly&&(o={...{rowNodes:(i=e)?Array.from(i.keys()):void 0,columns:i?[...new Set(Array.from(i.values()).flatMap(e=>Array.from(e.keys())))]:void 0},...cV}),this.beans.rowRenderer.refreshCells(o)}dispatchEditValuesChanged({rowNode:e,column:t},i={}){if(!e||!t||!i)return;let{pendingValue:o,sourceValue:r}=i,{rowIndex:s,rowPinned:n,data:l}=e;this.beans.eventSvc.dispatchEvent({type:"cellEditValuesChanged",node:e,rowIndex:s,rowPinned:n,column:t,source:"api",data:l,newValue:o,oldValue:r,value:o,colDef:t.getColDef()})}bulkRefresh(e={},t,i={}){let{beans:o,gos:r}=this,{editModelSvc:s,rowModel:n}=o;tL(r,n)&&(e.rowNode&&e.column?this.refCell(e,this.model.getEdit(e),i):t&&s?.getEditMap(!1)?.forEach((e,t)=>{for(let o of e.keys())this.refCell({rowNode:t,column:o},e.get(o),i)}))}refCell({rowNode:e,column:t},i,o={}){let{beans:r,gos:s}=this,n=new Set([e]),l=new Set,a=e.pinnedSibling;a&&n.add(a);let d=e.sibling;d&&l.add(d);let h=e.parent;for(;h;)h.sibling?.footer&&s.get("groupTotalRow")||!h.parent&&h.sibling&&s.get("grandTotalRow")?l.add(h.sibling):l.add(h),h=h.parent;for(let e of n)this.dispatchEditValuesChanged({rowNode:e,column:t},i);for(let e of n)dK(r,{rowNode:e,column:t})?.refreshCell(o);for(let e of l)dK(r,{rowNode:e,column:t})?.refreshCell(o)}stopAllEditing(e=!1,t="ui"){this.isEditing()&&this.stopEditing(void 0,{cancel:e,source:t})}isCellEditable(e,t="ui"){let{gos:i,beans:o}=this,r=e.rowNode,s=e.column.getColDef();if(r.group&&null==s.groupRowEditable){if(i.get("treeData")){if(!r.data&&!i.get("enableGroupEdit"))return!1}else if(!i.get("enableGroupEdit"))return!1}let n="fullRow"===cH(i)?function(e,t,i="ui"){let o=cb(e,t);if(o||"ui"===i)return o;let{rowNode:r,column:s}=t;for(let t of e.colModel.getCols())if(t!==s&&cb(e,{rowNode:r,column:t}))return!0;return!1}(o,e,t):cb(o,e);return n&&(this.strategy??(this.strategy=this.createStrategy())),n}cellEditingInvalidCommitBlocks(){return"block"===this.gos.get("invalidEditValueMode")}checkNavWithValidation(e,t,i=!0){if(this.hasValidationErrors(e)){let o=dK(this.beans,e);return this.cellEditingInvalidCommitBlocks()?(t?.preventDefault?.(),i&&(o&&!o.hasBrowserFocus()&&o.focusCell(),o?.comp?.getCellEditor()?.focusIn?.()),"block-stop"):(o&&this.revertSingleCellEdit(o),"revert-continue")}return"continue"}revertSingleCellEdit(e,t=!1){let i=dK(this.beans,e);!i?.comp?.getCellEditor()||(d3(this.beans,[e],{silent:!0}),this.model.clearEditValue(e),dQ(this.beans,e,{silent:!0}),d9(this.beans),i?.refreshCell(cV),t&&(i?.focusCell(),i?.comp?.getCellEditor()?.focusIn?.()))}hasValidationErrors(e){d9(this.beans);let t=dK(this.beans,e);t&&(t.refreshCell(cV),t.rowCtrl.rowEditStyleFeature?.applyRowStyles());let i=!1;return e?.rowNode?(i||(i=this.model.getRowValidationModel().hasRowValidation({rowNode:e.rowNode})),e.column&&(i||(i=this.model.getCellValidationModel().hasCellValidation({rowNode:e.rowNode,column:e.column})))):(i||(i=this.model.getCellValidationModel().getCellValidationMap().size>0),i||(i=this.model.getRowValidationModel().getRowValidationMap().size>0)),i}moveToNextCell(e,t,i,o="ui"){let r,s=this.isEditing(),n=s&&"block-stop"===this.checkNavWithValidation(void 0,i);return e instanceof hl&&s&&(r=this.strategy?.moveToNextEditingCell(e,t,i,o,n)),null===r||!1!==(r=r||!!this.beans.focusSvc.focusedHeader)||n||this.stopEditing(),r}getPendingEditValue(e,t,i){if("data"===i||"batch"===i&&!this.batch)return;let o=this.model.getEdit({rowNode:e,column:t},cB);if(!o||this.stopping&&!this.batch&&!o.editorState?.cellStartedEditing)return;if("edit"===i){let e=o.editorValue;if(null!=e&&e!==dq)return e}let r=o.pendingValue;if(r!==dq)return r}getCellDataValue(e){let t=this.model.getEdit(e,cB);if(t){let e=t.pendingValue;if(e!==dq)return e;let i=t.sourceValue;if(null!=i)return i}return this.valueSvc.getValue(e.column,e.rowNode,"data")}addStopEditingWhenGridLosesFocus(e){!function(e,t,i){let{gos:o,popupSvc:r}=t;if(!o.get("stopEditingWhenCellsLoseFocus"))return;let s=e=>{let s=e.relatedTarget;if(null===ri(s))return void dj(t);let n=i.some(e=>e.contains(s))&&o.isElementInThisInstance(s);n||(n=!!r&&(r.getActivePopups().some(e=>e.contains(s))||r.isElementWithinCustomPopup(s))),n||dj(t)};for(let t of i)e.addManagedElementListeners(t,{focusout:s})}(this,this.beans,e)}createPopupEditorWrapper(e){return new cw(e)}batchResetToSourceValue(e){if(!this.batch)return!1;let t=this.model.getEdit(e);if(!t)return!1;let{pendingValue:i,sourceValue:o,state:r}=t;return i!==o&&"editing"!==r&&(this.dispatchEditValuesChanged(e,{...t,pendingValue:o}),this.beans.editModelSvc?.removeEdits(e),this.bulkRefresh(e),!0)}setDataValue(e,t,i){try{let o,r=this.batch,s=this.isEditing(r?void 0:e);if((!s||this.committing)&&!cA.has(i)||!s&&!r&&"paste"===i)return;let n=this.beans;if(this.strategy??(this.strategy=this.createStrategy()),o=r?"ui":this.committing?i??"api":"api",!i||cE.has(i))return this.applyDirectValue(e,t,i);let l=this.applyExistingEdit(e,t,i,o);if(void 0!==l)return l;return d2(n,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0}),!0}finally{this.committing=!1}}applyExistingEdit(e,t,i,o){let r=this.model.getEdit(e);if(r)return r.pendingValue!==t&&(r.sourceValue!==t?(d2(this.beans,e,t,i,void 0,{persist:!0}),this.ensureBatchStarted(),this.stopEditing(e,{source:o,suppressNavigateAfterEdit:!0})):(this.beans.editModelSvc?.removeEdits(e),this.ensureBatchStarted(),this.dispatchEditValuesChanged(e,{...r,pendingValue:t})),!0)}applyDirectValue(e,t,i){let o=this.beans;if(this.batch)return d2(o,e,t,i,void 0,{persist:!0}),this.cleanupEditors(),dX(o),this.ensureBatchStarted(),this.bulkRefresh(),!0;d2(o,e,t,i,void 0,{persist:!0});let r=dK(o,e),s=this.setNodeDataValue(e.rowNode,e.column,t,r,i);return this.syncEditAfterCommit(e,s),dK(o,e)?.refreshCell(cV),s}handleColDefChanged(e){!function(e,t){let i=t.comp?.getCellEditor();if(!i?.refresh)return;let{eventKey:o,cellStartedEdit:r}=t.editCompDetails.params,{column:s}=t,n=dJ(e,t,o,r),l=s.getColDef(),a=oU(e.userCompFactory,l,n);i.refresh(d0(a.params,o))}(this.beans,e)}destroy(){this.model.clear(),this.destroyStrategy(),super.destroy()}prepDetailsDuringBatch(e,t){let{model:i}=this;if(!this.batch||!i.hasRowEdits(e.rowNode,cB))return;let{rowNode:o}=e,{compDetails:r,valueToDisplay:s}=t;if(r){let{params:e}=r;return e.data=i.getEditRowDataValue(o,cB),{compDetails:r}}return{valueToDisplay:s}}cleanupEditors(){this.strategy?.cleanupEditors()}dispatchCellEvent(e,t,i,o){this.strategy?.dispatchCellEvent(e,t,i,o)}dispatchBatchEvent(e,t){this.eventSvc.dispatchEvent(this.createBatchEditEvent(e,t))}createBatchEditEvent(e,t){return is(this.gos,{type:e,..."batchEditingStopped"===e?{changes:this.toEventChangeList(t)}:{}})}toEventChangeList(e){return this.model.getEditPositions(e).map(e=>({rowIndex:e.rowNode.rowIndex,rowPinned:e.rowNode.rowPinned,columnId:e.column.getColId(),newValue:e.pendingValue,oldValue:e.sourceValue}))}applyBulkEdit({rowNode:e,column:t},i){if(!i||0===i.length)return;let{beans:o,rangeSvc:r,valueSvc:s}=this,{formula:n}=o;d1(o,{persist:!0});let l=this.model.getEditMap(!0),a=l.get(e)?.get(t)?.pendingValue,d=!1;this.batch||(this.eventSvc.dispatchEvent({type:"bulkEditingStarted"}),d=!0);let h=n?.isFormula(a)??!1;i.forEach(e=>{let t=e.columns.some(e=>e?.isAllowFormula());if(r?.forEachRowInRange(e,i=>{let r=ry(o,i);if(void 0===r)return;let d=l.get(r)??new Map,u=a;for(let t of e.columns){if(!t)continue;let e=!!h&&t.isAllowFormula();if(this.isCellEditable({rowNode:r,column:t},"api")){let e=s.getValue(t,r,"data",!0),i=s.parseValue(t,r??null,u,e);Number.isNaN(i)&&(i=null),d.set(t,{editorValue:void 0,pendingValue:i,sourceValue:e,state:"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}e&&(u=n?.updateFormulaByOffset({value:u,columnDelta:1}))}d.size>0&&l.set(r,d),h&&t&&(a=n?.updateFormulaByOffset({value:a,rowDelta:1}))}),this.setEditMap(l),this.batch){this.cleanupEditors(),dX(o),this.ensureBatchStarted(),this.bulkRefresh();return}this.committing=!0;try{this.stopEditing(void 0,{source:"bulk"})}finally{this.committing=!1,d&&this.eventSvc.dispatchEvent({type:"bulkEditingStopped",changes:this.toEventChangeList(l)})}}),this.bulkRefresh();let u=dK(o,{rowNode:e,column:t});u&&u.focusCell(!0)}createCellStyleFeature(e){return new cx(e,this.beans)}createRowStyleFeature(e){return new cD(e,this.beans)}setEditingCells(e,t){let{beans:i}=this,{colModel:o,valueSvc:r}=i,s=new Map;for(let{colId:n,column:l,colKey:a,rowIndex:d,rowPinned:h,newValue:u,state:c}of e){let e=n?o.getCol(n):a?o.getCol(a):l;if(!e)continue;let g=ry(i,{rowIndex:d,rowPinned:h});if(!g)continue;let p=r.getValue(e,g,"data",!0);if(!t?.forceRefreshOfEditCellsOnly&&!dY({pendingValue:u,sourceValue:p})&&"editing"!==c)continue;let f=s.get(g);f||(f=new Map,s.set(g,f)),void 0===u&&(u=dq),f.set(e,{editorValue:void 0,pendingValue:u,sourceValue:p,state:c??"changed",editorState:{isCancelAfterEnd:void 0,isCancelBeforeStart:void 0}})}this.setEditMap(s,t)}onCellFocused(e){let t=dK(this.beans,e);if(!t||!this.isEditing(t,cB))return;let i=this.model.getEdit(t);if(!i||!dY(i))return;let o=this.getLocaleTextFunc()("ariaPendingChange","Pending Change");this.beans.ariaAnnounce?.announceValue(o,"pendingChange")}allowedFocusTargetOnValidation(e){return dK(this.beans,e)}};function cH(e,t){return t??e.get("editType")??"singleCell"}var cO=class extends e2{postConstruct(){this.model=this.beans.editModelSvc,this.editSvc=this.beans.editSvc,this.addManagedEventListeners({cellFocused:this.onCellFocusChanged?.bind(this),cellFocusCleared:this.onCellFocusChanged?.bind(this)})}clearEdits(e){this.model.clearEditValue(e)}onCellFocusChanged(e){let t,i=e.previousParams,{editSvc:o,beans:r}=this,s="cellFocused"===e.type?e.sourceEvent:null;i&&(t=dK(r,i));let{gos:n,editModelSvc:l}=r,a="cellFocusCleared"===e.type;if(o.isEditing(void 0,{withOpenEditor:!0})){let{column:t,rowIndex:d,rowPinned:h}=e,u={column:t,rowNode:ry(r,{rowIndex:d,rowPinned:h})},c="block"===n.get("invalidEditValueMode");if(c)return;let g=!c,p=!!l?.getCellValidationModel().hasCellValidation(u);!i&&!a||o.stopEditing(void 0,{cancel:g&&p,source:a&&g?"api":void 0,event:s})||(o.isBatchEditing()?o.cleanupEditors():o.stopEditing(void 0,{source:"api"}))}t?.refreshCell({suppressFlash:!0,force:!0})}stopCancelled(e){let t=this.editSvc.isBatchEditing()&&!e;for(let e of this.model.getEditPositions())d4(this.beans,e,{cancel:!0},dK(this.beans,e)),this.model.stop(e,t,!0);return!0}stopCommitted(e,t){let i=this.model.getEditPositions(),o={all:[],pass:[],fail:[]};for(let e of i)o.all.push(e),(this.model.getCellValidationModel().getCellValidation(e)?.errorMessages?.length??0)>0?o.fail.push(e):o.pass.push(e);let r=this.processValidationResults(o),s=this.editSvc.isBatchEditing()&&!t;for(let t of r.destroy)d4(this.beans,t,{event:e},dK(this.beans,t)),this.model.stop(t,s,!1);for(let e of r.keep){let t=dK(this.beans,e);!this.editSvc.cellEditingInvalidCommitBlocks()&&t&&this.editSvc.revertSingleCellEdit(t)}return!0}cleanupEditors({rowNode:e}={},t){d1(this.beans,{persist:!1});let i=this.model.getEditPositions(),o=[];if(e)for(let t of i)t.rowNode!==e&&o.push(t);else for(let e of i)o.push(e);d3(this.beans,o),dX(this.beans,t)}setFocusOutOnEditor(e){e.comp?.getCellEditor()?.focusOut?.()}setFocusInOnEditor(e){let t=e.comp,i=t?.getCellEditor();if(i?.focusIn)i.focusIn();else{let i="fullRow"===this.beans.gos.get("editType");e.focusCell(i),e.onEditorAttachedFuncs.push(()=>t?.getCellEditor()?.focusIn?.())}}setupEditors(e){let{event:t,ignoreEventKey:i=!1,startedEdit:o,position:r,cells:s=this.model.getEditPositions()}=e,n=t instanceof KeyboardEvent&&!i&&t.key||void 0;!function(e,t,i,o,r,s){0===t.length&&i?.rowNode&&i?.column&&dQ(e,i,{key:o,event:r,cellStartedEdit:s});let{valueSvc:n,editSvc:l,editModelSvc:a}=e,{rowNode:d,column:h}=i??{};for(let u of t){let{rowNode:t,column:c}=u,g=dK(e,u);if(!g){if(t&&c){let r=n.getValue(c,t,"data"),s=(i?.rowNode===t&&i?.column===c&&o||void 0)??l?.getCellDataValue(u)??n.getValueForDisplay({column:c,node:t,from:"edit"})?.value??r??dq;a?.setEdit(u,{pendingValue:d5(e,s,!1,c),sourceValue:r,state:"editing"})}continue}let p=s&&d===g.rowNode&&g.column===h;dQ(e,{rowNode:d,column:g.column},{key:p?o:null,event:p?r:null,cellStartedEdit:p&&s})}}(this.beans,s,r,n,t,o)}dispatchCellEvent(e,t,i,o){let r=dK(this.beans,e);r&&this.eventSvc.dispatchEvent({...r.createEvent(t??null,i),...o})}dispatchRowEvent(e,t,i){if(i)return;let o=d$(this.beans,e);o&&this.eventSvc.dispatchEvent(o.createRowEvent(t))}shouldStop(e,t,i="ui"){let o=this.editSvc.isBatchEditing();return!!o&&"api"===i||(!o||"ui"!==i&&"edit"!==i)&&("api"===i||(t instanceof KeyboardEvent&&!o?t.key===i3:null))}shouldCancel(e,t,i="ui"){let o=this.editSvc.isBatchEditing();return t instanceof KeyboardEvent&&!o&&t.key===i4||!!o&&"api"===i||"api"===i}setEditMap(e,t){t?.update||this.editSvc.stopEditing(void 0,{cancel:!0,source:"api"});let i=[];if(e.forEach((e,t)=>{e.forEach((e,o)=>{"editing"===e.state&&i.push({...e,rowNode:t,column:o})})}),t?.update&&(e=new Map([...this.model.getEditMap(),...e])),this.model?.setEditMap(e),i.length>0){let e=i.at(-1),t=e.pendingValue===dq?void 0:e.pendingValue;this.start({position:e,event:new KeyboardEvent("keydown",{key:t}),source:"api"});let o=dK(this.beans,e);o&&this.setFocusInOnEditor(o)}}destroy(){this.cleanupEditors(),super.destroy()}},cN=class extends cO{constructor(){super(...arguments),this.beanName="fullRow",this.startedRows=[]}shouldStop(e,t,i="ui"){let{rowNode:o}=e||{};if(!d$(this.beans,{rowNode:this.rowNode}))return!0;let r=super.shouldStop({rowNode:this.rowNode},t,i);return null!==r?r:!!this.rowNode&&o!==this.rowNode}midBatchInputsAllowed({rowNode:e}){return!!e&&this.model.hasEdits({rowNode:e})}clearEdits(e){this.model.clearEditValue(e)}start(e){let{position:t,silent:i,startedEdit:o,event:r,ignoreEventKey:s}=e,{rowNode:n}=t;this.rowNode!==n&&super.cleanupEditors(t);let l=this.beans.visibleCols.allCols,a=[],d=[];for(let e of l)e.isCellEditable(n)&&d.push(e);if(0!=d.length){for(let e of(this.dispatchRowEvent({rowNode:n},"rowEditingStarted",i),this.startedRows.push(n),d)){let t={rowNode:n,column:e};a.push(t),this.model.hasEdits(t)||this.model.start(t)}this.rowNode=n,this.setupEditors({cells:a,position:t,startedEdit:o,event:r,ignoreEventKey:s})}}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){let{rowNode:t}=this;return(!t||!!this.model.hasRowEdits(t))&&(super.stopCancelled(e),this.cleanupEditors({rowNode:t},!0),this.rowNode=void 0,!0)}stopCommitted(e,t){let{rowNode:i}=this;if(i&&!this.model.hasRowEdits(i))return!1;let o=[];if(this.model.getEditMap().forEach((e,t)=>{if(e&&0!==e.size){for(let i of e.values())if(dY(i)){o.push(t);break}}}),d9(this.beans),"block-stop"===this.editSvc.checkNavWithValidation({rowNode:i}))return!1;if(super.stopCommitted(e,t),t||!this.editSvc.isBatchEditing())for(let e of o)this.dispatchRowEvent({rowNode:e},"rowValueChanged");return this.cleanupEditors({rowNode:i},!0),this.rowNode=void 0,!0}onCellFocusChanged(e){let{rowIndex:t}=e,i=e.previousParams;if(i?.rowIndex===t||e.sourceEvent instanceof KeyboardEvent||this.beans.editSvc?.isRangeSelectionEnabledWhileEditing())return;let o=dK(this.beans,i);"block"===this.gos.get("invalidEditValueMode")&&o&&(this.model.getCellValidationModel().getCellValidation(o)||this.model.getRowValidationModel().getRowValidation(o))||super.onCellFocusChanged(e)}cleanupEditors(e={},t){for(let i of(super.cleanupEditors(e,t),this.startedRows))this.dispatchRowEvent({rowNode:i},"rowEditingStopped"),this.destroyEditorsForRow(i);this.startedRows.length=0}destroyEditorsForRow(e){let t=d$(this.beans,{rowNode:e});if(!t)return;let i={};for(let e of t.getAllCellCtrls())e.comp?.getCellEditor()&&d4(this.beans,e,i,e)}moveToNextEditingCell(e,t,i,o="ui",r=!1){let s,n=e.cellPosition;this.model.suspend(!0);try{s=this.beans.navigation?.findNextCellToFocusOn(n,{backwards:t,startEditing:!0,skipToNextEditableCell:!1})}finally{this.model.suspend(!1)}if(!1===s)return null;if(null==s)return!1;let l=s.cellPosition,a=e.isCellEditable(),d=s.isCellEditable(),h=l&&n.rowIndex===l.rowIndex&&n.rowPinned===l.rowPinned;a&&this.setFocusOutOnEditor(e),this.restoreEditors();let u=this.gos.get("suppressStartEditOnTab");return d&&!r?u?s.focusCell(!0,i):(s.comp?.getCellEditor()||dQ(this.beans,s,{event:i,cellStartedEdit:!0}),this.setFocusInOnEditor(s),s.focusCell(!1,i)):(d&&r&&this.setFocusInOnEditor(s),s.focusCell(!0,i)),h||r||(this.editSvc?.stopEditing({rowNode:e.rowNode},{event:i,forceStop:!0}),this.editSvc?.isRowEditing(e.rowNode,{withOpenEditor:!0})&&this.cleanupEditors(s,!0),u?s.focusCell(!0,i):this.editSvc.startEditing(s,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:d||void 0})),e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}restoreEditors(){this.model.getEditMap().forEach((e,t)=>e.forEach(({state:e},i)=>{if("editing"!==e)return;let o=dK(this.beans,{rowNode:t,column:i});o&&!o.comp?.getCellEditor()&&dQ(this.beans,o,{silent:!0})}))}destroy(){super.destroy(),this.rowNode=void 0,this.startedRows.length=0}},cz={moduleName:"EditCore",version:tv,beans:[dz,cG],apiFunctions:{getEditingCells:function(e){let t=e.editModelSvc?.getEditMap(),i=[];return t?.forEach((e,t)=>{let{rowIndex:o,rowPinned:r}=t;e.forEach((e,t)=>{let{editorValue:s,pendingValue:n,sourceValue:l,state:a}=e,d=dY(e),h=s??n;h===dq&&(h=void 0);let u={newValue:h,oldValue:l,state:a,column:t,colId:t.getColId(),colKey:t.getColId(),rowIndex:o,rowPinned:r},c="editing"===a;(c||!c&&d)&&i.push(u)})}),i},getEditRowValues:function(e,t){return e.editModelSvc?.getEditRowDataValue(t,{checkSiblings:!0})},getCellEditorInstances:(e,t={})=>{let i=e.rowRenderer.getCellCtrls(t.rowNodes,t.columns),o=Array(i.length),r=0;for(let e=0,t=i.length;e<t;++e){let t=i[e],s=t.comp?.getCellEditor();s&&(o[r++]=dN(s))}return o.length=r,o},startEditingCell:function(e,t){let{key:i,colKey:o,rowIndex:r,rowPinned:s}=t,{editSvc:n,colModel:l}=e,a=l.getCol(o);if(!a)return void tM(12,{colKey:o});let d=ry(e,{rowIndex:r,rowPinned:s||null,column:a});d?n?.isCellEditable({rowNode:d,column:a},"api")&&(null==s&&ud(e,r),ua(e,o),n?.startEditing({rowNode:d,column:a},{event:i?new KeyboardEvent("keydown",{key:i}):void 0,source:"api",editable:!0})):tM(290,{rowIndex:r,rowPinned:s})},stopEditing:function(e,t=!1){let{editSvc:i}=e;if(i?.isBatchEditing()){if(t)for(let t of e.editModelSvc?.getEditPositions()??[])"editing"===t.state&&i.revertSingleCellEdit(t);else d1(e,{persist:!0});d3(e,void 0,{cancel:t})}else i?.stopEditing(void 0,{cancel:t,source:"edit",forceStop:!t,forceCancel:t})},isEditing:function(e,t){let i=dK(e,t);return!!e.editSvc?.isEditing(i)},validateEdit:function(e){return e.editSvc?.validateEdit()||null}},dynamicBeans:{singleCell:class extends cO{constructor(){super(...arguments),this.beanName="singleCell"}shouldStop(e,t,i="ui"){let o=super.shouldStop(e,t,i);if(null!==o)return o;let r=e?.rowNode,s=e?.column,n=this.rowNode,l=this.column;return(!n||!l)&&r&&s?null:n!==r||l!==s||!n&&!l&&this.model.hasEdits(void 0,{withOpenEditor:!0})}midBatchInputsAllowed(e){return this.model.hasEdits(e)}start(e){let{position:t,startedEdit:i,event:o,ignoreEventKey:r}=e;(this.rowNode!==t.rowNode||this.column!==t.column)&&super.cleanupEditors(),this.rowNode=t.rowNode,this.column=t.column,this.model.start(t),this.setupEditors({cells:[t],position:t,startedEdit:i,event:o,ignoreEventKey:r})}dispatchRowEvent(e,t,i){}processValidationResults(e){return e.fail.length>0&&this.editSvc.cellEditingInvalidCommitBlocks()?{destroy:[],keep:e.all}:{destroy:e.all,keep:[]}}stopCancelled(e){return super.stopCancelled(e),this.clearPosition()}stopCommitted(e,t){return super.stopCommitted(e,t),this.clearPosition()}clearPosition(){return this.rowNode=void 0,this.column=void 0,!0}onCellFocusChanged(e){let{colModel:t,editSvc:i}=this.beans,{rowIndex:o,column:r,rowPinned:s}=e,n=ry(this.beans,{rowIndex:o,rowPinned:s}),l=d_(r),a=t.getCol(l),d=e.previousParams;if(d){let e=d_(d.column);if(d?.rowIndex===o&&e===l&&d?.rowPinned===s)return}"cellFocused"==e.type&&(i?.isRangeSelectionEnabledWhileEditing()||i?.isEditing({rowNode:n,column:a},{withOpenEditor:!0}))||super.onCellFocusChanged(e)}moveToNextEditingCell(e,t,i,o="ui",r=!1){let s,n=this.beans.focusSvc.getFocusedCell();n&&(e=rS(this.beans,n)??e);let l=e.cellPosition,a="fullRow"===this.beans.gos.get("editType");a&&this.model.suspend(!0),r||(e.eGui.focus(),this.editSvc?.stopEditing(e,{source:this.editSvc?.isBatchEditing()?"ui":"api",event:i}));try{s=this.beans.navigation?.findNextCellToFocusOn(l,{backwards:t,startEditing:!0})}finally{a&&this.model.suspend(!1)}if(!1===s)return null;if(null==s)return!1;let d=s.cellPosition,h=e.isCellEditable(),u=s.isCellEditable(),c=d&&l.rowIndex===d.rowIndex&&l.rowPinned===d.rowPinned;h&&!r&&this.setFocusOutOnEditor(e);let g=this.gos.get("suppressStartEditOnTab");if(c||r||(super.cleanupEditors(s,!0),g?s.focusCell(!0,i):this.editSvc.startEditing(s,{startedEdit:!0,event:i,source:o,ignoreEventKey:!0,editable:u})),u&&!r){if(s.focusCell(!1,i),g)s.focusCell(!0,i);else if(!s.comp?.getCellEditor()){let e=this.editSvc?.isEditing(s,{withOpenEditor:!0});dQ(this.beans,s,{event:i,cellStartedEdit:!0,silent:e}),this.setFocusInOnEditor(s),this.cleanupEditors(s)}}else u&&r&&this.setFocusInOnEditor(s),s.focusCell(!0,i);return e.rowCtrl?.refreshRow({suppressFlash:!0,force:!0}),!0}destroy(){super.destroy(),this.rowNode=void 0,this.column=void 0}},fullRow:cN},dependsOn:[uK,uq],css:[".ag-cell-inline-editing{border:var(--ag-cell-editing-border)!important;border-radius:var(--ag-border-radius);box-shadow:var(--ag-cell-editing-shadow);padding:0;z-index:1;.ag-cell-edit-wrapper,.ag-cell-editor,.ag-cell-wrapper,:where(.ag-cell-editor) .ag-input-field-input,:where(.ag-cell-editor) .ag-wrapper{height:100%;line-height:normal;min-height:100%;width:100%}&.ag-cell-editing-error{border-color:var(--ag-invalid-color)!important}}:where(.ag-popup-editor) .ag-large-text{background-color:var(--ag-background-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);padding:0}.ag-large-text-input{display:block;height:auto;padding:var(--ag-cell-horizontal-padding)}:where(.ag-rtl .ag-large-text-input) .ag-text-area-input{resize:none}:where(.ag-ltr) .ag-checkbox-edit{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-checkbox-edit{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-row.ag-row-editing-invalid .ag-cell-inline-editing){opacity:.8}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}"]},cW={agSetColumnFilter:"agSetColumnFilterHandler",agMultiColumnFilter:"agMultiColumnFilterHandler",agGroupColumnFilter:"agGroupColumnFilterHandler",agNumberColumnFilter:"agNumberColumnFilterHandler",agBigIntColumnFilter:"agBigIntColumnFilterHandler",agDateColumnFilter:"agDateColumnFilterHandler",agTextColumnFilter:"agTextColumnFilterHandler"},cU=new Set(Object.values(cW));function c$(e,t){let i=e.filterUi;if(!i)return null;if(i.created)return i.promise;if(t)return null;let o=i.create(i.refreshed);return i.created=!0,i.promise=o,o}function cK(e,t,i,o,r,s){e?.refresh?.({...t,model:i,state:o,source:r,additionalEventAttributes:s})}function cj(e,t,i,o){let r=e();r?.created&&r.promise.then(e=>{let s=t();cK(e,r.filterParams,s,i()??{model:s},"ui",o)})}function c_(e){let t,i,o=!1,{action:r,filterParams:s,getFilterUi:n,getModel:l,getState:a,updateState:d,updateModel:h,processModelToApply:u}=e;switch(r){case"apply":{let e=a();i=e?.model??null,u&&(i=u(i)),t={state:e?.state,model:i},o=!0;break}case"clear":t={model:null},s?.buttons?.includes("apply")||(o=!0,i=null);break;case"reset":t={model:null},o=!0,i=null;break;case"cancel":t={model:l()}}d(t),o?h(i):cj(n,l,a,{fromAction:r})}function cq(e,t){return e[t]??null}var cY=class extends r${constructor(){super(...arguments),this.iconCreated=!1}wireComp(e,t,i,o,r){this.comp=e;let s=rH(this,this.beans.context,r);this.eButtonShowMainFilter=i,this.eFloatingFilterBody=o,this.setGui(t,s),this.setupActive(),this.refreshHeaderStyles(),this.setupWidth(s),this.setupLeft(s),this.setupHover(s),this.setupFocus(s),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(s),this.setupUi(),s.addManagedElementListeners(this.eButtonShowMainFilter,{click:this.showParentFilter.bind(this)}),this.setupFilterChangedListener(s);let n=()=>this.onColDefChanged(s);s.addManagedListeners(this.column,{colDefChanged:n}),s.addManagedEventListeners({filterSwitched:({column:e})=>{e===this.column&&n()}}),s.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 is(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=og("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new rw(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();X(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){let{beans:t}=this;if($(t)===this.eGui)return;let i=ru(t,this.eGui,null,e.shiftKey);if(i){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),i.focus();return}let o=this.findNextColumnWithFloatingFilter(e.shiftKey);o&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:o},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){let t=this.beans.visibleCols,i=this.column;do if(!(i=e?t.getColBefore(i):t.getColAfter(i)))break;while(!i.getColDef().filter||!i.getColDef().floatingFilter)return i}handleKeyDown(e){super.handleKeyDown(e);let t=this.getWrapperHasFocus();switch(e.key){case i8:case i9:case i6:case i7:if(t)return;rf(e);case i3:t&&rh(this.eGui)&&e.preventDefault();break;case i4:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;let t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&em(e.relatedTarget,"ag-floating-filter");if(t&&i&&e.target===this.eGui){let e=this.lastFocusEvent,t=!!(e&&"Tab"===e.key);if(e&&t){let t=e.shiftKey;rh(this.eGui,t)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){let t=new rO(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!ii(this.gos)}setupUserComp(){if(!this.active)return;let e=this.beans.colFilter?.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{beans:{colFilter:t},column:i,gos:o}=this,r=e=>{if(e?.source==="filterDestroyed"&&(!this.isAlive()||!t?.isAlive()))return;let r=this.comp.getFloatingFilterComp();r&&r.then(r=>{if(r){if(o.get("enableFilterHandlers")){let t="filter";e?.afterFloatingFilter?t="ui":e?.afterDataChange?t="dataChanged":e?.source==="api"&&(t="api"),this.updateFloatingFilterParams(this.userCompDetails,t);return}let s=t?.getCurrentFloatingFilterParentModel(i),n=e?{...e,columns:e.columns??[],source:"api"===e.source?"api":"columnFilter"}:null;r.onParentModelChanged(s,n)}})};[this.destroySyncListener]=e.addManagedListeners(i,{filterChanged:r}),t?.isFilterActive(i)&&r(null)}setupWidth(e){let t=()=>{let e=`${this.column.getActualWidth()}px`;this.comp.setWidth(e)};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 o=this.beans.colFilter,r=this.active?o?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,s=this.comp.getFloatingFilterComp();s&&r?s.then(t=>{!t||o?.areFilterCompsDifferent(this.userCompDetails??null,r)?this.updateCompDetails(e,r,i):this.updateFloatingFilterParams(r,"colDef")}):this.updateCompDetails(e,r,i)}updateCompDetails(e,t,i){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),i&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e,t){if(!e)return;let i=e.params;this.comp.getFloatingFilterComp()?.then(e=>{"function"==typeof e?.refresh&&(this.gos.get("enableFilterHandlers")&&(i={...i,model:cq(this.beans.colFilter?.model??{},this.column.getColId()),source:t}),e.refresh(i))})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}},cQ=class extends e2{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){this.showColumnMenuCommon(cJ(this.beans),e,e.containerType,!0)}showHeaderContextMenu(e,t,i){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,i)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}hideFilterMenu(){cJ(this.beans)?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){let{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(ii(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){let t=e&&ih(e)?e.getColDef():e?.getColGroupDef();return!t?.suppressHeaderContextMenu&&"new"===this.gos.get("columnMenu")}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){let e=!this.isSuppressMenuHide();return!(rt()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!ii(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!ii(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 ii(e)?!!e.exists("suppressMenuHide")&&t:t}showColumnMenuCommon(e,t,i,o){let{positionBy:r,onClosedCallback:s}=t,n=t.column;if("button"===r){let{buttonElement:r}=t;e?.showMenuAfterButtonClick(n,r,i,s,o)}else if("mouse"===r){let{mouseEvent:r}=t;e?.showMenuAfterMouseEvent(n,r,i,s,o)}else if(n){let t=this.beans,r=t.ctrlsSvc;r.getScrollFeature().ensureColumnVisible(n,"auto"),eO(t,()=>{let t=r.getHeaderRowContainerCtrl(n.getPinned())?.getHeaderCtrlForColumn(n);t&&e?.showMenuAfterButtonClick(n,t.getAnchorElementForMenu(o),i,s,o)})}}};function cZ(e,t,i){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",i))}function cJ(e){let{enterpriseMenuFactory:t,filterMenuFactory:i,gos:o}=e;return t&&ii(o)?t:i}var cX={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},c0=["january","february","march","april","may","june","july","august","september","october","november","december"];function c1(e,t){return null==e?-1:null==t?1:Number.parseFloat(e)-Number.parseFloat(t)}function c2(e,t){if(null==e)return -1;if(null==t)return 1;let i=lP(e),o=lP(t);return null!=i&&null!=o?i===o?0:i>o?1:-1:String(e).localeCompare(String(t))}function c5(e){return e instanceof Date&&!isNaN(e.getTime())}var c3={number:()=>void 0,bigint:()=>void 0,boolean:()=>({maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(e,t)=>t,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(e,t)=>!1===t,numberOfInputs:0}]}),date:()=>({isValidDate:c5}),dateString:({dataTypeDefinition:e})=>({comparator:(t,i)=>{let o=e.dateParser(i);return null==i||o<t?-1:+(o>t)},isValidDate:t=>"string"==typeof t&&c5(e.dateParser(t))}),dateTime:e=>c3.date(e),dateTimeString:e=>c3.dateString(e),object:()=>void 0,text:()=>void 0},c4={number:()=>({comparator:c1}),bigint:()=>({comparator:c2}),boolean:({t:e})=>({valueFormatter:t=>A(t.value)?e(String(t.value),t.value?"True":"False"):e("blanks","(Blanks)")}),date:({formatValue:e,t})=>({valueFormatter:i=>{let o=e(i);return A(o)?o:t("blanks","(Blanks)")},treeList:!0,treeListFormatter:(e,i)=>{if("NaN"===e)return t("invalidDate","Invalid Date");if(1===i&&null!=e){let i=c0[Number(e)-1];return t(i,cX[i])}return e??t("blanks","(Blanks)")},treeListPathGetter:e=>lT(e,!1)}),dateString:({formatValue:e,dataTypeDefinition:t,t:i})=>({valueFormatter:t=>{let o=e(t);return A(o)?o:i("blanks","(Blanks)")},treeList:!0,treeListPathGetter:e=>lT(t.dateParser(e??void 0),!1),treeListFormatter:(e,t)=>{if(1===t&&null!=e){let t=c0[Number(e)-1];return i(t,cX[t])}return e??i("blanks","(Blanks)")}}),dateTime:e=>{let t=c4.date(e);return t.treeListPathGetter=lT,t},dateTimeString(e){let t=e.dataTypeDefinition.dateParser,i=c4.dateString(e);return i.treeListPathGetter=e=>lT(t(e??void 0)),i},object:({formatValue:e,t})=>({valueFormatter:i=>{let o=e(i);return A(o)?o:t("blanks","(Blanks)")}}),text:()=>void 0},c6={boolean:"agTextColumnFilter",date:"agDateColumnFilter",dateString:"agDateColumnFilter",dateTime:"agDateColumnFilter",dateTimeString:"agDateColumnFilter",bigint:"agBigIntColumnFilter",number:"agNumberColumnFilter",object:"agTextColumnFilter",text:"agTextColumnFilter"},c8={boolean:"agTextColumnFloatingFilter",date:"agDateColumnFloatingFilter",dateString:"agDateColumnFloatingFilter",dateTime:"agDateColumnFloatingFilter",dateTimeString:"agDateColumnFloatingFilter",bigint:"agBigIntColumnFloatingFilter",number:"agNumberColumnFloatingFilter",object:"agTextColumnFloatingFilter",text:"agTextColumnFloatingFilter"},c7={filterHandler:()=>({doesFilterPass:()=>!0})};function c9(e,t,i,o){return!e.isPrimary()||!!e.isValueActive()&&!i&&(!!t||o)}var ge=class extends e2{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.modelUpdates=[],this.columnModelUpdates=[],this.state=new Map,this.handlerMap={...cW},this.isGlobalButtons=!1,this.activeFilterComps=new Set}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.addManagedPropertyListener("pivotMode",this.onPivotModeChanged.bind(this));let e=this.gos,t={...e.get("initialState")?.filter?.filterModel??{}};this.initialModel=t,this.model={...t},e.get("enableFilterHandlers")||delete this.handlerMap.agMultiColumnFilter}refreshModel(){this.onNewRowsLoaded("rowDataUpdated")}setModel(e,t="api",i){let{colModel:o,dataTypeSvc:r,filterManager:s}=this.beans;if(r?.isPendingInference)return void this.modelUpdates.push({model:e,source:t});let n=[],l=this.getModel(!0);if(e){let t=new Set(Object.keys(e));this.allColumnFilters.forEach((i,o)=>{let r=e[o];n.push(this.setModelOnFilterWrapper(i,r)),t.delete(o)}),t.forEach(t=>{let i=o.getColDefCol(t)||o.getCol(t);if(!i)return void tM(62,{colId:t});if(!i.isFilterAllowed())return void tM(63,{colId:t});let r=this.getOrCreateFilterWrapper(i,!0);r?n.push(this.setModelOnFilterWrapper(r,e[t],!0)):tM(64,{colId:t})})}else this.model={},this.allColumnFilters.forEach(e=>{n.push(this.setModelOnFilterWrapper(e,null))});ou.all(n).then(()=>{let e=this.getModel(!0),o=[];this.allColumnFilters.forEach((t,i)=>{B(l?l[i]:null,e?e[i]:null)||o.push(t.column)}),o.length>0?s?.onFilterChanged({columns:o,source:t}):i&&this.updateActive("filterChanged")})}getModel(e){let t={},{allColumnFilters:i,initialModel:o,beans:{colModel:r}}=this;if(i.forEach((e,i)=>{let o=this.getModelFromFilterWrapper(e);A(o)&&(t[i]=o)}),!e)for(let e of Object.keys(o)){let s=o[e];A(s)&&!i.has(e)&&r.getCol(e)?.isFilterAllowed()&&(t[e]=s)}return t}setState(e,t,i="api"){if(this.state.clear(),t)for(let e of Object.keys(t)){let i=t[e];this.state.set(e,{model:cq(this.model,e),state:i})}this.setModel(e,i,!0)}getState(){let e=this.state;if(!e.size)return;let t={},i=!1;return e.forEach((e,o)=>{let r=e.state;null!=r&&(i=!0,t[o]=r)}),i?t:void 0}getModelFromFilterWrapper(e){let t=e.column.getColId();if(e.isHandler)return cq(this.model,t);let i=e.filter;return i?"function"!=typeof i.getModel?(tM(66),null):i.getModel():cq(this.initialModel,t)}isFilterPresent(){return this.activeColumnFilters.length>0}isAggFilterPresent(){return!!this.activeAggregateFilters.length}disableFilters(){this.initialModel={};let{allColumnFilters:e}=this;return!!e.size&&(e.forEach(e=>this.disposeFilterWrapper(e,"advancedFilterEnabled")),!0)}updateActiveFilters(){let{colModel:e,gos:t}=this.beans,i=!!t_(t),o=[],r=[],s=(t,s,n)=>{s&&(c9(t,e.isPivotMode(),e.isPivotActive(),i)?o.push(n):r.push(n))},n=[];return this.allColumnFilters.forEach(e=>{let t=e.column,i=t.getColId();if(e.isHandler)n.push(ou.resolve().then(()=>{s(t,this.isHandlerActive(t),{colId:i,isHandler:!0,handler:e.handler,handlerParams:e.handlerParams})}));else{let o=c$(e);o&&n.push(o.then(e=>{s(t,!!e&&(e.isFilterActive?e.isFilterActive():(tM(67),!1)),{colId:i,isHandler:!1,comp:e})}))}}),ou.all(n).then(()=>{this.activeAggregateFilters=o,this.activeColumnFilters=r})}updateFilterFlagInColumns(e,t){let i=[];return this.allColumnFilters.forEach(o=>{let r=o.column;if(o.isHandler)i.push(ou.resolve().then(()=>{this.setColFilterActive(r,this.isHandlerActive(r),e,t)}));else{let s=c$(o);s&&i.push(s.then(i=>{this.setColFilterActive(r,i.isFilterActive(),e,t)}))}}),this.beans.groupFilter?.updateFilterFlags(e,t),ou.all(i)}doFiltersPass(e,t,i){let{data:o,aggData:r}=e,s=i?this.activeAggregateFilters:this.activeColumnFilters,n=i?r:o,l=this.model;for(let i=0;i<s.length;i++){let o=s[i],{colId:r,isHandler:a}=o;if(r!==t)if(a){let{handler:t,handlerParams:i}=o;if(!t.doesFilterPass({node:e,data:n,model:cq(l,r),handlerParams:i}))return!1}else{let t=o.comp;if("function"!=typeof t.doesFilterPass){tT(91);continue}if(!t.doesFilterPass({node:e,data:n}))return!1}}return!0}getHandlerParams(e){let t=this.allColumnFilters.get(e.getColId());return t?.isHandler?t.handlerParams:void 0}callOnFilterChangedOutsideRenderCycle(e){let{rowRenderer:t,filterManager:i}=this.beans,o=()=>{this.isAlive()&&i?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(o,0):o()}updateBeforeFilterChanged(e={}){let{column:t,additionalEventAttributes:i}=e,o=t?.getColId();return this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",i).then(()=>{this.allColumnFilters.forEach(e=>{let{column:t,isHandler:i}=e;o!==t.getColId()&&(i&&e.handler.onAnyFilterChanged?.(),c$(e,i)?.then(e=>{"function"==typeof e?.onAnyFilterChanged&&e.onAnyFilterChanged()}))}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!this.gos.get("allowShowChangeAfterFilter")&&this.processingFilterChange}onNewRowsLoaded(e){let t=[];this.allColumnFilters.forEach(e=>{let i=e.isHandler;i&&e.handler.onNewRowsLoaded?.();let o=c$(e,i);o&&t.push(o.then(e=>{e.onNewRowsLoaded?.()}))}),ou.all(t).then(()=>this.updateActive(e,{afterDataChange:!0}))}updateActive(e,t){this.updateFilterFlagInColumns(e,t).then(()=>this.updateActiveFilters())}createGetValue(e,t){let{filterValueSvc:i,colModel:o}=this.beans;return(r,s)=>{let n=s?o.getCol(s):e;return n?i.getValue(n,r,t):void 0}}isFilterActive(e){let t=this.cachedFilter(e);if(t?.isHandler)return this.isHandlerActive(e);let i=t?.filter;return i?i.isFilterActive():null!=cq(this.initialModel,e.getColId())}isHandlerActive(e){let t=A(cq(this.model,e.getColId()));if(t)return t;let i=this.beans.groupFilter;return!!i?.isGroupFilter(e)&&i.isFilterActive(e)}getOrCreateFilterUi(e){let t=this.getOrCreateFilterWrapper(e,!0);return t?c$(t):null}getFilterUiForDisplay(e){let t=this.getOrCreateFilterWrapper(e,!0);if(!t)return null;let i=c$(t);return i?i.then(e=>({comp:e,params:t.filterUi.filterParams,isHandler:t.isHandler})):null}getHandler(e,t){let i=this.getOrCreateFilterWrapper(e,t);return i?.isHandler?i.handler:void 0}getOrCreateFilterWrapper(e,t){if(!e.isFilterAllowed())return;let i=this.cachedFilter(e);return!i&&t&&(i=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,i)),i}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e,t=!1){return this.getDefaultFilterFromDataType(()=>this.beans.dataTypeSvc?.getBaseDataType(e),t)}getDefaultFilterFromDataType(e,t=!1){var i;return(i=this.gos).isModuleRegistered("SetFilter")&&!i.get("suppressSetFilterByDefault")?t?"agSetColumnFloatingFilter":"agSetColumnFilter":function(e,t=!1){return(t?c8:c6)[e??"text"]}(e(),t)}getDefaultFloatingFilter(e){return this.getDefaultFilter(e,!0)}createFilterComp(e,t,i,o,r,s){let n=()=>{var n,l;let a,d=o(this.createFilterCompParams(e,r,s),r);return n=this.beans.userCompFactory,oS(a=(l=t).filter)&&(l={filter:a.component,filterParams:l.filterParams}),n.getCompDetails(l,oB,i,d,!0)},l=n();return l?{compDetails:l,createFilterUi:e=>(e?n():l).newAgStackInstance()}:null}createFilterInstance(e,t,i,o){let r=this.beans.selectableFilter;r?.isSelectable(t)&&(t=r.getFilterDef(e,t));let{handler:s,handlerParams:n,handlerGenerator:l}=this.createHandler(e,t,i)??{},a=this.createFilterComp(e,t,i,o,!!s,"init");if(!a)return{compDetails:null,createFilterUi:null,handler:s,handlerGenerator:l,handlerParams:n};let{compDetails:d,createFilterUi:h}=a;return this.isGlobalButtons&&(d.params?.buttons?.length||tM(281,{colId:e.getColId()})),{compDetails:d,handler:s,handlerGenerator:l,handlerParams:n,createFilterUi:h}}createBaseFilterParams(e,t){let{filterManager:i,rowModel:o}=this.beans;return is(this.gos,{column:e,colDef:e.getColDef(),getValue:this.createGetValue(e),doesRowPassOtherFilter:t?()=>!0:t=>i?.doesRowPassOtherFilters(e.getColId(),t)??!0,rowModel:o})}createFilterCompParams(e,t,i,o){let r=this.filterChangedCallbackFactory(e),s=this.createBaseFilterParams(e,o);if(s.filterChangedCallback=r,s.filterModifiedCallback=o?()=>{}:t=>this.filterModified(e,t),t){let t=e.getColId(),o=cq(this.model,t);s.model=o,s.state=this.state.get(t)??{model:o},s.onModelChange=(i,o)=>{this.updateStoredModel(t,i),this.refreshHandlerAndUi(e,i,"ui",!1,o).then(()=>{r({...o,source:"columnFilter"})})},s.onStateChange=t=>{this.updateState(e,t),this.updateOrRefreshFilterUi(e)},s.onAction=(t,i,o)=>{this.updateModel(e,t,i),this.dispatchLocalEvent({type:"filterAction",column:e,action:t,event:o})},s.getHandler=()=>this.getHandler(e,!0),s.onUiChange=t=>this.filterUiChanged(e,t),s.source=i}return s}createFilterUiForHandler(e,t){return t?{created:!1,create:t,filterParams:e.params,compDetails:e}:null}createFilterUiLegacy(e,t,i){let o=t(),r={created:!0,create:t,filterParams:e.params,compDetails:e,promise:o};return o.then(i),r}createFilterWrapper(e){let{compDetails:t,handler:i,handlerGenerator:o,handlerParams:r,createFilterUi:s}=this.createFilterInstance(e,e.getColDef(),this.getDefaultFilter(e),e=>e),n=e.getColId();if(i)return delete this.initialModel[n],i.init?.({...r,source:"init",model:cq(this.model,n)}),{column:e,isHandler:!0,handler:i,handlerGenerator:o,handlerParams:r,filterUi:this.createFilterUiForHandler(t,s)};if(s){let i={column:e,filterUi:null,isHandler:!1};return i.filterUi=this.createFilterUiLegacy(t,s,e=>{i.filter=e??void 0}),i}return{column:e,filterUi:null,isHandler:!1}}createHandlerFunc(e,t,i){let o,r,s,{gos:n,frameworkOverrides:l,registry:a}=this.beans,d=n.get("enableFilterHandlers"),h=d?(e=>{let t=e.filter;if(oS(t)){let e=t.handler;return e||((o=t.doesFilterPass)?()=>({doesFilterPass:o}):void 0)}return"string"==typeof t?t:void 0})(t):void 0,u=e=>()=>this.createBean(a.createDynamicBean(e,!0));if("string"==typeof h){let e=n.get("filterHandlers")?.[h];null!=e?r=e:cU.has(h)&&(r=u(h),s=h)}else r=h;if(!r){let e,{compName:o,jsComp:n,fwComp:a}=oR(l,t,oB);o?e=o:null==n&&null==a&&!0===t.filter&&(e=i),(s=this.handlerMap[e])&&(r=u(s))}if(!r){if(!d)return;return tL(n)&&tM(277,{colId:e.getColId()}),c7}return{filterHandler:r,handlerNameOrCallback:o??s}}createHandler(e,t,i){let o=this.createHandlerFunc(e,t,i);if(!o)return;let r=o$(this.beans.userCompFactory,t,this.createFilterCompParams(e,!0,"init")),{handlerNameOrCallback:s,filterHandler:n}=o,{handler:l,handlerParams:a}=this.createHandlerFromFunc(e,n,r);return{handler:l,handlerParams:a,handlerGenerator:s??n}}createHandlerFromFunc(e,t,i){let o=e.getColDef();return{handler:t(is(this.gos,{column:e,colDef:o})),handlerParams:this.createHandlerParams(e,i)}}createHandlerParams(e,t){let i=e.getColDef(),o=e.getColId(),r=this.filterChangedCallbackFactory(e);return is(this.gos,{colDef:i,column:e,getValue:this.createGetValue(e),doesRowPassOtherFilter:e=>this.beans.filterManager?.doesRowPassOtherFilters(o,e)??!0,onModelChange:(t,i)=>{this.updateStoredModel(o,t),this.refreshHandlerAndUi(e,t,"handler",!1,i).then(()=>{r({...i,source:"columnFilter"})})},onModelAsStringChange:()=>{e.dispatchColEvent("filterChanged","filterChanged"),this.dispatchLocalEvent({type:"filterModelAsStringChanged",column:e})},filterParams:t})}onColumnsChanged(){let e=[],{colModel:t,filterManager:i,groupFilter:o}=this.beans;this.allColumnFilters.forEach((i,o)=>{let r;(r=i.column.isPrimary()?t.getColDefCol(o):t.getCol(o))&&r===i.column||(e.push(i.column),this.disposeFilterWrapper(i,"columnChanged"),this.disposeColumnListener(o))});let r=o&&e.every(e=>o.isGroupFilter(e));e.length>0&&!r&&i?.onFilterChanged({columns:e,source:"api"})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;let t=this.beans.groupFilter;return!t?.isGroupFilter(e)||t.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){let{userCompFactory:i,frameworkOverrides:o,selectableFilter:r,gos:s}=this.beans,n=t=>{let i=this.getOrCreateFilterUi(e);i?.then(e=>{t(dN(e))})},l=e.getColDef(),a=r?.isSelectable(l)?r.getFilterDef(e,l):l,d=function(e,t,i){if(null==t)return null;let o=null,{compName:r,jsComp:s,fwComp:n}=oR(e,t,oB);return r?o=({agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agBigIntColumnFilter:"agBigIntColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"})[r]:null==s&&null==n&&!0===t.filter&&(o=i()),o}(o,a,()=>this.getDefaultFloatingFilter(e))??"agReadOnlyFloatingFilter",h=s.get("enableFilterHandlers"),u=o$(i,a,this.createFilterCompParams(e,h,"init",!0)),c=is(s,{column:e,filterParams:u,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:n,showParentFilter:t});if(h){let t=e.getColId(),i=this.filterChangedCallbackFactory(e);c.onUiChange=t=>this.floatingFilterUiChanged(e,t),c.model=cq(this.model,t),c.onModelChange=(o,r)=>{this.updateStoredModel(t,o),this.refreshHandlerAndUi(e,o,"floating",!0,r).then(()=>{i({...r,source:"columnFilter"})})},c.getHandler=()=>this.getHandler(e,!0),c.source="init"}return i.getCompDetails(l,oV,d,c)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilterUi(e,t,i,o){let r="paramsUpdated";if(e.isHandler){let s=t.getColId();delete this.initialModel[s],this.state.delete(s);let n=e.filterUi;e.filterUi=this.createFilterUiForHandler(i,o);let l=this.eventSvc;n?.created?n.promise.then(e=>{this.destroyBean(e),l.dispatchEvent({type:"filterDestroyed",source:r,column:t})}):l.dispatchEvent({type:"filterHandlerDestroyed",source:r,column:t})}else this.destroyFilter(t,r)}destroyFilter(e,t="api"){let i=e.getColId(),o=this.allColumnFilters.get(i);this.disposeColumnListener(i),delete this.initialModel[i],o&&this.disposeFilterWrapper(o,t).then(t=>{t&&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){let i=!1,{column:o,isHandler:r,filterUi:s}=e,n=o.getColId();r&&(i=this.isHandlerActive(o),this.destroyBean(e.handler),delete this.model[n],this.state.delete(n));let l=()=>{this.setColFilterActive(o,!1,"filterDestroyed"),this.allColumnFilters.delete(n),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:o})};if(s)if(s.created)return s.promise.then(e=>(i=r?i:!!e?.isFilterActive(),this.destroyBean(e),l(),i));else l();return ou.resolve(i)}filterChangedCallbackFactory(e){return t=>{this.callOnFilterChangedOutsideRenderCycle({additionalEventAttributes:t,columns:[e],column:e,source:t?.source??"columnFilter"})}}filterParamsChanged(e,t="api"){let i=this.allColumnFilters.get(e);if(!i)return;let o=this.beans,r=i.column,s=r.getColDef(),n=r.isFilterAllowed(),l=this.getDefaultFilter(r),a=o.selectableFilter,d=a?.isSelectable(s)?a.getFilterDef(r,s):s,h=n?this.createHandlerFunc(r,d,this.getDefaultFilter(r)):void 0,u=!!h,c=i.isHandler;if(c!=u)return void this.destroyFilter(r,"paramsUpdated");let{compDetails:g,createFilterUi:p}=(n?this.createFilterComp(r,d,l,e=>e,u,"colDef"):null)??{compDetails:null,createFilterUi:null},f=g?.params??o$(o.userCompFactory,d,this.createFilterCompParams(r,u,"colDef"));if(c){let o=h?.handlerNameOrCallback??h?.filterHandler,s=cq(this.model,e);if(i.handlerGenerator!=o){let n=i.handler,{handler:l,handlerParams:a}=this.createHandlerFromFunc(r,h.filterHandler,f);i.handler=l,i.handlerParams=a,i.handlerGenerator=o,delete this.model[e],l.init?.({...a,source:"init",model:null}),this.destroyBean(n),null!=s&&this.beans.filterManager?.onFilterChanged({columns:[r],source:t})}else{let e=this.createHandlerParams(r,g?.params);i.handlerParams=e,i.handler.refresh?.({...e,source:"colDef",model:s})}}!this.areFilterCompsDifferent(i.filterUi?.compDetails??null,g)&&i.filterUi&&g?(i.filterUi.filterParams=f,c$(i,c)?.then(e=>{!1===(!e?.refresh||e.refresh(f))?this.destroyFilterUi(i,r,g,p):this.dispatchLocalEvent({type:"filterParamsChanged",column:r,params:f})})):this.destroyFilterUi(i,r,g,p)}refreshHandlerAndUi(e,t,i,o,r){var s,n;let l=this.cachedFilter(e);if(!l)return o&&this.getOrCreateFilterWrapper(e,!0),ou.resolve();if(!l.isHandler)return ou.resolve();let{filterUi:a,handler:d,handlerParams:h}=l;return s=()=>{if(a){let{created:e,filterParams:t}=a;if(e)return a.promise.then(e=>e?{filter:e,filterParams:t}:void 0);a.refreshed=!0}return ou.resolve(void 0)},n=this.state.get(e.getColId())??{model:t},d.refresh?.({...h,model:t,source:i,additionalEventAttributes:r}),s().then(e=>{if(e){let{filter:o,filterParams:s}=e;cK(o,s,t,n,i,r)}})}setColumnFilterWrapper(e,t){let i=e.getColId();this.allColumnFilters.set(i,t),this.allColumnListeners.set(i,this.addManagedListeners(e,{colDefChanged:()=>this.filterParamsChanged(i)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;let{componentClass:i}=e,{componentClass:o}=t;return!(i===o||i?.render&&o?.render&&i.render===o.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(e=>e.getColDef().floatingFilter)}getFilterInstance(e){let t=this.beans.colModel.getColDefCol(e);if(!t)return Promise.resolve(void 0);let i=this.getOrCreateFilterUi(t);return i?new Promise(e=>{i.then(t=>{e(dN(t))})}):Promise.resolve(null)}processFilterModelUpdateQueue(){this.modelUpdates.forEach(({model:e,source:t})=>this.setModel(e,t)),this.modelUpdates=[],this.columnModelUpdates.forEach(({key:e,model:t,resolve:i})=>{this.setModelForColumn(e,t).then(()=>i())}),this.columnModelUpdates=[]}getModelForColumn(e,t){if(t){let{state:t,model:i}=this,o=e.getColId(),r=t.get(o);return r?r.model??null:cq(i,o)}let i=this.cachedFilter(e);return i?this.getModelFromFilterWrapper(i):null}setModelForColumn(e,t){if(this.beans.dataTypeSvc?.isPendingInference){let i=()=>{},o=new Promise(e=>{i=e});return this.columnModelUpdates.push({key:e,model:t,resolve:i}),o}return new Promise(i=>{this.setModelForColumnLegacy(e,t).then(e=>i(e))})}getStateForColumn(e){return this.state.get(e)??{model:cq(this.model,e)}}setModelForColumnLegacy(e,t){let i=this.beans.colModel.getColDefCol(e),o=i?this.getOrCreateFilterWrapper(i,!0):null;return o?this.setModelOnFilterWrapper(o,t):ou.resolve()}setColDefPropsForDataType(e,t,i){let o,r,s=e.filter,n=!0===s?this.getDefaultFilterFromDataType(()=>t.baseDataType):s;if("string"!=typeof n)return;let l=this.beans,{filterParams:a,filterValueGetter:d}=e;if("agMultiColumnFilter"===n)({filterParams:o,filterValueGetter:r}=l.multiFilter?.getParamsForDataType(a,d,t,i)??{});else{var h;let e,s,u;({filterParams:o,filterValueGetter:r}=(h=this.getLocaleTextFunc(),e=d,s="agSetColumnFilter"===n,e||"object"!==t.baseDataType||s||(e=({column:e,node:t})=>i({column:e,node:t,value:l.valueSvc.getValue(e,t,"data")})),u=(0,(s?c4:c3)[t.baseDataType])({dataTypeDefinition:t,formatValue:i,t:h}),{filterParams:"object"==typeof a?{...u,...a}:u,filterValueGetter:e}))}e.filterParams=o,r&&(e.filterValueGetter=r)}setColFilterActive(e,t,i,o){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",i)),e.dispatchColEvent("filterChanged",i,o)}setModelOnFilterWrapper(e,t,i){return new ou(o=>{if(e.isHandler){let r=e.column,s=r.getColId(),n=this.model[s];return(this.updateStoredModel(s,t),i&&t===n)?void o():void this.refreshHandlerAndUi(r,t,"api").then(()=>o())}let r=c$(e);r?r.then(e=>{if("function"!=typeof e?.setModel){tM(65),o();return}(e.setModel(t)||ou.resolve()).then(()=>o())}):o()})}updateStoredModel(e,t){A(t)?this.model[e]=t:delete this.model[e];let i=this.state.get(e),o={model:t,state:i?.state};this.state.set(e,o)}filterModified(e,t){this.getOrCreateFilterUi(e)?.then(i=>{this.eventSvc.dispatchEvent({type:"filterModified",column:e,filterInstance:i,...t})})}filterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"filterUiChanged",column:e,...t})}floatingFilterUiChanged(e,t){this.gos.get("enableFilterHandlers")&&this.eventSvc.dispatchEvent({type:"floatingFilterUiChanged",column:e,...t})}updateModel(e,t,i){let o=e.getColId(),r=this.cachedFilter(e),s=()=>r?.filterUi;c_({action:t,filterParams:r?.filterUi?.filterParams,getFilterUi:s,getModel:()=>cq(this.model,o),getState:()=>this.state.get(o),updateState:t=>this.updateState(e,t),updateModel:e=>s()?.filterParams?.onModelChange(e,{...i,fromAction:t}),processModelToApply:r?.isHandler?r.handler.processModelToApply?.bind(r.handler):void 0})}updateAllModels(e,t){let i=[];this.allColumnFilters.forEach((t,o)=>{let r=this.beans.colModel.getColDefCol(o);r&&c_({action:e,filterParams:t.filterUi?.filterParams,getFilterUi:()=>t.filterUi,getModel:()=>cq(this.model,o),getState:()=>this.state.get(o),updateState:e=>this.updateState(r,e),updateModel:t=>{this.updateStoredModel(o,t),this.dispatchLocalEvent({type:"filterAction",column:r,action:e}),i.push(this.refreshHandlerAndUi(r,t,"ui"))},processModelToApply:t?.isHandler?t.handler.processModelToApply?.bind(t.handler):void 0})}),i.length&&ou.all(i).then(()=>{this.callOnFilterChangedOutsideRenderCycle({source:"columnFilter",additionalEventAttributes:t,columns:[]})})}updateOrRefreshFilterUi(e){let t=e.getColId();cj(()=>this.cachedFilter(e)?.filterUi,()=>cq(this.model,t),()=>this.state.get(t))}updateState(e,t){this.state.set(e.getColId(),t),this.dispatchLocalEvent({type:"filterStateChanged",column:e,state:t})}canApplyAll(){let{state:e,model:t,activeFilterComps:i}=this;for(let e of i)if("COLUMN_MENU"===e.source)return!1;let o=!1;for(let i of e.keys()){let r=e.get(i);if(!1===r.valid)return!1;(r.model??null)!==cq(t,i)&&(o=!0)}return o}hasUnappliedModel(e){let{model:t,state:i}=this;return(i.get(e)?.model??null)!==cq(t,e)}setGlobalButtons(e){this.isGlobalButtons=e,this.dispatchLocalEvent({type:"filterGlobalButtons",isGlobal:e})}shouldKeepStateOnDetach(e,t){if("newFiltersToolPanel"===t)return!0;let i=this.beans.filterPanelSvc;return!!i?.isActive&&!!i.getState(e.getColId())}onPivotModeChanged(e){let{colModel:t,pivotColsSvc:i}=this.beans,o=!!t_(this.gos),r=e.currentValue,s=r?this.activeColumnFilters:this.activeAggregateFilters,n=r?this.activeAggregateFilters:this.activeColumnFilters,l=[];for(let e of s){let s=t.getColById(e.colId),a=r&&!!i?.columns.length;s&&r===c9(s,r,a,o)&&(n.push(e),l.push(e))}let a=0,d=0;for(;a<s.length;a++)!l.includes(s[a])&&(s[d]=s[a],d++);for(;d<s.length;)s.pop()}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear(),this.state.clear(),this.activeFilterComps.clear()}},gt=class extends e2{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:e})=>this.onAdvFilterEnabledChanged(e),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"function"==typeof e&&e({})}doesExternalFilterPass(e){let t=this.gos.get("doesExternalFilterPass");return"function"==typeof t&&t(e)}setFilterState(e,t,i="api"){this.isAdvFilterEnabled()||this.colFilter?.setState(e,t,i)}setFilterModel(e,t="api",i){if(this.isAdvFilterEnabled()){i||this.warnAdvFilters();return}this.colFilter?.setModel(e,t)}getFilterModel(){return this.colFilter?.getModel()??{}}getFilterState(){return this.colFilter?.getState()}isColumnFilterPresent(){return!!this.colFilter?.isFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableFilters()&&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(){t_(this.gos)&&this.isAnyFilterPresent()&&this.onFilterChanged()}onFilterChanged(e={}){let{source:t,additionalEventAttributes:i,columns:o=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):ou.resolve()).then(()=>{let e={source:t,type:"filterChanged",columns:o};i&&tt(e,i),this.eventSvc.dispatchEvent(e),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!t_(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,colIdToSkip:e})}doesRowPassAggregateFilters(e){let{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip,!0))}doesRowPassFilter(e){let{rowNode:t}=e;return!!this.alwaysPassFilter?.(t)||!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doFiltersPass(t,e.colIdToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterAllowed(e){return!this.isAdvFilterEnabled()&&!!this.colFilter?.isFilterAllowed(e)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference)return void this.advFilterModelUpdateQueue.push(e);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()&&!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){tM(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return+!!this.isAdvFilterHeaderActive()}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){for(let e of this.advFilterModelUpdateQueue)this.setAdvFilterModel(e);this.advFilterModelUpdateQueue=[]}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setModelForColumn(e,t)??Promise.resolve()}},gi=class extends e2{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,i,o){(!e||e.isColumn)&&this.showPopup(e,o=>{this.popupSvc?.positionPopupUnderMouseEvent({additionalParams:{column:e},type:i,mouseEvent:t,ePopup:o})},i,t.target,ii(this.gos),o)}showMenuAfterButtonClick(e,t,i,o){if(e&&!e.isColumn)return;let r=-1,s="left",n=ii(this.gos);!n&&this.gos.get("enableRtl")&&(r=1,s="right");let l=n?void 0:4*r,a=n?void 0:4;this.showPopup(e,o=>{this.popupSvc?.positionPopupByComponent({type:i,eventSource:t,ePopup:o,nudgeX:l,nudgeY:a,alignSide:s,keepWithinBounds:!0,position:"under",additionalParams:{column:e}})},i,t,n,o)}showPopup(e,t,i,o,r,s){let n,l=e?this.createBean(new o1(e,"COLUMN_MENU")):void 0;if(this.activeMenu=l,!l?.hasFilter()||!e)return void tT(57);let a=eW({tag:"div",cls:`ag-menu${!r?" ag-filter-menu":""}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:e=>this.trapFocusWithin(e,a)}),a.appendChild(l?.getGui());let d=ii(this.gos)?void 0:o??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody,h=t=>{cZ(e,!1,"contextMenu");let r=t instanceof KeyboardEvent;if(this.tabListener&&(this.tabListener=this.tabListener()),r&&o&&eE(o)){let e=rc(o);e?.focus({preventScroll:!0})}l?.afterGuiDetached(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,i,e),s?.()},u=this.getLocaleTextFunc(),c=r&&"columnFilter"!==i?u("ariaLabelColumnMenu","Column Menu"):u("ariaLabelColumnFilter","Column Filter"),g=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:h,positionCallback:()=>t(a),anchorToElement:d,ariaLabel:c});g&&(this.hidePopup=n=g.hideFunc),l.afterInit().then(()=>{t(a),l.afterGuiAttached({container:i,hidePopup:n})}),cZ(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,i,e)}trapFocusWithin(e,t){"Tab"!==e.key||e.defaultPrevented||ru(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),rh(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()}},go=class extends e2{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t,i){if(!t)return;let o=e.getColDef(),{selectableFilter:r,valueSvc:s,formula:n}=this.beans,l=i??r?.getFilterValueGetter(e.getColId())??o.filterValueGetter;if(l)return this.executeFilterValueGetter(l,t.data,e,t,o);let a=s.getValue(e,t,"data");return e.isAllowFormula()&&n?.isFormula(a)?n.resolveValue(e,t):a}executeFilterValueGetter(e,t,i,o,r){let{expressionSvc:s,valueSvc:n}=this.beans,l=is(this.gos,{data:t,node:o,column:i,colDef:r,getValue:n.getValueCallback.bind(n,o)});return"function"==typeof e?e(l):s?.evaluate(e,l)}},gr={tag:"div",cls:"ag-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},gs=class extends ow{constructor(){super(gr,[u2]),this.eFloatingFilterText=null}init(e){this.params=e;let t=this.beans.colNames.getDisplayNameForColumn(e.column,"header",!0);if(this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel(`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`),this.gos.get("enableFilterHandlers")){let t=e.getHandler();if(t.getModelAsString){let i=t.getModelAsString(e.model);this.eFloatingFilterText.setValue(i)}}}onParentModelChanged(e){null==e?this.eFloatingFilterText.setValue(""):this.params.parentFilterInstance(t=>{if(t.getModelAsString){let i=t.getModelAsString(e);this.eFloatingFilterText.setValue(i)}})}refresh(e){this.init(e)}},gn=class extends se{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)}},gl=class{constructor(){this.customFilterOptions={}}init(e,t){this.filterOptions=e.filterOptions??t,this.mapCustomOptions(),this.defaultOption=this.getDefaultItem(e.defaultOption)}refresh(e,t){let i=e.filterOptions??t;this.filterOptions!==i&&(this.filterOptions=i,this.customFilterOptions={},this.mapCustomOptions()),this.defaultOption=this.getDefaultItem(e.defaultOption)}mapCustomOptions(){let{filterOptions:e}=this;if(e){for(let t of e)if("string"!=typeof t){if(![["displayKey"],["displayName"],["predicate","test"]].every(e=>!!e.some(e=>null!=t[e])||(tM(72,{keys:e}),!1))){this.filterOptions=e.filter(e=>e===t)||[];continue}this.customFilterOptions[t.displayKey]=t}}}getDefaultItem(e){let{filterOptions:t}=this;if(e)return e;if(t.length>=1){let e=t[0];if("string"==typeof e)return e;if(e.displayKey)return e.displayKey;tM(73)}else tM(74)}getCustomOption(e){return this.customFilterOptions[e]}};function ga(e,t,i){return null==i?e.splice(t):e.splice(t,i)}function gd(e){return null==e||"string"==typeof e&&0===e.trim().length}var gh=new Set(["empty","notBlank","blank","today","yesterday","tomorrow","thisWeek","lastWeek","nextWeek","thisMonth","lastMonth","nextMonth","thisQuarter","lastQuarter","nextQuarter","thisYear","lastYear","nextYear","yearToDate","last7Days","last30Days","last90Days","last6Months","last12Months","last24Months"]);function gu(e,t){let i=t.getCustomOption(e);if(i){let{numberOfInputs:e}=i;return null!=e?e:1}return e&&gh.has(e)?0:"inRange"===e?2:1}var gc=class extends rv{constructor(e,t,i){super(e,"simple-filter"),this.mapValuesFromModel=t,this.defaultOptions=i,this.eTypes=[],this.eJoinPanels=[],this.eJoinAnds=[],this.eJoinOrs=[],this.eConditionBodies=[],this.listener=()=>this.onUiChanged(),this.lastUiCompletePosition=null,this.joinOperatorId=0}setParams(e){super.setParams(e);let t=new gl;this.optionsFactory=t,t.init(e,this.defaultOptions),this.commonUpdateSimpleParams(e),this.createOption(),this.createMissingConditionsAndOperators()}updateParams(e,t){this.optionsFactory.refresh(e,this.defaultOptions),super.updateParams(e,t),this.commonUpdateSimpleParams(e)}commonUpdateSimpleParams(e){var t;this.setNumConditions(e),this.defaultJoinOperator="AND"===(t=e.defaultJoinOperator)||"OR"===t?t:"AND",this.filterPlaceholder=e.filterPlaceholder,this.createFilterListOptions(),eG(this.getGui(),"tabindex",this.isReadOnly()?"-1":null)}onFloatingFilterChanged(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged("immediately",!0)}setTypeFromFloatingFilter(e){this.eTypes.forEach((t,i)=>{let o=0===i?e:this.optionsFactory.defaultOption;t.setValue(o,!0)})}getModelFromUi(){let e=this.getUiCompleteConditions();return 0===e.length?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{eJoinOrs:e,defaultJoinOperator:t}=this;return 0===e.length?t:!0===e[0].getValue()?"OR":"AND"}areNonNullModelsEqual(e,t){let i=!e.operator,o=!t.operator;return(!!i||!o)&&(!i||!!o)&&(i?this.areSimpleModelsEqual(e,t):e.operator===t.operator&&D(e.conditions,t.conditions,(e,t)=>this.areSimpleModelsEqual(e,t)))}setModelIntoUi(e,t){if(null==e)return this.resetUiToDefaults(t),ou.resolve();if(e.operator){var i,o;let t,r=e.conditions;null==r&&(r=[],tM(77));let s=(i=r,o=this.maxNumConditions,(t=i.length)>o&&(i.splice(o),tM(78),t=o),t),n=this.getNumConditions();if(s<n)this.removeConditionsAndOperators(s);else if(s>n)for(let e=n;e<s;e++)this.createJoinOperatorPanel(),this.createOption();let l="OR"===e.operator;this.eJoinAnds.forEach(e=>e.setValue(!l,!0)),this.eJoinOrs.forEach(e=>e.setValue(l,!0)),r.forEach((e,t)=>{this.eTypes[t].setValue(e.type,!0),this.setConditionIntoUi(e,t)})}else this.getNumConditions()>1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(e.type,!0),this.setConditionIntoUi(e,0);return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.updateUiVisibility(),t||this.params.onUiChange(this.getUiChangeEventParams()),ou.resolve()}setNumConditions(e){let t=e.maxNumConditions??2;t<1&&(tM(79),t=1),this.maxNumConditions=t;let i=e.numAlwaysVisibleConditions??1;i<1&&(tM(80),i=1),i>t&&(tM(81),i=t),this.numAlwaysVisibleConditions=i}createOption(){let e=this.getGui(),t=this.createManagedBean(new ch);this.eTypes.push(t),t.addCss("ag-filter-select"),e.appendChild(t.getGui());let i=this.createEValue();this.eConditionBodies.push(i),e.appendChild(i),this.putOptionsIntoDropdown(t),this.resetType(t);let o=this.getNumConditions()-1;this.forEachPositionInput(o,e=>this.resetInput(e)),this.addChangedListeners(t,o)}createJoinOperatorPanel(){let e=eW({tag:"div",cls:"ag-filter-condition"});this.eJoinPanels.push(e);let t=this.createJoinOperator(this.eJoinAnds,e,"and"),i=this.createJoinOperator(this.eJoinOrs,e,"or");this.getGui().appendChild(e);let o=this.eJoinPanels.length-1,r=this.joinOperatorId++;this.resetJoinOperatorAnd(t,o,r),this.resetJoinOperatorOr(i,o,r),this.isReadOnly()||(t.onValueChange(this.listener),i.onValueChange(this.listener))}createJoinOperator(e,t,i){let o=this.createManagedBean(new gn);e.push(o);let r="ag-filter-condition-operator";return o.addCss(r),o.addCss(`${r}-${i}`),t.appendChild(o.getGui()),o}createFilterListOptions(){this.filterListOptions=this.optionsFactory.filterOptions.map(e=>"string"==typeof e?this.createBoilerplateListOption(e):this.createCustomListOption(e))}putOptionsIntoDropdown(e){let{filterListOptions:t}=this;for(let i of t)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[]}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 t=this.lastUiCompletePosition??this.getNumConditions()-2;if(e<t){this.removeConditionsAndOperators(t+1);let i=e+1,o=t-i;o>0&&this.removeConditionsAndOperators(i,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=e}updateConditionStatusesAndValues(e,t){this.eTypes.forEach((t,i)=>{let o=this.isConditionDisabled(i,e);t.setDisabled(o||this.filterListOptions.length<=1),1===i&&(ef(this.eJoinPanels[0],o),this.eJoinAnds[0].setDisabled(o),this.eJoinOrs[0].setDisabled(o))}),this.eConditionBodies.forEach((e,t)=>{ep(e,this.isConditionBodyVisible(t))});let i=(t??this.getJoinOperator())==="OR";for(let e of this.eJoinAnds)e.setValue(!i,!0);for(let e of this.eJoinOrs)e.setValue(i,!0);this.forEachInput((t,i,o,r)=>{this.setElementDisplayed(t,i<r),this.setElementDisabled(t,this.isConditionDisabled(o,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:o,eJoinPanels:r,eJoinAnds:s,eJoinOrs:n}=this;this.removeComponents(i,e,t),this.removeElements(o,e,t),this.removeEValues(e,t);let l=Math.max(e-1,0);this.removeElements(r,l,t),this.removeComponents(s,l,t),this.removeComponents(n,l,t)}removeElements(e,t,i){for(let o of ga(e,t,i))ex(o)}removeComponents(e,t,i){for(let o of ga(e,t,i))ex(o.getGui()),this.destroyBean(o)}afterGuiAttached(e){if(super.afterGuiAttached(e),this.resetPlaceholder(),!e?.suppressFocus){let e;if(!this.isReadOnly()){let t=this.getInputs(0)[0];e=t instanceof r9&&this.isConditionBodyVisible(0)?t.getInputElement():this.eTypes[0]?.getFocusableElement()}(e??this.getGui()).focus({preventScroll:!0})}}shouldKeepInvalidInputState(){return!1}afterGuiDetached(){super.afterGuiDetached();let e=this.params;if(this.beans.colFilter?.shouldKeepStateOnDetach(e.column)||this.shouldKeepInvalidInputState())return;e.onStateChange({model:e.model});let t=-1,i=-1,o=!1,r=this.getJoinOperator();for(let e=this.getNumConditions()-1;e>=0;e--)if(this.isConditionUiComplete(e))-1===t&&(t=e,i=e);else{let r=e>=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(e-1),s=e<t;(r||s)&&(this.removeConditionsAndOperators(e,1),o=!0,s&&i--)}let s=!1;this.getNumConditions()<this.numAlwaysVisibleConditions&&(this.createMissingConditionsAndOperators(),s=!0),this.shouldAddNewConditionAtEnd(i===this.getNumConditions()-1)&&(this.createJoinOperatorPanel(),this.createOption(),s=!0),s&&this.updateConditionStatusesAndValues(i,r),o&&this.updateJoinOperatorsDisabled(),this.lastUiCompletePosition=i}getModelAsString(e){return this.params.getHandler()?.getModelAsString?.(e)??""}resetPlaceholder(){let e=this.getLocaleTextFunc(),{filterPlaceholder:t,eTypes:i}=this;this.forEachInput((o,r,s,n)=>{if(!(o instanceof r9))return;let l=0===r&&n>1?e("ariaFilterFromValue","Filter from value"):0===r?e("ariaFilterValue","Filter Value"):e("ariaFilterToValue","Filter to Value"),a=oJ(this,t,0===r&&n>1?"inRangeStart":0===r?"filterOoo":"inRangeEnd",i[s].getValue());o.setInputPlaceholder(a),o.setInputAriaLabel(l)})}setElementValue(e,t,i){e instanceof r9&&e.setValue(null!=t?String(t):null,!0)}setElementDisplayed(e,t){oc(e)&&ep(e.getGui(),t)}setElementDisabled(e,t){oc(e)&&ef(e.getGui(),t)}attachElementOnChange(e,t){e instanceof r9&&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 o=gu(t,this.optionsFactory),r=this.getInputs(e);for(let t=0;t<r.length;t++){let s=r[t];null!=s&&i(s,t,e,o)}}isConditionDisabled(e,t){return!!this.isReadOnly()||0!==e&&e>t+1}isConditionBodyVisible(e){return gu(this.getConditionType(e),this.optionsFactory)>0}isConditionUiComplete(e){return!(e>=this.getNumConditions()||"empty"===this.getConditionType(e)||this.getValues(e).some(e=>null==e)||this.positionHasInvalidInputs(e))}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){this.removeConditionsAndOperators(this.isReadOnly()?1:this.numAlwaysVisibleConditions),this.eTypes.forEach(e=>this.resetType(e)),this.eJoinAnds.forEach((e,t)=>this.resetJoinOperatorAnd(e,t,this.joinOperatorId+t)),this.eJoinOrs.forEach((e,t)=>this.resetJoinOperatorOr(e,t,this.joinOperatorId+t)),this.joinOperatorId++,this.forEachInput(e=>this.resetInput(e)),this.resetPlaceholder(),this.createMissingConditionsAndOperators(),this.lastUiCompletePosition=null,this.updateUiVisibility(),e||this.params.onUiChange(this.getUiChangeEventParams())}resetType(e){let t=this.getLocaleTextFunc()("ariaFilteringOperator","Filtering operator");e.setValue(this.optionsFactory.defaultOption,!0).setAriaLabel(t).setDisabled(this.isReadOnly()||this.filterListOptions.length<=1)}resetJoinOperatorAnd(e,t,i){this.resetJoinOperator(e,t,"AND"===this.defaultJoinOperator,this.translate("andCondition"),i)}resetJoinOperatorOr(e,t,i){this.resetJoinOperator(e,t,"OR"===this.defaultJoinOperator,this.translate("orCondition"),i)}resetJoinOperator(e,t,i,o,r){this.updateJoinOperatorDisabled(e.setValue(i,!0).setName(`ag-simple-filter-and-or-${this.getCompId()}-${r}`).setLabel(o),t)}updateJoinOperatorsDisabled(){let e=(e,t)=>this.updateJoinOperatorDisabled(e,t);this.eJoinAnds.forEach(e),this.eJoinOrs.forEach(e)}updateJoinOperatorDisabled(e,t){e.setDisabled(this.isReadOnly()||t>0)}resetInput(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())}setConditionIntoUi(e,t){let i=this.mapValuesFromModel(e,this.optionsFactory);this.forEachInput((e,o,r)=>{r===t&&this.setElementValue(e,null!=i[o]?i[o]:null)})}setValueFromFloatingFilter(e){this.forEachInput((t,i,o)=>{this.setElementValue(t,0===i&&0===o?e:null,!0)})}addChangedListeners(e,t){this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,e=>{this.attachElementOnChange(e,this.listener)}))}hasInvalidInputs(){return!1}positionHasInvalidInputs(e){return!1}isReadOnly(){return!!this.params.readOnly}},gg=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function gp(e){return e?.allowedCharPattern??null}function gf(e,t){let{filter:i,filterTo:o,type:r}=e||{};return[lP(i),lP(o)].slice(0,gu(r,t))}var gm=class extends gc{constructor(){super("bigintFilter",gf,gg),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="bigint",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!o9()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){let t=this.eValuesFrom[e],i=this.eValuesTo[e];this.refreshInputPairValidation(t,i)}}refreshInputPairValidation(e,t,i=!1){let{bigintParser:o}=this.params,r=this.getParsedValue(e,o),s=this.getParsedValue(t,o),n=this.isInvalidValue(e,r),l=this.isInvalidValue(t,s),a=i?e:t,d=i?t:e,h=i?n:l,u=i?l:n,c="";if(h)c=this.getLocaleTextFunc()("invalidBigInt","Invalid BigInt");else if(!n&&!l){var g,p,f;let o=(g=r,p=s,f=i,null!=g&&null!=p&&g>=p?`strict${f?"Max":"Min"}ValueValidation`:null);o&&(c=this.translate(o,[String(i?t.getValue():e.getValue())]))}a.setCustomValidity(c),u||d.setCustomValidity(""),c.length>0&&this.beans.ariaAnnounce.announceValue(c,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){let t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,r=this.state,s=o?.fromAction;return(s&&"apply"!=s||i.model!==r.model||!this.areStatesEqual(i.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){super.setElementValue(e,t,i),null===t&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:i}=this,o=gp(e),r=eW({tag:"div",cls:"ag-filter-body",role:"presentation"}),s=this.createFromToElement(r,t,"from",o),n=this.createFromToElement(r,i,"to",o),l=(e,t,i)=>()=>this.refreshInputPairValidation(e,t,i),a=l(s,n,!0);s.onValueChange(a),s.addGuiEventListener("focusin",a);let d=l(s,n,!1);return n.onValueChange(d),n.addGuiEventListener("focusin",d),r}createFromToElement(e,t,i,o){let r=this.createManagedBean(o?new u1({allowedCharPattern:o}):new u1);return r.addCss(`ag-filter-${i}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let i=i=>this.removeComponents(i,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,o,r)=>{i<r&&t.push(lP(e.getValue()??null))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=String(o[0])),o.length>1&&(i.filterTo=String(o[1])),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||(t=!e.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}getParsedValue(e,t){let i=e.getValue();return null==i||"string"==typeof i&&""===i.trim()?null:t?t(i):lP(i)}isInvalidValue(e,t){let i=e.getValue();return null!=i&&""!==String(i).trim()&&null===t}},gC=class extends e2{constructor(e,t){super(),this.mapValuesFromModel=e,this.defaultOptions=t}init(e){let t=e.filterParams,i=new gl;this.optionsFactory=i,i.init(t,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(i,t)),this.updateParams(e),this.validateModel(e)}refresh(e){if("colDef"===e.source){let t=e.filterParams,i=this.optionsFactory;i.refresh(t,this.defaultOptions),this.filterModelFormatter.updateParams({optionsFactory:i,filterParams:t}),this.updateParams(e)}this.validateModel(e)}updateParams(e){this.params=e}doesFilterPass(e){let t=e.model;if(null==t)return!0;let{operator:i}=t,o=[];i?o.push(...t.conditions??[]):o.push(t);let r=this.params.getValue(e.node);return o[i&&"OR"===i?"some":"every"](t=>this.individualConditionPasses(e,t,r))}getModelAsString(e,t){return this.filterModelFormatter.getModelAsString(e,t)??""}validateModel(e){let{model:t,filterParams:{filterOptions:i,maxNumConditions:o}}=e;if(null==t)return;let r=o2(t)?t.conditions:[t],s=i?.map(e=>"string"==typeof e?e:e.displayKey)??this.defaultOptions;if(!(!r||r.every(e=>void 0!==s.find(t=>t===e.type)))){this.params={...e,model:null},e.onModelChange(null);return}let n=!1,l=this.filterType;if((r&&!r.every(e=>e.filterType===l)||t.filterType!==l)&&(r=r.map(e=>({...e,filterType:l})),n=!0),"number"==typeof o&&r&&r.length>o&&(r=r.slice(0,o),n=!0),n){let i=r.length>1?{...t,filterType:l,conditions:r}:{...r[0],filterType:l};this.params={...e,model:i},e.onModelChange(i)}}individualConditionPasses(e,t,i){let o=this.optionsFactory,r=this.mapValuesFromModel(t,o),s=function(e,t,i){if(null==e)return;let{predicate:o}=e;if(null!=o&&!t.some(e=>null==e))return o(t,i)}(o.getCustomOption(t.type),r,i);return null!=s?s:null==i?this.evaluateNullValue(t.type):this.evaluateNonNullValue(r,i,t,e)}},gw=class extends gC{evaluateNullValue(e){let{includeBlanksInEquals:t,includeBlanksInNotEqual:i,includeBlanksInGreaterThan:o,includeBlanksInLessThan:r,includeBlanksInRange:s}=this.params.filterParams;switch(e){case"equals":if(t)return!0;break;case"notEqual":if(i)return!0;break;case"greaterThan":case"greaterThanOrEqual":if(o)return!0;break;case"lessThan":case"lessThanOrEqual":if(r)return!0;break;case"inRange":if(s)return!0;break;case"blank":return!0}return!1}evaluateNonNullValue(e,t,i){let o=i.type;if(!this.isValid(t))return"notEqual"===o||"notBlank"===o;let r=this.comparator(),s=null!=e[0]?r(e[0],t):0;switch(o){case"equals":return 0===s;case"notEqual":return 0!==s;case"greaterThan":return s>0;case"greaterThanOrEqual":return s>=0;case"lessThan":return s<0;case"lessThanOrEqual":return s<=0;case"inRange":{let i=r(e[1],t);return this.params.filterParams.inRangeInclusive?s>=0&&i<=0:s>0&&i<0}case"blank":return gd(t);case"notBlank":return!gd(t);default:return tM(76,{filterModelType:o}),!0}}},gv={equals:"Equals",notEqual:"NotEqual",greaterThan:"GreaterThan",greaterThanOrEqual:"GreaterThanOrEqual",lessThan:"LessThan",lessThanOrEqual:"LessThanOrEqual",inRange:"InRange"},gb={contains:"Contains",notContains:"NotContains",equals:"TextEquals",notEqual:"TextNotEqual",startsWith:"StartsWith",endsWith:"EndsWith",inRange:"InRange"},gy=class extends e2{constructor(e,t,i){super(),this.optionsFactory=e,this.filterParams=t,this.valueFormatter=i}getModelAsString(e,t){let i=this.getLocaleTextFunc(),o="filterToolPanel"===t;if(!e)return o?oY(this,"filterSummaryInactive"):null;if(null!=e.operator){let i=(e.conditions??[]).map(e=>this.getModelAsString(e,t)),o="AND"===e.operator?"andCondition":"orCondition";return i.join(` ${oY(this,o)} `)}{if("blank"===e.type||"notBlank"===e.type)return o?oY(this,"blank"===e.type?"filterSummaryBlank":"filterSummaryNotBlank"):i(e.type,e.type);let{displayKey:t,displayName:r,numberOfInputs:s}=this.optionsFactory.getCustomOption(e.type)||{};return t&&r&&0===s?i(t,r):this.conditionToString(e,o,"inRange"===e.type||2===s,t,r)}}updateParams(e){let{optionsFactory:t,filterParams:i}=e;this.optionsFactory=t,this.filterParams=i}conditionForToolPanel(e,t,i,o,r,s){let n,l=this.getTypeKey(e);if(l&&(n=oY(this,l)),r&&s&&(n=this.getLocaleTextFunc()(r,s)),null!=n)if(t)return`${n} ${oY(this,"filterSummaryInRangeValues",[i(),o()])}`;else return`${n} ${i()}`;return null}getTypeKey(e){let t=this.filterTypeKeys[e];return t?`filterSummary${t}`:null}formatValue(e){let t=this.valueFormatter;return t?t(e??null)??"":String(e)}},gS=class extends gy{constructor(e,t){super(e,t,t.bigintFormatter),this.filterTypeKeys=gv}conditionToString(e,t,i,o,r){let{filter:s,filterTo:n,type:l}=e,a=this.formatValue.bind(this),d=lP(s),h=lP(n);if(t){let e=this.conditionForToolPanel(l,i,()=>a(d),()=>a(h),o,r);if(null!=e)return e}return i?`${a(d)}-${a(h)}`:null!=s?a(d):`${l}`}},gR=class extends gw{constructor(){super(gf,gg),this.filterType="bigint",this.FilterModelFormatterClass=gS}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return null!==lP(e)}},gF=class extends e2{constructor(e){super(),this.params=e,this.eInput=null,this.onValueChanged=()=>{}}setupGui(e){this.eInput=this.createManagedBean(new u1(this.params?.config));let t=this.eInput.getGui();e.appendChild(t);let i=e=>this.onValueChanged(e);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,placeholder:i}){let{eInput:o}=this;o.setInputAriaLabel(e),void 0!==t&&o.setAutoComplete(t),o.toggleCss("ag-floating-filter-search-icon",!!i),o.setInputPlaceholder(i)}};function gP(e){let t=e?.trim();return""===t?e:t}function gx(e,t){let{filter:i,filterTo:o,type:r}=e||{};return[i||null,o||null].slice(0,gu(r,t))}var gD=class extends ow{constructor(){super(...arguments),this.defaultDebounceMs=0}setLastTypeFromModel(e){let t;if(!e){this.lastType=this.optionsFactory.defaultOption;return}t=e.operator?e.conditions[0]:e,this.lastType=t.type}canWeEditAfterModelFromParentFilter(e){return e?!e.operator&&this.isTypeEditable(e.type):this.isTypeEditable(this.lastType)}init(e){this.params=e;let t=this.gos.get("enableFilterHandlers");this.reactive=t,this.setParams(e),t&&this.onModelUpdated(e.model)}setParams(e){let t=new gl;this.optionsFactory=t,t.init(e.filterParams,this.defaultOptions),this.filterModelFormatter=this.createManagedBean(new this.FilterModelFormatterClass(t,e.filterParams)),this.setSimpleParams(e,!1)}setSimpleParams(e,t=!0){let i=this.optionsFactory.defaultOption;t||(this.lastType=i),this.readOnly=!!e.filterParams.readOnly;let o=this.isTypeEditable(i);this.setEditable(o)}refresh(e){this.params=e;let t=this.reactive;if(t&&"colDef"!==e.source||this.updateParams(e),t){let{source:t,model:i}=e;if("dataChanged"===t||"ui"===t)return;this.onModelUpdated(i)}}updateParams(e){let t=this.optionsFactory;t.refresh(e.filterParams,this.defaultOptions),this.setSimpleParams(e),this.filterModelFormatter.updateParams({optionsFactory:t,filterParams:e.filterParams})}onParentModelChanged(e,t){t?.afterFloatingFilter||t?.afterDataChange||this.onModelUpdated(e)}isTypeEditable(e){return!!e&&!this.readOnly&&1===gu(e,this.optionsFactory)}getAriaLabel(e){let t=this.beans.colNames.getDisplayNameForColumn(e,"header",!0);return`${t} ${this.getLocaleTextFunc()("ariaFilterInput","Filter Input")}`}},gE={tag:"div",ref:"eFloatingFilterInputContainer",cls:"ag-floating-filter-input",role:"presentation"},gM=class extends gD{constructor(){super(...arguments),this.eFloatingFilterInputContainer=null,this.defaultDebounceMs=500}postConstruct(){this.setTemplate(gE)}onModelUpdated(e){this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.inputSvc.setValue(this.filterModelFormatter.getModelAsString(e))}setParams(e){this.setupFloatingFilterInputService(e),super.setParams(e),this.setTextInputParams(e)}setupFloatingFilterInputService(e){this.inputSvc=this.createFloatingFilterInputService(e),this.inputSvc.setupGui(this.eFloatingFilterInputContainer)}setTextInputParams(e){let{inputSvc:t,defaultDebounceMs:i,readOnly:o}=this,{filterPlaceholder:r,column:s,browserAutoComplete:n,filterParams:l}=e,a=this.lastType??this.optionsFactory.defaultOption,d=e.filterParams.filterPlaceholder,h=!0===r?oJ(this,d,"filterOoo",a):r||void 0;if(t.setParams({ariaLabel:this.getAriaLabel(s),autoComplete:n??!1,placeholder:h}),this.applyActive=oZ(l),!o){let e=oQ(l,i);t.setValueChangedListener(e7(this,this.syncUpWithParentFilter.bind(this),e))}}updateParams(e){super.updateParams(e),this.setTextInputParams(e)}recreateFloatingFilterInputService(e){let{inputSvc:t}=this,i=t.getValue();eP(this.eFloatingFilterInputContainer),this.destroyBean(t),this.setupFloatingFilterInputService(e),t.setValue(i,!0)}syncUpWithParentFilter(e){let t=e.key===i3,i=this.reactive;if(i&&this.params.onUiChange(),this.applyActive&&!t)return;let{inputSvc:o,params:r,lastType:s}=this,n=o.getValue();if(r.filterParams.trimInput&&(n=gP(n),o.setValue(n,!0)),i){let e=r.model,t=this.convertValue(n),i=null==t?null:{...e??{filterType:this.filterType,type:s??this.optionsFactory.defaultOption},filter:t};r.onModelChange(i,{afterFloatingFilter:!0})}else r.parentFilterInstance(e=>{e?.onFloatingFilterChanged(s||null,n||null)})}convertValue(e){return e||null}setEditable(e){this.inputSvc.setEditable(e)}},gT=class extends gM{constructor(){super(...arguments),this.FilterModelFormatterClass=gS,this.filterType="bigint",this.defaultOptions=gg}updateParams(e){let t=e.filterParams;gp(t)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),this.bigintParser=t?.bigintParser,super.updateParams(e)}createFloatingFilterInputService(e){let t=e.filterParams;this.allowedCharPattern=gp(t),this.bigintParser=t?.bigintParser;let i=this.allowedCharPattern?{allowedCharPattern:this.allowedCharPattern}:void 0;return this.createManagedBean(new gF({config:i}))}convertValue(e){return null==e||""===e?null:this.bigintParser?this.bigintParser(e):lP(e)}},gk=".ag-input-field-input",gA=class{constructor(e,t,i,o,r,s){this.context=e,this.eParent=r,this.alive=!0,this.debouncedReport=e7({isAlive:()=>this.alive},gI,500),this.timeoutHandle=null;const n=function(e,t,i){return e.getCompDetails(t,oP,"agDateInput",i,!0)}(t,i,o);n?.newAgStackInstance().then(t=>{if(!this.alive)return void e.destroyBean(t);if(this.dateComp=t,!t)return;r.appendChild(t.getGui()),t?.afterGuiAttached?.();let{tempValue:i,disabled:o}=this;i&&t.setDate(i),null!=o&&t.setDisabled?.(o),s?.(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){ep(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)}setCustomValidity(e,t=!1){let i=this.dateComp?.getGui().querySelector(gk);if(i&&"setCustomValidity"in i){let o=e.length>0;i.setCustomValidity(e),o?t?this.timeoutHandle=this.debouncedReport(i):gI(i):this.timeoutHandle&&window.clearTimeout(this.timeoutHandle),et(i,o)}}getValidity(){return this.dateComp?.getGui().querySelector(gk)?.validity}};function gI(e){e.reportValidity()}var gL=["equals","notEqual","lessThan","greaterThan","inRange","blank","notBlank"];function gB(e,t){let{dateFrom:i,dateTo:o,type:r}=e||{};return[i&&lB(i,void 0,!0)||null,o&&lB(o,void 0,!0)||null].slice(0,gu(r,t))}var gV=1/0,gG=class extends gc{constructor(){super("dateFilter",gB,gL),this.eConditionPanelsFrom=[],this.eConditionPanelsTo=[],this.dateConditionFromComps=[],this.dateConditionToComps=[],this.minValidYear=1e3,this.maxValidYear=gV,this.minValidDate=null,this.maxValidDate=null,this.filterType="date"}afterGuiAttached(e){super.afterGuiAttached(e),this.dateConditionFromComps[0].afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!o9()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}commonUpdateSimpleParams(e){super.commonUpdateSimpleParams(e);let t=(t,i)=>{let o=e[t];if(null!=o)if(!isNaN(o))return null==o?i:Number(o);else tM(82,{param:t});return i},i=t("minValidYear",1e3),o=t("maxValidYear",gV);this.minValidYear=i,this.maxValidYear=o,i>o&&tM(83);let{minValidDate:r,maxValidDate:s}=e,n=r instanceof Date?r:lB(r);this.minValidDate=n;let l=s instanceof Date?s:lB(s);this.maxValidDate=l,n&&l&&n>l&&tM(84)}refreshInputValidation(){for(let e=0;e<this.dateConditionFromComps.length;e++)this.refreshInputPairValidation(e,!1,!0)}refreshInputPairValidation(e,t=!1,i=!1){var o,r,s;let{dateConditionFromComps:n,dateConditionToComps:l,beans:a}=this,d=n[e],h=l[e],u=d.getDate(),c=h.getDate(),g=(o=u,r=c,s=t,null!=o&&null!=r&&o>=r?`${s?"max":"min"}DateValidation`:null),p=g?this.translate(g,[String(t?c:u)]):"",f=!o9()&&!i;(t?d:h).setCustomValidity(p,f),(t?h:d).setCustomValidity("",f),p.length>0&&a.ariaAnnounce.announceValue(p,"dateFilter")}createDateCompWrapper(e,t,i){let{beans:{userCompFactory:o,context:r,gos:s},params:n}=this,l="from"===i,a=new gA(r,o,n.colDef,is(s,{onDateChanged:()=>{this.refreshInputPairValidation(t,l),this.onUiChanged()},onFocusIn:()=>this.refreshInputPairValidation(t,l),filterParams:n,location:"filter"}),e);return this.addDestroyFunc(()=>a.destroy()),a}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}setElementValue(e,t){e.setDate(t),t||e.setCustomValidity("")}setElementDisplayed(e,t){e.setDisplayed(t)}setElementDisabled(e,t){e.setDisabled(t)}createEValue(){let e=eW({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,o){let r=eW({tag:"div",cls:`ag-filter-${o} ag-filter-date-${o}`});t.push(r),e.appendChild(r),i.push(this.createDateCompWrapper(r,t.length-1,o))}removeEValues(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),ga(this.eConditionPanelsFrom,e,t),ga(this.eConditionPanelsTo,e,t)}removeDateComps(e,t,i){for(let o of ga(e,t,i))o.destroy()}isValidDateValue(e){if(null===e)return!1;let{minValidDate:t,maxValidDate:i,minValidYear:o,maxValidYear:r}=this;if(t){if(e<t)return!1}else if(e.getUTCFullYear()<o)return!1;if(i){if(e>i)return!1}else if(e.getUTCFullYear()>r)return!1;return!0}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=null!=t.getDate()&&!(t.getValidity()?.valid??!0))),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||(t=!(e.getValidity()?.valid??!0))),t}canApply(e){return!this.hasInvalidInputs()}isConditionUiComplete(e){if(!super.isConditionUiComplete(e))return!1;let t=!0;return this.forEachPositionInput(e,(e,i,o,r)=>{t&&!(i>=r)&&t&&(t=this.isValidDateValue(e.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={},{params:o,filterType:r}=this,s=this.getValues(e),n=o.useIsoSeparator?"T":" ";return s.length>0&&(i.dateFrom=lM(s[0],!0,n)),s.length>1&&(i.dateTo=lM(s[1],!0,n)),{dateFrom:null,dateTo:null,filterType:r,type:t,...i}}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}resetPlaceholder(){let e=this.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),i=e("ariaFilterValue","Filter Value");this.forEachInput(e=>{e.setInputPlaceholder(t),e.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,(e,i,o,r)=>{i<r&&t.push(e.getDate())}),t}translate(e,t){let i=e;return"lessThan"===e?i="before":"greaterThan"===e&&(i="after"),super.translate(i,t)}},gH=class extends gy{constructor(e,t){super(e,t,e=>{let{dataTypeSvc:i,valueSvc:o}=this.beans,r=t.column,s=i?.getDateFormatterFunction(r),n=s?s(e??void 0):e;return o.formatValue(r,null,n)}),this.filterTypeKeys=gv}conditionToString(e,t,i,o,r){let{type:s}=e,n=lB(e.dateFrom),l=lB(e.dateTo),a=this.filterParams.inRangeFloatingFilterDateFormat,d=t?this.formatValue.bind(this):e=>(function(e,t){if(null==t)return lM(e,!1);let i=lE(e.getFullYear(),4),o={YYYY:()=>i.slice(i.length-4,i.length),YY:()=>i.slice(i.length-2,i.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>lA[e.getMonth()],MMM:()=>lA[e.getMonth()].slice(0,3),MM:()=>lE(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${lk(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${lk(e.getDate())}`,DD:()=>lE(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>lI[e.getDay()],ddd:()=>lI[e.getDay()].slice(0,3),dd:()=>lI[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${lk(e.getDay())}`,d:()=>`${e.getDay()}`},r=RegExp(Object.keys(o).join("|"),"g");return t.replace(r,e=>e in o?o[e]():e)})(e,a),h=()=>null!==n?d(n):"null",u=()=>null!==l?d(l):"null";if(null==n&&null==l)return oY(this,s);if(t){let e=this.conditionForToolPanel(s,i,h,u,o,r);if(null!=e)return e}return i?`${h()}-${u()}`:null!=n?d(n):`${s}`}};function gO(e,t){return t<e?-1:+(t>e)}var gN=class extends gw{constructor(){super(gB,gL),this.filterType="date",this.FilterModelFormatterClass=gH,this.filterTypeToRangeCache=new Map}getOrRefreshRangeCacheItem(e,t){let{filterTypeToRangeCache:i}=this,o=Date.now(),r=i.get(e);if(r&&r.expires<o&&(r=void 0),!r){let[s,n]=t(new Date(o),new Date(o));r={from:s,to:n,expires:gK(new Date(o)).getTime()-o},i.set(e,r)}return r}comparator(){return this.params.filterParams.comparator??gO}isValid(e){let t=this.params.filterParams.isValidDate;return!t||t(e)}evaluateNonNullValue(e,t,i){let o=i.type,r=this.comparator();if(!this.isValid(t))return"notEqual"===o||"notBlank"===o;let s=g7[o];if(s){let{from:e,to:i}=this.getOrRefreshRangeCacheItem(o,s);return r(e,t)>=0&&0>r(i,t)}return super.evaluateNonNullValue(e,t,i)}},gz=null,gW=e=>(e.setHours(0,0,0,0),e),gU=e=>{let t=e.getDay(),i=(()=>{let e;if(null!=gz)return gz;let t="u"<typeof navigator?void 0:navigator.languages?.[0]??navigator.language;if(t&&"u">typeof Intl&&"function"==typeof Intl.Locale)try{let i=new Intl.Locale(t).getWeekInfo?.();e=i?.firstDay}catch{e=void 0}return gz=null==e?1:e%7})();return e.setDate(e.getDate()-(t-i+7)%7),gW(e)},g$=(e,t=1)=>(e.setDate(e.getDate()-t),e),gK=e=>(e.setDate(e.getDate()+1),gW(e)),gj=e=>(gU(e),e.setDate(e.getDate()+6),gK(e)),g_=e=>(e.setDate(1),gW(e)),gq=e=>(e.setDate(1),e.setMonth(e.getMonth()+1),gW(e)),gY=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(3*t),g_(e)},gQ=e=>{let t=Math.floor(e.getMonth()/3);return e.setMonth(3*t+2),gq(e)},gZ=e=>(e.setMonth(0,1),gW(e)),gJ=e=>(e.setMonth(12,0),gK(e)),gX=e=>g$(e),g0=e=>gX(gU(e)),g1=e=>gX(g_(e)),g2=e=>gX(gY(e)),g5=(e,t)=>[gW(e),gK(t)],g3=(e,t)=>[gU(e),gj(t)],g4=(e,t)=>[g_(e),gq(t)],g6=(e,t)=>[gY(e),gQ(t)],g8=(e,t)=>[gZ(e),gJ(t)],g7={today:g5,yesterday:(e,t)=>g5(gX(e),gX(t)),tomorrow:(e,t)=>(e.setDate(e.getDate()+1),t.setDate(t.getDate()+1),g5(e,t)),thisWeek:g3,lastWeek:(e,t)=>g3(g0(e),g0(t)),nextWeek:(e,t)=>(e.setDate(e.getDate()+7),t.setDate(t.getDate()+7),g3(e,t)),thisMonth:g4,lastMonth:(e,t)=>g4(g1(e),g1(t)),nextMonth:(e,t)=>(e.setMonth(e.getMonth()+1),t.setMonth(t.getMonth()+1),g4(e,t)),thisQuarter:g6,lastQuarter:(e,t)=>g6(g2(e),g2(t)),nextQuarter:(e,t)=>(e.setMonth(e.getMonth()+3),t.setMonth(t.getMonth()+3),g6(e,t)),thisYear:g8,lastYear:(e,t)=>(e.setFullYear(e.getFullYear()-1),t.setFullYear(t.getFullYear()-1),g8(e,t)),nextYear:(e,t)=>(e.setFullYear(e.getFullYear()+1),t.setFullYear(t.getFullYear()+1),g8(e,t)),yearToDate:(e,t)=>[gZ(e),gK(t)],last7Days:(e,t)=>[gW(g$(e,7)),gK(t)],last30Days:(e,t)=>[gW(g$(e,30)),gK(t)],last90Days:(e,t)=>[gW(g$(e,90)),gK(t)],last6Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),e.setMonth(e.getMonth()+6),[gW(e),gK(t)]),last12Months:(e,t)=>(e.setFullYear(e.getFullYear()-1),[gW(e),gK(t)]),last24Months:(e,t)=>(e.setFullYear(e.getFullYear()-2),[gW(e),gK(t)]),setStartOfDay:gW,setStartOfWeek:gU,setStartOfNextDay:gK,setStartOfNextWeek:gj,setStartOfMonth:g_,setStartOfNextMonth:gq,setStartOfQuarter:gY,setStartOfNextQuarter:gQ,setStartOfYear:gZ,setStartOfNextYear:gJ,setPreviousDay:gX,setPreviousWeek:g0,setPreviousMonth:g1,setPreviousQuarter:g2},g9={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"}]},pe=class extends gD{constructor(){super(g9,[u2]),this.eReadOnlyText=null,this.eDateWrapper=null,this.FilterModelFormatterClass=gH,this.filterType="date",this.defaultOptions=gL}setParams(e){super.setParams(e),this.createDateComponent();let t=this.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(t("ariaDateFilterInput","Date Filter Input"))}updateParams(e){super.updateParams(e),this.dateComp.updateParams(this.getDateComponentParams()),this.updateCompOnModelChange(e.currentParentModel())}updateCompOnModelChange(e){let t=!this.readOnly&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){let t=e?lB(e.dateFrom):null;this.dateComp.setDate(t),this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)}setEditable(e){ep(this.eDateWrapper,e),ep(this.eReadOnlyText.getGui(),!e)}onModelUpdated(e){super.setLastTypeFromModel(e),this.updateCompOnModelChange(e)}onDateChanged(){let e=this.dateComp.getDate();if(this.reactive){let t=this.params;t.onUiChange();let i=t.model,o=lM(e),r=null==o?null:{...i??{filterType:this.filterType,type:this.lastType??this.optionsFactory.defaultOption},dateFrom:o};t.onModelChange(r,{afterFloatingFilter:!0})}else this.params.parentFilterInstance(t=>{t?.onFloatingFilterChanged(this.lastType||null,e)})}getDateComponentParams(){let{filterParams:e}=this.params,t=oQ(e,this.defaultDebounceMs);return is(this.gos,{onDateChanged:e7(this,this.onDateChanged.bind(this),t),filterParams:e,location:"floatingFilter"})}createDateComponent(){let{beans:{context:e,userCompFactory:t},eDateWrapper:i,params:{column:o}}=this;this.dateComp=new gA(e,t,o.getColDef(),this.getDateComponentParams(),i,e=>{e.setInputAriaLabel(this.getAriaLabel(o))}),this.addDestroyFunc(()=>this.dateComp.destroy())}},pt={tag:"div",cls:"ag-filter-filter",children:[{tag:"ag-input-text-field",ref:"eDateInput",cls:"ag-date-filter"}]},pi=class extends ow{constructor(){super(pt,[u2]),this.eDateInput=null,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),focusin:this.handleFocusIn.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())}handleFocusIn(){this.params.onFocusIn?.()}setParams(e){let t=this.eDateInput.getInputElement(),i=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=i&&o7();let{minValidYear:o,maxValidYear:r,minValidDate:s,maxValidDate:n,buttons:l,includeTime:a,colDef:d}=e.filterParams||{},h=this.beans.dataTypeSvc,u=a??h?.getDateIncludesTimeFlag?.(d.cellDataType)??!1;i?u?(t.type="datetime-local",t.step="1"):t.type="date":t.type="text";let c=po(s,o,!0),g=po(n,r,!1);c&&g&&c.getTime()>g.getTime()&&tM(87),c&&(t.min=lM(c,u)),g&&(t.max=lM(g,u)),this.isApply="floatingFilter"===e.location&&!!l?.includes("apply")}refresh(e){this.params=e,this.setParams(e)}getDate(){return lB(this.eDateInput.getValue())}setDate(e){let t=this.params.filterParams.colDef.cellDataType,i=this.beans.dataTypeSvc?.getDateIncludesTimeFlag(t)??!1;this.eDateInput.setValue(lM(e,i))}setInputPlaceholder(e){this.eDateInput.setInputPlaceholder(e)}setInputAriaLabel(e){this.eDateInput.setAriaLabel(e)}setDisabled(e){this.eDateInput.setDisabled(e)}afterGuiAttached(e){e?.suppressFocus||this.eDateInput.getInputElement().focus({preventScroll:!0})}shouldUseBrowserDatePicker(e){return e?.filterParams?.browserDatePicker??!0}};function po(e,t,i){return(e&&t&&tM(i?85:86),e instanceof Date)?e:e?lB(e):t?lB(`${t}-${i?"01-01":"12-31"}`):null}var pr=["equals","notEqual","greaterThan","greaterThanOrEqual","lessThan","lessThanOrEqual","inRange","blank","notBlank"];function ps(e){return e?.allowedCharPattern??null}function pn(e){return null==e||isNaN(e)?null:e}function pl(e,t){let{filter:i,filterTo:o,type:r}=e||{};return[pn(i),pn(o)].slice(0,gu(r,t))}var pa=class extends gc{constructor(){super("numberFilter",pl,pr),this.eValuesFrom=[],this.eValuesTo=[],this.filterType="number",this.defaultDebounceMs=500}afterGuiAttached(e){super.afterGuiAttached(e),this.refreshInputValidation()}shouldKeepInvalidInputState(){return!o9()&&this.hasInvalidInputs()&&this.getConditionTypes().includes("inRange")}refreshInputValidation(){for(let e=0;e<this.eValuesFrom.length;e++){let t=this.eValuesFrom[e],i=this.eValuesTo[e];this.refreshInputPairValidation(t,i)}}refreshInputPairValidation(e,t,i=!1){var o,r,s;let n=this.params.numberParser,l=ph(n,e),a=ph(n,t),d=(o=l,r=a,s=i,null!=o&&null!=r&&o>=r?`strict${s?"Max":"Min"}ValueValidation`:null),h=d?this.translate(d,[String(i?a:l)]):"";(i?e:t).setCustomValidity(h),(i?t:e).setCustomValidity(""),h.length>0&&this.beans.ariaAnnounce.announceValue(h,"dateFilter")}getState(){return{isInvalid:this.hasInvalidInputs()}}areStatesEqual(e,t){return(e?.isInvalid??!1)===(t?.isInvalid??!1)}refresh(e){let t=super.refresh(e),{state:i,additionalEventAttributes:o}=e,r=this.state,s=o?.fromAction;return(s&&"apply"!=s||i.model!==r.model||!this.areStatesEqual(i.state,r.state))&&this.refreshInputValidation(),t}setElementValue(e,t,i){let{numberFormatter:o}=this.params,r=!i&&o?o(t??null):t;super.setElementValue(e,r),null===r&&e.setCustomValidity("")}createEValue(){let{params:e,eValuesFrom:t,eValuesTo:i}=this,o=ps(e),r=eW({tag:"div",cls:"ag-filter-body",role:"presentation"}),s=this.createFromToElement(r,t,"from",o),n=this.createFromToElement(r,i,"to",o),l=(e,t,i)=>()=>this.refreshInputPairValidation(e,t,i),a=l(s,n,!0);s.onValueChange(a),s.addGuiEventListener("focusin",a);let d=l(s,n,!1);return n.onValueChange(d),n.addGuiEventListener("focusin",d),r}createFromToElement(e,t,i,o){let r=this.createManagedBean(o?new u1({allowedCharPattern:o}):new ci);return r.addCss(`ag-filter-${i}`),r.addCss("ag-filter-filter"),t.push(r),e.appendChild(r.getGui()),r}removeEValues(e,t){let i=i=>this.removeComponents(i,e,t);i(this.eValuesFrom),i(this.eValuesTo)}getValues(e){let t=[];return this.forEachPositionInput(e,(e,i,o,r)=>{i<r&&t.push(pn(pd(this.params.numberParser,e.getValue())))}),t}areSimpleModelsEqual(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type}createCondition(e){let t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[1]),i}removeConditionsAndOperators(e,t){if(!this.hasInvalidInputs())return super.removeConditionsAndOperators(e,t)}getInputs(e){let{eValuesFrom:t,eValuesTo:i}=this;return e>=t.length?[null,null]:[t[e],i[e]]}hasInvalidInputs(){let e=!1;return this.forEachInput(t=>e||(e=!t.getInputElement().validity.valid)),e}positionHasInvalidInputs(e){let t=!1;return this.forEachPositionInput(e,e=>t||(t=!e.getInputElement().validity.valid)),t}canApply(e){return!this.hasInvalidInputs()}};function pd(e,t){if("number"==typeof t)return t;let i=k(t);return(null!=i&&""===i.trim()&&(i=null),e)?e(i):null==i||"-"===i.trim()?null:Number.parseFloat(i)}function ph(e,t){return pn(pd(e,t.getValue(!0)))}var pu=class extends gy{constructor(e,t){super(e,t,t.numberFormatter),this.filterTypeKeys=gv}conditionToString(e,t,i,o,r){let{filter:s,filterTo:n,type:l}=e,a=this.formatValue.bind(this);if(t){let e=this.conditionForToolPanel(l,i,()=>a(s),()=>a(n),o,r);if(null!=e)return e}return i?`${a(s)}-${a(n)}`:null!=s?a(s):`${l}`}},pc=class extends gw{constructor(){super(pl,pr),this.filterType="number",this.FilterModelFormatterClass=pu}comparator(){return(e,t)=>e===t?0:e<t?1:-1}isValid(e){return!isNaN(e)}},pg=class extends e2{constructor(){super(...arguments),this.onValueChanged=()=>{},this.numberInputActive=!0}setupGui(e){this.eNumberInput=this.createManagedBean(new ci),this.eTextInput=this.createManagedBean(new u1),this.eTextInput.setDisabled(!0);let t=this.eNumberInput.getGui(),i=this.eTextInput.getGui();e.appendChild(t),e.appendChild(i),this.setupListeners(t,e=>this.onValueChanged(e)),this.setupListeners(i,e=>this.onValueChanged(e))}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({ariaLabel:e,autoComplete:t,placeholder:i}){this.setAriaLabel(e),void 0!==t&&this.setAutoComplete(t),this.setPlaceholder(this.eNumberInput,i),this.setPlaceholder(this.eTextInput,i)}setPlaceholder(e,t){e.toggleCss("ag-floating-filter-search-icon",!!t),e.setInputPlaceholder(t)}setAriaLabel(e){this.eNumberInput.setInputAriaLabel(e),this.eTextInput.setInputAriaLabel(e)}},pp=class extends gM{constructor(){super(...arguments),this.FilterModelFormatterClass=pu,this.filterType="number",this.defaultOptions=pr}updateParams(e){ps(e.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(e),super.updateParams(e)}createFloatingFilterInputService(e){return(this.allowedCharPattern=ps(e.filterParams),this.allowedCharPattern)?this.createManagedBean(new gF({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new pg)}convertValue(e){return e?Number(e):null}},pf=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"],pm=class extends gc{constructor(){super("textFilter",gx,pf),this.filterType="text",this.eValuesFrom=[],this.eValuesTo=[],this.defaultDebounceMs=500}createCondition(e){let t=this.getConditionType(e),i={filterType:this.filterType,type:t},o=this.getValues(e);return o.length>0&&(i.filter=o[0]),o.length>1&&(i.filterTo=o[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){let t=[];return this.forEachPositionInput(e,(e,i,o,r)=>{i<r&&t.push(k(e.getValue()))}),t}createEValue(){let e=eW({tag:"div",cls:"ag-filter-body",role:"presentation"}),{eValuesFrom:t,eValuesTo:i}=this;return this.createFromToElement(e,t,"from"),this.createFromToElement(e,i,"to"),e}createFromToElement(e,t,i){let o=this.createManagedBean(new u1);o.addCss(`ag-filter-${i}`),o.addCss("ag-filter-filter"),t.push(o),e.appendChild(o.getGui())}removeEValues(e,t){let i=i=>this.removeComponents(i,e,t),{eValuesFrom:o,eValuesTo:r}=this;i(o),i(r)}},pC=class extends gy{constructor(){super(...arguments),this.filterTypeKeys=gb}conditionToString(e,t,i,o,r){let{filter:s,filterTo:n,type:l}=e;if(t){let e=e=>()=>oY(this,"filterSummaryTextQuote",[e]),t=this.conditionForToolPanel(l,i,e(s),e(n),o,r);if(null!=t)return t}return i?`${s}-${n}`:null!=s?`${s}`:`${l}`}},pw=({filterOption:e,value:t,filterText:i})=>{if(null==i)return!1;switch(e){case"contains":return t.includes(i);case"notContains":return!t.includes(i);case"equals":return t===i;case"notEqual":return t!=i;case"startsWith":return 0===t.indexOf(i);case"endsWith":{let e=t.lastIndexOf(i);return e>=0&&e===t.length-i.length}default:return!1}},pv=e=>e,pb=e=>null==e?null:e.toString().toLowerCase(),py=class extends gC{constructor(){super(gx,pf),this.filterType="text",this.FilterModelFormatterClass=pC}updateParams(e){super.updateParams(e);let t=e.filterParams;this.matcher=t.textMatcher??pw,this.formatter=t.textFormatter??(t.caseSensitive?pv:pb)}evaluateNullValue(e){return!!e&&["notEqual","notContains","blank"].indexOf(e)>=0}evaluateNonNullValue(e,t,i,o){let r=e.map(e=>this.formatter(e))||[],s=this.formatter(t),{api:n,colDef:l,column:a,context:d,filterParams:{textFormatter:h}}=this.params;if("blank"===i.type)return gd(t);if("notBlank"===i.type)return!gd(t);let u={api:n,colDef:l,column:a,context:d,node:o.node,data:o.data,filterOption:i.type,value:s,textFormatter:h};return r.some(e=>this.matcher({...u,filterText:e}))}processModelToApply(e){if(e&&this.params.filterParams.trimInput){let t=e=>{let t={...e},{filter:i,filterTo:o}=e;return i&&(t.filter=gP(i)??null),o&&(t.filterTo=gP(o)??null),t};return o2(e)?{...e,conditions:e.conditions.map(t)}:t(e)}return e}},pS=class extends gM{constructor(){super(...arguments),this.FilterModelFormatterClass=pC,this.filterType="text",this.defaultOptions=pf}createFloatingFilterInputService(){return this.createManagedBean(new gF)}},pR=class extends e2{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",e=>this.setFilter(e.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:o}=this.beans,r=t.isPivotMode(),s=e?.getColumns(),n=t.getColDefCols(),l=(r&&!i.get("applyQuickFilterBeforePivotOrAgg")?o?.getPivotResultCols()?.list:n)??[];s&&(l=l.concat(s)),this.colsToUse=i.get("includeHiddenColumnsInQuickFilter")?l:l.filter(e=>e.isVisible()||e.isRowGroupActive())}isFilterPresent(){return null!==this.quickFilter}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 A(e)?e.toUpperCase():null}setFilter(e){if(null!=e&&"string"!=typeof e)return void tM(70,{newFilter:e});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 o=this.getTextForColumn(i,e);return A(o)&&o.includes(t)})}doesRowPassCache(e,t){return this.checkGenerateAggText(e),e.quickFilterAggregateText.includes(t)}doesRowPassMatcher(e,t){let i;e?(this.checkGenerateAggText(t),i=t.quickFilterAggregateText):i=this.getAggText(t);let{quickFilterParts:o,matcher:r}=this;return r(o,i)}checkGenerateAggText(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getAggText(e))}getTextForColumn(e,t){let i=this.beans.filterValueSvc.getValue(e,t),o=e.getColDef();if(o.getQuickFilterText){let r=is(this.gos,{value:i,node:t,data:t.data,column:e,colDef:o});i=o.getQuickFilterText(r)}return A(i)?i.toString().toUpperCase():null}getAggText(e){let t=[];for(let i of this.colsToUse){let o=this.getTextForColumn(i,e);A(o)&&t.push(o)}return t.join("\n")}},pF={moduleName:"FilterCore",version:tv,beans:[gt],apiFunctions:{isAnyFilterPresent:function(e){return!!e.filterManager?.isAnyFilterPresent()},onFilterChanged:function(e,t="api"){e.filterManager?.onFilterChanged({source:t})}},css:[".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;:where(.ag-set-filter-group-closed-icon),:where(.ag-set-filter-group-indeterminate-icon),:where(.ag-set-filter-group-opened-icon){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{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%}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>:where(.ag-date-floating-filter-wrapper),>:where(.ag-floating-filter-input),>:where(.ag-input-field){flex:1 1 auto}:where(.ag-input-field-input[type=date]),:where(.ag-input-field-input[type=datetime-local]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input :where(.ag-input-field-input)[disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:solid var(--ag-border-width) var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);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:var(--ag-widget-container-vertical-padding);: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)}"],dependsOn:[{moduleName:"ClientSideRowModelFilter",version:tv,rowModels:["clientSide"],beans:[ub]}]},pP={moduleName:"FilterValue",version:tv,beans:[go]},px={moduleName:"ColumnFilter",version:tv,beans:[ge,gi],dynamicBeans:{headerFilterCellCtrl:cY},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:function(e){let t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()},getColumnFilterInstance:function(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)},destroyFilter:function(e,t){let i=e.colModel.getColDefCol(t);if(i)return e.colFilter?.destroyFilter(i,"api")},setFilterModel:function(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))},getFilterModel:function(e){return e.filterManager?.getFilterModel()??{}},getColumnFilterModel:function(e,t,i){let{gos:o,colModel:r,colFilter:s}=e;i&&!o.get("enableFilterHandlers")&&(tM(288),i=!1);let n=r.getColDefCol(t);return n?s?.getModelForColumn(n,i)??null:null},setColumnFilterModel:function(e,t,i){return e.filterManager?.setColumnFilterModel(t,i)??Promise.resolve()},showColumnFilter:function(e,t){let i=e.colModel.getCol(t);i?e.menuSvc?.showFilterMenu({column:i,containerType:"columnFilter",positionBy:"auto"}):tT(12,{colKey:t})},hideColumnFilter:function(e){e.menuSvc?.hideFilterMenu()},getColumnFilterHandler:function(e,t){let i=e.colModel.getCol(t);return i?e.colFilter?.getHandler(i,!0):void tT(12,{colKey:t})},doFilterAction:function(e,t){let{colModel:i,colFilter:o,gos:r}=e;if(!r.get("enableFilterHandlers"))return void tM(287);let{colId:s,action:n}=t;if(s){let e=i.getColById(s);e&&o?.updateModel(e,n)}else o?.updateAllModels(n)}},dependsOn:[pF,uK,pP,{moduleName:"SharedMenu",version:tv,beans:[cQ],apiFunctions:{showColumnMenu:function(e,t){let i=e.colModel.getCol(t);i?e.menuSvc?.showColumnMenu({column:i,positionBy:"auto"}):tT(12,{colKey:t})},hidePopupMenu:function(e){e.menuSvc?.hidePopupMenu()}}}]},pD=class extends e2{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:o,rowNodes:r}=this;for(let s=0;s<e;s++){let e=i+s,n=new sa(o);n.setRowHeight(t),n.uiLevel=0,n.setRowIndex(e),n.setRowTop(t*e),r.push(n)}}getBlockStateJson(){let{id:e,startRow:t,endRow:i,state:o}=this;return{id:""+e,state:{blockNumber:e,startRow:t,endRow:i,pageStatus:o}}}setDataAndId(e,t,i){A(t)?e.setDataAndId(t,i.toString()):e.setDataAndId(void 0,void 0)}loadFromDatasource(){let e=this.createLoadParams();I(this.params.datasource.getRows)?tM(90):window.setTimeout(()=>{this.params.datasource.getRows(e)},0)}createLoadParams(){let{startRow:e,endRow:t,version:i,params:{sortModel:o,filterModel:r},gos:s}=this;return is(s,{startRow:e,endRow:t,successCallback:this.pageLoaded.bind(this,i),failCallback:this.pageLoadFailed.bind(this,i),sortModel:o,filterModel:r})}forEachNode(e,t,i){this.rowNodes.forEach((o,r)=>{this.startRow+r<i&&e(o,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,r)=>{let s=e.rowData?e.rowData[r]:void 0;!o.id&&o.alreadyRendered&&s&&(t[r]=new sa(i),t[r].setRowIndex(o.rowIndex),t[r].setRowTop(o.rowTop),t[r].setRowHeight(o.rowHeight),o._destroy(!0)),this.setDataAndId(t[r],s,this.startRow+r)});let o=null!=e.rowCount&&e.rowCount>=0?e.rowCount:void 0;this.parentCache.pageLoaded(this,o)}destroy(){let e=this.rowNodes;for(let t=0,i=e.length;t<i;t++)e[t]._destroy(!1);e.length=0,super.destroy()}},pE=class extends e2{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),o=this.blocks[i];if(!o){if(t)return;o=this.createBlock(i)}return o.getRow(e)}createBlock(e){let t=this.params,i=this.createBean(new pD(e,this,t));return this.blocks[i.id]=i,this.blockCount++,this.purgeBlocksIfNeeded(i),t.rowNodeBlockLoader.addBlock(i),i}refreshCache(){if(0==this.blockCount)return void this.purgeCache();for(let e of this.getBlocksInOrder())e.setStateWaitingToLoad();this.params.rowNodeBlockLoader.checkBlockToLoad()}destroy(){for(let e of this.getBlocksInOrder())this.destroyBlock(e);super.destroy()}getRowCount(){return this.rowCount}isLastRowIndexKnown(){return this.lastRowIndexKnown}pageLoaded(e,t){this.isAlive()&&(tl(this.gos,`InfiniteCache - onPageLoaded: page = ${e.id}, lastRow = ${t}`),this.checkRowCount(e,t),this.onCacheUpdated())}purgeBlocksIfNeeded(e){let t=this.getBlocksInOrder().filter(t=>t!=e);t.sort((e,t)=>t.lastAccessed-e.lastAccessed);let i=this.params.maxBlocksInCache>0,o=i?this.params.maxBlocksInCache-1:null;t.forEach((e,t)=>{if("needsLoading"===e.state&&t>=1||i&&t>=o){if(!(this.isBlockCurrentlyDisplayed(e)||this.isBlockFocused(e)))this.removeBlockFromCache(e)}})}isBlockFocused(e){let t=this.beans.focusSvc.getFocusCellToUseAfterRefresh();if(!t||null!=t.rowPinned)return!1;let{startRow:i,endRow:o}=e;return t.rowIndex>=i&&t.rowIndex<o}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("number"==typeof t&&t>=0)this.rowCount=t,this.lastRowIndexKnown=!0;else if(!this.lastRowIndexKnown){let{blockSize:t,overflowSize:i}=this.params,o=(e.id+1)*t+i;this.rowCount<o&&(this.rowCount=o)}}setRowCount(e,t){this.rowCount=e,A(t)&&(this.lastRowIndexKnown=t),!this.lastRowIndexKnown&&this.rowCount%this.params.blockSize==0&&this.rowCount++,this.onCacheUpdated()}forEachNodeDeep(e){let t={value:0};for(let i of this.getBlocksInOrder())i.forEachNode(e,t,this.rowCount)}getBlocksInOrder(){return Object.values(this.blocks).sort((e,t)=>e.id-t.id)}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=[];for(let t of this.getBlocksInOrder())t.id*this.params.blockSize>=this.rowCount&&e.push(t);if(e.length>0)for(let t of e)this.destroyBlock(t)}purgeCache(){for(let e of this.getBlocksInOrder())this.removeBlockFromCache(e);this.lastRowIndexKnown=!1,0===this.rowCount&&(this.rowCount=this.params.initialRowCount),this.onCacheUpdated()}getRowNodesInRange(e,t){let i=[],o=-1,r=!1,s={value:0},n=!1;for(let l of this.getBlocksInOrder())if(!n){if(r&&o+1!==l.id){n=!0;continue}o=l.id,l.forEachNode(o=>{let s=o===e||o===t;(r||s)&&i.push(o),s&&(r=!r)},s,this.rowCount)}return n||r?[]:i}},pM=class extends e2{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null}getRowBounds(e){return{rowHeight:this.rowHeight,rowTop:this.rowHeight*e}}ensureRowHeightsValid(){return!1}postConstruct(){if("infinite"!==this.gos.get("rowModelType"))return;let e=this.beans,t=new sa(e);this.rootNode=t,t.level=-1,this.rowHeight=tN(e),this.addEventListeners(),this.addDestroyFunc(()=>this.destroyCache())}start(){this.setDatasource(this.gos.get("datasource"))}destroy(){this.destroyDatasource(),super.destroy(),this.rootNode=null}destroyDatasource(){this.datasource&&(this.destroyBean(this.datasource),this.beans.rowRenderer.datasourceChanged(),this.datasource=null)}addEventListeners(){this.addManagedEventListeners({filterChanged:this.reset.bind(this),sortChanged:this.reset.bind(this),newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.dispatchModelUpdatedEvent.bind(this)}),this.addManagedPropertyListener("datasource",()=>this.setDatasource(this.gos.get("datasource"))),this.addManagedPropertyListener("cacheBlockSize",()=>this.resetCache()),this.addManagedPropertyListener("rowHeight",()=>{this.rowHeight=tN(this.beans),this.cacheParams.rowHeight=this.rowHeight,this.updateRowHeights()})}onColumnEverything(){this.cacheParams&&B(this.cacheParams.sortModel,this.beans.sortSvc?.getSortModel()??[])||this.reset()}getType(){return"infinite"}setDatasource(e){this.destroyDatasource(),this.datasource=e,e&&this.reset()}isEmpty(){return!this.infiniteCache}isRowsToRender(){return!!this.infiniteCache}getOverlayType(){let e=this.infiniteCache;return e?.getRowCount()===0?this.beans.filterManager?.isAnyFilterPresent()?"noMatchingRows":"noRows":null}getNodesInRangeForSelection(e,t){return this.infiniteCache?.getRowNodesInRange(e,t)??[]}reset(){this.datasource&&(null==tZ(this.gos)&&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:o,eventSvc:r,gos:s}=e;this.cacheParams={datasource:this.datasource,filterModel:t?.getFilterModel()??{},sortModel:i?.getSortModel()??[],rowNodeBlockLoader:o,initialRowCount:s.get("infiniteInitialRowCount"),maxBlocksInCache:s.get("maxBlocksInCache"),rowHeight:tN(e),overflowSize:s.get("cacheOverflowSize"),blockSize:s.get("cacheBlockSize"),lastAccessedSequence:{value:0}},this.infiniteCache=this.createBean(new pE(this.cacheParams)),r.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(0!==this.rowHeight){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)}resetRowHeights(){}onRowHeightChanged(){}},pT=class extends e2{constructor(){super(...arguments),this.beanName="rowNodeBlockLoader",this.activeBlockLoadsCount=0,this.blocks=[],this.active=!0}postConstruct(){let e;this.maxConcurrentRequests=(e=this.gos.get("maxConcurrentDatasourceRequests"))>0?e:void 0;let t=this.gos.get("blockLoadDebounceMillis");t&&t>0&&(this.checkBlockToLoadDebounce=e7(this,this.performCheckBlocksToLoad.bind(this),t))}addBlock(e){this.blocks.push(e),e.addEventListener("loadComplete",this.loadComplete.bind(this)),this.checkBlockToLoad()}removeBlock(e){M(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(),null!=this.maxConcurrentRequests&&this.activeBlockLoadsCount>=this.maxConcurrentRequests)return void tl(this.gos,"RowNodeBlockLoader - checkBlockToLoad: max loads exceeded");let e=null!=this.maxConcurrentRequests?this.maxConcurrentRequests-this.activeBlockLoadsCount:1,t=this.blocks.filter(e=>"needsLoading"===e.state).slice(0,e);for(let e of(this.activeBlockLoadsCount+=t.length,t))e.load();this.printCacheStatus()}getBlockState(){let e={};return this.blocks.forEach(t=>{let{id:i,state:o}=t.getBlockStateJson();e[i]=o}),e}printCacheStatus(){tl(this.gos,`RowNodeBlockLoader - printCacheStatus: activePageLoadsCount = ${this.activeBlockLoadsCount}, blocks = ${JSON.stringify(this.getBlockState())}`)}},pk=class extends e2{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?.()}addListener(e,t){let i=this.wrapSvc?.wrap(e,t)??t,o=!du.has(e),r=o?this.asyncListeners:this.syncListeners;r.has(e)||r.set(e,new Set),r.get(e).add(i),this.eventSvc.addListener(e,i,o)}removeListener(e,t){let i=this.wrapSvc?.unwrap(e,t)??t,o=this.asyncListeners.get(e),r=!!o?.delete(i);r||this.syncListeners.get(e)?.delete(i),this.eventSvc.removeListener(e,i,r)}addGlobalListener(e){let t=this.wrapSvc?.wrapGlobal(e)??e,i=(e,i)=>{du.has(e)&&t(e,i)},o=(e,i)=>{du.has(e)||t(e,i)};this.globalListenerPairs.set(e,{syncListener:i,asyncListener:o});let r=this.eventSvc;r.addGlobalListener(i,!1),r.addGlobalListener(o,!0)}removeGlobalListener(e){let{eventSvc:t,wrapSvc:i,globalListenerPairs:o}=this,r=i?.unwrapGlobal(e)??e;if(o.has(r)){let{syncListener:i,asyncListener:s}=o.get(r);t.removeGlobalListener(i,!1),t.removeGlobalListener(s,!0),o.delete(e)}else this.syncGlobalListeners.delete(r),t.removeGlobalListener(r,!1)}destroyEventListeners(e,t){e.forEach((e,i)=>{e.forEach(e=>this.eventSvc.removeListener(i,e,t)),e.clear()}),e.clear()}destroyGlobalListeners(e,t){for(let i of e)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:e,asyncListener:i})=>{t.removeGlobalListener(e,!1),t.removeGlobalListener(i,!0)}),e.clear()}},pA=class extends e2{constructor(){super(...arguments),this.beanName="localeSvc"}getLocaleTextFunc(){var e;let t=this.gos,i=t.getCallback("getLocaleText");return i?(e,t,o)=>i({key:e,defaultValue:t,variableValues:o}):(e=t.get("localeText"),(t,i,o)=>{let r=e?.[t];if(r&&o?.length){let e=0;for(;!(e>=o.length)&&-1!==r.indexOf("${variable}");)r=r.replace("${variable}",o[e++])}return r??i})}};function pI(e){var t;return(e={...e}).version||(e.version="32.1.0"),"32.1.0"===e.version&&((t=e).cellSelection=function(e,t){if(e&&"object"==typeof e)return e[t]}(t,"rangeSelection"),e=t),e.version=tv,e}var pL=class extends e2{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=e7(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=e7(this,()=>{this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(this.updateCachedState("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("rowGroupExpansion",void 0)):(this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState()),this.updateCachedState("ssrmRowGroupExpansion",void 0))},0),this.onRowSelectedDebounced=e7(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){let{gos:e,ctrlsSvc:t,colDelayRenderSvc:i}=this.beans;this.isClientSideRowModel=tL(e);let o=pI(e.get("initialState")??{}),r=o.partialColumnState;delete o.partialColumnState,this.cachedState=o;let s=this.suppressEventsAndDispatchInitEvent.bind(this);t.whenReady(this,()=>s(()=>this.setupStateOnGridReady(o))),(o.columnOrder||o.columnVisibility||o.columnSizing||o.columnPinning||o.columnGroup)&&i?.hideColumns("columnState");let[n,l,a]=this.addManagedEventListeners({newColumnsLoaded:({source:e})=>{"gridInitializing"===e&&(n(),s(()=>{this.setupStateOnColumnsInitialised(o,!!r),i?.revealColumns("columnState")}))},rowCountReady:()=>{l?.(),s(()=>this.setupStateOnRowCountReady(o))},firstDataRendered:()=>{a?.(),s(()=>this.setupStateOnFirstDataRendered(o))}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setState(e,t){let i=pI(e);delete i.partialColumnState,this.cachedState=i,this.startSuppressEvents();let o=t?new Set(t):void 0;this.setGridReadyState(i,"api",o),this.setColumnsInitialisedState(i,"api",!!o,o),this.setRowCountState(i,"api",o),setTimeout(()=>{this.isAlive()&&this.setFirstDataRenderedState(i,"api",o),this.stopSuppressEvents("api")})}setGridReadyState(e,t,i){"api"!==t||i?.has("sideBar")||this.beans.sideBar?.comp?.setState(e.sideBar),this.updateCachedState("sideBar",this.getSideBarState())}setupStateOnGridReady(e){this.setGridReadyState(e,"gridInitializing");let t=()=>this.updateCachedState("sideBar",this.getSideBarState());this.addManagedEventListeners({toolPanelVisibleChanged:t,sideBarUpdated:t})}updateColumnAndGroupState(){this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState())}setColumnsInitialisedState(e,t,i,o){this.setColumnState(e,t,i,o),this.setColumnGroupState(e,t,o),this.updateColumnAndGroupState()}setupStateOnColumnsInitialised(e,t){this.setColumnsInitialisedState(e,"gridInitializing",t);let i=e=>()=>this.updateColumnState([e]);this.addManagedEventListeners({columnValueChanged:i("aggregation"),columnMoved:i("columnOrder"),columnPinned:i("columnPinning"),columnResized:i("columnSizing"),columnVisible:i("columnVisibility"),columnPivotChanged:i("pivot"),columnPivotModeChanged:i("pivot"),columnRowGroupChanged:i("rowGroup"),sortChanged:i("sort"),newColumnsLoaded:this.updateColumnAndGroupState.bind(this),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setRowCountState(e,t,i){let{filter:o,rowGroupExpansion:r,ssrmRowGroupExpansion:s,rowSelection:n,pagination:l,rowPinning:a}=e,d=(e,o)=>!i?.has(e)&&(o||"api"===t);d("filter",o)&&this.setFilterState(o),d("rowGroupExpansion",r)&&this.setRowGroupExpansionState(s,r,t),d("rowSelection",n)&&this.setRowSelectionState(n,t),d("pagination",l)&&this.setPaginationState(l,t),d("rowPinning",a)&&this.setRowPinningState(a);let h=this.updateCachedState.bind(this);h("filter",this.getFilterState()),this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(h("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),h("rowGroupExpansion",void 0)):(h("rowGroupExpansion",this.getRowGroupExpansionState()),h("ssrmRowGroupExpansion",void 0)),h("rowSelection",this.getRowSelectionState()),h("pagination",this.getPaginationState())}setupStateOnRowCountReady(e){this.setRowCountState(e,"gridInitializing");let t=this.updateCachedState.bind(this),i=()=>{this.updateRowGroupExpansionStateTimer=0,this.beans.gos.get("ssrmExpandAllAffectsAllRows")?(t("ssrmRowGroupExpansion",this.getRowGroupExpansionState()),t("rowGroupExpansion",void 0)):(t("rowGroupExpansion",this.getRowGroupExpansionState()),t("ssrmRowGroupExpansion",void 0))},o=()=>t("filter",this.getFilterState()),{gos:r,colFilter:s,selectableFilter:n}=this.beans;this.addManagedEventListeners({filterChanged:o,rowExpansionStateChanged:this.onRowGroupOpenedDebounced,expandOrCollapseAll:i,columnRowGroupChanged:i,rowDataUpdated:()=>{(0!==r.get("groupDefaultExpanded")||r.get("isGroupOpenByDefault"))&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(i)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:e=>{(e.newPage||e.newPageSize)&&t("pagination",this.getPaginationState())},pinnedRowsChanged:()=>t("rowPinning",this.getRowPinningState())}),s&&this.addManagedListeners(s,{filterStateChanged:o}),n&&this.addManagedListeners(n,{selectedFilterChanged:o})}setFirstDataRenderedState(e,t,i){let{scroll:o,cellSelection:r,focusedCell:s,columnOrder:n}=e,l=(e,o)=>!i?.has(e)&&(o||"api"===t);l("focusedCell",s)&&this.setFocusedCellState(s),l("cellSelection",r)&&this.setCellSelectionState(r),l("scroll",o)&&this.setScrollState(o),this.setColumnPivotState(!!n?.orderedColIds,t);let a=this.updateCachedState.bind(this);a("sideBar",this.getSideBarState()),a("focusedCell",this.getFocusedCellState());let d=this.getRangeSelectionState();a("rangeSelection",d),a("cellSelection",d),a("scroll",this.getScrollState())}setupStateOnFirstDataRendered(e){this.setFirstDataRenderedState(e,"gridInitializing");let t=this.updateCachedState.bind(this),i=()=>t("focusedCell",this.getFocusedCellState());this.addManagedEventListeners({cellFocused:i,cellFocusCleared:i,cellSelectionChanged:e=>{if(e.finished){let e=this.getRangeSelectionState();t("rangeSelection",e),t("cellSelection",e)}},bodyScrollEnd:()=>t("scroll",this.getScrollState())})}getColumnState(){let e=this.beans;return function(e,t=!1){let i=[],o=[],r=[],s=[],n=[],l=[],a=[],d=[],h=[],u=0;for(let t=0;t<e.length;t++){let{colId:c,sort:g,sortType:p,sortIndex:f,rowGroup:m,rowGroupIndex:C,aggFunc:w,pivot:v,pivotIndex:b,pinned:y,hide:S,width:R,flex:F}=e[t];h.push(c),g&&(i[f??u++]={colId:c,sort:g,type:p}),m&&(o[C??0]=c),"string"==typeof w&&r.push({colId:c,aggFunc:w}),v&&(s[b??0]=c),y&&("right"===y?l:n).push(c),S&&a.push(c),(null!=F||R)&&d.push({colId:c,flex:F??void 0,width:null===R?void 0:R})}return{sort:i.length?{sortModel:un(i)}:void 0,rowGroup:o.length?{groupColIds:un(o)}:void 0,aggregation:r.length?{aggregationModel:r}:void 0,pivot:s.length||t?{pivotMode:t,pivotColIds:un(s)}:void 0,columnPinning:n.length||l.length?{leftColIds:n,rightColIds:l}:void 0,columnVisibility:a.length?{hiddenColIds:a}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:h.length?{orderedColIds:h}:void 0}}(iJ(e),e.colModel.isPivotMode())}setColumnState(e,t,i,o){let{sort:r,rowGroup:s,aggregation:n,pivot:l,columnPinning:a,columnVisibility:d,columnSizing:h,columnOrder:u}=e,c=!1,g=(e,i)=>{let r=!o?.has(e)&&!!(i||"api"===t);return c||(c=r),r},p={},f=e=>{let t=p[e];return t||(t={colId:e},p[e]=t),t},m={},C=g("sort",r);C&&r?.sortModel.forEach(({colId:e,sort:t},i)=>{let o=f(e);o.sort=t,o.sortIndex=i}),(C||!i)&&(m.sort=null,m.sortIndex=null);let w=g("rowGroup",s);w&&s?.groupColIds.forEach((e,t)=>{let i=f(e);i.rowGroup=!0,i.rowGroupIndex=t}),(w||!i)&&(m.rowGroup=null,m.rowGroupIndex=null);let v=g("aggregation",n);v&&n?.aggregationModel.forEach(({colId:e,aggFunc:t})=>{f(e).aggFunc=t}),(v||!i)&&(m.aggFunc=null);let b=g("pivot",l);b&&(l?.pivotColIds.forEach((e,t)=>{let i=f(e);i.pivot=!0,i.pivotIndex=t}),this.gos.updateGridOptions({options:{pivotMode:!!l?.pivotMode},source:t})),(b||!i)&&(m.pivot=null,m.pivotIndex=null);let y=g("columnPinning",a);if(y){for(let e of a?.leftColIds??[])f(e).pinned="left";for(let e of a?.rightColIds??[])f(e).pinned="right"}(y||!i)&&(m.pinned=null);let S=g("columnVisibility",d);if(S)for(let e of d?.hiddenColIds??[])f(e).hide=!0;(S||!i)&&(m.hide=null);let R=g("columnSizing",h);if(R)for(let{colId:e,flex:t,width:i}of h?.columnSizingModel??[]){let o=f(e);o.flex=t??null,o.width=i}(R||!i)&&(m.flex=null);let F=u?.orderedColIds,P=!!F?.length&&!o?.has("columnOrder"),x=P?F.map(e=>f(e)):Object.values(p);(x.length||c)&&(this.columnStates=x,iQ(this.beans,{state:x,applyOrder:P,defaultState:m},t))}setColumnPivotState(e,t){let i=this.columnStates;this.columnStates=void 0;let o=this.columnGroupStates;this.columnGroupStates=void 0;let r=this.beans,{pivotResultCols:s,colGroupSvc:n}=r;if(s?.isPivotResultColsPresent()){if(i){let o=[];for(let e of i)s.getPivotResultCol(e.colId)&&o.push(e);iQ(r,{state:o,applyOrder:e},t)}o&&n?.setColumnGroupState(o,t)}}getColumnGroupState(){let e=this.beans.colGroupSvc;if(!e)return;var t=e.getColumnGroupState();let i=[];for(let{groupId:e,open:o}of t)o&&i.push(e);return i.length?{openColumnGroupIds:i}:void 0}setColumnGroupState(e,t,i){let o=this.beans.colGroupSvc;if(!o||i?.has("columnGroup")||"api"!==t&&!Object.prototype.hasOwnProperty.call(e,"columnGroup"))return;let r=new Set(e.columnGroup?.openColumnGroupIds),s=o.getColumnGroupState().map(({groupId:e})=>{let t=r.has(e);return t&&r.delete(e),{groupId:e,open:t}});for(let e of r)s.push({groupId:e,open:!0});s.length&&(this.columnGroupStates=s),o.setColumnGroupState(s,t)}getFilterState(){let{filterManager:e,selectableFilter:t}=this.beans,i=e?.getFilterModel();i&&0===Object.keys(i).length&&(i=void 0);let o=e?.getFilterState(),r=e?.getAdvFilterModel()??void 0,s=t?.getState();return i||r||o||s?{filterModel:i,columnFilterState:o,advancedFilterModel:r,selectableFilters:s}:void 0}setFilterState(e){let{filterManager:t,selectableFilter:i}=this.beans,{filterModel:o,columnFilterState:r,advancedFilterModel:s,selectableFilters:n}=e??{filterModel:null,columnFilterState:null,advancedFilterModel:null};void 0!==n&&i?.setState(n??{}),(void 0!==o||void 0!==r)&&t?.setFilterState(o??null,r??null,"columnFilter"),void 0!==s&&t?.setAdvFilterModel(s??null,"advancedFilter")}getRangeSelectionState(){let e=this.beans.rangeSvc?.getCellRanges().map(e=>{let{id:t,type:i,startRow:o,endRow:r,columns:s,startColumn:n}=e;return{id:t,type:i,startRow:o,endRow:r,colIds:s.map(e=>e.getColId()),startColId:n.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){let{gos:t,rangeSvc:i,colModel:o,visibleCols:r}=this.beans;if(!t2(t)||!i)return;let s=[];for(let t of e?.cellRanges??[]){let e=[];for(let i of t.colIds){let t=o.getCol(i);t&&e.push(t)}if(!e.length)continue;let i=o.getCol(t.startColId);if(!i){let t=r.allCols,o=new Set(e);i=t.find(e=>o.has(e))}s.push({...t,columns:e,startColumn:i})}i.setCellRanges(s)}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??{top:0,left:0},{frameworkOverrides:o,rowRenderer:r,animationFrameSvc:s,ctrlsSvc:n}=this.beans;o.wrapIncoming(()=>{n.get("center").setCenterViewportScrollLeft(i),n.getScrollFeature()?.setVerticalScrollPosition(t),r.redraw({afterScroll:!0}),s?.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:o}=e;return{colId:t.getColId(),rowIndex:i,rowPinned:o}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;let{focusSvc:t,colModel:i}=this.beans;if(!e)return void t.clearFocusedCell();let{colId:o,rowIndex:r,rowPinned:s}=e;t.setFocusedCell({column:i.getCol(o),rowIndex:r,rowPinned:s,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){let{pagination:e,gos:t}=this.beans;if(!e)return;let i=e.getCurrentPage(),o=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(i||o)return{page:i,pageSize:o}}setPaginationState(e,t){let{pagination:i,gos:o}=this.beans;if(!i)return;let{pageSize:r,page:s}=e??{page:0,pageSize:o.get("paginationPageSize")},n="gridInitializing"===t;r&&!o.get("paginationAutoPageSize")&&i.setPageSize(r,n?"initialState":"pageSizeSelector"),"number"==typeof s&&(n?i.setPage(s):i.goToPage(s))}getRowSelectionState(){let e=this.beans.selectionSvc;if(!e)return;let t=e.getSelectionState();return t&&(Array.isArray(t)||!1!==t.selectAll&&!1!==t.selectAllChildren||t?.toggledNodes?.length)?t:void 0}setRowSelectionState(e,t){this.beans.selectionSvc?.setSelectionState(e,t,"api"===t)}getRowGroupExpansionState(){let{expansionSvc:e}=this.beans;if(e)return e.getExpansionState()}getRowPinningState(){return this.beans.pinnedRowModel?.getPinnedState()}setRowPinningState(e){let t=this.beans.pinnedRowModel;e?t?.setPinnedState(e):t?.reset()}setRowGroupExpansionState(e,t,i){let o=this.beans.expansionSvc;o&&o.setExpansionState(t??{expandedRowGroupIds:[],collapsedRowGroupIds:[]},i)}updateColumnState(e){let t=this.getColumnState(),i=!1,o=this.cachedState;for(let e of Object.keys(t))B(t[e],o[e])||(i=!0);this.cachedState={...o,...t},i&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){let i=this.cachedState[e];this.setCachedStateValue(e,t),B(t,i)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){let e=this.staleStateKeys;for(let t of e)"rowSelection"===t&&this.setCachedStateValue(t,this.getRowSelectionState());e.clear()}dispatchStateUpdateEvent(e){if(!this.suppressEvents){for(let t of e)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})}startSuppressEvents(){this.suppressEvents=!0,this.beans.colAnimation?.setSuppressAnimation(!0)}stopSuppressEvents(e){setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(this.beans.colAnimation?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent([e]))})}suppressEventsAndDispatchInitEvent(e){this.startSuppressEvents(),e(),this.stopSuppressEvents("gridInitializing")}},pB=class extends e2{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")||null==this.centerRowsCtrl}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 i=Math.floor(e/Math.max(tN(t),1));t.pagination.setPageSize(i,"autoCalculated")};this.isBodyRendered?e7(this,i,50)():(i(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},pV="paginationPageSizeSelector",pG={tag:"span",cls:"ag-paging-page-size"},pH={selector:"AG-PAGE-SIZE-SELECTOR",component:class extends ow{constructor(){super(pG),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(pV,()=>{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){if(this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),!this.selectPageSizeComp))return}reset(){eP(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")&&!1!==this.gos.get(pV)}reloadPageSizesSelector(){let e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),i=!t||!e.includes(t);if(i){let i=this.gos.exists("paginationPageSize"),o=!0!==this.gos.get(pV);tM(94,{pageSizeSet:i,pageSizesSet:o,pageSizeOptions:e,paginationPageSizeOption:t}),o||tM(95,{paginationPageSizeOption:t,paginationPageSizeSelector:pV}),e.unshift("")}let o=String(i?"":t);this.selectPageSizeComp?(D(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(o,!0)):this.createPageSizeSelectorComp(e,o),this.hasEmptyOption=i}createPageSizeSelectOptions(e){return e.map(e=>({value:String(e)}))}createPageSizeSelectorComp(e,t){let i=this.getLocaleTextFunc(),o=i("pageSizeSelectorLabel","Page Size:"),r=i("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new ch).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(o).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){let e=this.gos.get(pV);return Array.isArray(e)&&e?.length?[...e].sort((e,t)=>e-t):[20,50,100]}destroy(){this.toggleSelectDisplay(!1),super.destroy()}}},pO={selector:"AG-PAGINATION",component:class extends nS{constructor(){super(),this.btFirst=null,this.btPrevious=null,this.btNext=null,this.btLast=null,this.lbRecordCount=null,this.lbFirstRowOnPage=null,this.lbLastRowOnPage=null,this.lbCurrent=null,this.lbTotal=null,this.pageSizeComp=null,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;flex-wrap:wrap-reverse;gap:calc(var(--ag-spacing)*4);justify-content:flex-end;min-height:var(--ag-pagination-panel-height);padding:calc(var(--ag-spacing)*.5) var(--ag-cell-horizontal-padding);row-gap:calc(var(--ag-spacing)*.5);@container (width < 600px){justify-content:center}}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel,.ag-paging-row-summary-panel{margin:calc(var(--ag-spacing)*.5)}.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}.ag-paging-description{line-height:0}")}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(),[pH]);let{btFirst:t,btPrevious:i,btNext:o,btLast:r}=this;this.activateTabIndex([t,i,o,r]),t.insertAdjacentElement("afterbegin",og(e?"last":"first",this.beans)),i.insertAdjacentElement("afterbegin",og(e?"next":"previous",this.beans)),o.insertAdjacentElement("afterbegin",og(e?"previous":"next",this.beans)),r.insertAdjacentElement("afterbegin",og(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:e=>{var t;return this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(e):(t=this.beans,t.ctrlsSvc.get("gridCtrl").focusInnerElement(e))},forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){let e=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(e),e&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){if(!this.areListenersSetup){var e,t;for(let e of(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)}])){let{el:t,fn:i}=e;this.addManagedListeners(t,{click:i,keydown:e=>{(e.key===i3||" "===e.key)&&(e.preventDefault(),i())}})}e=this.beans,t=this.getGui(),this.addManagedElementListeners(t,{keydown:i=>{if(!i.defaultPrevented&&"Tab"===i.key){let o=i.shiftKey;!ru(e,t,!1,o)&&rE(e,o)&&i.preventDefault()}}}),this.areListenersSetup=!0}}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){let t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):function(e,t){if("number"!=typeof e)return"";let i=t(),o=i("thousandSeparator",","),r=i("decimalSeparator",".");return e.toString().replace(".",r).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${o}`)}(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=0===e,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);let o=this.isZeroPagesToDisplay();this.nextButtonDisabled=e===i-1||o,this.lastButtonDisabled=!t||o||e===i-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Y(e,"disabled",t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){let e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&0===t}updateLabels(){let e,t,i,o,r,s=this.rowModel.isLastRowIndexKnown(),n=this.pagination.getTotalPages(),l=this.pagination.getMasterRowCount(),a=s?l:null,d=this.pagination.getCurrentPage(),h=this.pagination.getPageSize();this.isZeroPagesToDisplay()?e=t=0:(t=(e=h*d+1)+h-1,s&&t>a&&(t=a));let u=e+h-1,c=this.formatNumber(e);this.lbFirstRowOnPage.textContent=c;let g=this.getLocaleTextFunc();i=!s&&l<u?g("pageLastRowUnknown","?"):this.formatNumber(t),this.lbLastRowOnPage.textContent=i;let p=n>0,f=this.formatNumber(p?d+1:0);if(this.lbCurrent.textContent=f,s)o=this.formatNumber(n),r=this.formatNumber(a);else{let e=g("more","more");o=e,r=e}this.lbTotal.textContent=o,this.lbRecordCount.textContent=r,this.announceAriaStatus(c,i,r,f,o)}announceAriaStatus(e,t,i,o,r){let s=this.getLocaleTextFunc(),n=s("page","Page"),l=s("to","to"),a=s("of","of"),d=`${e} ${l} ${t} ${a} ${i}`,h=`${n} ${o} ${a} ${r}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),h!==this.ariaPageStatus&&(this.ariaPageStatus=h,this.ariaAnnounce?.announceValue(h,"paginationPage"))}}},pN=class extends e2{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 pO}isPaginateChildRows(){let e=this.gos;return!!(e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren"))||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;if(!this.active||t===e||"number"!=typeof t)return;let{editSvc:i}=this.beans;i?.isEditing()&&(i.isBatchEditing()?i.cleanupEditors():i.stopEditing(void 0,{source:"api"})),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}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){let e=Math.floor(this.beans.rowModel.getRowCount()/this.pageSize);this.goToPage(e)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return A(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:A(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:A(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:A(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:100}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(void 0===this.pageSizeAutoCalculated)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,0!==this.currentPage&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,0!==this.currentPage&&this.goToFirstPage()}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)return void this.setZeroRows();let i=this.pageSize,o=t-1;this.totalPages=Math.floor(o/i)+1,this.adjustCurrentPageIfInvalid();let r=this.currentPage,s=i*(r+1)-1;if(s>o&&(s=o),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(i*r),s===o)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{let t=e.getTopLevelRowDisplayedIndex(s+1);this.bottomDisplayedRowIndex=t-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){let e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,0===e)return void this.setZeroRows();let{pageSize:t,currentPage:i}=this,o=e-1;this.totalPages=Math.floor(o/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*i,this.bottomDisplayedRowIndex=t*(i+1)-1,this.bottomDisplayedRowIndex>o&&(this.bottomDisplayedRowIndex=o)}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:o=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:i,newPageSize:o,keepRenderedRows:t})}},pz={tag:"span",children:[{tag:"span",ref:"eDelta",cls:"ag-value-change-delta"},{tag:"span",ref:"eValue",cls:"ag-value-change-value"}]},pW=class extends ow{constructor(){super(pz),this.eValue=null,this.eDelta=null,this.refreshCount=0}init(e){this.refresh(e,!0)}showDelta(e,t){let i=Math.abs(t),o=e.formatValue(i),r=A(o)?o:i,s=t>=0,n=this.eDelta;s?n.textContent="↑"+r:n.textContent="↓"+r,n.classList.toggle("ag-value-change-delta-up",s),n.classList.toggle("ag-value-change-delta-down",!s)}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"),eP(this.eDelta)}refresh(e,t=!1){let{value:i,valueFormatted:o}=e,{eValue:r,lastValue:s,beans:n}=this;if(i===s||(A(o)?r.textContent=o:A(i)?r.textContent=i:eP(r),n.filterManager?.isSuppressFlashingCellsBecauseFiltering()))return!1;let l=i&&"object"==typeof i&&"toNumber"in i?i.toNumber():i,a=s&&"object"==typeof s&&"toNumber"in s?s.toNumber():s;return l!==a&&("number"==typeof l&&"number"==typeof a&&this.showDelta(e,l-a),s&&r.classList.add("ag-value-change-value-highlight"),t||this.setTimerToRemoveDelta(),this.lastValue=i,!0)}},pU={tag:"span",children:[{tag:"span",ref:"eCurrent",cls:"ag-value-slide-current"}]},p$=class extends ow{constructor(){super(pU),this.eCurrent=null,this.refreshCount=0,this.registerCSS(".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}")}init(e){this.refresh(e,!0)}addSlideAnimation(){this.refreshCount++;let e=this.refreshCount;this.ePrevious?.remove();let{beans:t,eCurrent:i}=this,o=eW({tag:"span",cls:"ag-value-slide-previous ag-value-slide-out"});this.ePrevious=o,o.textContent=i.textContent,this.getGui().insertBefore(o,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.ePrevious?.remove(),this.ePrevious=null)},3e3)})}refresh(e,t=!1){let i=e.value;if(I(i)&&(i=""),i===this.lastValue||this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering())return!1;t||this.addSlideAnimation(),this.lastValue=i;let o=this.eCurrent;return A(e.valueFormatted)?o.textContent=e.valueFormatted:A(e.value)?o.textContent=i:eP(o),!0}},pK=class extends e2{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"),o=this.beans.gos.get("cellFadeDuration")){let r=this.animations[t];r.delete(e);let s=Date.now(),n=s+i;r.set(e,{phase:"flash",flashEndTime:n,fadeEndTime:s+i+o});let l=`ag-cell-${t}`,a=`${l}-animation`,{comp:d,eGui:{style:h}}=e;d.toggleCss(l,!0),d.toggleCss(a,!1),h.removeProperty("transition"),h.removeProperty("transition-delay"),this.nextAnimationTime&&n+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=n)}advanceAnimations(){let e=Date.now(),t=null;for(let i of Object.keys(this.animations)){let o=this.animations[i],r=`ag-cell-${i}`,s=`${r}-animation`;for(let[i,n]of o){if(!i.isAlive()||!i.comp){o.delete(i);continue}let{phase:l,flashEndTime:a,fadeEndTime:d}=n,h="flash"===l?a:d;if(!(e+15>=h)){t=Math.min(h,t??1/0);continue}let{comp:u,eGui:{style:c}}=i;switch(l){case"flash":u.toggleCss(r,!1),u.toggleCss(s,!0),c.transition=`background-color ${d-a}ms`,c.transitionDelay=`${a-e}ms`,t=Math.min(d,t??1/0),n.phase="fade";break;case"fade":u.toggleCss(r,!1),u.toggleCss(s,!1),c.removeProperty("transition"),c.removeProperty("transition-delay"),o.delete(i)}}}null==t?(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=function(e){let{rowIndex:t,rowPinned:i,column:o}=e;return`${t}.${null==i?"null":i}.${o.getId()}`}(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()}},pj=class extends e2{constructor(){super(...arguments),this.beanName="rowAutoHeight",this.wasEverActive=!1,this._debouncedCalculateRowHeights=e7(this,this.calculateRowHeights.bind(this),1)}requestCheckAutoHeight(){this.wasEverActive&&this._debouncedCalculateRowHeights()}calculateRowHeights(){let{visibleCols:e,rowModel:t,rowSpanSvc:i,pinnedRowModel:o}=this.beans,r=e.autoHeightCols,s=!1,n=e=>{let t=e.__autoHeights,o=tO(this.beans,e).height;for(let s of r){let r=t?.[s.getColId()],n=i?.getCellSpan(s,e);if(n){if(n.getLastNode()!==e)continue;if(!(r=i?.getCellSpan(s,e)?.getLastNodeAutoHeight()))return}if(null==r){if(this.colSpanSkipCell(s,e))continue;return}o=Math.max(r,o)}o!==e.rowHeight&&(e.setRowHeight(o),s=!0)};o?.forEachPinnedRow?.("top",n),o?.forEachPinnedRow?.("bottom",n),t.forEachDisplayedNode?.(n),s&&t.onRowHeightChanged?.()}setRowAutoHeight(e,t,i){if(e.__autoHeights??(e.__autoHeights={}),void 0==t)return void delete e.__autoHeights[i.getId()];let o=e.__autoHeights[i.getId()];e.__autoHeights[i.getId()]=t,o!==t&&this.requestCheckAutoHeight()}colSpanSkipCell(e,t){let{colModel:i,colViewport:o,visibleCols:r}=this.beans;if(!i.colSpanActive)return!1;let s=[];switch(e.getPinned()){case"left":s=r.getLeftColsForRow(t);break;case"right":s=r.getRightColsForRow(t);break;case null:s=o.getColsWithinViewport(t)}return!s.includes(e)}setupCellAutoHeight(e,t,i){if(!e.column.isAutoHeight()||!t)return!1;this.wasEverActive=!0;let o=t.parentElement,{rowNode:r,column:s}=e,n=this.beans,l=a=>{if(this.beans.editSvc?.isEditing(e)||!e.isAlive()||!i.isAlive())return;let{paddingTop:d,paddingBottom:h,borderBottomWidth:u,borderTopWidth:c}=eC(o),g=t.offsetHeight+(d+h+u+c);if(a<5){let e=K(n),i=!e?.contains(t),o=0==g;if(i||o)return void window.setTimeout(()=>l(a+1),0)}this.setRowAutoHeight(r,g,s)},a=()=>l(0);a();let d=eH(n,t,a);return i.addDestroyFunc(()=>{d(),this.setRowAutoHeight(r,void 0,s)}),!0}setAutoHeightActive(e){this.active=e.list.some(e=>e.isVisible()&&e.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(e=>e.isAutoHeight())),0!==t.length){if(!i.__autoHeights)return!1;for(let e of t){let t=i.__autoHeights[e.getColId()];if(!t||i.rowHeight<t)return!1}}return!0}},p_=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&&this.firstNode.rowIndex<=e.rowIndex&&e.rowIndex<=this.lastNode.rowIndex}getLastNodeAutoHeight(){let e=this.firstNode.__autoHeights?.[this.col.getColId()];if(null==e)return;let t=0;for(let e of this.spannedNodes)e!==this.lastNode&&(t+=e.rowHeight);return e-t}},pq=class extends e2{constructor(e){super(),this.column=e}buildCache(e){let t,{column:i,beans:{gos:o,pinnedRowModel:r,rowModel:s,valueSvc:n,pagination:l}}=this,{colDef:a}=i,d=this.getNodeMap(e),h=new Map,u=o.getCallback("isFullWidthRow"),c=a.equals,g=a.spanRows,p="function"==typeof g,f=null,m=null,C=(e,i)=>{f=e,m=null,t=i},w=e=>{let r=!e.isExpandable()&&!e.group&&!e.detail&&(!u||!u({rowNode:e}));if(null==e.rowIndex||!r)return void C(null,null);if(null==f||e.level!==f.level||e.footer||m&&e.rowIndex-1!==m?.getLastNode().rowIndex)return void C(e,n.getValue(i,e,"data"));let s=n.getValue(i,e,"data");if(p){if(!g(is(o,{valueA:t,nodeA:f,valueB:s,nodeB:e,column:i,colDef:a})))return void C(e,s)}else if(c?!c(t,s):t!==s)return void C(e,s);if(!m){let e=d?.get(f);e?.firstNode===f?(e.reset(),m=e):m=new p_(i,f),h.set(f,m)}m.addSpannedNode(e),h.set(e,m)};switch(e){case"center":s.forEachDisplayedNode?.(e=>{(!l||l.isRowInPage(e.rowIndex))&&w(e)}),this.centerValueNodeMap=h;break;case"top":r?.forEachPinnedRow("top",w),this.topValueNodeMap=h;break;case"bottom":r?.forEachPinnedRow("bottom",w),this.bottomValueNodeMap=h}}isCellSpanning(e){return!!this.getCellSpan(e)}getCellSpan(e){return this.getNodeMap(e.rowPinned).get(e)}getNodeMap(e){switch(e){case"top":return this.topValueNodeMap;case"bottom":return this.bottomValueNodeMap;default:return this.centerValueNodeMap}}},pY=class extends e2{constructor(){super(...arguments),this.beanName="rowSpanSvc",this.spanningColumns=new Map,this.debouncePinnedEvent=e7(this,this.dispatchCellsUpdatedEvent.bind(this,!0),0),this.debounceModelEvent=e7(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 pq(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(null!=this.pinnedTimeout)return;this.pinnedTimeout=window.setTimeout(()=>{this.pinnedTimeout=null,this.buildPinnedCaches(),t?.createCtrls("top"),t?.createCtrls("bottom")},0);return}null==this.modelTimeout&&(this.modelTimeout=window.setTimeout(()=>{this.modelTimeout=null,this.buildModelCaches(),t?.createCtrls("center")},0))}buildModelCaches(){null!=this.modelTimeout&&clearTimeout(this.modelTimeout),this.spanningColumns.forEach(e=>e.buildCache("center")),this.debounceModelEvent()}buildPinnedCaches(){null!=this.pinnedTimeout&&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)}getCellSpanByPosition(e){let t,{pinnedRowModel:i,rowModel:o}=this.beans,r=e.column,s=e.rowIndex,n=this.spanningColumns.get(r);if(n){switch(e.rowPinned){case"top":t=i?.getPinnedTopRow(s);break;case"bottom":t=i?.getPinnedBottomRow(s);break;default:t=o.getRow(s)}if(t)return n.getCellSpan(t)}}getCellStart(e){let t=this.getCellSpanByPosition(e);return t?{...e,rowIndex:t.firstNode.rowIndex}:e}getCellEnd(e){let t=this.getCellSpanByPosition(e);return t?{...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,o]of this.spanningColumns)o.isCellSpanning(e)&&t(i,o.getCellSpan(e))}destroy(){super.destroy(),this.spanningColumns.clear()}},pQ=class extends hl{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,o,r,s,n){this.eWrapper=i,super.setComp(e,t,i,o,r,s,n),this.setAriaRowSpan(),this.refreshAriaRowIndex()}isCellSpanning(){return!0}getCellSpan(){return this.cellSpan}refreshAriaRowIndex(){let{eGui:e,rowNode:t}=this;e&&null!=t.rowIndex&&es(e,t.rowIndex)}setAriaRowSpan(){Q(this.eGui,"rowspan",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(rD(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}},pZ=class extends hc{onRowIndexChanged(){for(let e of(super.onRowIndexChanged(),this.getAllCellCtrls()))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 pQ(t,this,this.beans)}isCorrectCtrlForSpan(e){let t=this.beans.rowSpanSvc?.getCellSpan(e.column,this.rowNode);return!!t&&t.firstNode===this.rowNode&&e.getCellSpan()===t}onRowHeightChanged(){}refreshFirstAndLastRowStyles(){}addHoverFunctionality(){}resetHoveredStatus(){}},pJ=class extends e2{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=this.getCtrlsMap(e),o=i.size,r=this.getAllRelevantRowControls(e),s=new Map,n=!1;for(let e of r)e.isAlive()&&t?.forEachSpannedColumn(e.rowNode,(e,t)=>{if(s.has(t.firstNode))return;let o=i.get(t.firstNode);if(o){s.set(t.firstNode,o),i.delete(t.firstNode);return}n=!0;let r=new pZ(t.firstNode,this.beans,!1,!1,!1);s.set(t.firstNode,r)});this.setCtrlsMap(e,s);let l=s.size===o;if(n||!l){for(let e of i.values())e.destroyFirstPass(!0),e.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 o=this.getCtrlsMap(e.rowPinned).get(i.firstNode);if(o)return o.getAllCellCtrls().find(t=>t.column===e.column)}getCtrls(e){return[...this.getCtrlsMap(e).values()]}destroyRowCtrls(e){for(let t of this.getCtrlsMap(e).values())t.destroyFirstPass(!0),t.destroySecondPass();this.setCtrlsMap(e,new Map)}getCtrlsMap(e){switch(e){case"top":return this.topCtrls;case"bottom":return this.bottomCtrls;default:return this.centerCtrls}}setCtrlsMap(e,t){switch(e){case"top":this.topCtrls=t;break;case"bottom":this.bottomCtrls=t;break;default:this.centerCtrls=t}}destroy(){super.destroy(),this.destroyRowCtrls("top"),this.destroyRowCtrls("bottom"),this.destroyRowCtrls("center")}},pX=class extends e2{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,iG(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){let t=this.columns;if(null!=t){e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree);for(let t of(e.map={},e.list))e.map[t.getId()]=t}}createColumns(e,t){let i=()=>{iA(this.beans,this.columns?.tree),this.columns=null},o=e.treeDepth,r=this.columns?.treeDepth??-1,s=this.generateSelectionCols();if(D(s,this.columns?.list??[],(e,t)=>e.getColId()===t.getColId())&&r==o)return;i();let{colGroupSvc:n}=this.beans,l=n?.findDepth(e.tree)??0,a=n?.balanceTreeForAutoCols(s,l)??[];this.columns={list:s,tree:a,treeDepth:l,map:{}},t(e=>e?[...s,...e.filter(e=>!iL(e))]:null)}updateColumns(e){let t=iG(e.source),{beans:i}=this;for(let o of this.columns?.list??[]){let r=this.createSelectionColDef(e.currentValue);o.setColDef(r,null,t),iQ(i,{state:[function(e,t){let i={...e,sort:void 0,colId:t},o=iO(e);return o&&(i.sort=o.direction,i.sortType=o.type),i}(r,o.colId)]},t)}}getColumn(e){return this.columns?.list.find(t=>iH(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){let{gos:e,beans:t}=this,i=e.get("rowSelection");if("object"!=typeof i||!tG(e))return!1;let o=(t.autoColSvc?.getColumns()?.length??0)>0;if("autoGroupColumn"===i.checkboxLocation&&o)return!1;let r=!!tJ(i),s=tX(i);return r||s}createSelectionColDef(e){let{gos:t}=this,i=e??t.get("selectionColumnDef"),o=t.get("enableRtl"),{rowSpan:r,spanRows:s,...n}=i??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:o?"right":"left",comparator(e,t,i,o){let r=i.isSelected();return r===o.isSelected()?0:r?1:-1},editable:!1,suppressFillHandle:!0,suppressAutoSize:!0,pinned:null,...n,colId:iE,chartDataType:"excluded"}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];let e=this.createSelectionColDef(),t=e.colId;this.gos.validateColDef(e,t,!0);let i=new ig(e,null,t,!1);return this.createBean(i),[i]}onSelectionOptionsChanged(e,t,i){let o=t&&"string"!=typeof t?tJ(t):void 0,r=e&&"string"!=typeof e?tJ(e):void 0,s=t&&"string"!=typeof t?tX(t):void 0,n=e&&"string"!=typeof e?tX(e):void 0,l=t0(e),a=t0(t);(o!==r||s!==n||l!==a)&&this.beans.colModel.refreshAll(i)}destroy(){iA(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e,t,i){if(!this.columns?.list.length)return;let o=e.length+t.length+i.length;if(0===o)return;let r=this.columns.list[0];r.isVisible()&&(this.beans.rowNumbersSvc?.getColumn(iM)?2:1)===o&&(()=>{let o;switch(r.pinned){case"left":case!0:o=e;break;case"right":o=i;break;default:o=t}o&&M(o,r)})()}},p0={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},p1=class extends ow{constructor(){super(p0,[st]),this.eCheckbox=null}postConstruct(){this.eCheckbox.setPassive(!0)}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){let e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:i}=this,o=t.isSelected(),r=eu(e,o),[s,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],l=e(s,n);i.setValue(o,!0),i.setInputAriaLabel(`${l} (${r})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getWrapperElement(),{dblclick:rf,click:e=>{rf(e),this.eCheckbox.isDisabled()||this.beans.selectionSvc?.handleSelectionEvent(e,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:e,previousValue:t})=>{("object"==typeof e?t1(e):void 0)!==("object"==typeof t?t1(t):void 0)&&this.onSelectableChanged()}),t4(this.gos)||"function"==typeof this.getIsVisible()){let e=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e}),this.addManagedListeners(this.rowNode,{dataChanged:e,cellChanged:e}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){let e,{column:t,rowNode:i,overrides:o,gos:r}=this,s=i.selectable,n=this.getIsVisible();if("function"==typeof n){let r=o?.callbackParams;if(t){let o=t.createColumnFunctionCallbackParams(i);e=n({...r,...o})}else e=n({...r,node:i,data:i.data})}else e=n??!1;let l=s&&!e||!s&&e,a=s||e,d=r.get("rowSelection"),h=d&&"string"!=typeof d?!t1(d):!!t?.getColDef().showDisabledCheckboxes;this.setVisible(a&&(!l||h)),this.setDisplayed(a&&(!l||h)),a&&this.eCheckbox.setDisabled(l),o?.removeHidden&&this.setDisplayed(a)}getIsVisible(){let e=this.overrides;if(e)return e.isVisible;let t=this.gos.get("rowSelection");return t&&"string"!=typeof t?tJ(t):this.column?.getColDef()?.checkboxSelection}},p2=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(0===this.cachedRange.length){let e=this.getRoot(),t=this.getEnd();if(null==e||null==t)return this.cachedRange;this.cachedRange=this.getNodesInRange(e,t)??[]}return this.cachedRange}isInRange(e){return null!==this.rootId&&this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.getRowNode(this.rootId):e?(this.setRoot(e),e):void 0}getEnd(){if(this.endId)return this.getRowNode(this.endId)}getRowNode(e){let t,{rowModel:i,pinnedRowModel:o}=this;return t??(t=i.getRowNode(e)),o?.isManual()&&(t??(t=o.getPinnedRowById(e,"top")),t??(t=o.getPinnedRowById(e,"bottom"))),t}truncate(e){let t=this.getRange();if(0===t.length)return{keep:[],discard:[]};let i=t[0].id===this.rootId,o=t.findIndex(t=>t.id===e.id);if(!(o>-1))return{keep:t,discard:[]};{let r=t.slice(0,o),s=t.slice(o+1);return this.setEndRange(e),i?{keep:r,discard:s}:{keep:s,discard:r}}}extend(e,t=!1){let i=this.getRoot();if(null==i){let i=this.getRange().slice();return t&&e.depthFirstSearch(e=>!e.group&&i.push(e)),i.push(e),this.setRoot(e),{keep:i,discard:[]}}let o=this.getNodesInRange(i,e);if(!o)return this.setRoot(e),{keep:[e],discard:[]};if(o.find(e=>e.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{let t=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:t}}}getNodesInRange(e,t){let{pinnedRowModel:i,rowModel:o}=this;if(!i?.isManual())return o.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&!t.rowPinned)return hi(i,"top",e,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),t)??[]);if("bottom"===e.rowPinned&&!t.rowPinned){let r=hi(i,"bottom",void 0,e),s=o.getRowCount(),n=o.getRow(s-1);return(o.getNodesInRangeForSelection(t,n)??[]).concat(r)}if(!e.rowPinned&&!t.rowPinned)return o.getNodesInRangeForSelection(e,t);if("top"===e.rowPinned&&"top"===t.rowPinned)return hi(i,"top",e,t);if("bottom"===e.rowPinned&&"top"===t.rowPinned){let r=hi(i,"top",t,void 0),s=hi(i,"bottom",void 0,e),n=o.getRow(0),l=o.getRow(o.getRowCount()-1);return r.concat(o.getNodesInRangeForSelection(n,l)??[]).concat(s)}if(!e.rowPinned&&"top"===t.rowPinned)return hi(i,"top",t,void 0).concat(o.getNodesInRangeForSelection(o.getRow(0),e)??[]);if("top"===e.rowPinned&&"bottom"===t.rowPinned){let r=hi(i,"top",e,void 0),s=hi(i,"bottom",void 0,t),n=o.getRow(0),l=o.getRow(o.getRowCount()-1);return r.concat(o.getNodesInRangeForSelection(n,l)??[]).concat(s)}if("bottom"===e.rowPinned&&"bottom"===t.rowPinned)return hi(i,"bottom",e,t);if(!e.rowPinned&&"bottom"===t.rowPinned){let r=hi(i,"bottom",void 0,t),s=o.getRow(o.getRowCount());return(o.getNodesInRangeForSelection(e,s)??[]).concat(r)}return null}},p5=class extends e2{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 se);this.cbSelectAll=t,t.addCss("ag-header-select-all"),J(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:e,previousValue:t})=>{let i=e=>"string"!=typeof e&&e&&"singleRow"!==e.mode?e.selectAll:void 0;i(e)!==i(t)&&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("uiColumnMoved"===e.source)}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,o=t.getSelectAllState(e);i.setValue(o);let r=t.hasNodesToSelect(e);i.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){let t=this.getLocaleTextFunc(),{headerCellCtrl:i,cbSelectAll:o,cbSelectAllVisible:r}=this,s=eu(t,o.getValue()),n=t("ariaRowSelectAll","Press Space to toggle all rows selection");i.setAriaDescriptionProperty("selectAll",r?`${n} (${s})`:null),o.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||i.announceAriaDescription()}checkSelectionType(e){return!!t8(this.gos)||(tM(128,{feature:e}),!1)}checkRightRowModelType(e){let{gos:t,rowModel:i}=this.beans;return!!(tL(t)||tB(t))||(tM(129,{feature:e,rowModel:i.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;let e=this.cbSelectAll.getValue(),t=this.getSelectAllMode(),i="uiSelectAll";"currentPage"===t?i="uiSelectAllCurrentPage":"filtered"===t&&(i="uiSelectAllFiltered");let o={source:i,selectAll:t},r=this.beans.selectionSvc;e?r.selectAllRowNodes(o):r.deselectAllRowNodes(o)}isCheckboxSelection(){let{column:e,gos:t,beans:i}=this,o="object"==typeof t.get("rowSelection")?"headerCheckbox":"headerCheckboxSelection";return p3(i,e)&&this.checkRightRowModelType(o)&&this.checkSelectionType(o)}getSelectAllMode(){let e=t9(this.gos,!1);if(e)return e;let{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:i}=this.column.getColDef();return t?"currentPage":i?"filtered":"all"}destroy(){super.destroy(),this.cbSelectAll=void 0,this.headerCellCtrl=void 0}};function p3({gos:e,selectionColSvc:t},i){let o=e.get("rowSelection"),r=i.getColDef(),{headerCheckboxSelection:s}=r,n=!1;if("object"==typeof o){let e=iL(i),r=iI(i);("autoGroupColumn"===t0(o)&&r||e&&t?.isSelectionColumnEnabled())&&(n=tX(o))}else n="function"==typeof s?s(is(e,{column:i,colDef:r})):!!s;return n}var p4=class extends e2{postConstruct(){let{gos:e,beans:t}=this;this.selectionCtx=new p2(t.rowModel,t.pinnedRowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{let t=t4(e);t!==this.isRowSelectable&&(this.isRowSelectable=t,this.updateSelectable())}),this.isRowSelectable=t4(e),this.addManagedEventListeners({cellValueChanged:e=>this.updateRowSelectable(e.node),rowNodeDataChanged:e=>this.updateRowSelectable(e.node)})}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new p1}createSelectAllFeature(e){if(p3(this.beans,e))return new p5(e)}isMultiSelect(){return t8(this.gos)}onRowCtrlSelected(e,t,i){let o=!!e.rowNode.isSelected();e.forEachGui(i,e=>{e.rowComp.toggleCss("ag-row-selected",o);let i=e.element;eh(i,o),i.contains($(this.beans))&&t(e)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;let t=e.isSelected(),i=this.beans.editSvc?.isEditing({rowNode:e});if(!e.selectable||i)return;let o=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(o,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||e.rowPinned&&!ht(e)||!tG(this.gos)}updateRowSelectable(e,t){let i=e.rowPinned&&e.pinnedSibling?e.pinnedSibling.selectable:this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,i,t),i}setRowSelectable(e,t,i){if(e.selectable!==t&&(e.selectable=t,e.dispatchRowEvent("selectableChanged"),!i)){if(ie(this.gos)){let t=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:t??!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 o=0;o<e.childrenAfterGroup.length;o++){let r=e.childrenAfterGroup[o],s=r.isSelected();if(!r.selectable){let e=this.calculateSelectedFromChildren(r);if(null===e)continue;s=e}switch(s){case!0:t=!0;break;case!1:i=!0;break;default:return}}if(!t||!i)return!!t||!i&&(e.selectable?e.__selected:null)}selectRowNode(e,t,i,o="api"){if(t&&e.destroyed)return!1;let r=!e.selectable&&t,s=e.__selected===t;if(r||s)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");let n=e.sibling;n&&n.footer&&n.__localEventService&&n.dispatchRowEvent("rowSelected");let l=e.pinnedSibling;return l?.rowPinned&&l.__localEventService&&l.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...is(this.gos,{type:"rowSelected",node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned}),event:i||null,source:o}),!0}isCellCheckboxSelection(e,t){let i=this.gos.get("rowSelection");if(!i||"string"==typeof i)return e.isColumnFunc(t,e.colDef.checkboxSelection);{let o=iL(e)&&tJ(i);return e.isColumnFunc(t,o)}}inferNodeSelections(e,t,i,o){let r,s,{gos:n,selectionCtx:l}=this,a=e.isSelected(),d=ie(n),h=!0===(r=t3(n))||"enableSelection"===r,u=!0===(s=t3(n))||"enableDeselection"===s,c=this.isMultiSelect(),g="rowClicked"===o;if(g&&!(h||u))return null;if(t&&i&&c){let t=l.getRoot();if(!t)return null;if(!t.isSelected())return{select:[],deselect:l.extend(e,d).keep,reset:!1};{let t=l.isInRange(e)?l.truncate(e):l.extend(e,d);return{deselect:t.discard,select:t.keep,reset:!1}}}if(t&&c){let t=l.selectAll?this.beans.rowModel.getRow(0):void 0,i=l.getRoot(t),o=l.isInRange(e)?l.truncate(e):l.extend(e,d);return{select:o.keep,deselect:o.discard,reset:l.selectAll||!!(i&&!i.isSelected())}}if(i){if(g){let t=!a;return(!t||h)&&(t||u)?(l.setRoot(e),{node:e,newValue:t,clearSelection:!1}):null}return l.setRoot(e),{node:e,newValue:!a,clearSelection:!c}}{let t;l.setRoot(e);let i="string"==typeof(t=n.get("rowSelection"))?n.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1,o="filteredDescendants"===t7(n),r=g&&(!i||!h);if(o&&void 0===a&&tL(n))return{node:e,newValue:!1,checkFilteredNodes:!0,clearSelection:!c||r};if(g){let t=a?!i:h;return(t!==a||r)&&(!t||h)&&(t||u)?{node:e,newValue:t,clearSelection:!c||r,keepDescendants:e.group&&d}:null}return{node:e,newValue:!a,clearSelection:!c||r}}}},p6=class extends p4{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=t6(e),this.groupSelectsDescendants=ie(e),this.groupSelectsFiltered="filteredDescendants"===t7(e),this.masterSelectsDetail="detail"===it(e),this.addManagedPropertyListeners(["groupSelectsChildren","groupSelectsFiltered","rowSelection"],()=>{let t=ie(e),i=t6(e),o="filteredDescendants"===t7(e);this.masterSelectsDetail="detail"===it(e),(t!==this.groupSelectsDescendants||o!==this.groupSelectsFiltered||i!==this.mode)&&(this.deselectAllRowNodes({source:"api"}),this.groupSelectsDescendants=t,this.groupSelectsFiltered=o,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 o=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,i);if(null==o)return 0;if(this.selectionCtx.selectAll=!1,"select"in o)return o.reset?this.resetNodes():this.selectRange(o.deselect,!1,i),this.selectRange(o.select,!0,i);{let t=o.checkFilteredNodes?function e(t){let i=!1===t.isSelected(),o=t.childrenAfterFilter?.some(e)??!1;return i||o}(o.node):o.newValue;return this.setNodesSelected({nodes:[o.node],newValue:t,clearSelection:o.clearSelection,keepDescendants:o.keepDescendants,event:e,source:i})}}setNodesSelected({newValue:e,clearSelection:t,suppressFinishActions:i,nodes:o,event:r,source:s,keepDescendants:n=!1}){if(0===o.length)return 0;let{gos:l}=this;if(!tG(l)&&e)return tM(132),0;if(o.length>1&&!this.isMultiSelect())return tM(130),0;let a=0;for(let t=0;t<o.length;t++){let i=o[t],n=p8(i);if(n.rowPinned&&!ht(n)){tM(59);continue}if(void 0===n.id){tM(60);continue}(!e||!i.destroyed)&&(!(this.groupSelectsFiltered&&n.group&&!l.get("treeData"))&&this.selectRowNode(n,e,r,s)&&(this.detailSelection.delete(n.id),a++),this.groupSelectsDescendants&&n.childrenAfterGroup?.length&&(a+=this.selectChildren(n,e,s)))}return!i&&(1===o.length&&"api"===s&&this.selectionCtx.setRoot(p8(o[0])),e&&(t||!this.isMultiSelect())&&(a+=this.clearOtherNodes(p8(o[0]),n,s)),a>0&&(this.updateGroupsFromChildrenSelections(s),this.dispatchSelectionChanged(s))),a}selectRange(e,t,i){let o=0;return e.forEach(e=>{let r=p8(e);r.group&&this.groupSelectsDescendants||this.selectRowNode(r,t,void 0,i)&&o++}),o>0&&(this.updateGroupsFromChildrenSelections(i),this.dispatchSelectionChanged(i)),o}selectChildren(e,t,i){let o=this.groupSelectsFiltered?e.childrenAfterAggFilter:e.childrenAfterGroup;return o?this.setNodesSelected({newValue:t,clearSelection:!1,suppressFinishActions:!0,source:i,nodes:o}):0}getSelectedNodes(){return Array.from(this.selectedNodes.values())}getSelectedRows(){let e=[];return this.selectedNodes.forEach(t=>t.data&&e.push(t.data)),e}getSelectionCount(){return this.selectedNodes.size}filterFromSelection(e){let t=new Map;this.selectedNodes.forEach((i,o)=>{e(i)&&t.set(o,i)}),this.selectedNodes=t}updateGroupsFromChildrenSelections(e,t){if(!this.groupSelectsDescendants)return!1;let{gos:i,rowModel:o}=this.beans;if(!tL(i,o))return!1;let r=o.rootNode;if(!r)return!1;t||((t=new nZ(!0,r)).active=!1);let s=!1;return t.forEachChangedNodeDepthFirst(t=>{if(t!==r){let i=this.calculateSelectedFromChildren(t);s=this.selectRowNode(t,null!==i&&i,void 0,e)||s}}),s}clearOtherNodes(e,t,i){let o=new Map,r=0;return this.selectedNodes.forEach(s=>{let n=s.id==e.id;if((!t||!function(e,t){let i=t.parent;for(;i;){if(i===e)return!0;i=i.parent}return!1}(e,s))&&!n){let e=this.selectedNodes.get(s.id);r+=this.setNodesSelected({nodes:[e],newValue:!1,clearSelection:!1,suppressFinishActions:!0,source:i}),this.groupSelectsDescendants&&s.parent&&o.set(s.parent.id,s.parent)}}),o.forEach(e=>{let t=this.calculateSelectedFromChildren(e);this.selectRowNode(e,null!==t&&t,void 0,i)}),r}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 sa(this.beans);return t.id=e.id,t.data=e.data,t.__selected=e.__selected,t.level=e.level,t}syncInOldRowNode(e,t){t&&e.id!==t.id&&this.selectedNodes.get(t.id)==e&&this.selectedNodes.set(t.id,t)}syncInNewRowNode(e){this.selectedNodes.has(e.id)?(e.__selected=!0,this.selectedNodes.set(e.id,e)):e.__selected=!1}reset(e){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(!tL(e,t))return;let i=t.getTopLevelNodes();if(null===i)return;let o=[];return!function e(t){for(let i=0,r=t.length;i<r;i++){let r=t[i];r.isSelected()?o.push(r):r.group&&r.childrenAfterGroup&&e(r.childrenAfterGroup)}}(i),o}isEmpty(){return 0===this.getSelectionCount()}deselectAllRowNodes({source:e,selectAll:t}){let i=tL(this.gos),o=!1,r=t=>{let i=this.selectRowNode(p8(t),!1,void 0,e);o||(o=i)};if("currentPage"===t||"filtered"===t){if(!i)return void tT(102);this.getNodesToSelect(t).forEach(r)}else this.selectedNodes.forEach(r),this.reset(e);if(this.selectionCtx.selectAll=!1,i&&this.groupSelectsDescendants){let t=this.updateGroupsFromChildrenSelections(e);o||(o=t)}o&&this.dispatchSelectionChanged(e)}getSelectedCounts(e){let t=0,i=0;return this.getNodesToSelect(e).forEach(e=>{(!this.groupSelectsDescendants||!e.group)&&(e.isSelected()?t++:e.selectable&&i++)}),{selectedCount:t,notSelectedCount:i}}getSelectAllState(e){let{selectedCount:t,notSelectedCount:i}=this.getSelectedCounts(e);return p7(t,i)??null}hasNodesToSelect(e){return this.getNodesToSelect(e).filter(e=>e.selectable).length>0}getNodesToSelect(e){if(!this.canSelectAll())return[];let t=[],i=e=>t.push(e);if("currentPage"===e)return this.forEachNodeOnPage(e=>{if(!e.group)return void i(e);if(!e.expanded&&!e.footer){let t=e=>{i(e),e.childrenAfterFilter?.forEach(t)};t(e);return}this.groupSelectsDescendants||i(e)}),t;let o=this.beans.rowModel;return"filtered"===e?o.forEachNodeAfterFilter(i):o.forEachNode(i),t}forEachNodeOnPage(e){let{pageBounds:t,rowModel:i}=this.beans,o=t.getFirstRow(),r=t.getLastRow();for(let t=o;t<=r;t++){let o=i.getRow(t);o&&e(o)}}selectAllRowNodes(e){let{gos:t,selectionCtx:i}=this;if(!tG(t))return void tM(132);if("string"!=typeof t.get("rowSelection")&&!t8(t))return void tM(130);if(!this.canSelectAll())return;let{source:o,selectAll:r}=e,s=!1;if(this.getNodesToSelect(r).forEach(e=>{let t=this.selectRowNode(p8(e),!0,void 0,o);s||(s=t)}),i.selectAll=!0,tL(t)&&this.groupSelectsDescendants){let e=this.updateGroupsFromChildrenSelections(o);s||(s=e)}s&&this.dispatchSelectionChanged(o)}getSelectionState(){return this.isEmpty()?null:Array.from(this.selectedNodes.keys())}setSelectionState(e,t,i){if(e||(e=[]),!Array.isArray(e))return void tT(103);let o=new Set(e),r=[];this.beans.rowModel.forEachNode(e=>{o.has(e.id)&&r.push(e)}),i&&this.resetNodes(),this.setNodesSelected({newValue:!0,nodes:r,source:t})}canSelectAll(){return tL(this.beans.gos)}updateSelectable(e){let{gos:t,rowModel:i}=this.beans;if(!tG(t))return;let o="selectableChanged",r=void 0!==e,s=tL(t)&&this.groupSelectsDescendants,n=[],l=e=>{if(!r||e.group){if(s&&e.group){let t=e.childrenAfterGroup?.some(e=>e.selectable)??!1;this.setRowSelectable(e,t,!0);return}!this.updateRowSelectable(e,!0)&&e.isSelected()&&n.push(e)}};if(s){if(void 0===e){let t=i.rootNode;e=t?new nZ(!1,t):void 0}e?.forEachChangedNodeDepthFirst(l,!r,!r)}else i.forEachNode(l);n.length&&this.setNodesSelected({nodes:n,newValue:!1,source:o}),!r&&s&&this.updateGroupsFromChildrenSelections?.(o)}updateSelectableAfterGrouping(e){this.updateSelectable(e),this.groupSelectsDescendants&&this.updateGroupsFromChildrenSelections?.("rowGroupChanged",e)&&this.dispatchSelectionChanged("rowGroupChanged")}refreshMasterNodeState(e,t){let i,o;if(!this.masterSelectsDetail)return;let r=e.detailNode?.detailGridInfo?.api;if(!r)return;let s=(i=0,o=0,r.forEachNode(e=>{e.isSelected()?i++:e.selectable&&o++}),p7(i,o));e.isSelected()!==s&&this.selectRowNode(e,s,t,"masterDetail")&&this.dispatchSelectionChanged("masterDetail"),s||this.detailSelection.set(e.id,new Set(r.getSelectedNodes().map(e=>e.id)))}setDetailSelectionState(e,t,i){if(this.masterSelectsDetail){if(!t8(t))return void tM(269);switch(e.isSelected()){case!0:i.selectAll();break;case!1:i.deselectAll();break;case void 0:{let t=this.detailSelection.get(e.id);if(t){let e=[];for(let o of t){let t=i.getRowNode(o);t&&e.push(t)}i.setNodesSelected({nodes:e,newValue:!0,source:"masterDetail"})}}}}}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.getSelectedNodes(),serverSideState:null})}};function p8(e){return ht(e)?e.pinnedSibling:e.footer?e.sibling:e}function p7(e,t){return(0!==e||0!==t)&&(e>0&&t>0?void 0:e>0)}var p9=class extends e2{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,o=i.cellClassRules,r=this.getCellClassParams(e,i);ha(this.beans.expressionSvc,o===this.cellClassRules?void 0:this.cellClassRules,o,r,e=>t.toggleCss(e,!0),e=>t.toggleCss(e,!1)),this.cellClassRules=o}applyUserStyles(){let e,t=this.column,i=t.colDef,o=i.cellStyle;o&&(e="function"==typeof o?o(this.getCellClassParams(t,i)):o)&&this.cellComp.setUserStyles(e)}applyClassesFromColDef(){let{column:e,cellComp:t}=this,i=e.colDef,o=this.getCellClassParams(e,i);for(let e of this.staticClasses)t.toggleCss(e,!1);let r=this.beans.cellStyles.getStaticCellClasses(i,o);for(let e of(this.staticClasses=r,r))t.toggleCss(e,!0)}getCellClassParams(e,t){let{value:i,rowNode:o}=this.cellCtrl;return is(this.beans.gos,{value:i,data:o.data,node:o,colDef:t,column:e,rowIndex:o.rowIndex})}},fe=class extends e2{constructor(){super(...arguments),this.beanName="cellStyles"}processAllCellClasses(e,t,i,o){ha(this.beans.expressionSvc,void 0,e.cellClassRules,t,i,o),this.processStaticCellClasses(e,t,i)}getStaticCellClasses(e,t){let i,{cellClass:o}=e;return o?("string"==typeof(i="function"==typeof o?o(t):o)&&(i=[i]),i||[]):[]}createCellCustomStyleFeature(e){return new p9(e,this.beans)}processStaticCellClasses(e,t,i){this.getStaticCellClasses(e,t).forEach(e=>{i(e)})}},ft={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,overlayComponent:!0,suppressOverlays:!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,renderingMode:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0,enableFilterHandlers:!0,filterHandlers:!0},fi="clientSide",fo="serverSide",fr="infinite",fs={onGroupExpandedOrCollapsed:[fi],refreshClientSideRowModel:[fi],isRowDataEmpty:[fi],forEachLeafNode:[fi],forEachNodeAfterFilter:[fi],forEachNodeAfterFilterAndSort:[fi],resetRowHeights:[fi,fo],applyTransaction:[fi],applyTransactionAsync:[fi],flushAsyncTransactions:[fi],getBestCostNodeSelection:[fi],getServerSideSelectionState:[fo],setServerSideSelectionState:[fo],applyServerSideTransaction:[fo],applyServerSideTransactionAsync:[fo],applyServerSideRowData:[fo],retryServerSideLoads:[fo],flushServerSideAsyncTransactions:[fo],refreshServerSide:[fo],getServerSideGroupLevelState:[fo],refreshInfiniteCache:[fr],purgeInfiniteCache:[fr],getInfiniteRowCount:[fr],isLastRowIndexKnown:[fr,fo],expandAll:[fi,fo],collapseAll:[fi,fo],onRowHeightChanged:[fi,fo],setRowCount:[fr,fo],getCacheBlockState:[fr,fo]},fn={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")'}},fl={detailCellRendererCtrl:"SharedMasterDetail",dndSourceComp:"DragAndDrop",fillHandle:"CellSelection",groupCellRendererCtrl:"GroupCellRenderer",headerFilterCellCtrl:"ColumnFilter",headerGroupCellCtrl:"ColumnGroup",rangeHandle:"CellSelection",tooltipFeature:"Tooltip",highlightTooltipFeature:"Tooltip",tooltipStateManager:"Tooltip",groupStrategy:"RowGrouping",treeGroupStrategy:"TreeData",rowNumberRowResizer:"RowNumbers",singleCell:"EditCore",fullRow:"EditCore",agSetColumnFilterHandler:"SetFilter",agMultiColumnFilterHandler:"MultiFilter",agGroupColumnFilterHandler:"GroupFilter",agNumberColumnFilterHandler:"NumberFilter",agBigIntColumnFilterHandler:"BigIntFilter",agDateColumnFilterHandler:"DateFilter",agTextColumnFilterHandler:"TextFilter"},fa={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,"filter-add":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,aasc:1,adesc: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,"chevron-up":1,"chevron-down":1,"chevron-left":1,"chevron-right":1,edit:1},fd={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",filterAdd:"NewFiltersToolPanel",filterCardCollapse:"NewFiltersToolPanel",filterCardExpand:"NewFiltersToolPanel",filterCardEditing:"NewFiltersToolPanel",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",overlayLoading:"Overlay",overlayExporting:"Overlay",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",richSelectLoading:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortAbsoluteAscending:["MenuCore","Sort"],sortAbsoluteDescending:["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"},fh=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),fu=class extends e2{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,ty=h7}warnOnInitialPropertyUpdate(e,t){"api"===e&&ft[t]&&tM(22,{key:t})}processGridOptions(e){this.processOptions(e,{objectName:"gridOptions",allProperties:[...dv,...dw,...dC,...db,...dF,...dR,...dS,...dy,...Object.values(dc)],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:{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."},suppressAdvancedFilterEval:{version:"34",message:"Advanced filter no longer uses function evaluation, so this option has no effect."}},validations:(()=>{let e={autoSizePadding:{validate:({autoSizePadding:e})=>dP("autoSizePadding",e,0)},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate:({cacheBlockSize:e})=>dP("cacheBlockSize",e,1)},cacheOverflowSize:{validate:({cacheOverflowSize:e})=>dP("cacheOverflowSize",e,1)},datasource:{supportedRowModels:["infinite"]},domLayout:{validate:e=>{let t=e.domLayout,i=["autoHeight","normal","print"];return t&&!i.includes(t)?`domLayout must be one of [${i.join()}], currently it's ${t}`:null}},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},enableRowPinning:{supportedRowModels:["clientSide"],validate:({enableRowPinning:e,pinnedTopRowData:t,pinnedBottomRowData:i})=>e&&(t||i)?"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:({enableRowPinning:e,isRowPinnable:t,pinnedTopRowData:i,pinnedBottomRowData:o})=>t&&(i||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinnable`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinnable` requires `enableRowPinning` to be set.":null},isRowPinned:{supportedRowModels:["clientSide"],validate:({enableRowPinning:e,isRowPinned:t,pinnedTopRowData:i,pinnedBottomRowData:o})=>t&&(i||o)?"Manual row pinning cannot be used together with pinned row data. Either remove `isRowPinned`, or remove `pinnedTopRowData` and `pinnedBottomRowData`.":!e&&t?"`isRowPinned` requires `enableRowPinning` to be set.":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"]}}},groupHierarchyConfig:{validate({groupHierarchyConfig:e={}},t,i){for(let t of Object.keys(e))i.validation?.validateColDef(e[t]);return null}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return tA(262);if(e.smallLeft)return tA(263);if(e.smallRight)return tA(264)}return null}},infiniteInitialRowCount:{validate:({infiniteInitialRowCount:e})=>dP("infiniteInitialRowCount",e,1)},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},ssrmExpandAllAffectsAllRows:{validate:e=>{if("boolean"==typeof e.ssrmExpandAllAffectsAllRows){if("serverSide"!==e.rowModelType)return"'ssrmExpandAllAffectsAllRows' is only supported with the Server Side Row Model.";if(e.ssrmExpandAllAffectsAllRows&&"function"!=typeof e.getRowId)return"'getRowId' callback must be provided for Server Side Row Model grouping to work correctly."}return null}},keepDetailRowsCount:{validate:({keepDetailRowsCount:e})=>dP("keepDetailRowsCount",e,1)},paginationPageSize:{validate:({paginationPageSize:e})=>dP("paginationPageSize",e,1)},paginationPageSizeSelector:{validate:e=>{let t=e.paginationPageSizeSelector;return"boolean"==typeof t||null==t||t.length?null:`'paginationPageSizeSelector' cannot be an empty array.
47
- 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:e})=>dP("rowBuffer",e,0)},rowClass:{validate:e=>"function"==typeof e.rowClass?"rowClass should not be a function, please use getRowClass instead":null},rowData:{supportedRowModels:["clientSide"]},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{pagination:{required:[!1,void 0]}}},rowSelection:{validate:({rowSelection:e})=>e&&"string"==typeof e?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':e&&"object"!=typeof e?"Expected `RowSelectionOptions` object for the `rowSelection` property.":e&&"multiRow"!==e.mode&&"singleRow"!==e.mode?`Selection mode "${e.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},rowStyle:{validate:e=>{let t=e.rowStyle;return t&&"function"==typeof t?"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:e})=>dP("serverSideInitialRowCount",e,1)},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sortingOrder:{validate:e=>{let t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){let e=t.filter(e=>!ip(e));if(e.length>0)return`sortingOrder must be an array of type (SortDirection | SortDef)[], incorrect items are: ${e.map(e=>"string"==typeof e||null==e?tP(e):JSON.stringify(e))}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipHideDelay:{validate:e=>e.tooltipHideDelay&&e.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:e=>e.tooltipShowDelay&&e.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},tooltipSwitchShowDelay:{validate:e=>e.tooltipSwitchShowDelay&&e.tooltipSwitchShowDelay<0?"tooltipSwitchShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],validate:e=>{let t=e.rowModelType??"clientSide";switch(t){case"clientSide":{let{treeDataChildrenField:t,treeDataParentIdField:i,getDataPath:o,getRowId:r}=e;if(!t&&!i&&!o)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(t){if(o)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(i)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(i){if(!r)return"getRowId callback not provided, tree data with parent id cannot be built.";if(o)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}break}case"serverSide":{let i=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${t} row model.`;return e.isServerSideGroup&&e.getServerSideGroupKey?null:i}}return null}},viewportDatasource:{supportedRowModels:["viewport"]},viewportRowModelBufferSize:{validate:({viewportRowModelBufferSize:e})=>dP("viewportRowModelBufferSize",e,0)},viewportRowModelPageSize:{validate:({viewportRowModelPageSize:e})=>dP("viewportRowModelPageSize",e,1)},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},autoGroupColumnDef:{validate:({autoGroupColumnDef:e,showOpenedGroup:t})=>e?.field&&t?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":e?.valueGetter&&t?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null},renderingMode:{validate:e=>{let t=e.renderingMode,i=["default","legacy"];return t&&!i.includes(t)?`renderingMode must be one of [${i.join()}], currently it's ${t}`:null}},autoSizeStrategy:{validate:({autoSizeStrategy:e})=>{if(!e)return null;let t=e.type;return"fitCellContents"!==t&&"fitGridWidth"!==t&&"fitProvidedWidth"!==t?`Invalid Auto-size strategy. \`autoSizeStrategy\` must be one of ${["fitCellContents","fitGridWidth","fitProvidedWidth"].map(e=>'"'+e+'"').join(", ")}, currently it's ${t}`:"fitProvidedWidth"===t&&"number"!=typeof e.width?`When using the 'fitProvidedWidth' auto-size strategy, must provide a numeric \`width\`. You provided ${e.width}`:null}}},t={};for(let e of dR)t[e]={expectedType:"boolean"};for(let e of db)t[e]={expectedType:"number"};return tt(t,e),t})()})}validateApiFunction(e,t){return function(e,t,i){let o=fn[e];if(o){let{version:i,new:r,old:s,message:n}=o,l=s??e;return(...e)=>{let o=r?`Please use ${r} instead. `:"";return ta(`Since ${i} api.${l} is deprecated. ${o}${n??""}`),t.apply(t,e)}}let r=fs[e];return r?(...o)=>{let s=i.rowModel.getType();return r.includes(s)?t.apply(t,o):void td(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`)}:t}(e,t,this.beans)}missingUserComponent(e,t,i,o){let r=dg[t];r?this.gos.assertModuleRegistered(r,`AG Grid '${e}' component: ${t}`):tM(101,{propertyName:e,componentName:t,agGridDefaults:i,jsComps:o})}missingDynamicBean(e){let t=fl[e];return t?tA(200,{...this.gos.getModuleErrorParams(),moduleName:t,reasonOrId:e}):void 0}checkRowEvents(e){fc.has(e)&&tM(10,{eventType:e})}validateIcon(e){if(fh.has(e)&&tM(43,{iconName:e}),fa[e])return;let t=fd[e];t?tT(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:tp,gridId:this.beans.context.getId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."}):tM(134,{iconName:e})}isProvidedUserComp(e){return!!dg[e]}validateColDef(e){this.processOptions(e,{objectName:"colDef",allProperties:Object.keys(dm),docsUrl:"column-properties/",deprecations:{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."},rowGroupingHierarchy:{version:"34.3",message:"Use `colDef.groupHierarchy` instead."}},validations:{autoHeight:{supportedRowModels:["clientSide","serverSide"],validate:(e,{paginationAutoPageSize:t})=>t?"colDef.autoHeight is not supported with paginationAutoPageSize.":null},allowFormula:{supportedRowModels:["clientSide"]},cellRendererParams:{validate:e=>(null!=e.rowGroup||null!=e.rowGroupIndex||"agGroupCellRenderer"===e.cellRenderer)&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},flex:{validate:(e,t)=>t.autoSizeStrategy?"colDef.flex is not supported with gridOptions.autoSizeStrategy":null},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>"multiple"===t?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerValueGetter:{validate:e=>{let t=e.headerValueGetter;return"function"==typeof t||"string"==typeof t?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return tA(262);if(e.smallLeft)return tA(263);if(e.smallRight)return tA(264)}return null}},sort:{validate:e=>iw(e.sort)||im(e.sort)?null:`sort must be of type (SortDirection | SortDef), currently it is ${"object"==typeof e.sort?JSON.stringify(e.sort):tP(e.sort)}`},initialSort:{validate:e=>iw(e.initialSort)||im(e.initialSort)?null:`initialSort must be of non-null type (SortDirection | SortDef), currently it is ${"object"==typeof e.initialSort?JSON.stringify(e.initialSort):tP(e.initialSort)}`},sortingOrder:{validate:e=>{let t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){let e=t.filter(e=>!(iw(e)||im(e)));if(e.length>0)return`sortingOrder must be an array of type non-null (SortDirection | SortDef)[], incorrect items are: [${e.map(e=>"string"==typeof e||null==e?tP(e):JSON.stringify(e)).join(", ")}]`}else if(!Array.isArray(t)||!t.length)return`sortingOrder must be an array with at least one element, currently it is [${t}]`;return null}},type:{validate:e=>{let t=e.type;return t instanceof Array?t.some(e=>"string"!=typeof e)?"if colDef.type is supplied an array it should be of type 'string[]'":null:"string"==typeof t?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?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:(e,{rowSelection:t,cellSelection:i,suppressRowTransform:o,enableCellSpan:r,rowDragEntireRow:s,enableCellTextSelection:n})=>"object"==typeof t&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":i?"colDef.spanRows is not supported with cellSelection.":o?"colDef.spanRows is not supported with suppressRowTransform.":r?s?"colDef.spanRows is not supported with rowDragEntireRow.":n?"colDef.spanRows is not supported with enableCellTextSelection.":null:"colDef.spanRows requires enableCellSpan to be enabled."},groupHierarchy:{validate(e,{groupHierarchyConfig:t={}},i){let o=new Set(["year","quarter","month","formattedMonth","day","hour","minute","second"]),r=[];for(let s of e.groupHierarchy??[]){if("object"==typeof s){i.validation?.validateColDef(s);continue}o.has(s)||s in t||r.push(dp(s))}if(r.length>0){let e=`The following parts of colDef.groupHierarchy are not recognised: ${r.join(", ")}.`,t=`Choose one of ${[...o].map(dp).join(", ")}, or define your own parts in gridOptions.groupHierarchyConfig.`;return`${e}
48
- ${t}`}return null}}}})}processOptions(e,t){let{validations:i,deprecations:o,allProperties:r,propertyExceptions:s,objectName:n,docsUrl:l}=t;r&&!0!==this.gridOptions.suppressPropertyNamesCheck&&this.checkProperties(e,[...s??[],...Object.keys(o)],r,n,l);let a=new Set;if(Object.keys(e).forEach(t=>{let r=o[t];if(r){let{message:e,version:i}=r;a.add(`As of v${i}, ${String(t)} is deprecated. ${e??""}`)}let s=e[t];if(null==s||!1===s)return;let n=i[t];if(!n)return;let{dependencies:l,validate:d,supportedRowModels:h,expectedType:u}=n;if(u){let e=typeof s;if(e!==u)return void a.add(`${String(t)} should be of type '${u}' but received '${e}' (${s}).`)}if(h){let e=this.gridOptions.rowModelType??"clientSide";if(!h.includes(e))return void a.add(`${String(t)} is not supported with the '${e}' row model. It is only valid with: ${h.join(", ")}.`)}if(l){let i=this.checkForRequiredDependencies(t,l,e);if(i)return void a.add(i)}if(d){let t=d(e,this.gridOptions,this.beans);if(t)return void a.add(t)}}),a.size>0)for(let e of a)ta(e)}checkForRequiredDependencies(e,t,i){let o=Object.entries(t).filter(([e,t])=>{let o=i[e];return!t.required.includes(o)});return 0===o.length?null:o.map(([t,i])=>`'${String(e)}' requires '${t}' to be one of [${i.required.map(e=>null===e?"null":void 0===e?"undefined":e).join(", ")}]. ${i.reason??""}`).join("\n ")}checkProperties(e,t,i,o,r){let s=function(e,t,i){let o={},r=e.filter(e=>!t.some(t=>t===e));if(r.length>0)for(let e of r)o[e]=hZ({inputValue:e,allSuggestions:i}).values;return o}(Object.getOwnPropertyNames(e),["__ob__","__v_skip","__metadata__",...t,...i],i),n=Object.keys(s);for(let e of n){let t=s[e],r=`invalid ${o} property '${e}' did you mean any of these: ${t.slice(0,8).join(", ")}.`;i.includes("context")&&(r+=`
49
- If you are trying to annotate ${o} with application data, use the '${o}.context' property instead.`),ta(r)}if(n.length>0&&r){let e=this.beans.frameworkOverrides.getDocLink(r);ta(`to see all the valid ${o} properties please check: ${e}`)}}},fc=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),fg={moduleName:"AllCommunity",version:tv,dependsOn:[{moduleName:"ClientSideRowModel",version:tv,rowModels:["clientSide"],beans:[uF,uS],dependsOn:[hK]},{moduleName:"CsvExport",version:tv,beans:[uG],apiFunctions:{getDataAsCsv:function(e,t){return e.csvCreator?.getDataAsCsv(t)},exportDataAsCsv:function(e,t){e.csvCreator?.exportDataAsCsv(t)}},dependsOn:[{moduleName:"SharedExport",version:tv,beans:[uI]}]},{moduleName:"InfiniteRowModel",version:tv,apiFunctions:{refreshInfiniteCache:function(e){ss(e)?.refreshCache()},purgeInfiniteCache:function(e){ss(e)?.purgeCache()},getInfiniteRowCount:function(e){return ss(e)?.getRowCount()}},dependsOn:[{moduleName:"InfiniteRowModelCore",version:tv,rowModels:["infinite"],beans:[pM,pT]},{moduleName:"SsrmInfiniteSharedApi",version:tv,apiFunctions:{setRowCount:function(e,t,i){let o,r="serverSide"===(o=e.rowModel).getType()?o:void 0;if(r)return e.rowGroupColsSvc?.columns.length===0?t<0?void tT(238):void r.setRowCount(t,i):void tT(28);ss(e)?.setRowCount(t,i)},getCacheBlockState:function(e){return tB(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}},isLastRowIndexKnown:function(e){return e.rowModel.isLastRowIndexKnown()}}}]},{moduleName:"Validation",version:tv,beans:[fu]},{moduleName:"TextEditor",version:tv,userComponents:{agCellEditor:cm,agTextCellEditor:cm},dependsOn:[cz]},{moduleName:"NumberEditor",version:tv,userComponents:{agNumberCellEditor:{classImp:class extends u3{constructor(){super(new cs(()=>this.getLocaleTextFunc()))}}}},dependsOn:[cz]},{moduleName:"DateEditor",version:tv,userComponents:{agDateCellEditor:class extends u3{constructor(){super(new u6(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}},agDateStringCellEditor:class extends u3{constructor(){super(new u7(()=>this.beans.dataTypeSvc,()=>this.getLocaleTextFunc()))}}},dependsOn:[cz]},{moduleName:"CheckboxEditor",version:tv,userComponents:{agCheckboxCellEditor:u0},dependsOn:[cz]},{moduleName:"SelectEditor",version:tv,userComponents:{agSelectCellEditor:cg},dependsOn:[cz]},{moduleName:"LargeTextEditor",version:tv,userComponents:{agLargeTextCellEditor:ct},dependsOn:[cz]},{moduleName:"CustomEditor",version:tv,dependsOn:[cz]},{moduleName:"UndoRedoEdit",version:tv,beans:[uJ],apiFunctions:{undoCellEditing:function(e){e.undoRedo?.undo("api")},redoCellEditing:function(e){e.undoRedo?.redo("api")},getCurrentUndoSize:function(e){return e.undoRedo?.getCurrentUndoStackSize()??0},getCurrentRedoSize:function(e){return e.undoRedo?.getCurrentRedoStackSize()??0}},dependsOn:[cz]},{moduleName:"TextFilter",version:tv,dependsOn:[px],userComponents:{agTextColumnFilter:{classImp:pm,params:{useForm:!0}},agTextColumnFloatingFilter:pS},dynamicBeans:{agTextColumnFilterHandler:py}},{moduleName:"NumberFilter",version:tv,dependsOn:[px],userComponents:{agNumberColumnFilter:{classImp:pa,params:{useForm:!0}},agNumberColumnFloatingFilter:pp},dynamicBeans:{agNumberColumnFilterHandler:pc}},{moduleName:"BigIntFilter",version:tv,dependsOn:[px],userComponents:{agBigIntColumnFilter:{classImp:gm,params:{useForm:!0}},agBigIntColumnFloatingFilter:gT},dynamicBeans:{agBigIntColumnFilterHandler:gR}},{moduleName:"DateFilter",version:tv,dependsOn:[px],userComponents:{agDateColumnFilter:{classImp:gG,params:{useForm:!0}},agDateInput:pi,agDateColumnFloatingFilter:pe},dynamicBeans:{agDateColumnFilterHandler:gN}},{moduleName:"CustomFilter",version:tv,userComponents:{agReadOnlyFloatingFilter:gs},dependsOn:[px]},{moduleName:"QuickFilter",version:tv,apiFunctions:{isQuickFilterPresent:function(e){return!!e.quickFilter?.isFilterPresent()},getQuickFilter:function(e){return e.quickFilter?.getText()},resetQuickFilter:function(e){e.quickFilter?.resetCache()}},dependsOn:[{moduleName:"QuickFilterCore",version:tv,rowModels:["clientSide"],beans:[pR],dependsOn:[pF,pP]}]},{moduleName:"ExternalFilter",version:tv,dependsOn:[pF]},{moduleName:"GridState",version:tv,beans:[pL],apiFunctions:{getState:function(e){return e.stateSvc?.getState()??{}},setState:function(e,t,i){return e.stateSvc?.setState(t,i)}}},{moduleName:"AlignedGrids",version:tv,beans:[ul],dependsOn:[lj]},{moduleName:"Pagination",version:tv,beans:[pN,pB],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:function(e){return e.rowModel.isLastRowIndexKnown()},paginationGetPageSize:function(e){return e.pagination?.getPageSize()??100},paginationGetCurrentPage:function(e){return e.pagination?.getCurrentPage()??0},paginationGetTotalPages:function(e){return e.pagination?.getTotalPages()??1},paginationGetRowCount:function(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()},paginationGoToNextPage:function(e){e.pagination?.goToNextPage()},paginationGoToPreviousPage:function(e){e.pagination?.goToPreviousPage()},paginationGoToFirstPage:function(e){e.pagination?.goToFirstPage()},paginationGoToLastPage:function(e){e.pagination?.goToLastPage()},paginationGoToPage:function(e,t){e.pagination?.goToPage(t)}},dependsOn:[uK]},lj,{moduleName:"RowApi",version:tv,apiFunctions:{redrawRows:function(e,t={}){let i=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(i))},setRowNodeExpanded:function e(t,i,o,r,s){i&&(r&&i.parent&&-1!==i.parent.level&&e(t,i.parent,o,r,s),i.setExpanded(o,void 0,s))},getRowNode:function(e,t){return e.rowModel.getRowNode(t)},addRenderedRowListener:function(e,t,i,o){e.rowRenderer.addRenderedRowListener(t,i,o)},getRenderedNodes:function(e){return e.rowRenderer.getRenderedNodes()},forEachNode:function(e,t,i){e.rowModel.forEachNode(t,i)},getFirstDisplayedRowIndex:function(e){return e.rowRenderer.firstRenderedRow},getLastDisplayedRowIndex:function(e){return e.rowRenderer.lastRenderedRow},getDisplayedRowAtIndex:function(e,t){return e.rowModel.getRow(t)},getDisplayedRowCount:function(e){return e.rowModel.getRowCount()}}},{moduleName:"ScrollApi",version:tv,apiFunctions:{getVerticalPixelRange:function(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()},getHorizontalPixelRange:function(e){return e.ctrlsSvc.getScrollFeature().getHScrollPosition()},ensureColumnVisible:ua,ensureIndexVisible:ud,ensureNodeVisible:function(e,t,i=null){e.frameworkOverrides.wrapIncoming(()=>e.ctrlsSvc.getScrollFeature().ensureNodeVisible(t,i),"ensureVisible")}}},{moduleName:"RenderApi",version:tv,apiFunctions:{setGridAriaProperty:function(e,t,i){if(!t)return;let o=e.ctrlsSvc.getGridBodyCtrl().eGridBody,r=`aria-${t}`;null===i?o.removeAttribute(r):o.setAttribute(r,i)},refreshCells:function(e,t={}){e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.refreshCells(t))},refreshHeader:function(e){e.frameworkOverrides.wrapIncoming(()=>{for(let t of e.ctrlsSvc.getHeaderRowContainerCtrls())t.refresh()})},isAnimationFrameQueueEmpty:function(e){return e.animationFrameSvc?.isQueueEmpty()??!0},flushAllAnimationFrames:function(e){e.animationFrameSvc?.flushAllFrames()},getSizesForCurrentTheme:function(e){return{rowHeight:tN(e),headerHeight:rA(e)}},getCellRendererInstances:function(e,t={}){let i=[];for(let o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns)){let e=o.getCellRenderer();null!=e&&i.push(dN(e))}if(t.columns?.length)return i;let o=[],r=hV(t.rowNodes);for(let t of e.rowRenderer.getAllRowCtrls()){if(r&&!hG(t.rowNode,r)||!t.isFullWidth())continue;let e=t.getFullWidthCellRenderers();for(let t=0;t<e.length;t++){let i=e[t];null!=i&&o.push(dN(i))}}return[...o,...i]}}},{moduleName:"ColumnAutoSize",version:tv,beans:[uD],apiFunctions:{sizeColumnsToFit:function(e,t){"number"==typeof t?e.colAutosize?.sizeColumnsToFit(t,"api"):e.colAutosize?.sizeColumnsToFitGridBody(t)},autoSizeColumns:ux,autoSizeAllColumns:function(e,t){t&&"object"==typeof t?ux(e,t):e.colAutosize?.autoSizeAllColumns({source:"api",skipHeader:t})}},dependsOn:[la],css:[":where(.ag-ltr) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,left .2s ease-in-out}}:where(.ag-rtl) :where(.ag-animate-autosize){.ag-cell,.ag-header-cell,.ag-header-group-cell{transition:width .2s ease-in-out,right .2s ease-in-out}}"]},{moduleName:"RowDrag",version:tv,beans:[n4,n3],apiFunctions:{addRowDropZone:function(e,t){e.rowDragSvc?.rowDragFeature?.addRowDropZone(t)},removeRowDropZone:function(e,t){let i=e.dragAndDrop?.findExternalZone(t.getContainer());i&&e.dragAndDrop?.removeDropTarget(i)},getRowDropZoneParams:function(e,t){return e.rowDragSvc?.rowDragFeature?.getRowDropZone(t)},getRowDropPositionIndicator:function(e){let t=e.rowDropHighlightSvc;return t?{row:t.row,dropIndicatorPosition:t.position}:{row:null,dropIndicatorPosition:"none"}},setRowDropPositionIndicator:function(e,t){let i=e.rowDropHighlightSvc;if(!i)return;let o=t?.row,r=t?.dropIndicatorPosition;"above"!==r&&"below"!==r&&"inside"!==r&&(r="none"),null==o?.rowIndex||"none"===r?i.clear():i.set(o,r)}},dependsOn:[n8]},{moduleName:"PinnedRow",version:tv,beans:[sP],css:[".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)}"],apiFunctions:{getPinnedTopRowCount:function(e){return e.pinnedRowModel?.getPinnedTopRowCount()??0},getPinnedBottomRowCount:function(e){return e.pinnedRowModel?.getPinnedBottomRowCount()??0},getPinnedTopRow:function(e,t){return e.pinnedRowModel?.getPinnedTopRow(t)},getPinnedBottomRow:function(e,t){return e.pinnedRowModel?.getPinnedBottomRow(t)},forEachPinnedRow:function(e,t,i){return e.pinnedRowModel?.forEachPinnedRow(t,i)}},icons:{rowPin:"pin",rowPinTop:"pinned-top",rowPinBottom:"pinned-bottom",rowUnpin:"un-pin"}},{moduleName:"RowSelection",version:tv,rowModels:["clientSide","infinite","viewport"],beans:[p6],dependsOn:[{moduleName:"SharedRowSelection",version:tv,beans:[pX],css:[':where(.ag-selection-checkbox) .ag-checkbox-input-wrapper:before{content:"";cursor:pointer;inset:-8px;position:absolute}'],apiFunctions:{setNodesSelected:function(e,t){if(!t.nodes.every(e=>e.rowPinned&&!ht(e)?(tM(59),!1):void 0!==e.id||(tM(60),!1)))return;let{nodes:i,source:o,newValue:r}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:o??"api",newValue:r})},selectAll:function(e,t,i="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:i,selectAll:t})},deselectAll:function(e,t,i="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:i,selectAll:t})},selectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})},deselectAllFiltered:function(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})},selectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})},deselectAllOnCurrentPage:function(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})},getSelectedNodes:function(e){return e.selectionSvc?.getSelectedNodes()??[]},getSelectedRows:function(e){return e.selectionSvc?.getSelectedRows()??[]}}}]},{moduleName:"ValueCache",version:tv,beans:[hY],apiFunctions:{expireValueCache:function(e){e.valueCache?.expire()}}},{moduleName:"CellStyle",version:tv,beans:[fe]},{moduleName:"ColumnHover",version:tv,beans:[uA],apiFunctions:{isColumnHovered:function(e,t){return!!e.colHover?.isHovered(t)}}},{moduleName:"RowStyle",version:tv,beans:[hh]},{moduleName:"EventApi",version:tv,apiFunctions:{addEventListener:function(e,t,i){e.apiEventSvc?.addListener(t,i)},addGlobalListener:function(e,t){e.apiEventSvc?.addGlobalListener(t)},removeEventListener:function(e,t,i){e.apiEventSvc?.removeListener(t,i)},removeGlobalListener:function(e,t){e.apiEventSvc?.removeGlobalListener(t)}},beans:[pk]},{moduleName:"CellApi",version:tv,apiFunctions:{getCellValue:function(e,t){let{colKey:i,rowNode:o,useFormatter:r,from:s="edit"}=t,n=e.colModel.getColDefCol(i)??e.colModel.getCol(i);if(!n)return null;let l=e.valueSvc.getValueForDisplay({column:n,node:o,includeValueFormatted:r,from:s});return r?l.valueFormatted??N(l.value):l.value}}},{moduleName:"HighlightChanges",version:tv,beans:[pK],userComponents:{agAnimateShowChangeCellRenderer:pW,agAnimateSlideCellRenderer:p$},apiFunctions:{flashCells:function(e,t={}){let{cellFlashSvc:i}=e;i&&e.frameworkOverrides.wrapIncoming(()=>{for(let o of e.rowRenderer.getCellCtrls(t.rowNodes,t.columns))i.flashCell(o,t)})}}},uq,{moduleName:"Locale",version:tv,beans:[pA]},{moduleName:"RowAutoHeight",version:tv,beans:[pj]},{moduleName:"DragAndDrop",version:tv,dynamicBeans:{dndSourceComp:nA},icons:{rowDrag:"grip"}},{moduleName:"ClientSideRowModelApi",version:tv,apiFunctions:{onGroupExpandedOrCollapsed:function(e){e.expansionSvc?.onGroupExpandedOrCollapsed()},refreshClientSideRowModel:function(e,t){let i=sr(e);i&&(t&&"everything"!==t||(t="group"),i.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))},isRowDataEmpty:function(e){return sr(e)?.isEmpty()??!0},forEachLeafNode:function(e,t){sr(e)?.forEachLeafNode(t)},forEachNodeAfterFilter:function(e,t){sr(e)?.forEachNodeAfterFilter(t)},forEachNodeAfterFilterAndSort:function(e,t){sr(e)?.forEachNodeAfterFilterAndSort(t)},applyTransaction:function(e,t){return e.frameworkOverrides.wrapIncoming(()=>sr(e)?.updateRowData(t))},applyTransactionAsync:function(e,t,i){e.frameworkOverrides.wrapIncoming(()=>sr(e)?.batchUpdateRowData(t,i))},flushAsyncTransactions:function(e){e.frameworkOverrides.wrapIncoming(()=>sr(e)?.flushAsyncTransactions())},getBestCostNodeSelection:function(e){return e.selectionSvc?.getBestCostNodeSelection()},resetRowHeights:uu,onRowHeightChanged:uh},dependsOn:[{moduleName:"CsrmSsrmSharedApi",version:tv,apiFunctions:{expandAll:function(e){e.expansionSvc?.expandAll(!0)},collapseAll:function(e){e.expansionSvc?.expandAll(!1)}}},{moduleName:"RowModelSharedApi",version:tv,apiFunctions:{onRowHeightChanged:uh,resetRowHeights:uu}}]},{moduleName:"CellSpan",version:tv,beans:[pY,pJ]}]},fp=class{wrap(e,t,i,o){let r=this.createWrapper(e,o);for(let e of t??[])this.createMethod(r,e,!0);for(let e of i??[])this.createMethod(r,e,!1);return r}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&&tM(49,{methodName:t}),null)}}},ff=class extends nv{constructor(e){super(e,rC)}};e.s(["AgPromise",()=>ou,"AllCommunityModule",()=>fg,"BaseComponentWrapper",()=>fp,"BeanStub",()=>e2,"CssClassManager",()=>op,"FakeHScrollComp",()=>sO,"FakeVScrollComp",()=>sW,"GridBodyCtrl",()=>nC,"GridCoreCreator",()=>ur,"GridCtrl",()=>nR,"GridHeaderCtrl",()=>rB,"HeaderRowContainerCtrl",()=>rY,"RowContainerCtrl",()=>nm,"TabGuardClassNames",()=>nw,"TabGuardCtrl",()=>ff,"VanillaFrameworkOverrides",()=>ue,"_EmptyBean",()=>rG,"_areEqual",()=>D,"_combineAttributesAndGridOptions",()=>io,"_findEnterpriseCoreModule",()=>tw,"_getActiveDomElement",()=>$,"_getGridOption",()=>il,"_getGridRegisteredModules",()=>tC,"_getRowContainerClass",()=>ns,"_getRowContainerOptions",()=>nl,"_getRowSpanContainerClass",()=>nn,"_getRowViewportClass",()=>nr,"_isClientSideRowModel",()=>tL,"_isServerSideRowModel",()=>tB,"_observeResize",()=>eH,"_processOnChange",()=>ir,"_removeAriaSort",()=>ed,"_removeFromParent",()=>ex,"_setAriaColCount",()=>en,"_setAriaRowCount",()=>er,"_setAriaSort",()=>ea,"_toString",()=>N,"_warn",()=>tM,"themeQuartz",()=>a2],14475);var fm=e.i(94030),fC=P.default.createContext({}),fw=P.default.createContext("default"),fv=(e,t,i,o)=>{let r,s;if(!e||e.componentFromFramework||t.isDestroyed())return;let n=e.newAgStackInstance(),l=!1;return n.then(e=>{l?t.destroyBean(e):(s=(r=e).getGui(),i.appendChild(s),fb(o,r))}),()=>{l=!0,r&&(s?.remove(),t.destroyBean(r),o&&fb(o,void 0))}},fb=(e,t)=>{e&&(e instanceof Function?e(t):e.current=t)},fy=(...e)=>e.filter(e=>null!=e&&""!==e).join(" "),fS=class e{constructor(...e){for(const t of(this.classesMap={},e))this.classesMap[t]=!0}setClass(t,i){if(!!this.classesMap[t]==i)return this;let o=new e;return o.classesMap={...this.classesMap},o.classesMap[t]=i,o}toString(){return Object.keys(this.classesMap).filter(e=>this.classesMap[e]).join(" ")}},fR=e=>"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===("function"==typeof Symbol&&Symbol.for?Symbol.for("react.memo"):60115),fF=P.default.version?.split(".")[0],fP="16"===fF||"17"===fF,fx=!1,fD=(e,t)=>{fP||!e||fx?t():fm.default.flushSync(t)};function fE(e,t,i){if(null==t||null==e)return t;if(e===t||0===t.length&&0===e.length)return e;if(i||0===e.length&&t.length>0||e.length>0&&0===t.length)return t;let o=[],r=[],s=new Map,n=new Map;for(let e=0;e<t.length;e++){let i=t[e];n.set(i.instanceId,i)}for(let t=0;t<e.length;t++){let i=e[t];s.set(i.instanceId,i),n.has(i.instanceId)&&o.push(i)}for(let e=0;e<t.length;e++){let i=t[e],o=i.instanceId;s.has(o)||r.push(i)}return o.length===e.length&&0===r.length?e:0===o.length&&r.length===t.length?t:0===o.length?r:0===r.length?o:[...o,...r]}var fM=(0,P.forwardRef)((e,t)=>{let{registry:i,context:o}=(0,P.useContext)(fC),r=(0,P.useRef)(null),s=(0,P.useRef)(null),n=(0,P.useRef)(null),l=(0,P.useRef)(null),a=(0,P.useRef)(null),d=(0,P.useRef)(),[h,u]=(0,P.useState)(),[c,g]=(0,P.useState)(),[p,f]=(0,P.useState)(),[m,C]=(0,P.useState)(()=>new fS),[w,v]=(0,P.useState)(()=>new fS("ag-hidden")),[b,y]=(0,P.useState)(()=>new fS("ag-hidden")),[S,R]=(0,P.useState)(()=>new fS("ag-invisible"));(0,P.useImperativeHandle)(t,()=>({refresh:()=>!1})),(0,P.useLayoutEffect)(()=>fv(h,o,s.current),[h]);let F=(0,P.useCallback)(t=>{if(r.current=t,!t||o.isDestroyed()){d.current=o.destroyBean(d.current);return}let s=i.createDynamicBean("groupCellRendererCtrl",!0);s&&(d.current=o.createBean(s),d.current.init({setInnerRenderer:(e,t)=>{u(e),f(t)},setChildCount:e=>g(e),toggleCss:(e,t)=>C(i=>i.setClass(e,t)),setContractedDisplayed:e=>y(t=>t.setClass("ag-hidden",!e)),setExpandedDisplayed:e=>v(t=>t.setClass("ag-hidden",!e)),setCheckboxVisible:e=>R(t=>t.setClass("ag-invisible",!e)),setCheckboxSpacing:e=>R(t=>t.setClass("ag-group-checkbox-spacing",e))},t,n.current,l.current,a.current,fM,e))},[]),x=(0,P.useMemo)(()=>`ag-cell-wrapper ${m.toString()}`,[m]),D=(0,P.useMemo)(()=>`ag-group-expanded ${w.toString()}`,[w]),E=(0,P.useMemo)(()=>`ag-group-contracted ${b.toString()}`,[b]),M=(0,P.useMemo)(()=>`ag-group-checkbox ${S.toString()}`,[S]),T=h?.componentFromFramework,k=T?h.componentClass:void 0,A=null==h&&null!=p,I=N(p);return P.default.createElement("span",{className:x,ref:F,...!e.colDef?{role:d.current?.getCellAriaRole()}:{}},P.default.createElement("span",{className:D,ref:l}),P.default.createElement("span",{className:E,ref:a}),P.default.createElement("span",{className:M,ref:n}),P.default.createElement("span",{className:"ag-group-value",ref:s},A?I:T?P.default.createElement(k,{...h.params}):null),P.default.createElement("span",{className:"ag-group-child-count"},c))}),fT=(0,P.createContext)({setMethods:()=>{}}),fk=(0,P.memo)(e=>{let{initialProps:t,addUpdateCallback:i,CustomComponentClass:o,setMethods:r}=e,[{key:s,...n},l]=(0,P.useState)(t);return(0,P.useEffect)(()=>{i(e=>l(e))},[]),P.default.createElement(fT.Provider,{value:{setMethods:r}},P.default.createElement(o,{key:s,...n}))}),fA=0;function fI(){return`agPortalKey_${++fA}`}var fL=class{constructor(e,t,i,o){this.portal=null,this.oldPortal=null,this.reactComponent=e,this.portalManager=t,this.componentType=i,this.suppressFallbackMethods=!!o,this.statelessComponent=this.isStateless(this.reactComponent),this.key=fI(),this.portalKey=fI(),this.instanceCreated=this.isStatelessComponent()?ou.resolve(!1):new ou(e=>{this.resolveInstanceCreated=e})}getGui(){return this.eParentElement}getRootElement(){return this.eParentElement.firstChild}destroy(){this.componentInstance&&"function"==typeof this.componentInstance.destroy&&this.componentInstance.destroy();let e=this.portal;e&&this.portalManager.destroyPortal(e)}createParentElement(e){let t=this.portalManager.getComponentWrappingElement(),i=document.createElement(t||"div");return i.classList.add("ag-react-container"),e.reactContainer=i,i}statelessComponentRendered(){return this.eParentElement.childElementCount>0||this.eParentElement.childNodes.length>0}getFrameworkComponentInstance(){return this.componentInstance}isStatelessComponent(){return this.statelessComponent}getReactComponentName(){return this.reactComponent.name}getMemoType(){return this.hasSymbol()?Symbol.for("react.memo"):60115}hasSymbol(){return"function"==typeof Symbol&&Symbol.for}isStateless(e){return"function"==typeof e&&!(e.prototype&&e.prototype.isReactComponent)||"object"==typeof e&&e.$$typeof===this.getMemoType()}hasMethod(e){let t=this.getFrameworkComponentInstance();return!!t&&null!=t[e]||this.fallbackMethodAvailable(e)}callMethod(e,t){let i=this.getFrameworkComponentInstance();if(this.isStatelessComponent())return this.fallbackMethod(e,t&&t[0]?t[0]:{});if(!i)return void setTimeout(()=>this.callMethod(e,t));let o=i[e];return o?o.apply(i,t):this.fallbackMethodAvailable(e)?this.fallbackMethod(e,t&&t[0]?t[0]:{}):void 0}addMethod(e,t){this[e]=t}init(e){return this.eParentElement=this.createParentElement(e),this.createOrUpdatePortal(e),new ou(e=>this.createReactComponent(e))}createOrUpdatePortal(e){this.isStatelessComponent()||(this.ref=e=>{this.componentInstance=e,this.resolveInstanceCreated?.(!0),this.resolveInstanceCreated=void 0},e.ref=this.ref),this.reactElement=this.createElement(this.reactComponent,{...e,key:this.key}),this.portal=(0,fm.createPortal)(this.reactElement,this.eParentElement,this.portalKey)}createElement(e,t){return(0,P.createElement)(e,t)}createReactComponent(e){this.portalManager.mountReactPortal(this.portal,this,e)}rendered(){return this.isStatelessComponent()&&this.statelessComponentRendered()||!!(!this.isStatelessComponent()&&this.getFrameworkComponentInstance())}refreshComponent(e){this.oldPortal=this.portal,this.createOrUpdatePortal(e),this.portalManager.updateReactPortal(this.oldPortal,this.portal)}fallbackMethod(e,t){let i=this[`${e}Component`];if(!this.suppressFallbackMethods&&i)return i.bind(this)(t)}fallbackMethodAvailable(e){return!this.suppressFallbackMethods&&!!this[`${e}Component`]}};function fB(e,t,i){for(let o of e){let e=t[o];e&&(i[o]=e)}}var fV=class extends fL{constructor(){super(...arguments),this.awaitUpdateCallback=new ou(e=>{this.resolveUpdateCallback=e}),this.wrapperComponent=fk}init(e){return this.sourceParams=e,super.init(this.getProps())}addMethod(){}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}getFrameworkComponentInstance(){return this}createElement(e,t){return super.createElement(this.wrapperComponent,{initialProps:t,CustomComponentClass:e,setMethods:e=>this.setMethods(e),addUpdateCallback:e=>{this.updateCallback=()=>(e(this.getProps()),new ou(e=>{setTimeout(()=>{e()})})),this.resolveUpdateCallback()}})}setMethods(e){this.providedMethods=e,fB(this.getOptionalMethods(),this.providedMethods,this)}getOptionalMethods(){return[]}getProps(){return{...this.sourceParams,key:this.key,ref:this.ref}}refreshProps(){return this.updateCallback?this.updateCallback():new ou(e=>this.awaitUpdateCallback.then(()=>{this.updateCallback().then(()=>e())}))}},fG=class extends fV{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fH=class extends fV{refresh(e){this.sourceParams=e,this.refreshProps()}},fO=class extends fV{constructor(){super(...arguments),this.date=null,this.onDateChange=e=>this.updateDate(e)}getDate(){return this.date}setDate(e){this.date=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled"]}updateDate(e){this.setDate(e),this.sourceParams.onDateChanged()}getProps(){let e=super.getProps();return e.date=this.date,e.onDateChange=this.onDateChange,delete e.onDateChanged,e}},fN=class extends fV{constructor(){super(...arguments),this.label="",this.icon=null,this.shake=!1}setIcon(e,t){this.icon=e,this.shake=t,this.refreshProps()}setLabel(e){this.label=e,this.refreshProps()}getProps(){let e=super.getProps(),{label:t,icon:i,shake:o}=this;return e.label=t,e.icon=i,e.shake=o,e}},fz=class extends fV{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e),this.onUiChange=()=>this.sourceParams.filterModifiedCallback(),this.expectingNewMethods=!0,this.hasBeenActive=!1,this.awaitSetMethodsCallback=new ou(e=>{this.resolveSetMethodsCallback=e})}isFilterActive(){return null!=this.model}doesFilterPass(e){return this.providedMethods.doesFilterPass(e)}getModel(){return this.model}setModel(e){return this.expectingNewMethods=!0,this.model=e,this.hasBeenActive||(this.hasBeenActive=this.isFilterActive()),this.refreshProps()}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){let t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","getModelAsString","onAnyFilterChanged"]}setMethods(e){!1===this.expectingNewMethods&&this.hasBeenActive&&this.providedMethods?.doesFilterPass!==e?.doesFilterPass&&setTimeout(()=>{this.sourceParams.filterChangedCallback()}),this.expectingNewMethods=!1,super.setMethods(e),this.resolveSetMethodsCallback(),this.resolveFilterPassCallback?.(),this.resolveFilterPassCallback=void 0}updateModel(e){this.resolveFilterPassCallback?.();let t=new ou(e=>{this.resolveFilterPassCallback=e});this.setModel(e).then(()=>{t.then(()=>{this.sourceParams.filterChangedCallback()})})}getProps(){let e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e.onUiChange=this.onUiChange,delete e.filterChangedCallback,e}},fW=class extends fV{constructor(){super(...arguments),this.awaitSetMethodsCallback=new ou(e=>{this.resolveSetMethodsCallback=e})}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}afterGuiAttached(e){let t=this.providedMethods;t?t.afterGuiAttached?.(e):this.awaitSetMethodsCallback.then(()=>this.providedMethods?.afterGuiAttached?.(e))}getOptionalMethods(){return["afterGuiDetached","onNewRowsLoaded","onAnyFilterChanged"]}setMethods(e){super.setMethods(e),this.resolveSetMethodsCallback()}};function fU(e,t){e.parentFilterInstance(i=>{(i.setModel(t)||ou.resolve()).then(()=>{e.filterParams.filterChangedCallback()})})}var f$=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t,this.model=null,this.onModelChange=e=>this.updateModel(e)}getProps(){return{...this.floatingFilterParams,model:this.model,onModelChange:this.onModelChange}}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){fB(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),fU(this.floatingFilterParams,e)}},fK=class extends fV{constructor(){super(...arguments),this.model=null,this.onModelChange=e=>this.updateModel(e)}onParentModelChanged(e){this.model=e,this.refreshProps()}refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}updateModel(e){this.model=e,this.refreshProps(),fU(this.sourceParams,e)}getProps(){let e=super.getProps();return e.model=this.model,e.onModelChange=this.onModelChange,e}},fj=class extends fV{refresh(e){this.sourceParams=e,this.refreshProps()}getOptionalMethods(){return["afterGuiAttached"]}},f_=class extends fV{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fq=class extends fV{constructor(){super(...arguments),this.active=!1,this.expanded=!1,this.onActiveChange=e=>this.updateActive(e)}setActive(e){this.awaitSetActive(e)}setExpanded(e){this.expanded=e,this.refreshProps()}getOptionalMethods(){return["select","configureDefaults"]}awaitSetActive(e){return this.active=e,this.refreshProps()}updateActive(e){let t=this.awaitSetActive(e);e&&t.then(()=>this.sourceParams.onItemActivated())}getProps(){let e=super.getProps();return e.active=this.active,e.expanded=this.expanded,e.onActiveChange=this.onActiveChange,delete e.onItemActivated,e}},fY=class extends fV{refresh(e){return this.sourceParams=e,this.refreshProps(),!0}},fQ=class extends fV{constructor(){super(...arguments),this.onStateChange=e=>this.updateState(e)}refresh(e){return this.sourceParams=e,this.refreshProps(),!0}getState(){return this.state}updateState(e){this.state=e,this.refreshProps(),this.sourceParams.onStateUpdated()}getProps(){let e=super.getProps();return e.state=this.state,e.onStateChange=this.onStateChange,e}};function fZ(){tM(231)}var fJ=class{constructor(e,t,i){this.destroyed=!1,this.portals=[],this.hasPendingPortalUpdate=!1,this.wrappingElement=t||"div",this.refresher=e,this.maxComponentCreationTimeMs=i||1e3}getPortals(){return this.portals}destroy(){this.destroyed=!0}destroyPortal(e){this.portals=this.portals.filter(t=>t!==e),this.batchUpdate()}getComponentWrappingElement(){return this.wrappingElement}mountReactPortal(e,t,i){this.portals=[...this.portals,e],this.waitForInstance(t,i),this.batchUpdate()}updateReactPortal(e,t){this.portals[this.portals.indexOf(e)]=t,this.batchUpdate()}batchUpdate(){this.hasPendingPortalUpdate||(setTimeout(()=>{this.destroyed||(this.refresher(),this.hasPendingPortalUpdate=!1)}),this.hasPendingPortalUpdate=!0)}waitForInstance(e,t,i=Date.now()){if(this.destroyed)return void t(null);if(e.rendered())t(e);else{if(Date.now()-i>=this.maxComponentCreationTimeMs&&!this.hasPendingPortalUpdate){fD(!0,()=>this.refresher()),e.rendered()&&t(e);return}window.setTimeout(()=>{this.waitForInstance(e,t,i)})}}},fX=P.default.createContext([]),f0=P.default.createContext(void 0),f1=(0,P.memo)(({ctrl:e})=>{let t=e.isAlive(),{context:i}=(0,P.useContext)(fC),[o,r]=(0,P.useState)(),[s,n]=(0,P.useState)(),l=(0,P.useRef)(),a=(0,P.useRef)(null),d=(0,P.useRef)(null),h=(0,P.useRef)(null),u=(0,P.useRef)(),c=(0,P.useRef)();t&&!c.current&&(c.current=new op(()=>a.current));let g=(0,P.useCallback)(t=>{if(a.current=t,!t||!e.isAlive()||i.isDestroyed()){l.current=i.destroyBean(l.current);return}l.current=i.createBean(new rG);let o=()=>{let t=e.getSelectAllGui();t&&(d.current?.insertAdjacentElement("afterend",t),l.current.addDestroyFunc(()=>t.remove()))};e.setComp({setWidth:e=>{a.current&&(a.current.style.width=e)},toggleCss:(e,t)=>c.current.toggleCss(e,t),setUserStyles:e=>n(e),setAriaSort:e=>{a.current&&(e?ea(a.current,e):ed(a.current))},setUserCompDetails:e=>r(e),getUserCompInstance:()=>u.current||void 0,refreshSelectAllGui:o,removeSelectAllGui:()=>e.getSelectAllGui()?.remove()},t,d.current,h.current,l.current),o()},[]);(0,P.useLayoutEffect)(()=>fv(o,i,h.current,u),[o]),(0,P.useEffect)(()=>{e.setDragSource(a.current)},[o]);let p=(0,P.useMemo)(()=>!!(o?.componentFromFramework&&fR(o.componentClass)),[o]),f=o?.componentFromFramework,m=o?.componentClass;return P.default.createElement("div",{ref:g,style:s,className:"ag-header-cell",role:"columnheader"},P.default.createElement("div",{ref:d,className:"ag-header-cell-resize",role:"presentation"}),P.default.createElement("div",{ref:h,className:"ag-header-cell-comp-wrapper",role:"presentation"},f?p?P.default.createElement(m,{...o.params}):P.default.createElement(m,{...o.params,ref:u}):null))}),f2=class{constructor(e,t){this.floatingFilterParams=e,this.refreshProps=t}getProps(){return this.floatingFilterParams}refresh(e){this.floatingFilterParams=e,this.refreshProps()}setMethods(e){fB(this.getOptionalMethods(),e,this)}getOptionalMethods(){return["afterGuiAttached"]}},f5=(0,P.memo)(({ctrl:e})=>{let{context:t,gos:i}=(0,P.useContext)(fC),[o,r]=(0,P.useState)(),[s,n]=(0,P.useState)(()=>new fS("ag-header-cell","ag-floating-filter")),[l,a]=(0,P.useState)(()=>new fS),[d,h]=(0,P.useState)(()=>new fS("ag-floating-filter-button","ag-hidden")),[u,c]=(0,P.useState)("false"),[g,p]=(0,P.useState)(),[,f]=(0,P.useState)(1),m=(0,P.useRef)(),C=(0,P.useRef)(null),w=(0,P.useRef)(null),v=(0,P.useRef)(null),b=(0,P.useRef)(null),y=(0,P.useRef)(),S=(0,P.useRef)(),R=e=>{null!=e&&y.current?.(e)},F=(0,P.useCallback)(i=>{if(C.current=i,!i||!e.isAlive()||t.isDestroyed()){m.current=t.destroyBean(m.current);return}m.current=t.createBean(new rG),S.current=new ou(e=>{y.current=e}),e.setComp({toggleCss:(e,t)=>n(i=>i.setClass(e,t)),setUserStyles:e=>r(e),addOrRemoveBodyCssClass:(e,t)=>a(i=>i.setClass(e,t)),setButtonWrapperDisplayed:e=>{h(t=>t.setClass("ag-hidden",!e)),c(e?"false":"true")},setWidth:e=>{C.current&&(C.current.style.width=e)},setCompDetails:e=>p(e),getFloatingFilterComp:()=>S.current?S.current:null,setMenuIcon:e=>b.current?.appendChild(e)},i,b.current,w.current,m.current)},[]);(0,P.useLayoutEffect)(()=>fv(g,t,w.current,R),[g]);let x=(0,P.useMemo)(()=>s.toString(),[s]),D=(0,P.useMemo)(()=>l.toString(),[l]),E=(0,P.useMemo)(()=>d.toString(),[d]),M=(0,P.useMemo)(()=>!!(g&&g.componentFromFramework&&fR(g.componentClass)),[g]),T=(0,P.useMemo)(()=>i.get("reactiveCustomComponents"),[]),k=(0,P.useMemo)(()=>i.get("enableFilterHandlers"),[]),[A,I]=(0,P.useState)();(0,P.useEffect)(()=>{if(g?.componentFromFramework)if(T){let e=new(k?f2:f$)(g.params,()=>f(e=>e+1));R(e),I(e)}else fZ()},[g]);let L=A?.getProps(),B=g?.componentFromFramework,V=g?.componentClass;return P.default.createElement("div",{ref:F,style:o,className:x,role:"gridcell"},P.default.createElement("div",{ref:w,className:D,role:"presentation"},B?T?L&&P.default.createElement(fT.Provider,{value:{setMethods:e=>A.setMethods(e)}},P.default.createElement(V,{...L})):P.default.createElement(V,{...g.params,ref:M?()=>{}:R}):null),P.default.createElement("div",{ref:v,"aria-hidden":u,className:E,role:"presentation"},P.default.createElement("button",{ref:b,type:"button",className:"ag-button ag-floating-filter-button-button",tabIndex:-1})))}),f3=(0,P.memo)(({ctrl:e})=>{let{context:t}=(0,P.useContext)(fC),[i,o]=(0,P.useState)(),[r,s]=(0,P.useState)(()=>new fS),[n,l]=(0,P.useState)(()=>new fS),[a,d]=(0,P.useState)("false"),[h,u]=(0,P.useState)(),[c,g]=(0,P.useState)(),p=(0,P.useRef)(),f=(0,P.useRef)(null),m=(0,P.useRef)(null),C=(0,P.useRef)(null),w=(0,P.useRef)(),v=(0,P.useCallback)(i=>{if(f.current=i,!i||!e.isAlive()||t.isDestroyed()){p.current=t.destroyBean(p.current);return}p.current=t.createBean(new rG),e.setComp({setWidth:e=>{f.current&&(f.current.style.width=e)},toggleCss:(e,t)=>s(i=>i.setClass(e,t)),setUserStyles:e=>o(e),setHeaderWrapperHidden:e=>{let t=C.current;t&&(e?t.style.setProperty("display","none"):t.style.removeProperty("display"))},setHeaderWrapperMaxHeight:e=>{let t=C.current;t&&(null!=e?t.style.setProperty("max-height",`${e}px`):t.style.removeProperty("max-height"),t.classList.toggle("ag-header-cell-comp-wrapper-limited-height",null!=e))},setUserCompDetails:e=>g(e),setResizableDisplayed:e=>{l(t=>t.setClass("ag-hidden",!e)),d(e?"false":"true")},setAriaExpanded:e=>u(e),getUserCompInstance:()=>w.current||void 0},i,m.current,C.current,p.current)},[]);(0,P.useLayoutEffect)(()=>fv(c,t,C.current),[c]),(0,P.useEffect)(()=>{f.current&&e.setDragSource(f.current)},[c]);let b=(0,P.useMemo)(()=>!!(c?.componentFromFramework&&fR(c.componentClass)),[c]),y=(0,P.useMemo)(()=>"ag-header-group-cell "+r.toString(),[r]),S=(0,P.useMemo)(()=>"ag-header-cell-resize "+n.toString(),[n]),R=c?.componentFromFramework,F=c?.componentClass;return P.default.createElement("div",{ref:v,style:i,className:y,role:"columnheader","aria-expanded":h},P.default.createElement("div",{ref:C,className:"ag-header-cell-comp-wrapper",role:"presentation"},R?b?P.default.createElement(F,{...c.params}):P.default.createElement(F,{...c.params,ref:w}):null),P.default.createElement("div",{ref:m,"aria-hidden":a,className:S}))}),f4=(0,P.memo)(({ctrl:e})=>{let{gos:t,context:i}=(0,P.useContext)(fC),{topOffset:o,rowHeight:r}=(0,P.useMemo)(()=>e.getTopAndHeight(),[]),s=(0,P.useMemo)(()=>t.get("tabIndex"),[]),[n,l]=(0,P.useState)(()=>e.getAriaRowIndex()),a=e.headerRowClass,[d,h]=(0,P.useState)(()=>r+"px"),[u,c]=(0,P.useState)(()=>o+"px"),g=(0,P.useRef)(null),[p,f]=(0,P.useState)(()=>e.getUpdatedHeaderCtrls()),m=(0,P.useRef)(),C=(0,P.useRef)(null),w=(0,P.useCallback)(t=>{if(C.current=t,!t||!e.isAlive()||i.isDestroyed()){m.current=i.destroyBean(m.current);return}m.current=i.createBean(new rG),e.setComp({setHeight:e=>h(e),setTop:e=>c(e),setHeaderCtrls:(e,t,i)=>{let o=g.current,r=fE(o,e,t);r!==o&&(g.current=r,fD(i,()=>f(r)))},setWidth:e=>{C.current&&(C.current.style.width=e)},setRowIndex:e=>{l(e)}},m.current,!1)},[]),v=(0,P.useMemo)(()=>({height:d,top:u}),[d,u]),b=(0,P.useCallback)(t=>{switch(e.type){case"group":return P.default.createElement(f3,{ctrl:t,key:t.instanceId});case"filter":return P.default.createElement(f5,{ctrl:t,key:t.instanceId});default:return P.default.createElement(f1,{ctrl:t,key:t.instanceId})}},[]);return P.default.createElement("div",{ref:w,className:a,role:"row",style:v,tabIndex:s,"aria-rowindex":n},p.map(b))}),f6=(0,P.memo)(({pinned:e})=>{let[t,i]=(0,P.useState)(!0),[o,r]=(0,P.useState)([]),{context:s}=(0,P.useContext)(fC),n=(0,P.useRef)(null),l=(0,P.useRef)(null),a=(0,P.useRef)(),d="left"===e,h="right"===e,u=(0,P.useCallback)(t=>{if(n.current=t,!t||s.isDestroyed()){a.current=s.destroyBean(a.current);return}a.current=s.createBean(new rY(e)),a.current.setComp({setDisplayed:i,setCtrls:e=>r(e),setCenterWidth:e=>{l.current&&(l.current.style.width=e)},setViewportScrollLeft:e=>{n.current&&(n.current.scrollLeft=e)},setPinnedContainerWidth:e=>{n.current&&(n.current.style.width=e,n.current.style.minWidth=e,n.current.style.maxWidth=e)}},n.current)},[]),c=t?"":"ag-hidden",g=()=>o.map(e=>P.default.createElement(f4,{ctrl:e,key:e.instanceId}));return d?P.default.createElement("div",{ref:u,className:"ag-pinned-left-header "+c,"aria-hidden":!t,role:"rowgroup"},g()):h?P.default.createElement("div",{ref:u,className:"ag-pinned-right-header "+c,"aria-hidden":!t,role:"rowgroup"},g()):d||h?null:P.default.createElement("div",{ref:u,className:"ag-header-viewport "+c,role:"rowgroup",tabIndex:-1},P.default.createElement("div",{ref:l,className:"ag-header-container",role:"presentation"},g()))}),f8=(0,P.memo)(()=>{let[e,t]=(0,P.useState)(()=>new fS),[i,o]=(0,P.useState)(),{context:r}=(0,P.useContext)(fC),s=(0,P.useRef)(null),n=(0,P.useRef)(),l=(0,P.useCallback)(e=>{if(s.current=e,!e||r.isDestroyed()){n.current=r.destroyBean(n.current);return}n.current=r.createBean(new rB),n.current.setComp({toggleCss:(e,i)=>t(t=>t.setClass(e,i)),setHeightAndMinHeight:e=>o(e)},e,e)},[]),a=(0,P.useMemo)(()=>"ag-header "+e.toString(),[e]),d=(0,P.useMemo)(()=>({height:i,minHeight:i}),[i]);return P.default.createElement("div",{ref:l,className:a,style:d,role:"presentation"},P.default.createElement(f6,{pinned:"left"}),P.default.createElement(f6,{pinned:null}),P.default.createElement(f6,{pinned:"right"}))}),f7=(e,t)=>{(0,P.useEffect)(()=>{let i=t.current;if(i){let t=i.parentElement;if(t){let o=document.createComment(e);return t.insertBefore(o,i),()=>{o.remove()}}}},[e])},f9=class{constructor(e,t){this.cellEditorParams=e,this.refreshProps=t,this.instanceCreated=new ou(e=>{this.resolveInstanceCreated=e}),this.onValueChange=e=>this.updateValue(e),this.value=e.value}getProps(){return{...this.cellEditorParams,initialValue:this.cellEditorParams.value,value:this.value,onValueChange:this.onValueChange}}getValue(){return this.value}refresh(e){this.cellEditorParams=e,this.refreshProps()}setMethods(e){fB(this.getOptionalMethods(),e,this)}getInstance(){return this.instanceCreated.then(()=>this.componentInstance)}setRef(e){this.componentInstance=e,this.resolveInstanceCreated?.(),this.resolveInstanceCreated=void 0}getOptionalMethods(){return["isCancelBeforeStart","isCancelAfterEnd","focusIn","focusOut","afterGuiAttached","getValidationErrors","getValidationElement"]}updateValue(e){this.value=e,this.refreshProps()}},me=(0,P.memo)(e=>{let[t,i]=(0,P.useState)(),o=(0,P.useContext)(fC),{context:r,popupSvc:s,gos:n,editSvc:l}=o,{editDetails:a,cellCtrl:d,eParentCell:h}=e;return(e=>{let t=(0,P.useRef)(e),i=(0,P.useRef)(),o=(0,P.useRef)(!1),r=(0,P.useRef)(!1),[,s]=(0,P.useState)(0);o.current&&(r.current=!0),(0,P.useEffect)(()=>(o.current||(i.current=t.current(),o.current=!0),s(e=>e+1),()=>{r.current&&i.current?.()}),[])})(()=>{let t,o,{compDetails:u}=a,c=n.get("stopEditingWhenCellsLoseFocus");if(!r.isDestroyed()){let n=(t=r.createBean(l.createPopupEditorWrapper(u.params))).getGui();if(e.jsChildComp){let t=e.jsChildComp.getGui();t&&n.appendChild(t)}let{column:g,rowNode:p}=d,f={column:g,rowNode:p,type:"popupCellEditor",eventSource:h,ePopup:n,position:a.popupPosition,keepWithinBounds:!0},m=s?.positionPopupByComponent.bind(s,f),C=s?.addPopup({modal:c,eChild:n,closeOnEsc:!0,closedCallback:()=>{d.onPopupEditorClosed()},anchorToElement:h,positionCallback:m,ariaOwns:h});o=C?C.hideFunc:void 0,i(t),e.jsChildComp?.afterGuiAttached?.()}return()=>{o?.(),r.destroyBean(t)}}),(0,P.useLayoutEffect)(()=>()=>{d.isCellFocused()&&t?.getGui().contains($(o))&&h.focus({preventScroll:!0})},[t]),t&&e.wrappedContent?(0,fm.createPortal)(e.wrappedContent,t.getGui()):null}),mt=(e,t,i)=>e.compProxy?((e,t,i)=>{let{compProxy:o}=e;i(o);let r=o.getProps(),s=fR(t);return P.default.createElement(fT.Provider,{value:{setMethods:e=>o.setMethods(e)}},s?P.default.createElement(t,{...r}):P.default.createElement(t,{...r,ref:e=>o.setRef(e)}))})(e,t,i):P.default.createElement(t,{...e.compDetails.params,ref:i}),mi=(e,t,i,o,r,s,n=!1)=>{let{context:l}=(0,P.useContext)(fC),a=(0,P.useCallback)(()=>{let e=r.current;if(!e)return;let t=e.getGui();t&&t.parentElement&&t.remove(),l.destroyBean(e),r.current=void 0},[]);(0,P.useEffect)(()=>{let o=null!=e&&!n,l=e?.compDetails&&!e.compDetails.componentFromFramework,d=t&&null==i;if(!(o&&l&&!d))return void a();let h=e.compDetails;if(r.current){let t=r.current,i=null!=t.refresh&&!1==e.force&&t.refresh(h.params);if(!0===i||void 0===i)return;a()}h.newAgStackInstance().then(e=>{if(!e)return;let o=e.getGui();o&&((t?i:s.current).appendChild(o),r.current=e)})},[e,t,o,n]),(0,P.useEffect)(()=>a,[])},mo=({cellCtrl:e,parent:t})=>{let i=(0,P.useRef)(),o=(0,P.useMemo)(()=>{let{loadingComp:t}=e.getDeferLoadingCellRenderer();return t?{value:void 0,compDetails:t,force:!1}:void 0},[e]);if(mi(o,!1,void 0,1,i,t),o?.compDetails?.componentFromFramework){let e=o.compDetails.componentClass;return P.default.createElement(e,{...o.compDetails.params})}return P.default.createElement(P.default.Fragment,null)},mr=(0,P.memo)(({cellCtrl:e,printLayout:t,editingCell:i})=>{let{context:o}=(0,P.useContext)(fC),{column:{colIdSanitised:r},instanceId:s}=e,n=(0,P.useRef)(),[l,a]=(0,P.useState)(()=>e.isCellRenderer()?void 0:{compDetails:void 0,value:e.getValueToDisplay(),force:!1}),[d,h]=(0,P.useState)(),[u,c]=(0,P.useState)(1),[g,p]=(0,P.useState)(),[f,m]=(0,P.useState)(!1),[C,w]=(0,P.useState)(!1),[v,b]=(0,P.useState)(!1),[y,S]=(0,P.useState)(),R=(0,P.useMemo)(()=>e.isForceWrapper(),[e]),F=(0,P.useMemo)(()=>e.getCellAriaRole(),[e]),x=(0,P.useRef)(null),D=(0,P.useRef)(null),E=(0,P.useRef)(null),M=(0,P.useRef)(),T=(0,P.useRef)(),k=(0,P.useRef)(),A=(0,P.useRef)([]),I=(0,P.useRef)(),L=(0,P.useRef)(),[B,V]=(0,P.useState)(0),G=(0,P.useCallback)(e=>{L.current=e,V(e=>e+1)},[]),H=null!=l&&(f||v||C)&&(null==d||!!d.popup),O=R||H,N=(0,P.useMemo)(()=>e.getCellValueClass(),[e]),z=(0,P.useCallback)(t=>{if(T.current=t,t){let i=t.isCancelBeforeStart&&t.isCancelBeforeStart();setTimeout(()=>{i?(e.stopEditing(!0),e.focusCell(!0)):(e.cellEditorAttached(),e.enableEditorTooltipFeature(t))})}},[e]),W=(0,P.useRef)();W.current||(W.current=new op(()=>x.current));let U=!!d&&!d.popup;mi(l,O,L.current,B,M,x,U);let $=(0,P.useRef)();(0,P.useLayoutEffect)(()=>{let e=$.current;if($.current=l,null==e||null==e.compDetails||null==l||null==l.compDetails)return;I.current?.refreshVisibility();let t=e.compDetails,i=l.compDetails;t.componentClass!=i.componentClass||E.current?.refresh==null||!0!=E.current.refresh(i.params)&&c(e=>e+1)},[l]),(0,P.useLayoutEffect)(()=>{if(!(d&&!d.compDetails.componentFromFramework)||o.isDestroyed())return;let t=d.compDetails,i=!0===d.popup,r=t.newAgStackInstance();return r.then(e=>{if(!e)return;let t=e.getGui();if(z(e),!i){let i=(R?k:x).current;i?.appendChild(t),e.afterGuiAttached?.()}S(e)}),()=>{r.then(t=>{let i=t.getGui();e.disableEditorTooltipFeature(),o.destroyBean(t),z(void 0),S(void 0),i?.remove()})}},[d]);let K=(0,P.useCallback)(t=>{let i;if(k.current=t,!t||o.isDestroyed()||!e.isAlive()){let e=A.current;for(let t of(A.current=[],e))t();return}let r=e=>{e&&(t.insertAdjacentElement("afterbegin",e.getGui()),A.current.push(()=>{ex(e.getGui()),o.destroyBean(e),I.current===i&&(I.current=void 0)}))};f&&r(e.createSelectionCheckbox()),v&&r(e.createDndSource()),C&&(I.current=i=e.createRowDragComp(),i&&(r(i),i.refreshVisibility()))},[e,o,v,C,f]),j=(0,P.useCallback)(()=>{let r=!e.isCellSpanning()||D.current,s=x.current;if(!s||!r||!e||!e.isAlive()||o.isDestroyed()){n.current=o.destroyBean(n.current);return}n.current=o.createBean(new rG);let l={toggleCss:(e,t)=>W.current.toggleCss(e,t),setUserStyles:e=>p(e),getFocusableElement:()=>x.current,setIncludeSelection:e=>m(e),setIncludeRowDrag:e=>w(e),setIncludeDndSource:e=>b(e),getCellEditor:()=>T.current??null,getCellRenderer:()=>E.current??M.current,getParentOfValue:()=>L.current??k.current??x.current,setRenderDetails:(t,i,o)=>{let r=()=>{a(e=>e?.compDetails!==t||e?.value!==i||e?.force!==o?{value:i,compDetails:t,force:o}:e)};if(t?.params?.deferRender&&!e.rowNode.group){let{loadingComp:t,onReady:i}=e.getDeferLoadingCellRenderer();if(t){a({value:void 0,compDetails:t,force:!1}),i.then(()=>{fP?r():P.default.startTransition(r)});return}}r()},setEditDetails:(t,i,o,r)=>{if(t){let e;t.componentFromFramework&&(r?e=new f9(t.params,()=>c(e=>e+1)):fZ()),h({compDetails:t,popup:i,popupPosition:o,compProxy:e}),i||a(void 0)}else e.hasBrowserFocus()&&l.getFocusableElement().focus({preventScroll:!0}),T.current=void 0,h(void 0)},refreshEditStyles:(e,t)=>{if(!x.current)return;let{current:i}=W;i.toggleCss("ag-cell-value",!O),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)}},d=k.current||void 0;e.setComp(l,s,D.current??void 0,d,t,i,n.current)},[]),_=(0,P.useCallback)(e=>{x.current=e,j()},[]),q=(0,P.useCallback)(e=>{D.current=e,j()},[]),Y=(0,P.useMemo)(()=>!!(l?.compDetails?.componentFromFramework&&fR(l.compDetails.componentClass)),[l]);(0,P.useLayoutEffect)(()=>{if(!x.current)return;let{current:e}=W;e.toggleCss("ag-cell-value",!O),e.toggleCss("ag-cell-inline-editing",!!d&&!d.popup),e.toggleCss("ag-cell-popup-editing",!!d&&!!d.popup),e.toggleCss("ag-cell-not-inline-editing",!d||!!d.popup)});let Q=()=>{let{compDetails:t,value:i}=l;if(!t)return i?.toString?.()??i;if(t.componentFromFramework){let i=t.componentClass;return P.default.createElement(P.Suspense,{fallback:P.default.createElement(mo,{cellCtrl:e,parent:x})},Y?P.default.createElement(i,{...t.params,key:u}):P.default.createElement(i,{...t.params,key:u,ref:E}))}},Z=()=>{let t=()=>null==l?null:O?P.default.createElement("span",{role:"presentation",id:`cell-${s}`,className:N,ref:G},Q()):Q(),i=t=>{var i;let o,r,s,n,l;return i=x.current,r=(o=t.compDetails).componentClass,s=o.componentFromFramework&&!t.popup,n=o.componentFromFramework&&t.popup,l=!o.componentFromFramework&&t.popup,s?mt(t,r,z):n?P.default.createElement(me,{editDetails:t,cellCtrl:e,eParentCell:i,wrappedContent:mt(t,r,z)}):l&&y?P.default.createElement(me,{editDetails:t,cellCtrl:e,eParentCell:i,jsChildComp:y}):null};return null!=d?d.popup?P.default.createElement(P.default.Fragment,null,t(),i(d)):i(d):t()},J=()=>P.default.createElement("div",{ref:_,style:g,role:F,"col-id":r},O?P.default.createElement("div",{className:"ag-cell-wrapper",role:"presentation",ref:K},Z()):Z());return e.isCellSpanning()?P.default.createElement("div",{ref:q,className:"ag-spanned-cell-wrapper",role:"presentation"},J()):J()}),ms=(0,P.memo)(({rowCtrl:e,containerType:t})=>{var i,o,r;let s,{context:n,gos:l,editSvc:a}=(0,P.useContext)(fC),d="default"===(0,P.useContext)(fw),h=(0,P.useRef)(),u=(0,P.useRef)(e.getDomOrder()),c=e.isFullWidth(),g=e.rowNode.displayed,[p,f]=(0,P.useState)(()=>g?e.rowNode.getRowIndexString():null),[m,C]=(0,P.useState)(()=>e.rowId),[w,v]=(0,P.useState)(()=>e.businessKey),[b,y]=(0,P.useState)(()=>e.rowStyles),S=(0,P.useRef)(null),[R,F]=(0,P.useState)(()=>null),[x,D]=(0,P.useState)(),[E,M]=(0,P.useState)(()=>g?e.getInitialRowTop(t):void 0),[T,k]=(0,P.useState)(()=>g?e.getInitialTransform(t):void 0),A=(0,P.useRef)(null),I=(0,P.useRef)(),L=(0,P.useRef)(),B=(0,P.useRef)(!1),[V,G]=(0,P.useState)(0);(0,P.useEffect)(()=>{if(B.current||!x||V>10)return;let t=A.current?.firstChild;t?(e.setupDetailRowAutoHeight(t),B.current=!0):G(e=>e+1)},[x,V]);let H=(0,P.useRef)();H.current||(H.current=new op(()=>A.current));let O=(0,P.useRef)(()=>{}),N=(i=(0,P.useCallback)(e=>(O.current=e,()=>{O.current=()=>{}}),[]),o=()=>S.current,r=[],P.default.useSyncExternalStore?P.default.useSyncExternalStore(i,o):r),z=d?N:R,W=(0,P.useCallback)(i=>{(A.current=i,h.current=i?n.createBean(new rG):n.destroyBean(h.current),i)?!e.isAlive()||n.isDestroyed()||e.setComp({setTop:M,setTransform:k,toggleCss:(e,t)=>H.current.toggleCss(e,t),setDomOrder:e=>u.current=e,setRowIndex:f,setRowId:C,setRowBusinessKey:v,setUserStyles:y,setCellCtrls:(e,t)=>{let i=S.current,o=fE(i,e,u.current);o!==i&&(S.current=o,d?O.current():fD(t,()=>F(o)))},showFullWidth:e=>{L.current=e.params,D(e)},getFullWidthCellRenderer:()=>I.current,getFullWidthCellRendererParams:()=>L.current,refreshFullWidth:e=>{let t=e();return(L.current=t,_.current)?(D(e=>({...e,params:t})),!0):!!I.current&&!!I.current.refresh&&I.current.refresh(t)}},i,t,h.current):e.unsetComp(t)},[]);(0,P.useLayoutEffect)(()=>fv(x,n,A.current,I),[x]);let U=(0,P.useMemo)(()=>{let e={top:E,transform:T};return Object.assign(e,b),e},[E,T,b]),$=c&&x?.componentFromFramework,K=!c&&null!=z,j=(0,P.useMemo)(()=>!!(x?.componentFromFramework&&fR(x.componentClass)),[x]),_=(0,P.useRef)(!1);return(0,P.useEffect)(()=>{_.current=j&&!!x&&!!l.get("reactiveCustomComponents")},[j,x]),P.default.createElement("div",{ref:W,role:"row",style:U,"row-index":p,"row-id":m,"row-business-key":w},K?z?.map(t=>P.default.createElement(mr,{cellCtrl:t,editingCell:a?.isEditing(t,{withOpenEditor:!0})??!1,printLayout:e.printLayout,key:t.instanceId})):$?(s=x.componentClass,j?P.default.createElement(s,{...x.params}):P.default.createElement(s,{...x.params,ref:I})):null)}),mn=(0,P.memo)(({name:e})=>{let{context:t,gos:i}=(0,P.useContext)(fC),o=(0,P.useMemo)(()=>no[e],[e]),r=(0,P.useRef)(null),s=(0,P.useRef)(null),n=(0,P.useRef)(null),l=(0,P.useRef)([]),a=(0,P.useRef)([]),[d,h]=(0,P.useState)(()=>[]),u=!!i.get("enableCellSpan")&&!!o.getSpannedRowCtrls,c=(0,P.useRef)([]),g=(0,P.useRef)([]),[p,f]=(0,P.useState)(()=>[]),m=(0,P.useRef)(!1),C=(0,P.useRef)(),w=(0,P.useMemo)(()=>fy("ag-viewport",nr(e)),[e]),v=(0,P.useMemo)(()=>fy(ns(e)),[e]),b=(0,P.useMemo)(()=>fy("ag-spanning-container",nn(e)),[e]),y="center"===o.type||u;f7(" AG Row Container "+e+" ",y?r:s);let S=(0,P.useCallback)(()=>{let e=!y||null!=r.current,t=null!=s.current,i=!u||null!=n.current;return e&&t&&i},[]),R=(0,P.useCallback)(()=>null==r.current&&null==s.current&&null==n.current,[]),F=(0,P.useCallback)(()=>{if(R()&&(C.current=t.destroyBean(C.current)),!t.isDestroyed()&&S()){let i=e=>{let t=fE(a.current,l.current,m.current);t!==a.current&&(a.current=t,fD(e,()=>h(t)))};C.current=t.createBean(new nm(e)),C.current.setComp({setHorizontalScroll:e=>{r.current&&(r.current.scrollLeft=e)},setViewportHeight:e=>{r.current&&(r.current.style.height=e)},setRowCtrls:({rowCtrls:e,useFlushSync:t})=>{let o=!!t&&l.current.length>0&&e.length>0;l.current=e,i(o)},setSpannedRowCtrls:(e,t)=>{let i,o=!!t&&c.current.length>0&&e.length>0;c.current=e,(i=fE(g.current,c.current,m.current))!==g.current&&(g.current=i,fD(o,()=>f(i)))},setDomOrder:e=>{m.current!=e&&(m.current=e,i(!1))},setContainerWidth:e=>{s.current&&(s.current.style.width=e)},setOffsetTop:e=>{s.current&&(s.current.style.transform=`translateY(${e})`)}},s.current,n.current??void 0,r.current)}},[S,R]),x=(0,P.useCallback)(e=>{s.current=e,F()},[F]),D=(0,P.useCallback)(e=>{n.current=e,F()},[F]),E=(0,P.useCallback)(e=>{r.current=e,F()},[F]),M=()=>P.default.createElement("div",{className:v,ref:x,role:y?"presentation":"rowgroup"},d.map(e=>P.default.createElement(ms,{rowCtrl:e,containerType:o.type,key:e.instanceId})));return y?P.default.createElement("div",{className:w,ref:E,role:"rowgroup"},M(),u?P.default.createElement("div",{className:b,ref:D,role:"presentation"},p.map(e=>P.default.createElement(ms,{rowCtrl:e,containerType:o.type,key:e.instanceId}))):null):M()}),ml=(0,P.memo)(()=>{let e=(0,P.useContext)(fC),{context:t,overlays:i}=e,[o,r]=(0,P.useState)(""),[s,n]=(0,P.useState)(0),[l,a]=(0,P.useState)(0),[d,h]=(0,P.useState)("0px"),[u,c]=(0,P.useState)("0px"),[g,p]=(0,P.useState)("100%"),[f,m]=(0,P.useState)("0px"),[C,w]=(0,P.useState)("0px"),[v,b]=(0,P.useState)("100%"),[y,S]=(0,P.useState)(!0),[R,F]=(0,P.useState)(!0),[x,D]=(0,P.useState)(null),[E,M]=(0,P.useState)(""),[T,k]=(0,P.useState)(null),[A,I]=(0,P.useState)("ag-layout-normal"),L=(0,P.useRef)();L.current||(L.current=new op(()=>B.current));let B=(0,P.useRef)(null),V=(0,P.useRef)(null),G=(0,P.useRef)(null),H=(0,P.useRef)(null),O=(0,P.useRef)(null),N=(0,P.useRef)(null),z=(0,P.useRef)(null),W=(0,P.useRef)([]),U=(0,P.useRef)([]);f7(" AG Grid Body ",B),f7(" AG Pinned Top ",V),f7(" AG Sticky Top ",G),f7(" AG Middle ",N),f7(" AG Pinned Bottom ",z);let $=(0,P.useCallback)(o=>{if(B.current=o,!o||t.isDestroyed()){for(let e of(W.current=t.destroyBeans(W.current),U.current))e();U.current=[];return}let s=(e,t)=>{e.appendChild(t),U.current.push(()=>t.remove())},l=(e,i,o)=>{let r;s(e,document.createComment(o)),s(e,(r=t.createBean(new i),W.current.push(r),r).getGui())};l(o,sO," AG Fake Horizontal Scroll ");let d=i?.getOverlayWrapperCompClass();d&&l(o,d," AG Overlay Wrapper "),O.current&&l(O.current,sW," AG Fake Vertical Scroll ");let u=t.createBean(new nC);W.current.push(u),u.setComp({setRowAnimationCssOnBodyViewport:r,setColumnCount:e=>{B.current&&en(B.current,e)},setRowCount:e=>{B.current&&er(B.current,e)},setTopHeight:n,setBottomHeight:a,setStickyTopHeight:h,setStickyTopTop:c,setStickyTopWidth:p,setTopInvisible:S,setBottomInvisible:F,setColumnMovingCss:(e,t)=>L.current.toggleCss(e,t),updateLayoutClasses:I,setAlwaysVerticalScrollClass:D,setPinnedTopBottomOverflowY:M,setCellSelectableCss:(e,t)=>k(t?e:null),setBodyViewportWidth:e=>{N.current&&(N.current.style.width=e)},registerBodyViewportResizeListener:t=>{if(N.current){let i=eH(e,N.current,t);U.current.push(()=>i())}},setStickyBottomHeight:m,setStickyBottomBottom:w,setStickyBottomWidth:b,setGridRootRole:e=>o.setAttribute("role",e)},o,N.current,V.current,z.current,G.current,H.current)},[]),K=(0,P.useMemo)(()=>fy("ag-root","ag-unselectable",A),[A]),j=(0,P.useMemo)(()=>fy("ag-body-viewport",o,A,x,T),[o,A,x,T]),_=(0,P.useMemo)(()=>fy("ag-body",A),[A]),q=(0,P.useMemo)(()=>fy("ag-floating-top",y?"ag-invisible":null,T),[T,y]),Y=(0,P.useMemo)(()=>fy("ag-sticky-top",T),[T]),Q=(0,P.useMemo)(()=>fy("ag-sticky-bottom","0px"===f?"ag-invisible":null,T),[T,f]),Z=(0,P.useMemo)(()=>fy("ag-floating-bottom",R?"ag-invisible":null,T),[T,R]),J=(0,P.useMemo)(()=>({height:s,minHeight:s,overflowY:E}),[s,E]),X=(0,P.useMemo)(()=>({height:d,top:u,width:g}),[d,u,g]),ee=(0,P.useMemo)(()=>({height:f,bottom:C,width:v}),[f,C,v]),et=(0,P.useMemo)(()=>({height:l,minHeight:l,overflowY:E}),[l,E]),ei=e=>P.default.createElement(mn,{name:e,key:`${e}-container`}),eo=({section:e,children:t,className:i,style:o})=>P.default.createElement("div",{ref:e,className:i,role:"presentation",style:o},t.map(ei));return P.default.createElement("div",{ref:$,className:K},P.default.createElement(f8,null),eo({section:V,className:q,style:J,children:["topLeft","topCenter","topRight","topFullWidth"]}),P.default.createElement("div",{className:_,ref:O,role:"presentation"},eo({section:N,className:j,children:["left","center","right","fullWidth"]})),eo({section:G,className:Y,style:X,children:["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"]}),eo({section:H,className:Q,style:ee,children:["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"]}),eo({section:z,className:Z,style:et,children:["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"]}))}),ma=(0,P.forwardRef)((e,t)=>{let{children:i,eFocusableElement:o,onTabKeyDown:r,gridCtrl:s,forceFocusOutWhenTabGuardsAreEmpty:n,isEmpty:l}=e,{context:a}=(0,P.useContext)(fC),d=(0,P.useRef)(null),h=(0,P.useRef)(null),u=(0,P.useRef)(),c=e=>{let t=null==e?void 0:parseInt(e,10).toString();for(let e of[d,h])void 0===t?e.current?.removeAttribute("tabindex"):e.current?.setAttribute("tabindex",t)};(0,P.useImperativeHandle)(t,()=>({forceFocusOutOfContainer(e){u.current?.forceFocusOutOfContainer(e)}}));let g=(0,P.useCallback)(()=>{let e=d.current,t=h.current;if(!e&&!t||a.isDestroyed()){u.current=a.destroyBean(u.current);return}e&&t&&(u.current=a.createBean(new ff({comp:{setTabIndex:c},eTopGuard:e,eBottomGuard:t,eFocusableElement:o,onTabKeyDown:r,forceFocusOutWhenTabGuardsAreEmpty:n,focusInnerElement:e=>s.focusInnerElement(e),isEmpty:l})))},[]),p=(0,P.useCallback)(e=>{d.current=e,g()},[g]),f=(0,P.useCallback)(e=>{h.current=e,g()},[g]),m=e=>{let t="top"===e?nw.TAB_GUARD_TOP:nw.TAB_GUARD_BOTTOM;return P.default.createElement("div",{className:`${nw.TAB_GUARD} ${t}`,role:"presentation",ref:"top"===e?p:f})};return P.default.createElement(P.default.Fragment,null,m("top"),i,m("bottom"))}),md=(0,P.memo)(ma),mh=(0,P.memo)(({context:e})=>{let[t,i]=(0,P.useState)(""),[o,r]=(0,P.useState)(""),[s,n]=(0,P.useState)(null),[l,a]=(0,P.useState)(null),[d,h]=(0,P.useState)(!1),[u,c]=(0,P.useState)(),g=(0,P.useRef)(),p=(0,P.useRef)(null),f=(0,P.useRef)(),[m,C]=(0,P.useState)(null),w=(0,P.useRef)(()=>void 0),v=(0,P.useRef)(),b=(0,P.useRef)([]),y=(0,P.useCallback)(()=>void 0,[]);f7(" AG Grid ",p);let S=(0,P.useCallback)(t=>{if(p.current=t,g.current=t?e.createBean(new nR):e.destroyBean(g.current),!t||e.isDestroyed())return;let o=g.current;w.current=o.focusInnerElement.bind(o),o.setComp({destroyGridUi:()=>{},setRtlClass:i,forceFocusOutOfContainer:e=>{!e&&v.current?.isDisplayed()?v.current.forceFocusOutOfContainer(e):f.current?.forceFocusOutOfContainer(e)},updateLayoutClasses:r,getFocusableContainers:()=>{let e=[],t=p.current?.querySelector(".ag-root");for(let i of(t&&e.push({getGui:()=>t}),b.current))i.isDisplayed()&&e.push(i);return e},setCursor:n,setUserSelect:a},t,t),h(!0)},[]);(0,P.useEffect)(()=>{let t=g.current,i=p.current;if(!u||!t||!m||!i||e.isDestroyed())return;let o=[],{watermarkSelector:r,paginationSelector:s,sideBarSelector:n,statusBarSelector:l,gridHeaderDropZonesSelector:a}=t.getOptionalSelectors(),d=[];if(a){let t=e.createBean(new a.component),r=t.getGui();i.insertAdjacentElement("afterbegin",r),d.push(r),o.push(t)}if(n){let t=e.createBean(new n.component),i=t.getGui(),r=m.querySelector(".ag-tab-guard-bottom");r&&(r.insertAdjacentElement("beforebegin",i),d.push(i)),o.push(t),b.current.push(t)}let h=t=>{let r=e.createBean(new t),s=r.getGui();return i.insertAdjacentElement("beforeend",s),d.push(s),o.push(r),r};if(l&&h(l.component),s){let e=h(s.component);v.current=e,b.current.push(e)}return r&&h(r.component),()=>{for(let t of(e.destroyBeans(o),d))t.remove()}},[u,m,e]);let R=(0,P.useMemo)(()=>fy("ag-root-wrapper",t,o),[t,o]),F=(0,P.useMemo)(()=>fy("ag-root-wrapper-body","ag-focus-managed",o),[o]),x=(0,P.useMemo)(()=>({userSelect:null!=l?l:"",WebkitUserSelect:null!=l?l:"",cursor:null!=s?s:""}),[l,s]),D=(0,P.useCallback)(e=>{f.current=e,c(null!==e)},[]),E=(0,P.useCallback)(()=>!g.current?.isFocusable(),[]);return P.default.createElement("div",{ref:S,className:R,style:x,role:"presentation"},P.default.createElement("div",{className:F,ref:C,role:"presentation"},d&&m&&!e.isDestroyed()&&P.default.createElement(fC.Provider,{value:e.getBeans()},P.default.createElement(md,{ref:D,eFocusableElement:m,onTabKeyDown:y,gridCtrl:g.current,forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:E},P.default.createElement(ml,null)))))}),mu=class extends e2{postConstruct(){if(this.beans.colAutosize){let e=this.queueResizeOperationsForTick.bind(this);this.addManagedEventListeners({rowExpansionStateChanged:e,expandOrCollapseAll:e,cellValueChanged:e,rowNodeDataChanged:e,rowDataUpdated:e})}}queueResizeOperationsForTick(){let e=this.beans.colAutosize;e.shouldQueueResizeOperations=!0,setTimeout(()=>{e.processResizeOperations()},0)}areHeaderCellsRendered(){return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().every(e=>e.getAllCtrls().every(e=>e.areCellsRendered()))}areCellsRendered(){return this.beans.rowRenderer.getAllRowCtrls().every(e=>e.isRowRendered()&&e.getAllCellCtrls().every(e=>!!e.eGui))}},mc=P.useLayoutEffect,mg={setGridApi:void 0,maxComponentCreationTimeMs:void 0,children:void 0},mp=new Set(Object.keys({gridOptions:void 0,modules:void 0,containerStyle:void 0,className:void 0,passGridApi:void 0,componentWrappingElement:void 0,...mg})),mf=new Set(Object.keys(mg)),mm=e=>{let t=(0,P.useContext)(fX),i=(0,P.useContext)(f0),o=(0,P.useRef)(),r=(0,P.useRef)(null),s=(0,P.useRef)(null),n=(0,P.useRef)([]),l=(0,P.useRef)([]),a=(0,P.useRef)(e),d=(0,P.useRef)(),h=(0,P.useRef)(),u=(0,P.useRef)(!1),[c,g]=(0,P.useState)(void 0),[,p]=(0,P.useState)(0),f=(0,P.useRef)(),m=e=>{let t=r.current?.classList,i=(e="")=>e.trim().split(/\s+/g).filter(Boolean);if(f.current!==e){for(let e of i(f.current))t?.contains(e)&&t.remove(e);for(let o of i(e))t?.contains(o)||t?.add(o);f.current=e}};mc(()=>{m(e.className)},[e.className]);let C=(0,P.useCallback)(a=>{if(r.current=a,m(e.className),!a){for(let e of n.current)e();n.current.length=0;return}let c=[...e.modules??[],...t??[]];i&&tw(c)?.setLicenseKey(i),s.current||(s.current=new fJ(()=>p(e=>e+1),e.componentWrappingElement,e.maxComponentCreationTimeMs),n.current.push(()=>{s.current?.destroy(),s.current=null}));let f=io(e.gridOptions,e,Object.keys(e).filter(e=>!mp.has(e))),C=new mv(()=>{if(u.current){let e=()=>d.current?.shouldQueueUpdates()?void 0:l.current.shift(),t=e();for(;t;)t(),t=e()}});d.current=C;let w=new mu,v={providedBeanInstances:{frameworkCompWrapper:new mC(s.current,f),renderStatus:w},modules:c,frameworkOverrides:C,setThemeOnGridDiv:!0},b=new ur;f.gridId??(f.gridId=h.current),o.current=b.create(a,f,t=>{g(t),t.createBean(w),n.current.push(()=>{t.destroy()}),t.getBean("ctrlsSvc").whenReady({addDestroyFunc:e=>{n.current.push(e)}},()=>{if(t.isDestroyed())return;let i=o.current;i&&e.passGridApi?.(i)})},e=>{e.getBean("ctrlsSvc").whenReady({addDestroyFunc:e=>{n.current.push(e)}},()=>{for(let e of l.current)e();l.current.length=0,u.current=!0})},v),n.current.push(()=>{o.current=void 0}),o.current&&(h.current=o.current.getGridId())},[]),w=(0,P.useMemo)(()=>({height:"100%",...e.containerStyle||{}}),[e.containerStyle]),v=(0,P.useCallback)(e=>{u.current&&!d.current?.shouldQueueUpdates()?e():l.current.push(e)},[]);(0,P.useEffect)(()=>{let t=function(e,t){let i={};for(let o of Object.keys(t)){if(mp.has(o)){mf.has(o)&&tM(274,{prop:o});continue}let r=t[o];e[o]!==r&&(i[o]=r)}return i}(a.current,e);a.current=e,v(()=>{o.current&&ir(t,o.current)})},[e]);let b=P.default.useSyncExternalStore&&"legacy"!==il(e,"renderingMode")?"default":"legacy";return P.default.createElement("div",{style:w,ref:C},P.default.createElement(fw.Provider,{value:b},c&&!c.isDestroyed()?P.default.createElement(mh,{key:c.instanceId,context:c}):null,s.current?.getPortals()??null))},mC=class extends fp{constructor(e,t){super(),this.parent=e,this.gridOptions=t}createWrapper(e,t){let i=this.gridOptions;if(il(i,"reactiveCustomComponents")){let o=(e=>{switch(e){case"filter":return il(i,"enableFilterHandlers")?fW:fz;case"floatingFilterComponent":return il(i,"enableFilterHandlers")?fj:fK;case"dateComponent":return fO;case"dragAndDropImageComponent":return fN;case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":return fH;case"statusPanel":return fY;case"toolPanel":return fQ;case"menuItem":return fq;case"cellRenderer":return fG;case"innerHeaderComponent":return f_}})(t.name);if(o)return new o(e,this.parent,t)}else switch(t.name){case"filter":case"floatingFilterComponent":case"dateComponent":case"dragAndDropImageComponent":case"loadingOverlayComponent":case"noRowsOverlayComponent":case"activeOverlay":case"statusPanel":case"toolPanel":case"menuItem":case"cellRenderer":fZ()}let o=!t.cellRenderer&&"toolPanel"!==t.name;return new fL(e,this.parent,t,o)}},mw=(0,P.forwardRef)((e,t)=>{let i=(0,P.useContext)(fC),{registry:o,context:r,gos:s,rowModel:n}=i,[l,a]=(0,P.useState)(()=>new fS),[d,h]=(0,P.useState)(()=>new fS),[u,c]=(0,P.useState)(),[g,p]=(0,P.useState)(),f=(0,P.useRef)(),m=(0,P.useRef)(null),C=(0,P.useRef)(),w=(0,P.useMemo)(()=>tC(e.api.getGridId(),u?.rowModelType??"clientSide"),[e]),v=(0,P.useMemo)(()=>l.toString()+" ag-details-row",[l]),b=(0,P.useMemo)(()=>d.toString()+" ag-details-grid",[d]);t&&(0,P.useImperativeHandle)(t,()=>({refresh:()=>f.current?.refresh()??!1})),e.template&&tM(230);let y=(0,P.useCallback)(t=>{if(m.current=t,!t||r.isDestroyed()){f.current=r.destroyBean(f.current),C.current?.();return}let l=o.createDynamicBean("detailCellRendererCtrl",!0);if(l&&(r.createBean(l),l.init({toggleCss:(e,t)=>a(i=>i.setClass(e,t)),toggleDetailGridCss:(e,t)=>h(i=>i.setClass(e,t)),setDetailGrid:e=>c(e),setRowData:e=>p(e),getGui:()=>m.current},e),f.current=l,s.get("detailRowAutoHeight"))){let o=()=>{if(null==m.current)return;let t=m.current.clientHeight;null!=t&&t>0&&setTimeout(()=>{e.node.setRowHeight(t),(tL(s,n)||tB(s,n))&&n.onRowHeightChanged()},0)};C.current=eH(i,t,o),o()}},[]),S=(0,P.useCallback)(e=>{f.current?.registerDetailWithMaster(e)},[]);return P.default.createElement("div",{className:v,ref:y},u&&P.default.createElement(mm,{className:b,...u,modules:w,rowData:g,passGridApi:S}))}),mv=class extends ue{constructor(e){super("react"),this.processQueuedUpdates=e,this.queueUpdates=!1,this.renderingEngine="react",this.frameworkComponents={agGroupCellRenderer:fM,agGroupRowRenderer:fM,agDetailCellRenderer:mw},this.wrapIncoming=(e,t)=>{if("ensureVisible"===t)return fx||setTimeout(()=>fx=!1,0),fx=!0,e();return e()}}frameworkComponent(e){return this.frameworkComponents[e]}isFrameworkComponent(e){if(!e)return!1;let t=e.prototype;return!(t&&"getGui"in t)}getLockOnRefresh(){this.queueUpdates=!0}releaseLockOnRefresh(){this.queueUpdates=!1,this.processQueuedUpdates()}shouldQueueUpdates(){return this.queueUpdates}runWhenReadyAsync(){return"19"===fF}},mb=class extends P.Component{constructor(){super(...arguments),this.apiListeners=[],this.setGridApi=e=>{for(let t of(this.api=e,this.apiListeners))t(e)}}registerApiListener(e){this.apiListeners.push(e)}componentWillUnmount(){this.apiListeners.length=0}render(){return P.default.createElement(mm,{...this.props,passGridApi:this.setGridApi})}};e.s(["AgGridReact",()=>mb],99173);var my=e.i(13274),mS=e.i(54219),mR=e.i(99318),mF=e.i(46670),mP=e.i(68759),mx=e.i(22195),mD=e.i(12646),mE=e.i(3790);let mM=(0,mE.default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),mT=(0,mE.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),mk=new Set(["id","created_at","createdAt","updated_at","updatedAt"]);function mA({row:e,columns:t,tableName:i,onClose:o,onDataChanged:r}){let{apiBase:s}=(0,mR.useDashboardStore)(),[n,l]=(0,P.useState)(null),[a,d]=(0,P.useState)(""),[h,u]=(0,P.useState)(!1),[c,g]=(0,P.useState)(!1);if(!e)return null;let p=e.id,f=(0,P.useCallback)(async(e,t,o)=>{u(!0);try{let n=t,l=o.toLowerCase();if(l.includes("int")||l.includes("float")||l.includes("numeric")||l.includes("real")||l.includes("double")||l.includes("decimal"))n=""===t?null:Number(t);else if(l.includes("bool"))n="true"===t;else if(l.includes("json"))try{n=JSON.parse(t)}catch{mS.toast.error("Invalid JSON"),u(!1);return}else""===t&&(n=null);await fetch(`${s}/_admin/data/${i}/${p}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:n})}),mS.toast.success(`Updated ${e}`),r()}catch(e){console.error("Failed to update:",e),mS.toast.error("Failed to update field")}u(!1),l(null)},[s,i,p,r]),m=()=>{l(null),d("")},C=(0,P.useCallback)(async(e,t)=>{let o=!t;u(!0);try{await fetch(`${s}/_admin/data/${i}/${p}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:o})}),mS.toast.success(`${e} = ${o}`),r()}catch{mS.toast.error("Failed to toggle")}u(!1)},[s,i,p,r]),w=(0,P.useCallback)(async()=>{try{let{deleteRow:e}=mR.useDashboardStore.getState();await e(i,p),mS.toast.success("Row deleted"),r(),o()}catch{mS.toast.error("Failed to delete row")}},[i,p,r,o]),v=(e,t,i)=>{"Enter"!==e.key||e.shiftKey?"Escape"===e.key&&m():(e.preventDefault(),f(t,a,i))};return(0,my.jsxs)("div",{className:"h-full flex flex-col border-l border-border bg-background w-[400px] max-w-[400px] overflow-x-hidden",children:[(0,my.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0",children:[(0,my.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[(0,my.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Row Detail"}),(0,my.jsx)(mF.Badge,{variant:"outline",className:"text-[10px] font-mono border-border text-muted-foreground shrink-0",children:String(p).length>16?String(p).slice(0,16)+"…":String(p)})]}),(0,my.jsx)(mP.Button,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-foreground",onClick:o,children:(0,my.jsx)(mx.X,{className:"h-4 w-4"})})]}),(0,my.jsx)("div",{className:"flex-1 min-h-0 overflow-y-auto",children:(0,my.jsx)("div",{className:"p-4 space-y-4",children:t.map(t=>{var i;let o,r,s=e[t.column],u=(o=t.type.toLowerCase()).includes("timestamp")||o.includes("date")?"readonly":o.includes("json")?"textarea":o.includes("bool")?"boolean":o.includes("int")||o.includes("float")||o.includes("numeric")||o.includes("decimal")||o.includes("real")||o.includes("double")?"number":o.includes("text")&&!o.includes("varchar")?"textarea":"text",c=mk.has(t.column)||"readonly"===u,g=n===t.column;return(0,my.jsxs)("div",{className:"space-y-1.5",children:[(0,my.jsxs)("div",{className:"flex items-center gap-2",children:[(0,my.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:t.column}),(0,my.jsx)("span",{className:`text-[10px] px-1.5 py-0.5 rounded font-mono ${(r=t.type.toLowerCase()).includes("int")||r.includes("float")||r.includes("numeric")?"text-blue-400 bg-blue-500/10":r.includes("bool")?"text-amber-400 bg-amber-500/10":r.includes("timestamp")||r.includes("date")?"text-green-400 bg-green-500/10":r.includes("json")?"text-purple-400 bg-purple-500/10":"text-zinc-400 bg-zinc-500/10"}`,children:t.type.split("(")[0]}),t.nullable&&(0,my.jsx)("span",{className:"text-[10px] text-muted-foreground/50",children:"nullable"})]}),g?(0,my.jsxs)("div",{className:"space-y-2",children:["textarea"===u?(0,my.jsx)("textarea",{value:a,onChange:e=>d(e.target.value),onKeyDown:e=>v(e,t.column,t.type),rows:6,autoFocus:!0,className:"w-full rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground font-mono resize-y focus:outline-none focus:ring-1 focus:ring-primary/50"}):(0,my.jsx)("input",{type:"number"===u?"number":"text",value:a,onChange:e=>d(e.target.value),onKeyDown:e=>v(e,t.column,t.type),autoFocus:!0,className:"w-full rounded-md border border-primary/50 bg-background px-3 py-2 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,my.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,my.jsxs)(mP.Button,{variant:"default",size:"sm",className:"h-6 text-[11px] px-2",disabled:h,onClick:()=>f(t.column,a,t.type),children:[(0,my.jsx)(mM,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,my.jsx)(mP.Button,{variant:"ghost",size:"sm",className:"h-6 text-[11px] px-2 text-muted-foreground",onClick:m,children:"Cancel"})]})]}):"boolean"!==u||c?(0,my.jsx)("div",{onClick:()=>{var e;return!c&&(e=t.column,void(l(e),null==s?d(""):"object"==typeof s?d(JSON.stringify(s,null,2)):d(String(s))))},className:`rounded-md border border-border px-3 py-2 text-xs overflow-hidden ${c?"bg-muted/30 text-muted-foreground cursor-default":"hover:bg-accent/50 hover:border-primary/30 cursor-pointer transition-colors"} ${null==s?"text-muted-foreground italic":"object"==typeof s?"font-mono text-foreground whitespace-pre-wrap break-all max-h-24 overflow-y-auto":"text-foreground truncate"}`,children:(i=t.type,null==s?"null":"boolean"==typeof s?s?"true":"false":i.toLowerCase().includes("timestamp")||i.toLowerCase().includes("date")?new Date(s).toLocaleString():"object"==typeof s?JSON.stringify(s,null,2):String(s))}):(0,my.jsxs)("button",{onClick:()=>C(t.column,s),disabled:h,className:"flex items-center gap-2 rounded-md border border-border px-3 py-2 text-xs w-full hover:bg-accent/50 transition-colors text-left",children:[(0,my.jsx)("div",{className:`w-8 h-4 rounded-full transition-colors relative ${s?"bg-green-500":"bg-zinc-600"}`,children:(0,my.jsx)("div",{className:`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform ${s?"translate-x-4":"translate-x-0.5"}`})}),(0,my.jsx)("span",{className:s?"text-green-400":"text-muted-foreground",children:s?"true":"false"})]})]},t.column)})})}),(0,my.jsx)("div",{className:"p-4 border-t border-border",children:c?(0,my.jsxs)("div",{className:"flex items-center gap-2",children:[(0,my.jsxs)(mP.Button,{variant:"destructive",size:"sm",className:"flex-1 text-xs",onClick:w,children:[(0,my.jsx)(mD.Trash2,{className:"h-3 w-3 mr-1.5"}),"Confirm Delete"]}),(0,my.jsxs)(mP.Button,{variant:"ghost",size:"sm",className:"text-xs text-muted-foreground",onClick:()=>g(!1),children:[(0,my.jsx)(mT,{className:"h-3 w-3 mr-1"}),"Cancel"]})]}):(0,my.jsxs)(mP.Button,{variant:"ghost",size:"sm",className:"w-full text-xs text-destructive hover:text-destructive hover:bg-destructive/10",onClick:()=>g(!0),children:[(0,my.jsx)(mD.Trash2,{className:"h-3 w-3 mr-1.5"}),"Delete Row"]})})]})}e.s(["RowDetailDrawer",()=>mA],26725);let mI=(0,mE.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);e.s(["ChevronLeft",()=>mI],5289)}]);