@turquoisehealth/pit-viper 2.51.0 → 2.53.0

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 (83) hide show
  1. package/_site/assets/css/pit-viper-v2-scoped.css +11 -1
  2. package/_site/assets/css/pit-viper-v2.css +12 -1
  3. package/_site/assets/css/pit-viper.css +10 -1
  4. package/package.json +1 -1
  5. package/pv-components/dist/vue/base/pv-components-base.d.ts +158 -43
  6. package/pv-components/dist/vue/base/pv-components-base.js +68 -18
  7. package/pv-components/dist/vue/base/pv-components-base.mjs +2659 -2305
  8. package/pv-components/dist/vue/base/pv-components-base.umd.js +1502 -0
  9. package/pv-components/dist/vue/charts/pv-components-charts.js +49 -49
  10. package/pv-components/dist/vue/charts/pv-components-charts.mjs +15608 -15568
  11. package/pv-components/dist/vue/charts/pv-components-charts.umd.js +253 -0
  12. package/pv-components/dist/vue/tables/pv-components-tables.js +36 -36
  13. package/pv-components/dist/vue/tables/pv-components-tables.mjs +5706 -5665
  14. package/pv-components/dist/vue/tables/pv-components-tables.umd.js +222 -0
  15. package/pv-components/dist/web/pv-components.iife.js +96 -27
  16. package/pv-components/dist/stats-vue_base.html +0 -4949
  17. package/pv-components/dist/stats-vue_charts.html +0 -4949
  18. package/pv-components/dist/stats-vue_tables.html +0 -4949
  19. package/pv-components/dist/stats-web.html +0 -4949
  20. package/pv-components/dist/types/base/PvAccordion/PvAccordion.vue.d.ts +0 -22
  21. package/pv-components/dist/types/base/PvAccordion/types.d.ts +0 -5
  22. package/pv-components/dist/types/base/PvBanner/PvBanner.vue.d.ts +0 -22
  23. package/pv-components/dist/types/base/PvBanner/types.d.ts +0 -11
  24. package/pv-components/dist/types/base/PvBreadcrumbs/PvBreadcrumbs.vue.d.ts +0 -6
  25. package/pv-components/dist/types/base/PvBreadcrumbs/types.d.ts +0 -4
  26. package/pv-components/dist/types/base/PvButton/PvButton.vue.d.ts +0 -24
  27. package/pv-components/dist/types/base/PvButton/types.d.ts +0 -3
  28. package/pv-components/dist/types/base/PvCard/PvCard.example.vue.d.ts +0 -2
  29. package/pv-components/dist/types/base/PvCard/PvCard.vue.d.ts +0 -15
  30. package/pv-components/dist/types/base/PvCompanyLogo/PvCompanyLogo.example.vue.d.ts +0 -2
  31. package/pv-components/dist/types/base/PvCompanyLogo/PvCompanyLogo.vue.d.ts +0 -15
  32. package/pv-components/dist/types/base/PvCompanyTag/PvCompanyTag.example.vue.d.ts +0 -2
  33. package/pv-components/dist/types/base/PvCompanyTag/PvCompanyTag.vue.d.ts +0 -26
  34. package/pv-components/dist/types/base/PvCounterBadge/PvCounterBadge.vue.d.ts +0 -15
  35. package/pv-components/dist/types/base/PvCounterBadge/types.d.ts +0 -3
  36. package/pv-components/dist/types/base/PvDatePicker/PvDatePicker.example.vue.d.ts +0 -2
  37. package/pv-components/dist/types/base/PvDatePicker/PvDatePicker.vue.d.ts +0 -114
  38. package/pv-components/dist/types/base/PvDateTime/PvDateTime.example.vue.d.ts +0 -2
  39. package/pv-components/dist/types/base/PvDateTime/PvDateTime.vue.d.ts +0 -13
  40. package/pv-components/dist/types/base/PvDateTime/useDateTime.d.ts +0 -9
  41. package/pv-components/dist/types/base/PvDrawer/PvDrawer.example.vue.d.ts +0 -2
  42. package/pv-components/dist/types/base/PvDrawer/PvDrawer.vue.d.ts +0 -31
  43. package/pv-components/dist/types/base/PvDropdown/PvDropdown.example.vue.d.ts +0 -2
  44. package/pv-components/dist/types/base/PvDropdown/PvDropdown.vue.d.ts +0 -42
  45. package/pv-components/dist/types/base/PvDropdown/useDropdownMenuPosition.d.ts +0 -59
  46. package/pv-components/dist/types/base/PvIcon/PvIcon.example.vue.d.ts +0 -2
  47. package/pv-components/dist/types/base/PvIcon/PvIcon.vue.d.ts +0 -10
  48. package/pv-components/dist/types/base/PvModal/PvModal.vue.d.ts +0 -26
  49. package/pv-components/dist/types/base/PvMultiSelect/PvMultiSelect.example.vue.d.ts +0 -2
  50. package/pv-components/dist/types/base/PvMultiSelect/PvMultiSelect.vue.d.ts +0 -12
  51. package/pv-components/dist/types/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +0 -54
  52. package/pv-components/dist/types/base/PvMultiSelectButton/PvMultiSelectButtonTrigger.vue.d.ts +0 -28
  53. package/pv-components/dist/types/base/PvMultiSelectButton/PvSelectMenu.vue.d.ts +0 -30
  54. package/pv-components/dist/types/base/PvMultiSelectButton/PvSelectMenuControlPanel.vue.d.ts +0 -8
  55. package/pv-components/dist/types/base/PvMultiSelectButton/items/PvMenuCheckboxItem.vue.d.ts +0 -11
  56. package/pv-components/dist/types/base/PvMultiSelectButton/items/PvMenuItem.vue.d.ts +0 -12
  57. package/pv-components/dist/types/base/PvMultiSelectButton/items/PvMenuRadioItem.vue.d.ts +0 -11
  58. package/pv-components/dist/types/base/PvMultiSelectButton/mocks.d.ts +0 -13
  59. package/pv-components/dist/types/base/PvMultiSelectButton/types.d.ts +0 -17
  60. package/pv-components/dist/types/base/PvPill/PvPill.vue.d.ts +0 -30
  61. package/pv-components/dist/types/base/PvPill/types.d.ts +0 -3
  62. package/pv-components/dist/types/base/PvPopover/PvPopover.vue.d.ts +0 -29
  63. package/pv-components/dist/types/base/PvReleaseBadge/PvReleaseBadge.example.vue.d.ts +0 -2
  64. package/pv-components/dist/types/base/PvReleaseBadge/PvReleaseBadge.vue.d.ts +0 -5
  65. package/pv-components/dist/types/base/PvSearchInput/PvSearchInput.vue.d.ts +0 -18
  66. package/pv-components/dist/types/base/PvSegmentedControl/PvSegmentedControl.example.vue.d.ts +0 -2
  67. package/pv-components/dist/types/base/PvSegmentedControl/PvSegmentedControl.vue.d.ts +0 -19
  68. package/pv-components/dist/types/base/PvSelect/PvSelect.example.vue.d.ts +0 -2
  69. package/pv-components/dist/types/base/PvSelect/PvSelect.vue.d.ts +0 -22
  70. package/pv-components/dist/types/base/PvSuggestionTag/PvSuggestionTag.example.vue.d.ts +0 -2
  71. package/pv-components/dist/types/base/PvSuggestionTag/PvSuggestionTag.vue.d.ts +0 -28
  72. package/pv-components/dist/types/base/PvTabList/PvTabList.vue.d.ts +0 -11
  73. package/pv-components/dist/types/base/PvTabs/PvTabs.example.vue.d.ts +0 -2
  74. package/pv-components/dist/types/base/PvTabs/PvTabs.vue.d.ts +0 -17
  75. package/pv-components/dist/types/base/PvTabs/types.d.ts +0 -7
  76. package/pv-components/dist/types/base/PvTag/PvTag.example.vue.d.ts +0 -2
  77. package/pv-components/dist/types/base/PvTag/PvTag.vue.d.ts +0 -40
  78. package/pv-components/dist/types/base/PvTag/types.d.ts +0 -3
  79. package/pv-components/dist/types/base/PvToggle/PvToggle.vue.d.ts +0 -35
  80. package/pv-components/dist/types/base/PvTooltip/PvTooltip.vue.d.ts +0 -24
  81. package/pv-components/dist/types/base/PvTooltip/types.d.ts +0 -2
  82. package/pv-components/dist/types/base/baseProps.d.ts +0 -7
  83. package/pv-components/dist/types/base/index.d.ts +0 -29
@@ -0,0 +1,222 @@
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".pv-popover-list[data-v-cda1af8c]{font-size:14px}.pv-icon-button[data-v-bdffc608]{background-color:transparent;border:none}.pv-icon-button[data-v-bdffc608]:hover{cursor:pointer;color:#176f6f}.pv-select[data-v-bdffc608]{padding-top:4px;padding-bottom:4px}.pv-button-loading[data-v-942d55a7]{width:16px;height:16px;border:2px solid #ccc;border-top-color:#fff;border-radius:50%;animation:spin-942d55a7 1s linear infinite}@keyframes spin-942d55a7{to{transform:rotate(360deg)}}.pv-badge-md[data-v-fc3c1104]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-badge-sm[data-v-fc3c1104]{--inset-size: 0 2px;min-height:16px;max-height:16px;min-width:16px;font-weight:500}.pv-surface-lighten-5[data-v-fc3c1104]{background-color:#e0e5e4}.pv-text-secondary[data-v-fc3c1104]{color:#4b595c}.pv-table-row-count{position:absolute;right:12px;top:6px;opacity:1;background-color:#f7f8f8;transition:opacity .3s ease}.pv-table-group-cell:hover .pv-table-row-count{opacity:0}.pv-table-row-number{padding:8px 12px 8px 0;text-align:center;color:#89989b}.focus-button[data-v-5bb7bd55]{opacity:0;transition:opacity .2s ease}.option-label:hover .focus-button[data-v-5bb7bd55]{opacity:1}.suggested-label[data-v-3e72521a]:hover{color:#16696d}.ag-custom-header-cell[data-v-054d9038]{height:100%;align-items:center}.ag-header-actions .ag-header-cell-menu-button[data-v-054d9038]{opacity:0;transition:opacity .2s ease-in-out}.ag-header-cell-menu-button:hover .ag-header-actions .ag-header-cell-menu-button[data-v-054d9038]{opacity:1}.ag-header-cell-menu-button:focus .ag-header-actions .ag-header-cell-menu-button[data-v-054d9038]{opacity:1}.pv-table-row-number[data-v-ae67b797]{padding:8px 12px 8px 0;text-align:center;color:#89989b}.pv-table-overlay{position:absolute;margin-top:20px;z-index:2;background:#fff;width:100%;top:50%;left:50%;height:95%;transform:translate(-50%,-50%);pointer-events:none}.ag-header-cell-resize{border:none!important}.ag-row-group-leaf-indent{padding-left:7px;margin-left:0}.ag-custom-loading-cell{width:100%;height:40%;margin:15px;background-color:#ccc;border-radius:4px}.ag-group-value{width:100%}.ag-menu-option:hover{background-color:#f7f8f8}.ag-menu-option:active{background-color:#e8f2f4}.ag-menu-option-text{font-family:Inter,sans-serif}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ (function(Ao,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],h):(Ao=typeof globalThis<"u"?globalThis:Ao||self,h(Ao.PvComponentsVueTables={},Ao.Vue))})(this,function(Ao,h){"use strict";var eo=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,o){const i=t?this.allAsyncListeners:this.allSyncListeners;let r=i.get(e);return!r&&o&&(r=new Set,i.set(e,r)),r}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,o=!1){this.getListeners(e,o,!0).add(t)}removeEventListener(e,t,o=!1){const i=this.getListeners(e,o,!1);i&&(i.delete(t),i.size===0&&(o?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const o=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const i=(a,l)=>a.forEach(d=>{if(!l.has(d))return;const c=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>d(e)):()=>d(e);t?this.dispatchAsync(c):c()}),r=this.getListeners(o,t,!1)??new Set,s=new Set(r);s.size>0&&i(s,r),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(o,e)):()=>a(o,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function Jg(e,t){return t}function ln(e){return e?.getLocaleTextFunc()??Jg}function bt(e,t,o){o==null||typeof o=="string"&&o==""?dn(e,t):yt(e,t,o)}function yt(e,t,o){e.setAttribute(El(t),o.toString())}function dn(e,t){e.removeAttribute(El(t))}function El(e){return`aria-${e}`}function Xe(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function ep(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function tp(e){return parseInt(e.getAttribute("aria-posinset"),10)}function op(e){return e.getAttribute("aria-label")}function dt(e,t){bt(e,"label",t)}function oi(e,t){bt(e,"labelledby",t)}function cn(e,t){bt(e,"describedby",t)}function Al(e,t){bt(e,"live",t)}function ip(e,t){bt(e,"atomic",t)}function rp(e,t){bt(e,"relevant",t)}function Tl(e,t){bt(e,"level",t)}function Il(e,t){bt(e,"disabled",t)}function Ll(e,t){bt(e,"hidden",t)}function to(e,t){yt(e,"expanded",t)}function sp(e){dn(e,"expanded")}function Gl(e,t){yt(e,"setsize",t)}function Bl(e,t){yt(e,"posinset",t)}function np(e,t){yt(e,"multiselectable",t)}function ap(e,t){yt(e,"rowcount",t)}function Ol(e,t){yt(e,"rowindex",t)}function lp(e,t){yt(e,"colcount",t)}function Nl(e,t){yt(e,"colindex",t)}function dp(e,t){yt(e,"colspan",t)}function cp(e,t){yt(e,"sort",t)}function up(e){dn(e,"sort")}function un(e,t){bt(e,"selected",t)}function Hl(e,t){yt(e,"checked",t===void 0?"mixed":t)}function hp(e,t){bt(e,"controls",t.id),oi(t,e.id)}function gp(e,t){bt(e,"haspopup",t===!1?null:t)}function Vl(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var hn,gn,pn,fn,mn,Cn,vn;function Pr(){return hn===void 0&&(hn=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),hn}function wn(){return gn===void 0&&(gn=/(firefox)/i.test(navigator.userAgent)),gn}function _l(){return pn===void 0&&(pn=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),pn}function To(){return fn===void 0&&(fn=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),fn}function zl(e){if(!e)return null;const t=e.tabIndex,o=e.getAttribute("tabIndex");return t===-1&&(o===null||o===""&&!wn())?null:t.toString()}function pp(){if(vn!==void 0)return vn;if(!document.body)return-1;let e=1e6;const t=wn()?6e6:1e9,o=document.createElement("div");for(document.body.appendChild(o);;){const i=e*2;if(o.style.height=i+"px",i>t||o.clientHeight!==i)break;e=i}return document.body.removeChild(o),vn=e,e}function fp(){return Cn==null&&Wl(),Cn}function Wl(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let o=t.offsetWidth-t.clientWidth;o===0&&t.clientWidth===0&&(o=null),t.parentNode&&t.parentNode.removeChild(t),o!=null&&(Cn=o,mn=o===0)}function $l(){return mn==null&&Wl(),mn}function Ul(e,t,o){const i=e.parentElement;let r=i&&i.firstChild;for(;r;)t&&r.classList.toggle(t,r===e),r=r.nextSibling}var mp="[tabindex], input, select, button, textarea, [href]",jl="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function bn(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,i=t.call(e,"input, select, button, textarea"),r=t.call(e,jl),s=ut(e);return i&&!r&&s}function ge(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-hidden",!t),i||Ll(e,!t)}function Cp(e,t,o={}){const{skipAriaHidden:i}=o;e.classList.toggle("ag-invisible",!t),i||Ll(e,!t)}function yn(e,t){const o="disabled",i=t?s=>s.setAttribute(o,""):s=>s.removeAttribute(o);i(e);const r=e.querySelectorAll("input")??[];for(const s of r)i(s)}function Io(e,t,o){let i=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof o=="number"){if(++i>o)break}else if(e===o)break}return!1}function ii(e){const{height:t,width:o,borderTopWidth:i,borderRightWidth:r,borderBottomWidth:s,borderLeftWidth:n,paddingTop:a,paddingRight:l,paddingBottom:d,paddingLeft:c,marginTop:u,marginRight:g,marginBottom:p,marginLeft:f,boxSizing:m}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(o||"0"),borderTopWidth:parseFloat(i||"0"),borderRightWidth:parseFloat(r||"0"),borderBottomWidth:parseFloat(s||"0"),borderLeftWidth:parseFloat(n||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(d||"0"),paddingLeft:parseFloat(c||"0"),marginTop:parseFloat(u||"0"),marginRight:parseFloat(g||"0"),marginBottom:parseFloat(p||"0"),marginLeft:parseFloat(f||"0"),boxSizing:m}}function Er(e){const t=ii(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function Li(e){const t=ii(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function Kl(e){const{height:t,marginBottom:o,marginTop:i}=ii(e);return Math.floor(t+o+i)}function Ar(e){const{width:t,marginLeft:o,marginRight:i}=ii(e);return Math.floor(t+o+i)}function Yl(e){const t=e.getBoundingClientRect(),{borderTopWidth:o,borderLeftWidth:i,borderRightWidth:r,borderBottomWidth:s}=ii(e);return{top:t.top+(o||0),left:t.left+(i||0),right:t.right+(r||0),bottom:t.bottom+(s||0)}}function Tr(e,t){let o=e.scrollLeft;return t&&(o=Math.abs(o)),o}function Ir(e,t,o){o&&(t*=-1),e.scrollLeft=t}function ct(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function _t(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function ql(e){return!!e.offsetParent}function ut(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!ql(e)||window.getComputedStyle(e).visibility!=="visible")}function Lr(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function Xl(e,t,o){o&&o.nextSibling===t||(e.firstChild?o?o.nextSibling?e.insertBefore(t,o.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t):e.appendChild(t))}function Ql(e,t){for(let o=0;o<t.length;o++){const i=t[o],r=e.children[o];r!==i&&e.insertBefore(i,r)}}function vp(e){return e.replace(/[A-Z]/g,t=>`-${t.toLocaleLowerCase()}`)}function Gi(e,t){if(t)for(const o of Object.keys(t)){const i=t[o];if(!o||!o.length||i==null)continue;const r=vp(o),s=i.toString(),n=s.replace(/\s*!important/g,""),a=n.length!=s.length?"important":void 0;e.style.setProperty(r,n,a)}}function wp(e){return e.clientWidth<e.scrollWidth}function bp(e){return e.clientHeight<e.scrollHeight}function Gr(e,t){t==="flex"?(e.style.removeProperty("width"),e.style.removeProperty("minWidth"),e.style.removeProperty("maxWidth"),e.style.flex="1 1 auto"):zt(e,t)}function zt(e,t){t=Sn(t),e.style.width=t,e.style.maxWidth=t,e.style.minWidth=t}function Bi(e,t){t=Sn(t),e.style.height=t,e.style.maxHeight=t,e.style.minHeight=t}function Sn(e){return typeof e=="number"?`${e}px`:e}function Br(e){return e instanceof Node||e instanceof HTMLElement}function ri(e,t,o){o==null||o===""?e.removeAttribute(t):e.setAttribute(t,o.toString())}function mo(e,t,o){const r=gd(e).ResizeObserver,s=r?new r(o):null;return s?.observe(t),()=>s?.disconnect()}function yp(e){const t=ai(e),o="getSelection"in t?t.getSelection():null,i=[];for(let r=0;r<(o?.rangeCount??0);r++){const s=o?.getRangeAt(r);s&&i.push(s)}return{selection:o,ranges:i}}function Zl(e,t){if(!e.gos.get("enableCellTextSelection")||!wn()&&!Pr())return t();const{selection:i,ranges:r}=yp(e);t(),i?.removeAllRanges();for(const s of r)i?.addRange(s)}function Pt(e,t){const o=gd(e);o.requestAnimationFrame?o.requestAnimationFrame(t):o.webkitRequestAnimationFrame?o.webkitRequestAnimationFrame(t):o.setTimeout(t,0)}var Jl="data-ref",Rn;function ed(){return Rn??(Rn=document.createTextNode(" ")),Rn.cloneNode()}function Pe(e){const{attrs:t,children:o,cls:i,ref:r,role:s,tag:n}=e,a=document.createElement(n);if(i&&(a.className=i),r&&a.setAttribute(Jl,r),s&&a.setAttribute("role",s),t)for(const l of Object.keys(t))a.setAttribute(l,t[l]);if(o)if(typeof o=="string")a.textContent=o;else{let l=!0;for(const d of o)d&&(typeof d=="string"?(a.appendChild(document.createTextNode(d)),l=!1):(l&&(a.appendChild(ed()),l=!1),a.append(Pe(d)),a.appendChild(ed())))}return a}function et(e){return e==null||e===""?null:e}function q(e){return e!=null&&e!==""}function De(e){return!q(e)}function oo(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function Oi(e,t){const o=e?JSON.stringify(e):null,i=t?JSON.stringify(t):null;return o===i}function Or(e,t,o=!1){const i=e==null,r=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),i&&r)return 0;if(i)return-1;if(r)return 1;function s(n,a){return n>a?1:n<a?-1:0}if(typeof e!="string"||!o)return s(e,t);try{return e.localeCompare(t)}catch{return s(e,t)}}var td="https://www.ag-grid.com",od={};function xn(e,t){od[t]||(e(),od[t]=!0)}function Ni(e,t,...o){e.get("debug")&&console.log("AG Grid: "+t,...o)}function Hi(e,...t){xn(()=>console.warn("AG Grid: "+e,...t),e+t?.join(""))}function si(e,...t){xn(()=>console.error("AG Grid: "+e,...t),e+t?.join(""))}var Sp={pending:!1,funcs:[]},Rp={pending:!1,funcs:[]};function Fn(e,t="setTimeout",o){const i=t==="raf"?Rp:Sp;if(i.funcs.push(e),i.pending)return;i.pending=!0;const r=()=>{const s=i.funcs.slice();i.funcs.length=0,i.pending=!1,s.forEach(n=>n())};t==="raf"?Pt(o,r):window.setTimeout(r,0)}function tt(e,t,o){let i;return function(...r){const s=this;window.clearTimeout(i),i=window.setTimeout(function(){e.isAlive()&&t.apply(s,r)},o)}}function id(e,t){let o=0;return function(...i){const r=this,s=Date.now();s-o<t||(o=s,e.apply(r,i))}}function rd(e,t,o=100,i){const r=Date.now();let s=null,n=!1;const a=()=>{const l=Date.now()-r>o;(e()||l)&&(t(),n=!0,s!=null&&(window.clearInterval(s),s=null))};a(),n||(s=window.setInterval(a,10))}var ae="33.2.4",sd=2e3,nd=100,ad="_version_",ld=null,Lo=`${td}/javascript-data-grid`;function xp(e){ld=e}function Fp(e){Lo=e}function dd(e,t,o){return ld?.getConsoleMessage(e,t)??[Pp(e,t,o)]}function Dn(e,t,o,i){e(`error #${t}`,...dd(t,o,i))}function Dp(e){if(!e)return String(e);const t={};for(const o of Object.keys(e))typeof e[o]!="object"&&typeof e[o]!="function"&&(t[o]=e[o]);return JSON.stringify(t)}function kp(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=Dp(e)),t}function Nr(e){return e===void 0?"undefined":e===null?"null":e}function kn(e,t){return`${e}?${t.toString()}`}function Mp(e,t,o){const i=Array.from(t.entries()).sort((s,n)=>n[1].length-s[1].length);let r=kn(e,t);for(const[s,n]of i){if(s===ad)continue;const a=r.length-o;if(a<=0)break;const l="...",d=a+l.length,c=n.length-d>nd?n.slice(0,n.length-d)+l:n.slice(0,nd)+l;t.set(s,c),r=kn(e,t)}return r}function cd(e,t){const o=new URLSearchParams;if(o.append(ad,ae),t)for(const s of Object.keys(t))o.append(s,kp(t[s]));const i=`${Lo}/errors/${e}`,r=kn(i,o);return r.length<=sd?r:Mp(i,o,sd)}var Pp=(e,t,o)=>{const i=cd(e,t);return`${o?o+`
3
+ `:""}Visit ${i}${o?"":`
4
+ Alternatively register the ValidationModule to see the full message in the console.`}`};function _(...e){Dn(Hi,e[0],e[1])}function ce(...e){Dn(si,e[0],e[1])}function Mn(e,t,o){Dn(si,e,t,o)}function Ep(e,t){const o=t[0];return`error #${o} `+dd(o,t[1],e).join(" ")}function Co(...e){return Ep(void 0,e)}function ud(e,t){return e.get("rowModelType")===t}function Et(e,t){return ud(e,"clientSide")}function ht(e,t){return ud(e,"serverSide")}function Ke(e,t){return e.get("domLayout")===t}function Wt(e){return Wr(e)!==void 0}function Pn(e){return typeof e.get("getRowHeight")=="function"}function Ap(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function St(e,t,o=!1,i){const{gos:r,environment:s}=e;if(i==null&&(i=s.getDefaultRowHeight()),Pn(r)){if(o)return{height:i,estimated:!0};const l={node:t,data:t.data},d=r.getCallback("getRowHeight")(l);if(En(d))return d===0&&_(23),{height:Math.max(1,d),estimated:!1}}if(t.detail&&r.get("masterDetail"))return Tp(r);const n=r.get("rowHeight");return{height:n&&En(n)?n:i,estimated:!1}}function Tp(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return En(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function vo(e){const{environment:t,gos:o}=e,i=o.get("rowHeight");if(!i||De(i))return t.getDefaultRowHeight();const r=t.refreshRowHeightVariable();return r!==-1?r:(_(24),t.getDefaultRowHeight())}function En(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function hd(e,t,o){const i=t[e.getDomDataKey()];return i?i[o]:void 0}function ni(e,t,o,i){const r=e.getDomDataKey();let s=t[r];De(s)&&(s={},t[r]=s),s[o]=i}function Te(e){const{gos:t,eGridDiv:o}=e;let i=null;const r=t.get("getDocument");return r&&q(r)?i=r():o&&(i=o.ownerDocument),i&&q(i)?i:document}function gd(e){return Te(e).defaultView||window}function ai(e){return e.eGridDiv.getRootNode()}function Ee(e){return ai(e).activeElement}function An(e){let t=null,o=null;try{t=Te(e).fullscreenElement}catch{}finally{t||(t=ai(e));const i=t.querySelector("body");i?o=i:t instanceof ShadowRoot?o=t:t instanceof Document?o=t?.documentElement:o=t}return o}function Ip(e){return An(e)?.clientWidth??(window.innerHeight||-1)}function Lp(e){return An(e)?.clientHeight??(window.innerHeight||-1)}function Gp(e,t,o){const r=e.getBoundingClientRect().height,s=Ip(o)-2,n=Lp(o)-2;if(!e.offsetParent)return;const l=Yl(e.offsetParent),{clientY:d,clientX:c}=t;let u=d-l.top-r/2,g=c-l.left-10;const p=Te(o),f=p.defaultView||window,m=f.pageYOffset||p.documentElement.scrollTop,C=f.pageXOffset||p.documentElement.scrollLeft;s>0&&g+e.clientWidth>s+C&&(g=s+C-e.clientWidth),g<0&&(g=0),n>0&&u+e.clientHeight>n+m&&(u=n+m-e.clientHeight),u<0&&(u=0),e.style.left=`${g}px`,e.style.top=`${u}px`}function Hr(e){const t=Te(e),o=Ee(e);return o===null||o===t.body}function li(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Vr(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Ke(e,"print"))}function At(e){return!e.get("autoGroupColumnDef")?.comparator&&!e.get("treeData")}function Vi(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Tn(e){return e.get("grandTotalRow")}function di(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function In(e){return e.get("groupHideOpenParents")?!0:e.get("groupDisplayType")==="multipleColumns"}function _r(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function _i(e){const t=e.getCallback("getRowId");return t===void 0?t:o=>{let i=t(o);return typeof i!="string"&&(_(25,{id:i}),i=String(i)),i}}function Bp(e,t){const o=e.get("groupHideParentOfSingleChild");return!!(o===!0||o==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function Op(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function Np(e,t){const o=e.get("suppressGroupChangesColumnVisibility");if(o===!0||t&&o==="suppressHideOnGroup"||!t&&o==="suppressShowOnUngroup")return!1;const i=e.get("suppressRowGroupHidesColumns");if(t&&i===!0)return!1;const r=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&r===!0)}function Go(e){return e?.checkboxes??!0}function zr(e){return e?.mode==="multiRow"&&(e.headerCheckbox??!0)}function zi(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function Ln(e){return e?.hideDisabledCheckboxes??!1}function pd(e){return typeof e.get("rowSelection")!="string"}function Bo(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function fd(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const o=e.get("suppressRowClickSelection"),i=e.get("suppressRowDeselection");return o&&i?!1:o?"enableDeselection":i?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function Hp(e){const t=fd(e);return t===!0||t==="enableSelection"}function Vp(e){const t=fd(e);return t===!0||t==="enableDeselection"}function Gn(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t?.isRowSelectable}function Wr(e){const t="beanName"in e&&e.beanName==="gos"?e.get("rowSelection"):e.rowSelection;if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t?.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function Oo(e){return Wr(e)==="multiRow"}function _p(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):t?.enableSelectionWithoutKeys??!1}function md(e){const t=e.get("rowSelection");if(typeof t=="string"){const o=e.get("groupSelectsChildren"),i=e.get("groupSelectsFiltered");return o&&i?"filteredDescendants":o?"descendants":"self"}return t?.mode==="multiRow"?t.groupSelects:void 0}function Cd(e,t=!0){const o=e.get("rowSelection");return typeof o!="object"?t?"all":void 0:o.mode==="multiRow"?o.selectAll:"all"}function Wi(e){const t=md(e);return t==="descendants"||t==="filteredDescendants"}function Bn(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function We(e){return e.get("columnMenu")==="legacy"}function vd(e){return!We(e)}function On(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function zp(e,t,o){typeof e!="object"&&(e={});const i={...e};return o.forEach(r=>{const s=t[r];typeof s<"u"&&(i[r]=s)}),i}function Wp(e,t){if(!e)return;const o={};let i=!1;if(Object.keys(e).forEach(n=>{o[n]=e[n],i=!0}),!i)return;const r={type:"gridOptionsChanged",options:o};t.dispatchEvent(r);const s={type:"componentStateChanged",...o};t.dispatchEvent(s)}function Z(e,t){return e.addGridCommonParams(t)}function wd(e){return e.get("treeData")?e.get("treeDataParentIdField")?"treeSelfRef":e.get("treeDataChildrenField")?"treeNested":"treePath":"group"}var bd="__ag_Grid_Stop_Propagation",$p=["touchstart","touchend","touchmove","touchcancel","scroll"],Up=["wheel"],Nn={};function io(e){e[bd]=!0}function Tt(e){return e[bd]===!0}var yd=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return o=>{if(typeof Nn[o]=="boolean")return Nn[o];const i=document.createElement(e[o]||"div");return o="on"+o,Nn[o]=o in i}})();function Sd(e,t,o){let i=t;for(;i;){const r=hd(e,i,o);if(r)return r;i=i.parentElement}return null}function Hn(e,t){return!t||!e?!1:Kp(t).indexOf(e)>=0}function jp(e){const t=[];let o=e.target;for(;o;)t.push(o),o=o.parentElement;return t}function Kp(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():jp(t)}function Yp(e,t,o,i){const r=Rd(o);let s;r!=null&&(s={passive:r}),e&&e.addEventListener&&e.addEventListener(t,o,i,s)}var Rd=e=>{const t=$p.includes(e),o=Up.includes(e);if(t)return!0;if(o)return!1},E=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;t<e.length;t++)e[t]();e.length=0,this.destroyed=!0,this.dispatchLocalEvent({type:"destroyed"})}addEventListener(e,t,o){this.localEventService||(this.localEventService=new eo),this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService?.removeEventListener(e,t,o)}dispatchLocalEvent(e){this.localEventService?.dispatchEvent(e)}addManagedElementListeners(e,t){return this._setupListeners(e,t)}addManagedEventListeners(e){return this._setupListeners(this.eventSvc,e)}addManagedListeners(e,t){return this._setupListeners(e,t)}_setupListeners(e,t){const o=[];for(const i of Object.keys(t)){const r=t[i];r&&o.push(this._setupListener(e,i,r))}return o}_setupListener(e,t,o){if(this.destroyed)return()=>null;let i;return qp(e)?(e.__addEventListener(t,o),i=()=>(e.__removeEventListener(t,o),null)):(e instanceof HTMLElement?Yp(this.beans.frameworkOverrides,e,t,o):e.addEventListener(t,o),i=()=>(e.removeEventListener(t,o),null)),this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}setupGridOptionListener(e,t){const{gos:o}=this;o.addPropertyEventListener(e,t);const i=()=>(o.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(i),()=>(i(),this.destroyFunctions=this.destroyFunctions.filter(r=>r!==i),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const o=e.join("-")+this.propertyListenerId++,i=r=>{if(r.changeSet){if(r.changeSet&&r.changeSet.id===this.lastChangeSetIdLookup[o])return;this.lastChangeSetIdLookup[o]=r.changeSet.id}const s={type:"gridPropertyChanged",changeSet:r.changeSet,source:r.source};t(s)};e.forEach(r=>this.setupGridOptionListener(r,i))}getLocaleTextFunc(){return ln(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const o=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),o}createBean(e,t,o){return(t||this.stubContext).createBean(e,o)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}};function qp(e){return e.__addEventListener!==void 0}var xd=new Set(["__proto__","constructor","prototype"]);function Xp(e,t){if(e!=null){if(Array.isArray(e)){for(let o=0;o<e.length;o++)t(o.toString(),e[o]);return}for(const o of Object.keys(e))t(o,e[o])}}function Ye(e,t,o=!0,i=!1){q(t)&&Xp(t,(r,s)=>{if(xd.has(r))return;let n=e[r];n!==s&&(i&&n==null&&s!=null&&typeof s=="object"&&s.constructor===Object&&(n={},e[r]=n),Fd(s)&&Fd(n)&&!Array.isArray(n)?Ye(n,s,o,i):(o||s!==void 0)&&(e[r]=s))})}function $i(e,t,o){if(!t||!e)return;if(!o)return e[t];const i=t.split(".");let r=e;for(let s=0;s<i.length;s++){if(r==null)return;r=r[i[s]]}return r}function Fd(e){return typeof e=="object"&&e!==null}var Qp=/[&<>"']/g,Zp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function Rt(e,t){if(e==null)return null;const o=e.toString().toString();return t?o:o.replace(Qp,i=>Zp[i])}var Jp={resizable:!0,sortable:!0},ef=0;function Dd(){return ef++}function $t(e){return e instanceof $r}var $r=class extends E{constructor(e,t,o,i){super(),this.colDef=e,this.userProvidedColDef=t,this.colId=o,this.primary=i,this.isColumn=!0,this.instanceId=Dd(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.colEventSvc=new eo,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.flex=null,this.colIdSanitised=Rt(o)}destroy(){super.destroy(),this.beans.rowSpanSvc?.deregister(this)}getInstanceId(){return this.instanceId}setState(){const{colDef:e,beans:{sortSvc:t,pinnedCols:o,colFlex:i}}=this;t?.initCol(this);const r=e.hide;r!==void 0?this.visible=!r:this.visible=!e.initialHide,o?.initCol(this),i?.initCol(this)}setColDef(e,t,o){const i=e.spanRows!==this.colDef.spanRows;this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),i&&(this.beans.rowSpanSvc?.deregister(this),this.initRowSpan()),this.dispatchColEvent("colDefChanged",o)}getUserProvidedColDef(){return this.userProvidedColDef}getParent(){return this.parent}getOriginalParent(){return this.originalParent}postConstruct(){this.setState(),this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.initRowSpan()}initDotNotation(){const{gos:e,colDef:{field:t,tooltipField:o}}=this,i=e.get("suppressFieldDotNotation");this.fieldContainsDots=q(t)&&t.indexOf(".")>=0&&!i,this.tooltipFieldContainsDots=q(o)&&o.indexOf(".")>=0&&!i}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){this.beans.tooltipSvc?.initCol(this)}initRowSpan(){this.colDef.spanRows&&this.beans.rowSpanSvc?.register(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const o=e.width,i=e.initialWidth;return o!=null?t=o:i!=null?t=i:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){return this.beans.showRowGroupCols?.isRowGroupDisplayed(this,e)??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}__addEventListener(e,t){this.colEventSvc.addEventListener(e,t)}__removeEventListener(e,t){this.colEventSvc.removeEventListener(e,t)}addEventListener(e,t){this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.colEventSvc);const o=this.frameworkEventListenerService?.wrap(t)??t;this.colEventSvc.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.colEventSvc.removeEventListener(e,o)}createColumnFunctionCallbackParams(e){return Z(this.gos,{node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){return this.beans.cellNavigation?.isSuppressNavigable(this,e)??!1}isCellEditable(e){return this.beans.editSvc?.isCellEditable(this,e)??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){return this.beans.selectionSvc?.isCellCheckboxSelection(this,e)??!1}isSuppressPaste(e){return this.isColumnFunc(e,this.colDef?.suppressPaste??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??Jp[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const o=this.createColumnFunctionCallbackParams(e);return t(o)}return!1}createColumnEvent(e,t){return Z(this.gos,{type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return De(this.sort)}isSorting(){return q(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){return _(261),!!this.beans.colHover?.isHovered(this)}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const o=e===!0;this.visible!==o&&(this.visible=o,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let o=!0;for(;e;){if(!e.isPadding()){o=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:o}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return Z(this.gos,{node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(De(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.colSpan(t);return Math.max(o,1)}getRowSpan(e){if(De(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),o=this.colDef.rowSpan(t);return Math.max(o,1)}setActualWidth(e,t,o=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex!=null&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),o||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,o){const i=this.createColumnEvent(e,t);o&&Ye(i,o),this.colEventSvc.dispatchEvent(i)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function _e(e){return e instanceof Ui}var Ui=class extends E{constructor(e,t,o,i){super(),this.colGroupDef=e,this.groupId=t,this.padding=o,this.level=i,this.isColumn=!1,this.expandable=!1,this.instanceId=Dd(),this.expandableListenerRemoveCallback=null,this.expanded=!!e?.openByDefault}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{$t(t)?e.push(t):_e(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.__addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.__removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,o=!1;const i=this.findChildrenRemovingPadding();for(let s=0,n=i.length;s<n;s++){const a=i[s];if(!a.isVisible())continue;const l=a.getColumnGroupShow();l==="open"?(e=!0,o=!0):l==="closed"?(t=!0,o=!0):(e=!0,t=!0)}const r=e&&t&&o;this.expandable!==r&&(this.expandable=r,this.dispatchLocalEvent({type:"expandableChanged"}))}findChildrenRemovingPadding(){const e=[],t=o=>{o.forEach(i=>{_e(i)&&i.isPadding()?t(i.children):e.push(i)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},tf={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},of=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;t<e.length;t++)this.existingKeys[e[t]]=!0}getUniqueKey(e,t){e=oo(e);let o=0;for(;;){let i=e??t;if(i?o!==0&&(i+="_"+o):i=o,!this.existingKeys[i])return this.existingKeys[i]=!0,String(i);o++}}},Vn=Object.freeze([]);function Ce(e){if(e?.length)return e[e.length-1]}function It(e,t,o){return e==null&&t==null?!0:e!=null&&t!=null&&e.length===t.length&&e.every((i,r)=>o?o(i,t[r]):t[r]===i)}function Ur(e,t){if(e)for(const o of e)t(o)}function ot(e,t){const o=e.indexOf(t);o>=0&&e.splice(o,1)}function kd(e,t,o){for(let i=0;i<t.length;i++)ot(e,t[i]);for(let i=t.length-1;i>=0;i--)e.splice(o,0,t[i])}var No="ag-Grid-AutoColumn",Md="ag-Grid-SelectionColumn",rf="ag-Grid-RowNumbersColumn";function _n(e){const t=[],o=i=>{for(let r=0;r<i.length;r++){const s=i[r];$t(s)?t.push(s):_e(s)&&o(s.getChildren())}};return o(e),t}function ci(e){return e.reduce((t,o)=>t+o.getActualWidth(),0)}function wo(e,t,o){const i={};if(!t)return;so(null,t,s=>{i[s.getInstanceId()]=s}),o&&so(null,o,s=>{i[s.getInstanceId()]=null});const r=Object.values(i).filter(s=>s!=null);e.context.destroyBeans(r)}function jr(e){return e.getId().startsWith(No)}function ro(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(Md)??!1}function ji(e){return(typeof e=="string"?e:"getColId"in e?e.getColId():e.colId)?.startsWith(rf)??!1}function Kr(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function Pd(e,t){return It(e,t,(o,i)=>o.getColId()===i.getColId())}function Ed(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Ho(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function zn(e,t){const o=e===t,i=e.getColDef()===t,r=e.getColId()==t;return o||i||r}var sf=(e,t)=>(o,i)=>{const r={value1:void 0,value2:void 0};let s=!1;return e&&(e[o]!==void 0&&(r.value1=e[o],s=!0),q(i)&&e[i]!==void 0&&(r.value2=e[i],s=!0)),!s&&t&&(t[o]!==void 0&&(r.value1=t[o]),q(i)&&t[i]!==void 0&&(r.value2=t[i])),r};function Ad(e,t=null,o,i,r){const s=new of,{existingCols:n,existingGroups:a,existingColKeys:l}=nf(i);s.addExistingKeys(l);const d=Td(e,t,0,o,n,s,a,r),{colGroupSvc:c}=e,u=c?.findMaxDepth(d,0)??0,g=c?c.balanceColumnTree(d,0,u,s):d;return so(null,g,(f,m)=>{_e(f)&&f.setupExpandable(),f.originalParent=m}),{columnTree:g,treeDept:u}}function nf(e){const t=[],o=[],i=[];return e&&so(null,e,r=>{if(_e(r)){const s=r;o.push(s)}else{const s=r;i.push(s.getId()),t.push(s)}}),{existingCols:t,existingGroups:o,existingColKeys:i}}function Td(e,t,o,i,r,s,n,a){if(!t)return[];const{colGroupSvc:l}=e,d=new Array(t.length);for(let c=0;c<d.length;c++){const u=t[c];l&&hf(u)?d[c]=l.createProvidedColumnGroup(i,u,o,r,s,n,a):d[c]=af(e,i,u,r,s,a)}return d}function af(e,t,o,i,r,s){const n=df(o,i);n&&i?.splice(n.idx,1);let a=n?.column;if(a){const l=Yr(e,o,a.getColId());a.setColDef(l,o,s),lf(e,a,l,s)}else{const l=r.getUniqueKey(o.colId,o.field),d=Yr(e,o,l);a=new $r(d,o,l,t),e.context.createBean(a)}return e.dataTypeSvc?.addColumnListeners(a),a}function Id(e,t,o,i,r,s,n,a){const{sortSvc:l,pinnedCols:d,colFlex:c}=e;o!==void 0&&t.setVisible(!o,a),l&&(l.updateColSort(t,i,a),r!==void 0&&l.setColSortIndex(t,r)),s!==void 0&&d?.setColPinned(t,s),n!==void 0&&c?.setColFlex(t,n)}function lf(e,t,o,i){Id(e,t,o.hide,o.sort,o.sortIndex,o.pinned,o.flex,i);const r=t.getFlex();if(!(r!=null&&r>0))if(o.width!=null)t.setActualWidth(o.width,i);else{const s=t.getActualWidth();t.setActualWidth(s,i)}}function df(e,t){if(t)for(let o=0;o<t.length;o++){const i=t[o].getUserProvidedColDef();if(!i)continue;if(e.colId!=null){if(t[o].getId()===e.colId)return{idx:o,column:t[o]};continue}if(e.field!=null){if(i.field===e.field)return{idx:o,column:t[o]};continue}if(i===e)return{idx:o,column:t[o]}}}function Yr(e,t,o,i){const{gos:r,dataTypeSvc:s,validation:n}=e,a={},l=r.get("defaultColDef");Ye(a,l,!1,!0);const d=cf(e,a,t,o);d&&uf(e,d,a),Ye(a,t,!1,!0);const c=r.get("autoGroupColumnDef"),u=At(r);return t.rowGroup&&c&&u&&Ye(a,{sort:c.sort,initialSort:c.initialSort},!1,!0),s?.validateColDef(a),n?.validateColDef(a,o,i),a}function cf(e,t,o,i){const r=e.dataTypeSvc?.updateColDefAndGetColumnType(t,o,i),s=o.type??r??t.type;return t.type=s,s?Kr(s):void 0}function uf(e,t,o){if(!t.length)return;const i=Object.assign({},tf),r=e.gos.get("columnTypes")||{};for(const s of Object.keys(r)){const n=r[s];s in i?_(34,{key:s}):(n.type&&_(35),i[s]=n)}t.forEach(s=>{const n=i[s.trim()];n?Ye(o,n,!1,!0):_(36,{t:s})})}function hf(e){return e.children!==void 0}function so(e,t,o){if(t)for(let i=0;i<t.length;i++){const r=t[i];_e(r)&&so(r,r.getChildren(),o),o(r,e)}}function Ld(e,t){const o=[],i=[],r=[];return e.forEach(n=>{const a=n.getColDef().lockPosition;a==="right"?r.push(n):a==="left"||a===!0?o.push(n):i.push(n)}),t.get("enableRtl")?[...r,...i,...o]:[...o,...i,...r]}function Gd(e,t){let o=!0;return so(null,t,i=>{if(!_e(i))return;const r=i,s=r.getColGroupDef();if(!(s&&s.marryChildren))return;const a=[];r.getLeafColumns().forEach(g=>{const p=e.indexOf(g);a.push(p)});const l=Math.max.apply(Math,a),d=Math.min.apply(Math,a),c=l-d,u=r.getLeafColumns().length-1;c>u&&(o=!1)}),o}function Bd(e,t){if(!e||e.length==0)return;const o=t(e[0]);for(let i=1;i<e.length;i++)if(o!==t(e[i]))return;return o}function Od(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,r=Bd(t,s=>s.getPinned());e.dispatchEvent({type:"columnPinned",pinned:r??null,columns:t,column:i,source:o})}function gf(e,t,o){if(!t.length)return;const i=t.length===1?t[0]:null,r=Bd(t,s=>s.isVisible());e.dispatchEvent({type:"columnVisible",visible:r,columns:t,column:i,source:o})}function Nd(e,t,o,i){e.dispatchEvent({type:t,columns:o,column:o&&o.length==1?o[0]:null,source:i})}function qr(e,t,o,i,r=null){t?.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:r,finished:o,source:i})}function it(e,t,o){const{colModel:i,rowGroupColsSvc:r,pivotColsSvc:s,autoColSvc:n,selectionColSvc:a,colAnimation:l,visibleCols:d,pivotResultCols:c,environment:u,valueColsSvc:g,eventSvc:p,gos:f}=e,m=i.getColDefCols()||[];if(!m?.length)return!1;if(t?.state&&!t.state.forEach)return _(32),!1;const C=(x,M,P,k,S)=>{if(!x)return;const v=sf(M,t.defaultState),R=v("flex").value1;if(Id(e,x,v("hide").value1,v("sort").value1,v("sortIndex").value1,v("pinned").value1,R,o),R==null){const F=v("width").value1;if(F!=null){const G=x.getColDef().minWidth??u.getDefaultColumnMinWidth();G!=null&&F>=G&&x.setActualWidth(F,o)}}S||!x.isPrimary()||(g?.syncColumnWithState(x,o,v),r?.syncColumnWithState(x,o,v,P),s?.syncColumnWithState(x,o,v,k))},w=(x,M,P)=>{const k=Vd(e,o),S=M.slice(),v={},R={},F=[],G=[],z=[];let B=0;const H=r?.columns.slice()??[],O=s?.columns.slice()??[];x.forEach(I=>{const K=I.colId;if(K.startsWith(No)){F.push(I),z.push(I);return}if(ro(K)){G.push(I),z.push(I);return}const Y=P(K);Y?(C(Y,I,v,R,!1),ot(S,Y)):(z.push(I),B+=1)});const L=I=>C(I,null,v,R,!1);S.forEach(L),r?.sortColumns(zd.bind(r,v,H)),s?.sortColumns(zd.bind(s,R,O)),i.refreshCols(!1);const N=(I,K,W=[])=>{K.forEach(Y=>{const $=I(Y.colId);ot(W,$),C($,Y,null,null,!0)}),W.forEach(L)};return N(I=>n?.getColumn(I)??null,F,n?.getColumns()?.slice()),N(I=>a?.getColumn(I)??null,G,a?.getColumns()?.slice()),pf(t,i,f),d.refresh(o),p.dispatchEvent({type:"columnEverythingChanged",source:o}),k(),{unmatchedAndAutoStates:z,unmatchedCount:B}};l?.start();let{unmatchedAndAutoStates:y,unmatchedCount:b}=w(t.state||[],m,x=>i.getColDefCol(x));if(y.length>0||q(t.defaultState)){const x=c?.getPivotResultCols()?.list??[];b=w(y,x,M=>c?.getPivotResultCol(M)??null).unmatchedCount}return l?.finish(),b===0}function Hd(e,t){const{colModel:o,autoColSvc:i,selectionColSvc:r}=e,s=o.getColDefCols();if(!s?.length)return;const n=o.getColDefColTree(),a=_n(n),l=[];let d=1e3,c=1e3;const u=C=>{const w=_d(C);De(w.rowGroupIndex)&&w.rowGroup&&(w.rowGroupIndex=d++),De(w.pivotIndex)&&w.pivot&&(w.pivotIndex=c++),l.push(w)};i?.getColumns()?.forEach(u),r?.getColumns()?.forEach(u),a?.forEach(u),it(e,{state:l},t);const g=i?.getColumns()??[],m=[...r?.getColumns()??[],...g,...s].map(C=>({colId:C.colId}));it(e,{state:m,applyOrder:!0},t)}function Vd(e,t){const{rowGroupColsSvc:o,pivotColsSvc:i,valueColsSvc:r,colModel:s,sortSvc:n,eventSvc:a}=e,l={rowGroupColumns:o?.columns.slice()??[],pivotColumns:i?.columns.slice()??[],valueColumns:r?.columns.slice()??[]},d=Ki(e),c={};return d.forEach(u=>{c[u.colId]=u}),()=>{const u=(P,k,S,v)=>{const R=k.map(v),F=S.map(v);if(It(R,F))return;const z=new Set(k);S.forEach(H=>{z.delete(H)||z.add(H)});const B=[...z];a.dispatchEvent({type:P,columns:B,column:B.length===1?B[0]:null,source:t})},g=P=>{const k=[];return s.forAllCols(S=>{const v=c[S.getColId()];v&&P(v,S)&&k.push(S)}),k},p=P=>P.getColId();u("columnRowGroupChanged",l.rowGroupColumns,o?.columns??[],p),u("columnPivotChanged",l.pivotColumns,i?.columns??[],p);const m=g((P,k)=>{const S=P.aggFunc!=null,v=S!=k.isValueActive(),R=S&&P.aggFunc!=k.getAggFunc();return v||R});m.length>0&&Nd(a,"columnValueChanged",m,t),qr(a,g((P,k)=>P.width!=k.getActualWidth()),!0,t),Od(a,g((P,k)=>P.pinned!=k.getPinned()),t),gf(a,g((P,k)=>P.hide==k.isVisible()),t);const x=g((P,k)=>P.sort!=k.getSort()||P.sortIndex!=k.getSortIndex());x.length>0&&n?.dispatchSortChangedEvents(t,x);const M=Ki(e);mf(d,M,t,s,a)}}function Ki(e){const{colModel:t,rowGroupColsSvc:o,pivotColsSvc:i}=e,r=t.getColDefCols();if(De(r)||!t.isAlive())return[];const s=o?.columns,n=i?.columns,a=[],l=c=>{const u=c.isRowGroupActive()&&s?s.indexOf(c):null,g=c.isPivotActive()&&n?n.indexOf(c):null,p=c.isValueActive()?c.getAggFunc():null,f=c.getSort()!=null?c.getSort():null,m=c.getSortIndex()!=null?c.getSortIndex():null;a.push({colId:c.getColId(),width:c.getActualWidth(),hide:!c.isVisible(),pinned:c.getPinned(),sort:f,sortIndex:m,aggFunc:p,rowGroup:c.isRowGroupActive(),rowGroupIndex:u,pivot:c.isPivotActive(),pivotIndex:g,flex:c.getFlex()??null})};t.forAllCols(c=>l(c));const d=new Map(t.getCols().map((c,u)=>[c.getColId(),u]));return a.sort((c,u)=>{const g=d.has(c.colId)?d.get(c.colId):-1,p=d.has(u.colId)?d.get(u.colId):-1;return g-p}),a}function _d(e){const t=(f,m)=>f??m??null,o=e.getColDef(),i=t(o.sort,o.initialSort),r=t(o.sortIndex,o.initialSortIndex),s=t(o.hide,o.initialHide),n=t(o.pinned,o.initialPinned),a=t(o.width,o.initialWidth),l=t(o.flex,o.initialFlex);let d=t(o.rowGroupIndex,o.initialRowGroupIndex),c=t(o.rowGroup,o.initialRowGroup);d==null&&(c==null||c==!1)&&(d=null,c=null);let u=t(o.pivotIndex,o.initialPivotIndex),g=t(o.pivot,o.initialPivot);u==null&&(g==null||g==!1)&&(u=null,g=null);const p=t(o.aggFunc,o.initialAggFunc);return{colId:e.getColId(),sort:i,sortIndex:r,hide:s,pinned:n,width:a,flex:l,rowGroup:c,rowGroupIndex:d,pivot:g,pivotIndex:u,aggFunc:p}}function pf(e,t,o){if(!e.applyOrder||!e.state)return;const i=[];e.state.forEach(r=>{r.colId!=null&&i.push(r.colId)}),ff(t.cols,i,t,o)}function ff(e,t,o,i){if(e==null)return;let r=[];const s={};t.forEach(a=>{if(s[a])return;const l=e.map[a];l&&(r.push(l),s[a]=!0)});let n=0;if(e.list.forEach(a=>{const l=a.getColId();if(s[l]!=null)return;l.startsWith(No)?r.splice(n++,0,a):r.push(a)}),r=Ld(r,i),!Gd(r,o.getColTree())){_(39);return}e.list=r}function mf(e,t,o,i,r){const s={};t.forEach(c=>s[c.colId]=c);const n={};e.forEach(c=>{s[c.colId]&&(n[c.colId]=!0)});const a=e.filter(c=>n[c.colId]),l=t.filter(c=>n[c.colId]),d=[];l.forEach((c,u)=>{const g=a&&a[u];if(g&&g.colId!==c.colId){const p=i.getCol(g.colId);p&&d.push(p)}}),d.length&&r.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,finished:!0,source:o})}var zd=(e,t,o,i)=>{const r=e[o.getId()],s=e[i.getId()],n=r!=null,a=s!=null;if(n&&a)return r-s;if(n)return-1;if(a)return 1;const l=t.indexOf(o),d=t.indexOf(i),c=l>=0,u=d>=0;return c&&u?l-d:c?-1:1},Cf=class extends E{constructor(){super(...arguments),this.beanName="colModel",this.pivotMode=!1,this.ready=!1,this.changeEventsDispatching=!1}postConstruct(){this.pivotMode=this.gos.get("pivotMode"),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],e=>this.refreshAll(Ho(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],this.recreateColumnDefs.bind(this)),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Ho(e.source)))}createColsFromColDefs(e){const{beans:t}=this,{valueCache:o,colAutosize:i,rowGroupColsSvc:r,pivotColsSvc:s,valueColsSvc:n,visibleCols:a,colViewport:l,eventSvc:d}=t,c=this.colDefs?Vd(t,e):void 0;o?.expire();const u=this.colDefCols?.list,g=this.colDefCols?.tree,p=Ad(t,this.colDefs,!0,g,e);wo(t,this.colDefCols?.tree,p.columnTree);const f=p.columnTree,m=p.treeDept,C=_n(f),w={};C.forEach(y=>w[y.getId()]=y),this.colDefCols={tree:f,treeDepth:m,list:C,map:w},r?.extractCols(e,u),s?.extractCols(e,u),n?.extractCols(e,u),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),d.dispatchEvent({type:"columnEverythingChanged",source:e}),c&&(this.changeEventsDispatching=!0,c(),this.changeEventsDispatching=!1),d.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&i?.applyAutosizeStrategy()}refreshCols(e){if(!this.colDefCols)return;const t=this.cols?.tree;this.saveColOrder();const{autoColSvc:o,selectionColSvc:i,rowNumbersSvc:r,quickFilter:s,pivotResultCols:n,showRowGroupCols:a,rowAutoHeight:l,visibleCols:d,colViewport:c,eventSvc:u}=this.beans,g=this.selectCols(n,this.colDefCols);this.createColumnsForService([o,i,r],g);const p=Ap(this.gos,this.showingPivotResult);(!e||p)&&this.restoreColOrder(g),this.positionLockedCols(g),a?.refresh(),s?.refreshCols(),this.setColSpanActive(),l?.setAutoHeightActive(g),d.clear(),c.clear(),!It(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}createColumnsForService(e,t){for(const o of e)o&&(o.createColumns(t,i=>{this.lastOrder=i(this.lastOrder),this.lastPivotOrder=i(this.lastPivotOrder)}),o.addColumns(t))}selectCols(e,t){const o=e?.getPivotResultCols()??null;this.showingPivotResult=o!=null;const{map:i,list:r,tree:s,treeDepth:n}=o??t;return this.cols={list:r.slice(),map:{...i},tree:s.slice(),treeDepth:n},o&&(o.list.some(l=>this.cols?.map[l.getColId()]!==void 0)||(this.lastPivotOrder=null)),this.cols}getColsToShow(){if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=this.beans.valueColsSvc?.columns;return this.cols.list.filter(i=>{const r=jr(i);if(e){const s=t?.includes(i);return r||s}else return r||i.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,o){it(this.beans,{state:e.map(i=>({colId:typeof i=="string"?i:i.getColId(),hide:!t}))},o)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const o=new Map(t.map((d,c)=>[d,c]));if(!e.list.some(d=>o.has(d)))return;const r=new Map(e.list.map(d=>[d,!0])),s=t.filter(d=>r.has(d)),n=new Map(s.map(d=>[d,!0])),a=e.list.filter(d=>!n.has(d)),l=s.slice();a.forEach(d=>{let c=d.getOriginalParent();if(!c){l.push(d);return}const u=[];for(;!u.length&&c;)c.getLeafColumns().forEach(m=>{const C=l.indexOf(m)>=0,w=u.indexOf(m)<0;C&&w&&u.push(m)}),c=c.getOriginalParent();if(!u.length){l.push(d);return}const g=u.map(f=>l.indexOf(f)),p=Math.max(...g);l.splice(p+1,0,d)}),e.list=l}positionLockedCols(e){e.list=Ld(e.list,this.gos)}saveColOrder(){this.showingPivotResult?this.lastPivotOrder=this.cols?.list??null:this.lastOrder=this.cols?.list??null}getColumnDefs(){return this.colDefCols?this.beans.colDefFactory?.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,this.cols?.list??[]):void 0}setColSpanActive(){this.colSpanActive=!!this.cols?.list.some(e=>e.getColDef().colSpan!=null)}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:o,eventSvc:i}=this.beans;o.refresh(t),i.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){const e=this.beans.pivotColsSvc?.columns;return this.pivotMode&&!!e?.length}recreateColumnDefs(e){if(!this.cols)return;this.beans.autoColSvc?.updateColumns(e);const t=Ho(e.source);this.createColsFromColDefs(t)}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){wo(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){const{pivotResultCols:t,autoColSvc:o,selectionColSvc:i}=this.beans;Ur(this.colDefCols?.list,e),Ur(o?.columns?.list,e),Ur(i?.columns?.list,e),Ur(t?.getPivotResultCols()?.list,e)}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){return this.colDefCols?.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){if(t==null)return null;const{map:o,list:i}=t;if(typeof e=="string"&&o[e])return o[e];for(let r=0;r<i.length;r++)if(zn(i[r],e))return i[r];return this.beans.autoColSvc?.getColumn(e)??this.beans.selectionColSvc?.getColumn(e)??null}},Wn=class extends E{constructor(){super(...arguments),this.dispatchColumnChangedEvent=Nd,this.columns=[],this.columnIndexMap={},this.updateIndexMap=()=>{this.columnIndexMap={},this.columns.forEach((e,t)=>this.columnIndexMap[e.getId()]=t)}}wireBeans(e){this.colModel=e.colModel,this.aggFuncSvc=e.aggFuncSvc,this.visibleCols=e.visibleCols}sortColumns(e){this.columns.sort(e),this.updateIndexMap()}setColumns(e,t){this.setColList(e,this.columns,this.eventName,!0,!0,this.columnProcessors.set,t)}addColumns(e,t){this.updateColList(e,this.columns,!0,!0,this.columnProcessors.add,this.eventName,t)}removeColumns(e,t){this.updateColList(e,this.columns,!1,!0,this.columnProcessors.remove,this.eventName,t)}getColumnIndex(e){return this.columnIndexMap[e]}setColList(e=[],t,o,i,r,s,n){const a=this.colModel.getCols();if(!a||a.length===0)return;const l=new Map;t.forEach((c,u)=>l.set(c,u)),t.length=0,q(e)&&e.forEach(c=>{const u=this.colModel.getColDefCol(c);u&&t.push(u)}),t.forEach((c,u)=>{const g=l.get(c);if(g===void 0){l.set(c,0);return}i&&g!==u||l.delete(c)}),this.updateIndexMap(),(this.colModel.getColDefCols()||[]).forEach(c=>{const u=t.indexOf(c)>=0;s(c,u,n)}),r&&this.colModel.refreshCols(!1),this.visibleCols.refresh(n),this.dispatchColumnChangedEvent(this.eventSvc,o,[...l.keys()],n)}updateColList(e=[],t,o,i,r,s,n){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(c=>{if(!c)return;const u=this.colModel.getColDefCol(c);if(u){if(l.add(u),o){if(t.indexOf(u)>=0)return;t.push(u)}else{const g=t.indexOf(u);if(g<0)return;for(let p=g+1;p<t.length;p++)l.add(t[p]);ot(t,u)}r(u,o,n),a=!0}}),!a)return;this.updateIndexMap(),i&&this.colModel.refreshCols(!1),this.visibleCols.refresh(n);const d=Array.from(l);this.eventSvc.dispatchEvent({type:s,columns:d,column:d.length===1?d[0]:null,source:n})}extractCols(e,t=[]){const o=this.columns,i=[],r=[],{setFlagFunc:s,getIndexFunc:n,getInitialIndexFunc:a,getValueFunc:l,getInitialValueFunc:d}=this.columnExtractors;(this.colModel.getColDefCols()||[]).forEach(p=>{const f=t.indexOf(p)<0,m=p.getColDef(),C=l(m),w=d(m),y=n(m),b=a(m);let x;C!==void 0?x=C:y!==void 0?y===null?x=!1:x=y>=0:f?w!==void 0?x=w:b!==void 0?x=b!=null&&b>=0:x=!1:x=o.indexOf(p)>=0,x&&((f?y!=null||b!=null:y!=null)?i.push(p):r.push(p))});const u=p=>{const f=n(p.getColDef()),m=a(p.getColDef());return f??m};i.sort((p,f)=>{const m=u(p),C=u(f);return m===C?0:m<C?-1:1});const g=[].concat(i);return o.forEach(p=>{r.indexOf(p)>=0&&g.push(p)}),r.forEach(p=>{g.indexOf(p)<0&&g.push(p)}),o.forEach(p=>{g.indexOf(p)<0&&s(p,!1,e)}),g.forEach(p=>{o.indexOf(p)<0&&s(p,!0,e)}),this.columns=g,this.updateIndexMap(),this.columns}restoreColumnOrder(e,t){const o=this.columns,i=this.colModel.getColDefCols();if(!o.length||!i)return e;const r=Object.keys(t),s=new Set(r),n=new Set(r),a=new Set(o.map(b=>{const x=b.getColId();return n.delete(x),x}).concat(r)),l=[],d={};let c=0;for(let b=0;b<i.length;b++){const x=i[b].getColId();a.has(x)&&(l.push(x),d[x]=c++)}let u=1e3,g=!1,p=0;const f=this.columnOrdering.enableProp,m=this.columnOrdering.initialEnableProp,C=this.columnOrdering.indexProp,w=this.columnOrdering.initialIndexProp,y=b=>{const x=d[b];for(let M=p;M<x;M++){const P=l[M];n.has(P)&&(t[P][C]=u++,n.delete(P))}p=x};return o.forEach(b=>{const x=b.getColId();if(s.has(x))y(x),t[x][C]=u++;else{const M=b.getColDef();(M[C]===null||M[C]===void 0&&M[w]==null)&&(g||(M[f]||M[f]===void 0&&M[m]?y(x):(n.forEach(S=>{t[S][C]=u+d[S]}),u+=l.length,g=!0)),e[x]||(e[x]={colId:x}),e[x][C]=u++)}}),e}},Wd=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let o;return typeof t!="number"?o=0:o=t+1,this.existingIds[e]=o,o}};function Yi(e,t,o){return o&&e.addDestroyFunc(()=>t.destroyBean(o)),o??e}var $d=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const i=(e||"").split(" ");if(i.length>1){i.forEach(r=>this.addOrRemoveCssClass(r,t));return}}if(this.cssClassStates[e]!==t&&e.length){const i=this.getGui();i&&i.classList.toggle(e,t),this.cssClassStates[e]=t}}},vf=0,V=null,pe=class extends E{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=vf++,this.cssClassManager=new $d(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(o=>[o.selector,o])),e&&this.setTemplate(e)}preConstruct(){this.wireTemplate(this.getGui());const e="component-"+Object.getPrototypeOf(this)?.constructor?.name;this.css?.forEach(t=>this.beans.environment.addGlobalCSS(t,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute(Jl):null}applyElementsToComponent(e,t,o,i=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const r=this[t];if(r===V)this[t]=i??e;else{const s=o&&o[t];if(!this.suppressDataRefValidation&&!s)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${r}`)}}}createChildComponentsFromTags(e,t){const o=[];for(const i of e.childNodes??[])o.push(i);o.forEach(i=>{if(!(i instanceof HTMLElement))return;const r=this.createComponentFromElement(i,s=>{const n=s.getGui();if(n)for(const a of i.attributes??[])n.setAttribute(a.name,a.value)},t);if(r){if(r.addItems&&i.children.length){this.createChildComponentsFromTags(i,t);const s=Array.prototype.slice.call(i.children);r.addItems(s)}this.swapComponentForNode(r,e,i)}else i.childNodes&&this.createChildComponentsFromTags(i,t)})}createComponentFromElement(e,t,o){const i=e.nodeName,r=this.getDataRefAttribute(e),s=i.indexOf("AG-")===0,n=s?this.componentSelectors.get(i):null;let a=null;if(n){const l=o&&r?o[r]:void 0;a=new n.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(s)throw new Error(`selector: ${i}`);return this.applyElementsToComponent(e,r,o,a),a}swapComponentForNode(e,t,o){const i=e.getGui();t.replaceChild(i,o),t.insertBefore(document.createComment(o.nodeName),i),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(o=>o.setAttribute("tabindex",t.toString()))}setTemplate(e,t,o){let i;typeof e=="string"||e==null?i=Lr(e):i=Pe(e),this.setTemplateFromElement(i,t,o)}setTemplateFromElement(e,t,o,i=!1){if(this.eGui=e,this.suppressDataRefValidation=i,t)for(let r=0;r<t.length;r++){const s=t[r];this.componentSelectors.set(s.selector,s)}this.wireTemplate(e,o)}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 o=t;return e==null?null:(o||(o=this.eGui),Br(e)?{element:e,parent:o}:{element:e.getGui(),parent:o})}prependChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.insertAdjacentElement("afterbegin",o)}appendChild(e,t){const{element:o,parent:i}=this.getContainerAndElement(e,t)||{};!o||!i||i.appendChild(o)}isDisplayed(){return this.displayed}setVisible(e,t={}){if(e!==this.visible){this.visible=e;const{skipAriaHidden:o}=t;Cp(this.eGui,e,{skipAriaHidden:o})}}setDisplayed(e,t={}){if(e!==this.displayed){this.displayed=e;const{skipAriaHidden:o}=t;ge(this.eGui,e,{skipAriaHidden:o});const i={type:"displayChanged",visible:this.displayed};this.dispatchLocalEvent(i)}}destroy(){this.parentComponent&&(this.parentComponent=void 0),super.destroy()}addGuiEventListener(e,t,o){this.eGui.addEventListener(e,t,o),this.addDestroyFunc(()=>this.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}},ke=class Mr{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(o=>this.onDone(o),o=>this.onReject(o))}static all(t){return t.length?new Mr(o=>{let i=t.length;const r=new Array(i);t.forEach((s,n)=>{s.then(a=>{r[n]=a,i--,i===0&&o(r)})})}):Mr.resolve()}static resolve(t=null){return new Mr(o=>o(t))}then(t){return new Mr(o=>{this.status===1?o(t(this.resolution)):this.waiters.push(i=>o(t(i)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(o=>o(t))}onReject(t){}};function wf(e){return e?e.prototype&&"getGui"in e.prototype:!1}function Ud(e,t,o,i){const{name:r}=o;let s,n,a,l,d,c;if(t){const u=t,g=u[r+"Selector"],p=g?g(i):null,f=m=>{typeof m=="string"?s=m:m!=null&&m!==!0&&(e.isFrameworkComponent(m)?a=m:n=m)};p?(f(p.component),l=p.params,d=p.popup,c=p.popupPosition):f(u[r])}return{compName:s,jsComp:n,fwComp:a,paramsFromSelector:l,popupFromSelector:d,popupPositionFromSelector:c}}var bf=class extends E{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,o,i=!1){return this.getCompDetails(this.gridOptions,e,t,o,i)}getCompDetails(e,t,o,i,r=!1){const{name:s,cellRenderer:n}=t;let{compName:a,jsComp:l,fwComp:d,paramsFromSelector:c,popupFromSelector:u,popupPositionFromSelector:g}=Ud(this.beans.frameworkOverrides,e,t,i),p;const f=y=>{const b=this.registry.getUserComponent(s,y);b&&(l=b.componentFromFramework?void 0:b.component,d=b.componentFromFramework?b.component:void 0,p=b.params)};if(a!=null&&f(a),l==null&&d==null&&o!=null&&f(o),l&&n&&!wf(l)&&(l=this.agCompUtils?.adaptFunction(t,l)),!l&&!d){const{validation:y}=this.beans;r&&(a!==o||!o)?a?y?.isProvidedUserComp(a)||ce(50,{compName:a}):o?y||ce(260,{...this.gos.getModuleErrorParams(),propName:s,compName:o}):ce(216,{name:s}):o&&!y&&ce(146,{comp:o});return}const m=this.mergeParams(e,t,i,c,p),C=l==null,w=l??d;return{componentFromFramework:C,componentClass:w,params:m,type:t,popupFromSelector:u,popupPositionFromSelector:g,newAgStackInstance:()=>this.newAgStackInstance(w,C,m,t)}}newAgStackInstance(e,t,o,i){const r=!t;let s;r?s=new e:s=this.frameworkCompWrapper.wrap(e,i.mandatoryMethods,i.optionalMethods,i),this.createBean(s);const n=s.init?.(o);return n==null?ke.resolve(s):n.then(()=>s)}mergeParams(e,t,o,i=null,r){const s={...o,...r},n=e,a=n&&n[t.name+"Params"];if(typeof a=="function"){const l=a(o);Ye(s,l)}else typeof a=="object"&&Ye(s,a);return Ye(s,i),s}},yf={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Sf={name:"headerComponent",optionalMethods:["refresh"]},Rf={name:"innerHeaderComponent"},xf={name:"innerHeaderGroupComponent"},Ff={name:"headerGroupComponent"},Df={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},kf={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Mf={name:"loadingCellRenderer",cellRenderer:!0},Pf={name:"loadingOverlayComponent",optionalMethods:["refresh"]},Ef={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Af={name:"tooltipComponent"},$n={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},Tf={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},If={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Lf={name:"loadingCellRenderer",cellRenderer:!0},Gf={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Bf={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Of(e,t){return e.getCompDetailsFromGridOptions(yf,"agDragAndDropImage",t,!0)}function Xr(e,t,o){return e.getCompDetails(t,Df,void 0,o)}function Nf(e,t,o){return e.getCompDetails(t,Sf,"agColumnHeader",o)}function Hf(e,t,o){return e.getCompDetails(t,Rf,void 0,o)}function Vf(e,t){const o=t.columnGroup.getColGroupDef();return e.getCompDetails(o,Ff,"agColumnGroupHeader",t)}function _f(e,t,o){return e.getCompDetails(t,xf,void 0,o)}function zf(e,t){return e.getCompDetailsFromGridOptions(If,void 0,t,!0)}function Wf(e,t){return e.getCompDetailsFromGridOptions(Lf,"agLoadingCellRenderer",t,!0)}function $f(e,t){return e.getCompDetailsFromGridOptions(Gf,"agGroupRowRenderer",t,!0)}function Uf(e,t){return e.getCompDetailsFromGridOptions(Bf,"agDetailCellRenderer",t,!0)}function ui(e,t,o){return e.getCompDetails(t,kf,void 0,o)}function jf(e,t,o){return e.getCompDetails(t,Mf,"agSkeletonCellRenderer",o,!0)}function Kf(e,t,o,i){return e.getCompDetails(t,$n,i,o,!0)}function Yf(e,t){return e.getCompDetailsFromGridOptions(Pf,"agLoadingOverlay",t,!0)}function qf(e,t){return e.getCompDetailsFromGridOptions(Ef,"agNoRowsOverlay",t,!0)}function Xf(e,t){return e.getCompDetails(t.colDef,Af,"agTooltipComponent",t,!0)}function Qf(e,t,o,i){return e.getCompDetails(t,Tf,i,o)}function Zf(e,t){return Ud(e,t,$n)}function Jf(e,t,o){return e.mergeParams(t,$n,o)}function jd(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var Kd=new Set,Qr={},hi={},Zr,Yd=!1,em=!1;function tm(e){const[t,o]=e.version.split(".")||[],[i,r]=Zr.split(".")||[];return t===i&&o===r}function om(e){Zr||(Zr=e.version);const t=o=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${o} Please update all modules to the same version.`;if(e.version?tm(e)||si(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Zr}.`)):si(t(`'${e.moduleName}' is incompatible.`)),e.validate){const o=e.validate();o.isValid||si(`${o.message}`)}}function qi(e,t){om(e);const o=e.rowModels??["all"];Kd.add(e);let i;t!==void 0?(Yd=!0,hi[t]===void 0&&(hi[t]={}),i=hi[t]):i=Qr,o.forEach(r=>{i[r]===void 0&&(i[r]={}),i[r][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(r=>qi(r,t))}function im(e){delete hi[e]}function qd(e,t,o){const i=r=>!!Qr[r]?.[e]||!!hi[t]?.[r]?.[e];return i(o)||i("all")}function Un(){return Yd}function rm(e,t){const o=hi[e]??{};return[...Object.values(Qr.all??{}),...Object.values(o.all??{}),...Object.values(Qr[t]??{}),...Object.values(o[t]??{})]}function sm(){return new Set(Kd)}function nm(){return em}var Xd=class{static register(e){qi(e,void 0)}static registerModules(e){e.forEach(t=>qi(t,void 0))}},am=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){for(const t of Object.keys(e.providedBeanInstances))this.beans[t]=e.providedBeanInstances[t];e.beanClasses.forEach(t=>{const o=new t;o.beanName?this.beans[o.beanName]=o:console.error(`Bean ${t.name} is missing beanName`),this.createdBeans.push(o)}),e.derivedBeans?.forEach(t=>{const{beanName:o,bean:i}=t(this);this.beans[o]=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){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(o=>{o.preWireBeans?.(this.beans),o.wireBeans?.(this.beans)}),e.forEach(o=>o.preConstruct?.()),t&&e.forEach(t),e.forEach(o=>o.postConstruct?.())}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){e?.destroy?.()}destroyBeans(e){if(e)for(let t=0;t<e.length;t++)this.destroyBean(e[t]);return[]}isDestroyed(){return this.destroyed}},lm=class extends am{init(e){this.gridId=e.gridId,this.beans.context=this,this.destroyCallback=e.destroyCallback,super.init(e)}destroy(){super.destroy(),im(this.gridId),this.destroyCallback?.()}getGridId(){return this.gridId}},dm="ag-column-first",cm="ag-column-last";function Qd(e,t,o,i){return De(e)?[]:ec(e.headerClass,e,t,o,i)}function Zd(e,t,o,i){return De(e)?[]:ec(e.toolPanelClass,e,t,o,i)}function Jd(e,t,o){e.addOrRemoveCssClass(dm,o.isColAtEdge(t,"first")),e.addOrRemoveCssClass(cm,o.isColAtEdge(t,"last"))}function um(e,t,o,i){return Z(t,{colDef:e,column:o,columnGroup:i})}function ec(e,t,o,i,r){if(De(e))return[];let s;if(typeof e=="function"){const n=um(t,o,i,r);s=e(n)}else s=e;return typeof s=="string"?[s]:Array.isArray(s)?[...s]:[]}var D={BACKSPACE:"Backspace",TAB:"Tab",ENTER:"Enter",ESCAPE:"Escape",SPACE:" ",LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",DOWN:"ArrowDown",DELETE:"Delete",F2:"F2",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",PAGE_HOME:"Home",PAGE_END:"End",A:"KeyA",C:"KeyC",D:"KeyD",V:"KeyV",X:"KeyX",Y:"KeyY",Z:"KeyZ"},jn=!1,Jr=0;function hm(e){Jr>0||(e.addEventListener("keydown",es),e.addEventListener("mousedown",es))}function gm(e){Jr>0||(e.removeEventListener("keydown",es),e.removeEventListener("mousedown",es))}function es(e){const t=jn,o=e.type==="keydown";o&&(e.ctrlKey||e.metaKey||e.altKey)||t!==o&&(jn=o)}function pm(e){const t=Te(e);return hm(t),Jr++,()=>{Jr--,gm(t)}}function tc(){return jn}function fm(e,t,o){t.addManagedElementListeners(o,{keydown:i=>{if(!i.defaultPrevented&&i.key===D.TAB){const r=i.shiftKey;Ut(e,o,!1,r)||zo(e,r)&&i.preventDefault()}}})}function Vo(e,t,o=!1){const i=mp;let r=jl;t&&(r+=", "+t),o&&(r+=', [tabindex="-1"]');const s=Array.prototype.slice.apply(e.querySelectorAll(i)).filter(l=>ut(l)),n=Array.prototype.slice.apply(e.querySelectorAll(r));return n.length?((l,d)=>l.filter(c=>d.indexOf(c)===-1))(s,n):s}function Lt(e,t=!1,o=!1,i=!1){const r=Vo(e,i?".ag-tab-guard":null,o),s=t?Ce(r):r[0];return s?(s.focus({preventScroll:!0}),!0):!1}function Ut(e,t,o,i){const r=Vo(t,o?':not([tabindex="-1"])':null),s=Ee(e);let n;o?n=r.findIndex(l=>l.contains(s)):n=r.indexOf(s);const a=n+(i?-1:1);return a<0||a>=r.length?null:r[a]}function Kn(e,t=5){let o=0;for(;e&&zl(e)===null&&++o<=t;)e=e.parentElement;return zl(e)===null?null:e}function mm(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function _o(e){return e.gos.get("suppressHeaderFocus")||!!e.overlays?.isExclusive()}function Yn(e){return e.gos.get("suppressCellFocus")||!!e.overlays?.isExclusive()}function zo(e,t,o=!1){const i=e.ctrlsSvc.get("gridCtrl");return!o&&i.focusNextInnerContainer(t)?!0:((o||!t&&!i.isDetailGrid())&&i.forceFocusOutOfContainer(t),!1)}function Cm(e,t=!1){return e===D.DELETE?!0:!t&&e===D.BACKSPACE?_l():!1}var vm=class extends E{constructor(e,t,o,i){super(),this.cellCtrl=e,this.rowNode=o,this.rowCtrl=i,this.beans=t}init(){this.eGui=this.cellCtrl.eGui}onKeyDown(e){const t=e.key;switch(t){case D.ENTER:this.onEnterKeyDown(e);break;case D.F2:this.onF2KeyDown(e);break;case D.ESCAPE:this.onEscapeKeyDown(e);break;case D.TAB:this.onTabKeyDown(e);break;case D.BACKSPACE:case D.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case D.DOWN:case D.UP:case D.RIGHT:case D.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){if(!this.cellCtrl.editing){if(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled())this.onShiftRangeSelect(e);else{const o=this.cellCtrl.getFocusedCellPosition();this.beans.navigation?.navigateToNextCell(e,t,o,!0)}e.preventDefault()}}onShiftRangeSelect(e){const{rangeSvc:t,navigation:o}=this.beans;if(!t)return;const i=t.extendLatestRangeInDirection(e);i&&o?.ensureCellVisible(i)}onTabKeyDown(e){this.beans.navigation?.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){const{cellCtrl:o,beans:i,rowNode:r}=this,{gos:s,rangeSvc:n,eventSvc:a}=i;if(!o.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Cm(e,s.get("enableCellEditingOnBackspace"))){if(n&&Bo(s))n.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(o.isCellEditable()){const{column:l}=o,d=this.beans.valueSvc.getDeleteValue(l,r);r.setDataValue(l,d,"cellClear")}}else i.editSvc?.startRowOrCellEdit(o,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){const{cellCtrl:t,beans:o}=this;if(t.editing||this.rowCtrl.editing)this.beans.editSvc?.stopRowOrCellEdit(t,!1,!1,e.shiftKey);else if(o.gos.get("enterNavigatesVertically")){const i=e.shiftKey?D.UP:D.DOWN;o.navigation?.navigateToNextCell(null,i,t.cellPosition,!1)}else o.editSvc?.startRowOrCellEdit(t,D.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing||o.editSvc?.startRowOrCellEdit(t,D.F2,e)}onEscapeKeyDown(e){const{cellCtrl:t,beans:o}=this;t.editing&&o.editSvc?.stopRowOrCellEdit(t,!0)}processCharacter(e){if(e.target!==this.eGui||this.cellCtrl.editing)return;const i=e.key;i===D.SPACE?this.onSpaceKeyDown(e):this.beans.editSvc?.startRowOrCellEdit(this.cellCtrl,i,e)&&e.preventDefault()}onSpaceKeyDown(e){const{gos:t}=this.beans;!this.cellCtrl.editing&&Wt(t)&&this.beans.selectionSvc?.handleSelectionEvent(e,this.rowNode,"spaceKey"),e.preventDefault()}destroy(){super.destroy()}},wm=class extends E{constructor(e,t,o){super(),this.cellCtrl=e,this.column=o,this.beans=t}onMouseEvent(e,t){if(!Tt(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){if(this.beans.touchSvc?.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:o,gos:i,editSvc:r}=this.beans,s=e.ctrlKey||e.metaKey;o&&s&&o.getCellRangeCount(this.cellCtrl.cellPosition)>1&&o.intersectLastRange(!0);const n=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(n);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(n)})},0),(i.get("singleClickEdit")||a.singleClickEdit)&&!i.get("suppressClickEdit")&&!(e.shiftKey&&o?.getCellRanges().length!=0)&&r?.startRowOrCellEdit(this.cellCtrl,void 0,e)}onCellDoubleClicked(e){const{column:t,beans:o,cellCtrl:i}=this,{eventSvc:r,frameworkOverrides:s,gos:n,editSvc:a}=o,l=t.getColDef(),d=i.createEvent(e,"cellDoubleClicked");r.dispatchEvent(d),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{s.wrapOutgoing(()=>{l.onCellDoubleClicked(d)})},0),!n.get("singleClickEdit")&&!n.get("suppressClickEdit")&&a?.startRowOrCellEdit(i,null,e)}onMouseDown(e){const{ctrlKey:t,metaKey:o,shiftKey:i}=e,r=e.target,{cellCtrl:s,beans:n}=this,{eventSvc:a,rangeSvc:l,rowNumbersSvc:d,focusSvc:c,gos:u}=n;if(this.isRightClickInExistingRange(e))return;const g=l&&!l.isEmpty(),p=this.containsWidget(r),{cellPosition:f}=s,m=ji(f.column);if(d&&m&&!d.handleMouseDownOnCell(f,e)){l&&e.preventDefault(),e.stopImmediatePropagation();return}if(!i||!g){const w=u.get("enableCellTextSelection")&&e.defaultPrevented,y=(Pr()||w)&&!s.editing&&!bn(r)&&!p;s.focusCell(y)}if(i&&g&&!c.isCellFocused(f)){e.preventDefault();const C=c.getFocusedCell();if(C){const{column:w,rowIndex:y,rowPinned:b}=C,M=n.rowRenderer.getRowByPosition({rowIndex:y,rowPinned:b})?.getCellCtrl(w);M?.editing&&M.stopEditing(),c.setFocusedCell({column:w,rowIndex:y,rowPinned:b,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!p){if(l)if(m&&e.preventDefault(),i)l.extendLatestRangeToCell(f);else{const C=t||o;l.setRangeToCell(f,C)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const o=t.isCellInAnyRange(this.cellCtrl.cellPosition),i=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(o&&i)return!0}return!1}containsWidget(e){return Io(e,"ag-selection-checkbox",3)||Io(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),o?.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:o}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),o?.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const t=this.cellCtrl.eGui,o=t.contains(e.target),i=t.contains(e.relatedTarget);return o&&i}destroy(){super.destroy()}},bm=class extends E{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;const e=this.cellCtrl.getCellSpan();e||(this.setupColSpan(),this.setupRowSpan()),this.onLeftChanged(),this.onWidthChanged(),e||this._legacyApplyRowSpan(),e&&(this.refreshSpanHeight(e),this.addManagedListeners(this.beans.eventSvc,{paginationChanged:this.refreshSpanHeight.bind(this,e),recalculateRowBounds:this.refreshSpanHeight.bind(this,e)}))}refreshSpanHeight(e){const t=e.getCellHeight();t!=null&&(this.eContent.style.height=`${t}px`)}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this._legacyApplyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();It(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eContent)return;const 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(){const{column:e,rowNode:t}=this,o=e.getColSpan(t),i=[];if(o===1)i.push(e);else{let r=e;const s=e.getPinned();for(let n=0;r&&n<o&&(i.push(r),r=this.beans.visibleCols.getColAfter(r),!(!r||De(r)||s!==r.getPinned()));n++);}return i}onLeftChanged(){if(!this.eSetLeft)return;const e=this.modifyLeftForPrintLayout(this.getCellLeft());this.eSetLeft.style.left=e+"px"}getCellLeft(){let e;return this.beans.gos.get("enableRtl")&&this.colsSpanning?e=Ce(this.colsSpanning):e=this.column,e.getLeft()}modifyLeftForPrintLayout(e){if(!this.cellCtrl.printLayout||this.column.getPinned()==="left")return e;const{visibleCols:t}=this.beans,o=t.getColsLeftWidth();if(this.column.getPinned()==="right"){const i=t.bodyWidth;return o+i+(e||0)}return o+(e||0)}_legacyApplyRowSpan(e){if(this.rowSpan===1&&!e)return;const o=vo(this.beans)*this.rowSpan;this.eContent.style.height=`${o}px`,this.eContent.style.zIndex="1"}destroy(){super.destroy()}},ym="ag-cell",Sm="ag-cell-auto-height",Rm="ag-cell-normal-height",xm="ag-cell-focus",Fm="ag-cell-first-right-pinned",Dm="ag-cell-last-left-pinned",km="ag-cell-not-inline-editing",Mm="ag-cell-wrap-text",ts="cellCtrl";function oc(e,t){return Sd(e,t,ts)}var Pm=0,os=class extends E{constructor(e,t,o,i){super(),this.column=e,this.rowNode=t,this.rowCtrl=i,this.rangeFeature=void 0,this.positionFeature=void 0,this.customStyleFeature=void 0,this.tooltipFeature=void 0,this.mouseListener=void 0,this.keyboardListener=void 0,this.suppressRefreshCell=!1,this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],this.focusEventWhileNotReady=null,this.hasBeenFocused=!1,this.beans=o;const{colId:r,colIdSanitised:s}=e;this.instanceId=r+"-"+Pm++,this.colIdSanitised=s,this.createCellPosition(),this.updateAndFormatValue(!1)}addFeatures(){const{beans:e}=this;this.positionFeature=new bm(this,e),this.customStyleFeature=e.cellStyles?.createCellCustomStyleFeature(this,e),this.mouseListener=new wm(this,e,this.column),this.keyboardListener=new vm(this,e,this.rowNode,this.rowCtrl),this.column.isTooltipEnabled()&&this.enableTooltipFeature();const{rangeSvc:t}=e;t&&Bo(e.gos)&&(this.rangeFeature=t.createCellRangeFeature(e,this))}isCellSpanning(){return!1}getCellSpan(){}removeFeatures(){const e=this.beans.context;this.positionFeature=e.destroyBean(this.positionFeature),this.customStyleFeature=e.destroyBean(this.customStyleFeature),this.mouseListener=e.destroyBean(this.mouseListener),this.keyboardListener=e.destroyBean(this.keyboardListener),this.rangeFeature=e.destroyBean(this.rangeFeature),this.disableTooltipFeature()}enableTooltipFeature(e,t){this.tooltipFeature=this.beans.tooltipSvc?.enableCellTooltipFeature(this,e,t)}disableTooltipFeature(){this.tooltipFeature=this.beans.context.destroyBean(this.tooltipFeature)}setComp(e,t,o,i,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(i,n),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),this.positionFeature?.init(),this.customStyleFeature?.setComp(e),this.tooltipFeature?.refreshTooltip(),this.keyboardListener?.init(),this.rangeFeature?.setComp(e),s&&this.isCellEditable()?this.beans.editSvc?.startEditing(this):this.showValue(!1,!0),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(a=>a()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){this.isAutoHeight=this.beans.rowAutoHeight?.setupCellAutoHeight(this,e,t)??!1}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e,t){const{beans:o,column:i,rowNode:r,rangeFeature:s}=this,{userCompFactory:n}=o,a=this.getValueToDisplay();let l;const d=r.stub&&r.groupData?.[i.getId()]==null,c=i.getColDef();if(d||this.isCellRenderer()){const u=this.createCellRendererParams();!d||ji(i)?l=ui(n,c,u):l=jf(n,c,u)}if(!l&&!d&&o.findSvc?.isMatch(r,i)){const u=this.createCellRendererParams();l=ui(n,{...i.getColDef(),cellRenderer:"agFindCellRenderer"},u)}this.comp.setRenderDetails(l,a,e),!t&&s&&Pt(o,()=>s?.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t,groupDisplayType:o}=this.beans.gridOptions,i=zi(t),r=ro(this.column);return o==="custom"&&i!=="selectionColumn"&&r?!1:e.checkboxSelection||r&&typeof t=="object"&&Go(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),o=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),i=this.includeDndSource!=this.isIncludeControl(e.dndSource),r=this.isAutoHeight!=this.column.isAutoHeight();return t||o||i||r}onPopupEditorClosed(){this.editing&&this.beans.editSvc?.stopRowOrCellEdit(this)}stopEditing(e=!1){return this.beans.editSvc?.stopEditing(this,e)??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:o,rowNode:i,comp:r,eGui:s,beans:{valueSvc:n,gos:a}}=this;return Z(a,{value:e,valueFormatted:t,getValue:()=>n.getValueForDisplay(o,i),setValue:d=>n.setValue(i,o,d),formatValue:this.formatValue.bind(this),data:i.data,node:i,pinned:o.getPinned(),colDef:o.getColDef(),column:o,refreshCell:this.refreshCell.bind(this),eGridCell:s,eParentOfValue:r.getParentOfValue(),registerRowDragger:(d,c,u,g)=>this.registerRowDragger(d,c,g),setTooltip:(d,c)=>{a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(d,c),this.tooltipFeature?.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){this.refreshShouldDestroy()?this.rowCtrl?.recreateCell(this):this.refreshCell(e)}refreshCell(e){if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),o=e!=null&&!!e.newData,i=e!=null&&!!e.suppressFlash,r=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,s=e&&e.forceRefresh||r||o,n=!!this.comp,a=this.updateAndFormatValue(n),l=s||a;if(n){if(l){this.showValue(o,!1);const d=this.beans.filterManager?.isSuppressFlashingCellsBecauseFiltering();!i&&!d&&t.enableCellChangeFlash&&this.beans.cellFlashSvc?.flashCell(this),this.customStyleFeature?.applyUserStyles(),this.customStyleFeature?.applyClassesFromColDef()}this.tooltipFeature?.refreshTooltip(),this.customStyleFeature?.applyCellClassRules()}}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,o=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=o:!0}valuesAreEqual(e,t){const o=this.column.getColDef();return o.equals?o.equals(e,t):e===t}addDomData(e){const t=this.eGui;ni(this.beans.gos,t,ts,this),e.addDestroyFunc(()=>ni(this.beans.gos,t,ts,null))}createEvent(e,t){const{rowNode:o,column:i,value:r,beans:s}=this;return Z(s.gos,{type:t,node:o,data:o.data,value:r,column:i,colDef:i.getColDef(),rowPinned:o.rowPinned,event:e,rowIndex:o.rowIndex})}processCharacter(e){this.keyboardListener?.processCharacter(e)}onKeyDown(e){this.keyboardListener?.onKeyDown(e)}onMouseEvent(e,t){this.mouseListener?.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){this.comp&&this.positionFeature?.onLeftChanged()}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:o}=this;Jd(e,t,o.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);Nl(this.eGui,e)}onWidthChanged(){return this.positionFeature?.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){this.comp&&this.rangeFeature?.updateRangeBordersIfRangeCount()}onCellSelectionChanged(){this.comp&&this.rangeFeature?.onCellSelectionChanged()}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({...this.getFocusedCellPosition(),forceBrowserFocus:e})}restoreFocus(e=!1){if(!this.comp||this.editing||!this.isCellFocused()||!this.beans.focusSvc.shouldTakeFocus())return;const t=()=>{if(!this.isAlive())return;const o=this.comp.getFocusableElement();this.isCellFocused()&&o.focus({preventScroll:!0})};if(e){setTimeout(t,0);return}t()}onRowIndexChanged(){this.createCellPosition(),this.onCellFocused(),this.restoreFocus(),this.rangeFeature?.onCellSelectionChanged()}onSuppressCellFocusChanged(e){const t=this.eGui;t&&(ji(this.column)&&(e=!0),ri(t,"tabindex",e?void 0:-1))}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(Fm,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(Dm,e)}checkCellFocused(){return this.beans.focusSvc.isCellFocused(this.cellPosition)}isCellFocused(){const e=this.checkCellFocused();return this.hasBeenFocused||(this.hasBeenFocused=e),e}setupFocus(){this.restoreFocus(!0),this.onCellFocused(this.focusEventWhileNotReady??void 0)}onCellFocused(e){const{beans:t}=this;if(Yn(t))return;if(!this.comp){e&&(this.focusEventWhileNotReady=e);return}const o=this.isCellFocused();if(this.comp.addOrRemoveCssClass(xm,o),o&&e&&e.forceBrowserFocus){let r=this.comp.getFocusableElement();if(this.editing){const s=Vo(r,null,!0);s.length&&(r=s[0])}r.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const i=t.gos.get("editType")==="fullRow";!o&&!i&&this.editing&&t.editSvc?.stopRowOrCellEdit(this),o&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:et(t),column:this.column}}setInlineEditingCss(){this.beans.editSvc?.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(ym,!0),e.addOrRemoveCssClass(km,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Sm,t),e.addOrRemoveCssClass(Rm,!t)}onColumnHover(){this.beans.colHover?.onCellColumnHover(this.column,this.comp)}onColDefChanged(){this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?this.beans.editSvc?.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(Mm,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),o=this.createEvent(e,"cellContextMenu"),{beans:i}=this;i.eventSvc.dispatchEvent(o),t.onCellContextMenu&&window.setTimeout(()=>{i.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(o)})},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(Ee(this.beans))??!1}createSelectionCheckbox(){const e=this.beans.selectionSvc?.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,o){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const i=this.createRowDragComp(e,t,o);i&&(this.customRowDragComp=i,this.addDestroyFunc(()=>{this.beans.context.destroyBean(i),this.customRowDragComp=null}))}createRowDragComp(e,t,o){const i=this.beans.rowDragSvc?.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,o);if(i)return this.beans.context.createBean(i),i}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}setFocusedCellPosition(e){}getFocusedCellPosition(){return this.cellPosition}refreshAriaRowIndex(){}getRootElement(){return this.eGui}},ic="__ag_grid_instance";function rc(e,t){t[ic]=e.gridInstanceId}function Xi(e,t){return Em(e,t.target)}function Em(e,t){let o=t;for(;o;){const i=o[ic];if(q(i))return i===e.gridInstanceId;o=o.parentElement}return!1}function Am(e,t){return oc(e,t.target)?.getFocusedCellPosition()??null}var is=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(is||{}),Tm=class extends E{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const o={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:o,dragSource:e}),this.dragSvc.addDragSource(o)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:o}=this,i=t.find(r=>r.dragSource===e);i&&(o.removeDragSource(i.params),ot(t,i))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:o}=this;e.forEach(i=>t.removeDragSource(i.params)),e.length=0,o.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),e.onDragStarted?.(),this.createDragAndDropImageComponent()}onDragStop(e){this.dragSource?.onDragStopped?.();const{lastDropTarget:t}=this;if(t?.onDragStop){const o=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(o)}this.clearDragAndDropProperties()}onDragCancel(){const{dragSource:e,lastDropTarget:t}=this;e?.onDragCancelled?.(),t?.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){const o=this.getHorizontalDirection(e),i=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const r=this.dropTargets.filter(c=>this.isMouseOnDropTarget(e,c)),s=this.findCurrentDropTarget(e,r),{lastDropTarget:n,dragSource:a,dragAndDropImageComp:l,dragItem:d}=this;if(s!==n){if(this.leaveLastTargetIfExists(e,o,i,t),n!==null&&s===null&&a?.onGridExit?.(d),n===null&&s!==null&&a?.onGridEnter?.(d),this.enterDragTargetIfExists(s,e,o,i,t),s&&l){const{comp:c,promise:u}=l;c?c.setIcon(s.getIconName?s.getIconName():null,!1):u.then(g=>{g&&g.setIcon(s.getIconName?s.getIconName():null,!1)})}this.lastDropTarget=s}else if(s&&s.onDragging){const c=this.createDropTargetEvent(s,e,o,i,t);s.onDragging(c)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,o=[[e.getContainer()]];return t?o.concat(t):o}isMouseOnDropTarget(e,t){const o=this.getAllContainersFromDropTarget(t);let i=!1;const r=(a,l)=>{for(const d of l){const{width:c,height:u,left:g,right:p,top:f,bottom:m}=d.getBoundingClientRect();if(c===0||u===0)return!1;const C=a.clientX>=g&&a.clientX<p,w=a.clientY>=f&&a.clientY<m;if(!C||!w)return!1}return!0};for(const a of o)if(r(e,a)){i=!0;break}const{eElement:s,type:n}=this.dragSource;return t.targetContainsSource&&!t.getContainer().contains(s)?!1:i&&t.isInterestedIn(n,s)}findCurrentDropTarget(e,t){const o=t.length;if(o===0)return null;if(o===1)return t[0];const r=ai(this.beans).elementsFromPoint(e.clientX,e.clientY);for(const s of r)for(const n of t)if(this.getAllContainersFromDropTarget(n).flatMap(l=>l).indexOf(s)!==-1)return n;return null}enterDragTargetIfExists(e,t,o,i,r){if(e&&e.onDragEnter){const s=this.createDropTargetEvent(e,t,o,i,r);e.onDragEnter(s)}}leaveLastTargetIfExists(e,t,o,i){const{lastDropTarget:r}=this;if(!r)return;if(r.onDragLeave){const n=this.createDropTargetEvent(r,e,t,o,i);r.onDragLeave(n)}const s=this.getDragAndDropImageComponent();s&&s.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(o=>o.external).find(o=>o.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const o=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:i}=e;return o.contains(i)}getHorizontalDirection(e){const t=this.eventLastTime?.clientX,o=e.clientX;return t===o?null:t>o?"left":"right"}getVerticalDirection(e){const t=this.eventLastTime?.clientY,o=e.clientY;return t===o?null:t>o?"up":"down"}createDropTargetEvent(e,t,o,i,r){const s=e.getContainer(),n=s.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:d}=this,c=t.clientX-n.left,u=t.clientY-n.top;return Z(d,{event:t,x:c,y:u,vDirection:i,hDirection:o,dragSource:l,fromNudge:r,dragItem:a,dropZoneTarget:s})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&Gp(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;if(e){const{comp:t}=e;if(t){const o=t.getGui();this.dragAndDropImageParent?.removeChild(o),this.destroyBean(t)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e,gos:t,userCompFactory:o}=this;if(!e)return;const i=Of(o,Z(t,{dragSource:e}));if(!i)return;const r=i.newAgStackInstance();this.dragAndDropImageComp={promise:r},r.then(s=>{!s||!this.isAlive()||(this.processDragAndDropImageComponent(s),this.dragAndDropImageComp.comp=s)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:o}=this;if(!t)return;const i=e.getGui();i.style.setProperty("position","absolute"),i.style.setProperty("z-index","9999"),rc(this.gos,i),o.applyThemeClasses(i),e.setIcon(null,!1);let{dragItemName:r}=t;typeof r=="function"&&(r=r()),e.setLabel(r||""),i.style.top="20px",i.style.left="20px";const s=An(this.beans);this.dragAndDropImageParent=s,s?s.appendChild(i):_(54)}registerGridDropTarget(e,t){const o={getContainer:e,isInterestedIn:i=>i===1||i===0,getIconName:()=>"notAllowed"};this.addDropTarget(o),t.addDestroyFunc(()=>this.removeDropTarget(o))}},Im=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const o=t||this.shouldSkipVerticalScroll();if(o&&this.shouldSkipHorizontalScroll())return;const i=this.scrollContainer.getBoundingClientRect(),r=this.scrollByTick;this.tickLeft=e.clientX<i.left+r,this.tickRight=e.clientX>i.right-r,this.tickUp=e.clientY<i.top+r&&!o,this.tickDown=e.clientY>i.bottom-r&&!o,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function Lm(e,t){const o=e.column===t.column,i=e.rowPinned===t.rowPinned,r=e.rowIndex===t.rowIndex;return o&&i&&r}function Gm(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if(q(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex<t.rowIndex}function Bm(e){let t=0,o;const{pinnedRowModel:i,rowModel:r,pageBounds:s}=e;return i?.getPinnedTopRowCount()?o="top":r.getRowCount()?(o=null,t=s.getFirstRow()):i?.getPinnedBottomRowCount()&&(o="bottom"),o===void 0?null:{rowIndex:t,rowPinned:o}}function Om(e){let t,o=null;const{pinnedRowModel:i,pageBounds:r}=e,s=i?.getPinnedBottomRowCount(),n=i?.getPinnedTopRowCount();return s?(o="bottom",t=s-1):e.rowModel.getRowCount()?(o=null,t=r.getLastRow()):n&&(o="top",t=n-1),t===void 0?null:{rowIndex:t,rowPinned:o}}function qn(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){const o=e.spannedRowRenderer?.getCellByPosition(t);if(o)return o;const i=e.rowRenderer.getRowByPosition(t);return i?i.getCellCtrl(t.column):null}function ss(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:r,pinnedRowModel:s,rowModel:n}=e;if(o===0)return i==="top"?null:i==="bottom"&&n.isRowsToRender()?{rowIndex:r.getLastRow(),rowPinned:null}:s?.isRowsToRender("top")?{rowIndex:s.getPinnedTopRowCount()-1,rowPinned:"top"}:null;const a=i?void 0:n.getRow(o);return nc(e,a,!0)??{rowIndex:o-1,rowPinned:i}}function sc(e,t){const{rowIndex:o,rowPinned:i}=t,{pageBounds:r,pinnedRowModel:s,rowModel:n}=e;if(Nm(e,t))return i==="bottom"?null:i==="top"&&n.isRowsToRender()?{rowIndex:r.getFirstRow(),rowPinned:null}:s?.isRowsToRender("bottom")?{rowIndex:0,rowPinned:"bottom"}:null;const a=i?void 0:n.getRow(o);return nc(e,a)??{rowIndex:o+1,rowPinned:i}}function nc(e,t,o){const{gos:i,rowRenderer:r}=e;if(!t?.sticky||!Vr(i))return;const s=o?r.getStickyTopRowCtrls():r.getStickyBottomRowCtrls();let n;for(let a=0;a<s.length;a++)if(s[a].rowNode.rowIndex===t.rowIndex){n=s[a+(o?-1:1)];break}return n?{rowIndex:n.rowNode.rowIndex,rowPinned:null}:void 0}function Nm(e,t){const{rowPinned:o,rowIndex:i}=t,{pinnedRowModel:r,pageBounds:s}=e;return o==="top"?(r?.getPinnedTopRowCount()??0)-1<=i:o==="bottom"?(r?.getPinnedBottomRowCount()??0)-1<=i:s.getLastRow()<=i}function ac(e,t,o){if(o===0)return!1;const i=Math.abs(e.clientX-t.clientX),r=Math.abs(e.clientY-t.clientY);return Math.max(i,r)<=o}var Hm=class extends E{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,o=e.mouseDownListener;if(t.removeEventListener("mousedown",o),e.touchEnabled){const i=e.touchStartListener;t.removeEventListener("touchstart",i,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,o=t.find(i=>i.dragSource===e);o&&(this.removeListener(o),ot(t,o))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:o,includeTouch:i,stopPropagationForTouch:r}=e;o.addEventListener("mousedown",t);let s=null;const n=this.gos.get("suppressTouch");i&&!n&&(s=a=>{bn(a.target)||(r&&a.stopPropagation(),this.onTouchStart(e,a))},o.addEventListener("touchstart",s,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:s,touchEnabled:!!i})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const o=t.touches[0];this.touchLastTime=o,this.touchStart=o;const i=l=>this.onTouchMove(l,e.eElement),r=l=>this.onTouchUp(l,e.eElement),s=l=>{l.cancelable&&l.preventDefault()},n=t.target,a=[{target:ai(this.beans),type:"touchmove",listener:s,options:{passive:!1}},{target:n,type:"touchmove",listener:i,options:{passive:!0}},{target:n,type:"touchend",listener:r,options:{passive:!0}},{target:n,type:"touchcancel",listener:r,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(o,this.touchStart,e.eElement)}onMouseDown(e,t){const o=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||o._alreadyProcessedByDragService||(o._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const i=d=>this.onMouseMove(d,e.eElement),r=d=>this.onMouseUp(d,e.eElement),s=d=>d.preventDefault(),n=d=>{d.key===D.ESCAPE&&this.cancelDrag(e.eElement)},a=ai(this.beans),l=[{target:a,type:"mousemove",listener:i},{target:a,type:"mouseup",listener:r},{target:a,type:"contextmenu",listener:s},{target:a,type:"keydown",listener:n}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:o,type:i,listener:r,options:s}=t;o.addEventListener(i,r,s)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:o,type:i,listener:r,options:s}=t;o.removeEventListener(i,r,s)})})}isEventNearStartEvent(e,t){const{dragStartPixels:o}=this.currentDragParams,i=q(o)?o:4;return ac(e,t,i)}getFirstActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}onCommonMove(e,t,o){if(!this.dragging){if(this.isEventNearStartEvent(e,t))return;if(this.dragging=!0,this.eventSvc.dispatchEvent({type:"dragStarted",target:o}),this.currentDragParams.onDragStart(t),!this.currentDragParams){this.dragging=!1;return}this.currentDragParams.onDragging(t)}this.currentDragParams?.onDragging(e)}onTouchMove(e,t){const o=this.getFirstActiveTouch(e.touches);o&&this.onCommonMove(o,this.touchStart,t)}onMouseMove(e,t){Pr()&&Te(this.beans).getSelection()?.removeAllRanges(),this.shouldPreventMouseEvent(e)&&e.preventDefault(),this.onCommonMove(e,this.mouseStartEvent,t)}shouldPreventMouseEvent(e){const{gos:t}=this,o=t.get("enableCellTextSelection"),i=e.type==="mousemove",r=s=>!!s.target?.tagName.toLocaleLowerCase()?.match("^a$|textarea|input|select|button");return o&&i&&e.cancelable&&Xi(t,e)&&!r(e)}onTouchUp(e,t){let o=this.getFirstActiveTouch(e.changedTouches);o||(o=this.touchLastTime),this.onUpCommon(o,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),this.currentDragParams?.onDragCancel?.(),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function lc(e,t){return e+"_"+t}function Ie(e){return e instanceof dc}var dc=class extends E{constructor(e,t,o,i){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=o,this.pinned=i,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return lc(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{Ie(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Ce(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){let e=0;return this.displayedChildren?.forEach(t=>{e+=t.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){return!!this.getColGroupDef()?.autoHeaderHeight}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{$t(t)?e.push(t):Ie(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{$t(t)?e.push(t):Ie(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(o=>{if(Ie(o)&&(!o.displayedChildren||!o.displayedChildren.length))return;switch(o.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(o);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(o);break;default:this.displayedChildren.push(o);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},ns="row-group-",Vm="t-",_m="b-",zm=0,Wo=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=zm++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){const{valueCache:o,selectionSvc:i,eventSvc:r}=this.beans,s=this.data;this.data=e,o?.onDataChanged(),this.updateDataOnDetailNode(),i?.updateRowSelectable(this),this.resetQuickFilterAggregateText();const n=this.createDataChangedEvent(e,s,t);this.__localEventService?.dispatchEvent(n),r.dispatchEvent({type:"rowNodeDataChanged",node:this})}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,o){return{type:"dataChanged",node:this,oldData:t,newData:e,update:o}}getRowIndexString(){return this.rowIndex==null?(ce(13),null):this.rowPinned==="top"?Vm+this.rowIndex:this.rowPinned==="bottom"?_m+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){const{selectionSvc:o}=this.beans,i=o?.createDaemonNode?.(this),r=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),o&&(o.updateRowSelectable(this),o.syncInRowNode(this,i));const s=this.createDataChangedEvent(e,r,!1);this.__localEventService?.dispatchEvent(s)}setId(e){const t=_i(this.beans.gos);if(t)if(this.data){const o=this.parent?.getRoute()??[];this.id=t({data:this.data,parentKeys:o.length>0?o:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(ns)&&ce(14,{groupPrefix:ns})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,o){this.beans.expansionSvc?.setExpanded(this,e,t,o)}setDataValue(e,t,o){const{colModel:i,valueSvc:r,gos:s,selectionSvc:n}=this.beans,a=typeof e!="string"?e:i.getCol(e)??i.getColDefCol(e);if(!a)return!1;const l=r.getValueForDisplay(a,this);if(s.get("readOnlyEdit")){const{beans:{eventSvc:c},data:u,rowIndex:g,rowPinned:p}=this;return c.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:p,column:a,colDef:a.colDef,data:u,node:this,oldValue:l,newValue:t,value:t,source:o}),!1}const d=r.setValue(this,a,t,o);return this.dispatchCellChangedEvent(a,t,l),n?.updateRowSelectable(this),d}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,o){const i={type:"cellChanged",node:this,column:e,newValue:t,oldValue:o};this.__localEventService?.dispatchEvent(i)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){return this.beans.expansionSvc?.isExpandable(this)??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){this.childrenAfterGroup?.forEach(t=>t.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){this.__localEventService?.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,o="api"){this.beans.selectionSvc?.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:o})}isRowPinned(){return!!this.rowPinned}__addEventListener(e,t){this.__localEventService||(this.__localEventService=new eo),this.__localEventService.addEventListener(e,t)}__removeEventListener(e,t){this.removeLocalListener(e,t)}addEventListener(e,t){this.beans.validation?.checkRowEvents(e),this.__localEventService||(this.__localEventService=new eo),this.frameworkEventListenerService=this.beans.frameworkOverrides.createLocalEventListenerWrapper?.(this.frameworkEventListenerService,this.__localEventService);const o=this.frameworkEventListenerService?.wrap(t)??t;this.__localEventService.addEventListener(e,o)}removeEventListener(e,t){const o=this.frameworkEventListenerService?.unwrap(t)??t;this.removeLocalListener(e,o)}removeLocalListener(e,t){this.__localEventService?.removeEventListener(e,t),this.__localEventService?.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(_(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function cc(e,t,o){return Z(t,{type:o,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var Wm={tag:"div",cls:"ag-filter"},uc=class extends pe{constructor(e,t){super(Wm),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){return this.filterWrapper?.filterPromise??null}afterInit(){return this.filterWrapper?.filterPromise?.then(()=>{})??ke.resolve()}afterGuiAttached(e){this.filterWrapper?.filterPromise?.then(t=>{t?.afterGuiAttached?.(e)})}afterGuiDetached(){this.filterWrapper?.filterPromise?.then(e=>{e?.afterGuiDetached?.()})}createFilter(e){const{column:t,source:o}=this;this.filterWrapper=this.beans.filterManager?.getOrCreateFilterWrapper(t)??null,this.filterWrapper?.filterPromise&&this.filterWrapper.filterPromise.then(i=>{const r=i.getGui();q(r)||_(69,{guiFromFilter:r}),this.appendChild(r),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:o,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ct(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},hc="ag-resizer-wrapper",bo=(e,t)=>({tag:"div",ref:`${e}Resizer`,cls:`ag-resizer ag-resizer-${t}`}),$m={tag:"div",cls:hc,children:[bo("eTopLeft","topLeft"),bo("eTop","top"),bo("eTopRight","topRight"),bo("eRight","right"),bo("eBottomRight","bottomRight"),bo("eBottom","bottom"),bo("eBottomLeft","bottomLeft"),bo("eLeft","left")]},Xn=class extends E{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,o=t/2-this.getWidth()/2,i=e/2-this.getHeight()/2;this.offsetElement(o,i)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:o,width:i,minHeight:r,height:s,x:n,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,d=0;const c=ut(this.element);if(c){const u=this.findBoundaryElement(),g=window.getComputedStyle(u);if(g.minWidth!=null){const p=u.offsetWidth-this.element.offsetWidth;d=parseInt(g.minWidth,10)-p}if(g.minHeight!=null){const p=u.offsetHeight-this.element.offsetHeight;l=parseInt(g.minHeight,10)-p}}if(this.minHeight=r||l,this.minWidth=o||d,i&&this.setWidth(i),s&&this.setHeight(s),(!i||!s)&&this.refreshSize(),e)this.center();else if(n||a)this.offsetElement(n,a);else if(c&&t){let u=this.boundaryEl,g=!0;if(u||(u=this.findBoundaryElement(),g=!1),u){const p=parseFloat(u.style.top),f=parseFloat(u.style.left);g?this.offsetElement(isNaN(f)?0:f,isNaN(p)?0:p):this.setPosition(f,p)}}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;const o=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragSvc?.addDragSource(o),this.moveElementDragListener=o):(this.dragSvc?.removeDragSource(o),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{const i=!!e[t],r=this.getResizerElement(t),s={dragStartPixels:0,eElement:r,onDragStart:n=>this.onResizeStart(n,t),onDragging:this.onResize.bind(this),onDragStop:n=>this.onResizeEnd(n,t)};(i||!this.isAlive()&&!i)&&(i?(this.dragSvc?.addDragSource(s),this.resizeListeners.push(s),r.style.pointerEvents="all"):r.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";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,o=this.element;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Bi(o,e),e=Kl(o),i=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const r=this.getAvailableHeight();r&&e>r&&(e=r)}this.getHeight()!==e&&(i?(o.style.maxHeight="unset",o.style.minHeight="unset"):t?Bi(o,e):(o.style.height=`${e}px`,o.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:o}=this.offsetParent;if(!o)return null;const i=this.element.getBoundingClientRect(),r=this.offsetParent.getBoundingClientRect(),s=e?this.position.y:i.top,n=e?0:r.top;let a=0;if(t){const d=this.element.parentElement;if(d){const{bottom:c}=d.getBoundingClientRect();a=c-i.bottom}}return o+n-s-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:o}=this.config;let i=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)zt(t,e),e=Ar(t),i=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:r}=this.offsetParent,s=o?this.position.x:this.element.getBoundingClientRect().left;r&&e+s>r&&(e=r-s)}this.getWidth()!==e&&(i?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?zt(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){const{forcePopupParentAsOffsetParent:o}=this.config,i=o?this.boundaryEl:this.element;i&&(this.popupSvc?.positionPopup({ePopup:i,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(i.style.left),parseFloat(i.style.top)))}constrainSizeToAvailableHeight(e){if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const o=this.getAvailableHeight();this.element.style.setProperty("max-height",`${o}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=mo(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){const{e:t,isLeft:o,isTop:i,anywhereWithin:r,topBuffer:s}=e,n=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!o,!!r,n)?0:n,d=this.shouldSkipY(t,!!i,s,a)?0:a;return{movementX:l,movementY:d}}shouldSkipX(e,t,o,i){const r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:r.left;let l=a<=0&&s.left>=e.clientX||s.right<=e.clientX&&s.right<=n.right;return l?!0:(t?l=i<0&&e.clientX>a+s.left||i>0&&e.clientX<a+s.left:o?l=i<0&&e.clientX>n.right||i>0&&e.clientX<a+s.left:l=i<0&&e.clientX>n.right||i>0&&e.clientX<n.right,l)}shouldSkipY(e,t,o=0,i){const r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),n=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.y:r.top;let l=a<=0&&s.top>=e.clientY||s.bottom<=e.clientY&&s.bottom<=n.bottom;return l?!0:(t?l=i<0&&e.clientY>a+s.top+o||i>0&&e.clientY<a+s.top:l=i<0&&e.clientY>n.bottom||i>0&&e.clientY<n.bottom,l)}createResizeMap(){const e=t=>({element:this.element.querySelector(`[data-ref=${t}Resizer]`)});this.resizerMap={topLeft:e("eTopLeft"),top:e("eTop"),topRight:e("eTopRight"),right:e("eRight"),bottomRight:e("eBottomRight"),bottom:e("eBottom"),bottomLeft:e("eBottomLeft"),left:e("eLeft")}}addResizers(){if(this.resizersAdded)return;const e=this.element;e&&(e.appendChild(Pe($m)),this.createResizeMap(),this.resizersAdded=!0)}removeResizers(){this.resizerMap=void 0;const e=this.element.querySelector(`.${hc}`);e&&this.element.removeChild(e),this.resizersAdded=!1}getResizerElement(e){return this.resizerMap[e].element}onResizeStart(e,t){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.currentResizer={isTop:!!t.match(/top/i),isRight:!!t.match(/right/i),isBottom:!!t.match(/bottom/i),isLeft:!!t.match(/left/i)},this.element.classList.add("ag-resizing"),this.resizerMap[t].element.classList.add("ag-active");const{popup:o,forcePopupParentAsOffsetParent:i}=this.config;!o&&!i&&this.applySizeToSiblings(this.currentResizer.isBottom||this.currentResizer.isTop),this.isResizing=!0,this.updateDragStartPosition(e.clientX,e.clientY)}getSiblings(){const t=this.element.parentElement;return t?Array.prototype.slice.call(t.children).filter(o=>!o.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,o=0;for(let i=0;i<e.length;i++){const r=e[i],s=!!r.style.flex&&r.style.flex!=="0 0 auto";if(r===this.element)continue;let n=this.minHeight||0,a=this.minWidth||0;if(s){const l=window.getComputedStyle(r);l.minHeight&&(n=parseInt(l.minHeight,10)),l.minWidth&&(a=parseInt(l.minWidth,10))}else n=r.offsetHeight,a=r.offsetWidth;t+=n,o+=a}return{height:t,width:o}}applySizeToSiblings(e){let t=null;const o=this.getSiblings();if(o){for(let i=0;i<o.length;i++){const r=o[i];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=o[i+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;const{popup:t,forcePopupParentAsOffsetParent:o}=this.config,{isTop:i,isRight:r,isBottom:s,isLeft:n}=this.currentResizer,a=r||n,l=s||i,{movementX:d,movementY:c}=this.calculateMouseMovement({e,isLeft:n,isTop:i}),u=this.position.x,g=this.position.y;let p=0,f=0;if(a&&d){const m=n?-1:1,C=this.getWidth(),w=C+d*m;let y=!1;n&&(p=C-w,(u+p<=0||w<=this.minWidth)&&(y=!0,p=0)),y||this.setWidth(w)}if(l&&c){const m=i?-1:1,C=this.getHeight(),w=C+c*m;let y=!1;i?(f=C-w,(g+f<=0||w<=this.minHeight)&&(y=!0,f=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&C<w&&this.getMinSizeOfSiblings().height+w>this.element.parentElement.offsetHeight&&(y=!0),y||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||o)&&p||f)&&this.offsetElement(u+p,g+f)}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(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:o}=this.position;let i;this.config.calculateTopBuffer&&(i=this.config.calculateTopBuffer());const{movementX:r,movementY:s}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:i});this.offsetElement(t+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(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){for(;this.resizeListeners.length;){const 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()}},gc="ag-focus-managed",gi=class extends E{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:o=>{if(o.defaultPrevented)return;const i=Ut(this.beans,this.eFocusable,!1,o.shiftKey);i&&(i.focus(),o.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:o}}=this;e.classList.add(gc),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),o&&this.addManagedElementListeners(e,{focusout:o})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||Tt(t))return;const{callbacks:o}=this;if(o.shouldStopEventPropagation(t)){io(t);return}t.key===D.TAB?o.onTabKeyDown(t):o.handleKeyDown&&o.handleKeyDown(t)}})}},Um={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function jm(e,t){const{debounceMs:o}=e;return Qn(e)?(o!=null&&_(71),0):o??t}function Qn(e){return(e.buttons?.indexOf("apply")??-1)>=0}var Km=class extends pe{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=V,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new gi(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Xn(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t?.removeEventListener("submit",this.onFormSubmit);const o={tag:"form",cls:"ag-filter-wrapper",children:[{tag:"div",ref:"eFilterBody",cls:`ag-filter-body-wrapper ag-${this.getCssIdentifier()}-body-wrapper`,children:[this.createBodyTemplate()]}]};this.setTemplate(o,this.getAgComponents(),e),t=this.getGui(),t?.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=Qn(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=Qn(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:o,readOnly:i}=t??{},{buttons:r,readOnly:s}=e;if(i===s&&Oi(o,r))return;const n=r&&r.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(ct(this.eButtonsPanel),this.buttonListeners.forEach(d=>d()),this.buttonListeners=[]):n&&(this.eButtonsPanel=Pe({tag:"div",cls:"ag-filter-apply-panel"})),!n){this.eButtonsPanel&&_t(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=d=>{let c;const u=d?this.translate(`${d}Filter`):void 0;switch(d){case"apply":c=f=>this.onBtApply(!1,!1,f);break;case"clear":c=()=>this.onBtClear();break;case"reset":c=()=>this.onBtReset();break;case"cancel":c=f=>{this.onBtCancel(f)};break;default:_(75);return}const p=Lr(`<button
5
+ type="${d==="apply"?"submit":"button"}"
6
+ data-ref="${d}FilterButton"
7
+ class="ag-button ag-standard-button ag-filter-apply-panel-button"
8
+ >${u}
9
+ </button>`);this.buttonListeners.push(...this.addManagedElementListeners(p,{click:c})),a.append(p)};r.forEach(d=>l(d)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=jm(this.params,this.defaultDebounceMs),t=tt(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const o=()=>{this.onUiChanged(!1,"prevent"),t?.()};e!=null?this.setModelIntoUi(e).then(o):this.resetUiToDefaults().then(o)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const o=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(o,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,o){o&&o.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:i}=this.params;i&&this.applyActive&&!e&&!t&&this.close(o)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,o=t&&t.key;let i;(o==="Enter"||o==="Space")&&(i={keyboardEvent:t}),this.hidePopup(i),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const o=this.isModelValid(this.getModelFromUi()),i=this.queryForHtmlElement('[data-ref="applyFilterButton"]');i&&yn(i,!o)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e?.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:o}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(o.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){this.checkApplyDebounce(),this.positionableFeature?.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,Um[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function Ym(e,t,o){if(t==null)return null;let i=null;const{compName:r,jsComp:s,fwComp:n}=Zf(e,t);return r?i={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[r]:s==null&&n==null&&t.filter===!0&&(i=o()),i}var Gt={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},Zn=class extends E{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},o=t.autoHeight?Gt.AUTO_HEIGHT:t.print?Gt.PRINT:Gt.NORMAL;this.view.updateLayoutClasses(o,t)}},yo="Viewport",pc="fakeVScrollComp",fc=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],mc=100,Jn=150,qm=class extends E{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.lastIsHorizontalScrollShowing=!1,this.scrollTimer=0,this.isVerticalPositionInvalidated=!0,this.isHorizontalPositionInvalidated=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=tt(this,()=>this.lastScrollSource[1]=null,Jn),this.resetLastVScrollDebounced=tt(this,()=>this.lastScrollSource[0]=null,Jn)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.invalidateVerticalScroll.bind(this),t=this.invalidateHorizontalScroll.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e,scrollGapChanged:t}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,o=>{this.centerRowsCtrl=o.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}invalidateHorizontalScroll(){this.isHorizontalPositionInvalidated=!0}invalidateVerticalScroll(){this.isVerticalPositionInvalidated=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,yo)});for(const e of fc){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),o=t?tt(this,this.onVScroll.bind(this,yo),mc):this.onVScroll.bind(this,yo),i=t?tt(this,this.onVScroll.bind(this,pc),mc):this.onVScroll.bind(this,pc);this.addManagedElementListeners(this.eBodyViewport,{scroll:o}),this.registerScrollPartner(e,i)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...fc,yo]){if(this.lastScrollSource[1]===t)continue;const o=this.getViewportForSource(t);Ir(o,e,this.enableRtl)}}getViewportForSource(e){return e===yo?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:o}=t;if(this.shouldBlockScrollUpdate(1,o,!0))return;const i=Tr(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(i),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===yo?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:o}=this;o?.setScrollTop(t),this.nextScrollTop=t,e===yo?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,o?.active?o.schedule():this.scrollGridIfNeeded(!0),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},Jn)}shouldBlockScrollUpdate(e,t,o=!1){return o&&!To()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Er(this.eBodyViewport),{scrollHeight:o}=this.eBodyViewport;return e<0||e+t>o}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:o}=this.centerRowsCtrl.eViewport;if(this.enableRtl){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>o}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(yo)}scrollGridIfNeeded(e=!1){const t=this.scrollTop!=this.nextScrollTop;return t&&(this.scrollTop=this.nextScrollTop,e&&this.invalidateVerticalScroll(),this.redrawRowsAfterScroll()),t}setHorizontalScrollPosition(e,t=!1){const i=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl?e=e>0?0:i:e=Math.min(Math.max(e,0),i)),Ir(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.invalidateVerticalScroll(),this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.isVerticalPositionInvalidated){const{lastOffsetHeight:o,lastScrollTop:i}=this;return{top:i,bottom:i+o}}this.isVerticalPositionInvalidated=!1;const{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){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:o}=this.beans,i=o.getRowCount();let r=-1;for(let s=0;s<i;s++){const n=o.getRow(s);if(typeof e=="function"){if(n&&e(n)){r=s;break}}else if(e===n||e===n.data){r=s;break}}r>=0&&this.ensureIndexVisible(r,t)}ensureIndexVisible(e,t){if(Ke(this.gos,"print"))return;const{rowModel:o}=this.beans,i=o.getRowCount();if(typeof e!="number"||e<0||e>=i){_(88,{index:e});return}const{frameworkOverrides:r,pageBounds:s,rowContainerHeight:n,rowRenderer:a}=this.beans;r.wrapIncoming(()=>{const l=this.ctrlsSvc.getGridBodyCtrl(),d=o.getRow(e);let c,u,g=0;this.invalidateVerticalScroll();do{const{stickyTopHeight:p,stickyBottomHeight:f}=l,m=d.rowTop,C=d.rowHeight,w=s.getPixelOffset(),y=d.rowTop-w,b=y+d.rowHeight,x=this.getVScrollPosition(),M=n.divStretchOffset,P=x.top+M,k=x.bottom+M,S=k-P,v=n.getScrollPositionForPixel(y),R=n.getScrollPositionForPixel(b-S),F=Math.min((v+R)/2,y),G=P+p>y,z=k-f<b;let B=null;t==="top"?B=v-p:t==="bottom"?B=R+f:t==="middle"?B=F:G?B=v-p:z&&(B=R+f),B!==null&&(this.setVerticalScrollPosition(B),a.redraw({afterScroll:!0})),c=m!==d.rowTop||C!==d.rowHeight,u=p!==l.stickyTopHeight||f!==l.stickyBottomHeight,g++}while((c||u)&&g<10);this.animationFrameSvc?.flushAllFrames()})}ensureColumnVisible(e,t="auto"){const{colModel:o,frameworkOverrides:i}=this.beans,r=o.getCol(e);if(!r||r.isPinned()||!this.visibleCols.isColDisplayed(r))return;const s=this.getPositionedHorizontalScroll(r,t);i.wrapIncoming(()=>{s!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(s),this.centerRowsCtrl.onHorizontalViewportChanged(),this.animationFrameSvc?.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:o,columnAfterEnd:i}=this.isColumnOutsideViewport(e),r=this.centerRowsCtrl.getCenterWidth()<e.getActualWidth(),s=this.centerRowsCtrl.getCenterWidth(),n=this.enableRtl;let a=(n?o:i)||r,l=n?i:o;t!=="auto"&&(a=t==="start",l=t==="end");const d=t==="middle";if(a||l||d){const{colLeft:c,colMiddle:u,colRight:g}=this.getColumnBounds(e);return d?u-s/2:a?n?g:c:n?c-s:g-s}return null}isColumnOutsideViewport(e){const{start:t,end:o}=this.getViewportBounds(),{colLeft:i,colRight:r}=this.getColumnBounds(e),s=this.enableRtl,n=s?t>r:o<r,a=s?o<i:t>i;return{columnBeforeStart:n,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,o=this.visibleCols.bodyWidth,i=e.getActualWidth(),r=e.getLeft(),s=t?-1:1,n=t?o-r:r,a=n+i*s,l=n+i/2*s;return{colLeft:n,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),o=t,i=e+t;return{start:o,end:i,width:e}}},ea=class extends E{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const 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(){const e=Ke(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:o}=this.beans,i=t.bodyWidth,r=t.getColsLeftWidth(),s=t.getDisplayedColumnsRightWidth();let n;e?n=i+r+s:(n=i,this.addSpacer&&(this.gos.get("enableRtl")?r:s)===0&&o.verticalScrollShowing&&(n+=o.getScrollbarWidth())),this.callback(n)}},Xm=class extends E{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(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:o}=this,i=()=>{Pt(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(i),o.registerBodyViewportResizeListener(i)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e?.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const o=this.centerContainerCtrl.getCenterWidth();o!==this.centerWidth&&(this.centerWidth=o,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(){const e=this.gridBodyCtrl.eBodyViewport,t=Er(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function Qm(e,t,o,i,r,s){if(o==null&&t==null)return;const n={},a={},l=(d,c)=>{d.split(" ").forEach(u=>{u.trim()!=""&&c(u)})};if(o){const d=Object.keys(o);for(let c=0;c<d.length;c++){const u=d[c],g=o[u];let p;typeof g=="string"?p=e?e.evaluate(g,i):!0:typeof g=="function"&&(p=g(i)),l(u,f=>{p?n[f]=!0:a[f]=!0})}}s&&Object.keys(a).forEach(s),Object.keys(n).forEach(r)}function Cc(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var Zm=class extends E{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const o=this.gos,i=n=>{typeof n=="string"?e.push(n):Array.isArray(n)&&n.forEach(a=>e.push(a))},r=o.get("rowClass");r&&i(r);const s=o.getCallback("getRowClass");if(s){const n={data:t.data,node:t,rowIndex:t.rowIndex},a=s(n);i(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,o=>{e.push(o)},()=>{})}processRowClassRules(e,t,o){const{gos:i,expressionSvc:r}=this.beans,s=Z(i,{data:e.data,node:e,rowIndex:e.rowIndex});Qm(r,void 0,i.get("rowClassRules"),s,t,o)}processStylesFromGridOptions(e){const t=this.gos,o=t.get("rowStyle"),i=t.getCallback("getRowStyle");let r;if(i){const s={data:e.data,node:e,rowIndex:e.rowIndex};r=i(s)}if(r||o)return Object.assign({},o,r)}},Jm=0,as="renderedRow",ta=class extends E{constructor(e,t,o,i,r){super(),this.rowNode=e,this.useAnimationFrameForCreate=i,this.printLayout=r,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+"-"+Jm++,this.rowId=Rt(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=Cc(this.rowNode),this.setRowType(),this.setAnimateFlags(o),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Rt(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,o,i){const{context:r,focusSvc:s}=this.beans;i=Yi(this,r,i);const n={rowComp:e,element:t,containerType:o,compBean:i};this.allRowGuis.push(n),this.updateGui(o,n),this.initialiseRowComp(n);const a=this.rowNode,l=this.rowType==="FullWidthLoading"||a.stub,d=!a.data&&this.beans.rowModel.getType()==="infinite";!l&&!d&&!a.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent();const c=this.fullWidthGui?.element;c&&!this.editing&&s.isRowFocused(a.rowIndex,a.rowPinned)&&s.shouldTakeFocus()&&setTimeout(()=>c.focus({preventScroll:!0}),0)}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(o=>o.element.style.display=t)}initialiseRowComp(e){const 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),Wt(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const o=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(r=>o.addOrRemoveCssClass(r,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&to(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(o),this.setRowCompRowBusinessKey(o),ni(t,e.element,as,this),e.compBean.addDestroyFunc(()=>ni(t,e.element,as,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.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Rt(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(Fn(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(Fn(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){const t=this.beans.rowDragSvc?.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const o=this.createBean(t,this.beans.context);this.rowDragComps.push(o),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(i=>i!==o),this.destroyBean(o,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),o=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(o)}getFullWidthCellRenderers(){return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(e=>e?.rowComp?.getFullWidthCellRenderer()):[this.fullWidthGui?.rowComp?.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:o,beans:{visibleCols:i}}=this,r=!!e||!i.isPinningLeft(),s=!!t,n=!!o||!i.isPinningRight();return r&&s&&n}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),o=this.gos.get("masterDetail")&&this.rowNode.detail,i=this.beans.colModel.isPivotMode(),s=!!this.rowNode.group&&!this.rowNode.footer&&_r(this.gos,i);e?this.rowType="FullWidthLoading":o?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":s?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:o}=this.beans;if(!o?.active||e||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(o.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 os(e,this.rowNode,this.beans,this)}isCorrectCtrlForSpan(e){return!this.beans.rowSpanSvc?.isCellSpanning(e.column,this.rowNode)}createCellCtrls(e,t,o=null){const i={list:[],map:{}},r=(d,c,u)=>{u!=null?i.list.splice(u,0,c):i.list.push(c),i.map[d]=c},s=[];for(const d of t){const c=d.getInstanceId();let u=e.map[c];u&&!this.isCorrectCtrlForSpan(u)&&(u.destroy(),u=void 0),u||(u=this.getNewCellCtrl(d)),u&&r(c,u)}for(const d of e.list){const c=d.column.getInstanceId();if(i.map[c]!=null)continue;!this.isCellEligibleToBeRemoved(d,o)?s.push([c,d]):d.destroy()}if(s.length)for(const[d,c]of s){const u=i.list.findIndex(p=>p.column.getLeft()>c.column.getLeft()),g=u===-1?void 0:Math.max(u-1,0);r(d,c,g)}const{focusSvc:n,visibleCols:a}=this.beans,l=n.getFocusedCell();if(l&&l.column.getPinned()==o){const d=l.column.getInstanceId();if(!i.map[d]&&a.allCols.includes(l.column)){const u=this.createFocusedCellCtrl();if(u){const g=i.list.findIndex(f=>f.column.getLeft()>u.column.getLeft()),p=g===-1?void 0:Math.max(g-1,0);r(d,u,p)}}}return i}createFocusedCellCtrl(){const{focusSvc:e,rowSpanSvc:t}=this.beans,o=e.getFocusedCell();if(!o)return;const i=t?.getCellSpan(o.column,this.rowNode);if(i){if(i.firstNode!==this.rowNode||!i.doesSpanContain(o))return}else if(!e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned))return;return this.getNewCellCtrl(o.column)}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const o=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(o,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(){const 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{const o=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,o);const i=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,i,"left");const r=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,r,"right")}}isCellEligibleToBeRemoved(e,t){const{column:r}=e;if(r.getPinned()!=t||!this.isCorrectCtrlForSpan(e))return!0;const{editing:s}=e,{visibleCols:n}=this.beans,a=e.isCellFocused();return s||a?!(n.allCols.indexOf(r)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Ke(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=q(this.rowNode.oldRowTop),{visibleCols:o}=this.beans,i=o.isPinningLeft(),r=o.isPinningRight();if(t){const{slideInAnimation:s}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){s.fullWidth=!0;return}s.center=!0,s.left=i,s.right=r}else{const{fadeInAnimation:s}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){s.fullWidth=!0;return}s.center=!0,s.left=i,s.right=r}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(n,a)=>n?n.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(n.element,a).params):!0,t=e(this.fullWidthGui,null),o=e(this.centerGui,null),i=e(this.leftGui,"left"),r=e(this.rightGui,"right");return t&&o&&i&&r}addListeners(){this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...this.beans.expansionSvc?.getRowExpandedListeners(this)??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.beans.rowSpanSvc&&this.addManagedListeners(this.beans.rowSpanSvc,{spannedCellsUpdated:({pinned:e})=>{e&&!this.rowNode.rowPinned||this.updateColumnLists()}}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(t=>{this.addRowDraggerToRow(t)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(o=>o.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(o=>{this.setRowCompRowId(o.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(o.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const o=e==="Above",i=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",o),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",i)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){this.updateColumnLists(!0),this.beans.rowAutoHeight?.requestCheckAutoHeight()}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:et(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}onKeyboardNavigate(e){const t=this.findFullWidthInfoForEvent(e);if(!t)return;const{rowGui:o,column:i}=t;if(!(o.element===e.target))return;const n=this.rowNode,{focusSvc:a,navigation:l}=this.beans,d=a.getFocusedCell(),c={rowIndex:n.rowIndex,rowPinned:n.rowPinned,column:d?.column??i};l?.navigateToNextCell(e,e.key,c,!0),e.preventDefault()}onTabKeyDown(e){if(e.defaultPrevented||Tt(e))return;const t=this.allRowGuis.find(a=>a.element.contains(e.target)),o=t?t.element:null,i=o===e.target,r=Ee(this.beans);let s=!1;o&&r&&(s=o.contains(r)&&r.classList.contains("ag-cell"));let n=null;!i&&!s&&(n=Ut(this.beans,o,!1,e.shiftKey)),(this.isFullWidth()&&i||!n)&&this.beans.navigation?.onTabKeyDown(this,e)}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){const e=this.allRowGuis.find(t=>ut(t.element))?.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(o=>{ri(o.element,"tabindex",t)})}onFullWidthRowFocused(e){const t=this.rowNode,o=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1;let i;if(this.fullWidthGui)i=this.fullWidthGui.element;else{const s=this.beans.colModel.getCol(e?.column)?.pinned;s?i=s==="right"?this.rightGui?.element:this.leftGui?.element:i=this.centerGui?.element}i&&(i.classList.toggle("ag-full-width-focus",o),o&&e?.forceBrowserFocus&&i.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){const o={list:[],map:{}};return e.list.forEach(i=>{i!==t&&(o.list.push(i),o.map[i.column.getInstanceId()]=i)}),o}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:o}=this;return Z(this.gos,{type:e,node:o,data:o.data,rowIndex:o.rowIndex,rowPinned:o.rowPinned,event:t})}createRowEventWithSource(e,t){const o=this.createRowEvent(e,t);return o.source=this,o}onRowDblClick(e){Tt(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}findFullWidthInfoForEvent(e){if(!e)return;const t=this.findFullWidthRowGui(e.target),o=this.getColumnForFullWidth(t);if(!(!t||!o))return{rowGui:t,column:o}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}getColumnForFullWidth(e){const{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=Io(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:o,focusSvc:i}=this.beans;o?.removeAllCellRanges();const r=this.findFullWidthInfoForEvent(e);if(!r)return;const{rowGui:s,column:n}=r,a=s.element,l=e.target;let d=e.defaultPrevented||Pr();a&&a.contains(l)&&bn(l)&&(d=!1),i.setFocusedCell({rowIndex:t.rowIndex,column:n,rowPinned:t.rowPinned,forceBrowserFocus:d})}onRowClick(e){if(Tt(e)||this.lastMouseDownOnDragger)return;const{eventSvc:o,selectionSvc:i}=this.beans;o.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),i?.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){this.rowType==="FullWidthDetail"&&this.beans.masterDetailSvc?.setupDetailRowAutoHeight(this,e)}createFullWidthCompDetails(e,t){const{gos:o,rowNode:i}=this,r=Z(o,{fullWidth:!0,data:i.data,node:i,value:i.key,valueFormatted:i.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(n,a,l,d)=>this.addFullWidthRowDragging(n,a,l,d),setTooltip:(n,a)=>{o.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(n,a)}}),s=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return Uf(s,r);case"FullWidthGroup":return r.value=i.groupValue,r.valueFormatted=i.rowGroupColumn?this.beans.valueSvc.formatValue(i.rowGroupColumn,i,r.value):r.value,$f(s,r);case"FullWidthLoading":return Wf(s,r);default:return zf(s,r)}}refreshRowTooltip(e,t){this.fullWidthGui&&(this.tooltipFeature=this.beans.tooltipSvc?.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,o="",i){const{rowDragSvc:r,context:s}=this.beans;if(!r||!this.isFullWidth())return;const n=r.createRowDragComp(()=>o,this.rowNode,void 0,e,t,i);this.createBean(n,s),this.addDestroyFunc(()=>{this.destroyBean(n,s)})}onUiLevelChanged(){const e=Cc(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,o="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(i=>{i.rowComp.addOrRemoveCssClass(t,!0),i.rowComp.addOrRemoveCssClass(o,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){const e=[];this.beans.rowStyleSvc?.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(t=>{this.allRowGuis.forEach(o=>o.rowComp.addOrRemoveCssClass(t,!0))})}postProcessRowClassRules(){this.beans.rowStyleSvc?.processRowClassRules(this.rowNode,e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!0))},e=>{this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass(e,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,o=>o.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){const t=this.getPinnedForContainer(e),o=this.isFullWidth(),{rowNode:i,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(i.rowIndex%2===0?"ag-row-even":"ag-row-odd"),i.isRowPinned()&&s.push("ag-row-pinned"),i.isSelected()&&s.push("ag-row-selected"),i.footer&&s.push("ag-row-footer"),s.push("ag-row-level-"+this.rowLevel),i.stub&&s.push("ag-row-loading"),o&&s.push("ag-full-width-row"),r.expansionSvc?.addExpandedCss(s,i),i.dragging&&s.push("ag-row-dragging");const{rowStyleSvc:n}=r;return n&&(n.processClassesFromGridOptions(s,i),n.preProcessRowClassRules(s,i)),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"),o&&(t==="left"&&s.push("ag-cell-last-left-pinned"),t==="right"&&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,t=>{(t===this.centerGui||t===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){this.beans.selectionSvc?.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:o}=e,{rowNode:i,beans:r,gos:s}=this;o.addManagedListeners(t,{mouseenter:()=>i.dispatchRowEvent("mouseEnter"),mouseleave:()=>i.dispatchRowEvent("mouseLeave")}),o.addManagedListeners(i,{mouseEnter:()=>{!r.dragSvc?.dragging&&!s.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),i.setHovered(!0))},mouseLeave:()=>{this.resetHoveredStatus(t)}})}resetHoveredStatus(e){const t=e?[e]:this.allRowGuis.map(o=>o.element);for(const o of t)o.classList.remove("ag-row-hover");this.rowNode.setHovered(!1)}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),o=this.applyPaginationOffset(t.top,!0)-100,i=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(o,e),i)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}isRowRendered(){return this.allRowGuis.length>0}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,o=this.beans.environment.getDefaultRowHeight(),r=Pn(this.gos)?St(this.beans,this.rowNode).height:void 0,s=r?`${Math.min(o,r)-2}px`:void 0;this.forEachGui(e,n=>{n.element.style.height=`${t}px`,s&&n.element.style.setProperty("--ag-line-height",s)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&li(this.gos)&&!t.sticky)if(t.rowTop!=null){const r=this.roundRowTopToBounds(t.rowTop);this.setRowTop(r)}else this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));this.fullWidthGui?.element.contains(Ee(this.beans))&&this.beans.focusSvc.attemptToRecoverFocus(),t.setHovered(!1);const o=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(o),this.beans.eventSvc.dispatchEvent(o),super.destroy()}destroySecondPass(){this.allRowGuis.length=0,this.beans.editSvc?.stopRowEditing(this);const e=t=>(t.list.forEach(o=>o.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,o=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);o!==this.rowFocused&&(this.rowFocused=o,this.setFocusedClasses()),!o&&this.editing&&t?.stopRowEditing(this,!1)}onPaginationChanged(){const e=this.beans.pagination?.getCurrentPage()??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const o=this.beans.pageBounds.getPixelOffset();return e+o*(t?1:-1)}setRowTop(e){if(!this.printLayout&&q(e)){const t=this.applyPaginationOffset(e),r=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(r)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let o;if(t.sticky)o=t.stickyRowTop;else{const i=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,r=this.applyPaginationOffset(i);o=t.isRowPinned()?r:this.beans.rowContainerHeight.getRealPixelPosition(r)}return o+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let o=null;return this.getAllCellCtrls().forEach(i=>{i.column==e&&(o=i)}),o!=null||t||this.getAllCellCtrls().forEach(i=>{i.getColSpanningList().indexOf(e)>=0&&(o=i)}),o}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){const t=this.rowNode.getRowIndexString();if(t===null)return;const o=(this.beans.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.beans.filterManager?.getHeaderRowCount()??0),i=this.rowNode.rowIndex%2===0,r=o+this.rowNode.rowIndex+1;this.forEachGui(e,s=>{s.rowComp.setRowIndex(t),s.rowComp.addOrRemoveCssClass("ag-row-even",i),s.rowComp.addOrRemoveCssClass("ag-row-odd",!i),Ol(s.element,r)})}};function vc(e){return e.altKey||e.ctrlKey||e.metaKey?!1:e.key?.length===1}function wc(e,t,o,i,r){const s=i?i.getColDef().suppressKeyboardEvent:void 0;if(!s)return!1;const n=Z(e,{event:t,editing:r,column:i,node:o,data:o.data,colDef:i.getColDef()});return!!(s&&s(n))}function eC(e){const{pinnedRowModel:t,rowModel:o}=e,[i,r]=[t?.isEmpty("top")??!0,t?.isEmpty("bottom")??!0],s=i?null:"top";let n,a;r?(n=null,a=o.getRowCount()-1):(n="bottom",a=t?.getPinnedBottomRowCount()??-1);const{visibleCols:l,rangeSvc:d}=e,c=l.allCols;!d||!c?.length||d.setCellRange({rowStartIndex:0,rowStartPinned:s,rowEndIndex:a,rowEndPinned:n})}var tC=65,oC=67,iC=86,rC=68,sC=90,nC=89;function aC(e){const{keyCode:t}=e;let o;switch(t){case tC:o=D.A;break;case oC:o=D.C;break;case iC:o=D.V;break;case rC:o=D.D;break;case sC:o=D.Z;break;case nC:o=D.Y;break;default:o=e.code}return o}var lC=class extends E{constructor(e){super(),this.element=e}postConstruct(){this.addKeyboardListeners(),this.addMouseListeners(),this.beans.touchSvc?.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",yd("touchstart")?"touchstart":"mousedown"].forEach(o=>{const i=this.processMouseEvent.bind(this,o);this.addManagedElementListeners(this.element,{[o]:i})})}processMouseEvent(e,t){if(!Xi(this.gos,t)||Tt(t))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(o?.column&&o.dispatchCellContextMenuEvent(t),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(t,void 0,i,o)):(o&&o.onMouseEvent(e,t),i&&i.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:oc(t,e),rowCtrl:Sd(t,e,as)}}processKeyboardEvent(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(o?this.processCellKeyboardEvent(o,e,t):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,t))}processCellKeyboardEvent(e,t,o){const{rowNode:i,column:r,editing:s}=e;!wc(this.gos,o,i,r,s)&&t==="keydown"&&(!s&&this.beans.navigation?.handlePageScrollingKey(o)||e.onKeyDown(o),this.doGridOperations(o,e.editing),vc(o)&&e.processCharacter(o)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(o,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,o){const{rowNode:i}=e,{focusSvc:r,navigation:s}=this.beans,n=r.getFocusedCell(),a=n&&n.column;if(!wc(this.gos,o,i,a,!1)){const d=o.key;if(t==="keydown")switch(d){case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:s?.handlePageScrollingKey(o,!0);break;case D.LEFT:case D.RIGHT:if(!this.gos.get("embedFullWidthRows"))break;case D.UP:case D.DOWN:e.onKeyboardNavigate(o);break;case D.TAB:e.onTabKeyDown(o);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",o))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!Xi(this.gos,e))return;const o=aC(e),{clipboardSvc:i,undoRedo:r}=this.beans;if(o===D.A)return this.onCtrlAndA(e);if(o===D.C)return this.onCtrlAndC(i,e);if(o===D.D)return this.onCtrlAndD(i,e);if(o===D.V)return this.onCtrlAndV(i,e);if(o===D.X)return this.onCtrlAndX(i,e);if(o===D.Y)return this.onCtrlAndY(r);if(o===D.Z)return this.onCtrlAndZ(r,e)}onCtrlAndA(e){const{beans:{rowModel:t,rangeSvc:o,selectionSvc:i},gos:r}=this;o&&Bo(r)&&t.isRowsToRender()?eC(this.beans):i&&i?.selectAllRowNodes({source:"keyboardSelectAll",selectAll:Cd(r)}),e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:o,rowCtrl:i}=this.getControlsForEventTarget(t.target);o?.editing||i?.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e?.redo("ui")}},bc=class extends E{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,o=t!=null?`${t}px`:"";this.eContainer.style.height=o,this.eViewport&&(this.eViewport.style.height=o)}},ls=e=>e.topRowCtrls,ds=e=>e.getStickyTopRowCtrls(),cs=e=>e.getStickyBottomRowCtrls(),us=e=>e.bottomRowCtrls,hs=e=>e.allRowCtrls,oa=e=>e.getCtrls("top"),ia=e=>e.getCtrls("center"),ra=e=>e.getCtrls("bottom"),dC={center:{type:"center",name:"center-cols",getRowCtrls:hs,getSpannedRowCtrls:ia},left:{type:"left",name:"pinned-left-cols",pinnedType:"left",getRowCtrls:hs,getSpannedRowCtrls:ia},right:{type:"right",name:"pinned-right-cols",pinnedType:"right",getRowCtrls:hs,getSpannedRowCtrls:ia},fullWidth:{type:"fullWidth",name:"full-width",fullWidth:!0,getRowCtrls:hs},topCenter:{type:"center",name:"floating-top",getRowCtrls:ls,getSpannedRowCtrls:oa},topLeft:{type:"left",name:"pinned-left-floating",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:ls,getSpannedRowCtrls:oa},topRight:{type:"right",name:"pinned-right-floating",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:ls,getSpannedRowCtrls:oa},topFullWidth:{type:"fullWidth",name:"floating-top-full-width",fullWidth:!0,getRowCtrls:ls},stickyTopCenter:{type:"center",name:"sticky-top",getRowCtrls:ds},stickyTopLeft:{type:"left",name:"pinned-left-sticky-top",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:ds},stickyTopRight:{type:"right",name:"pinned-right-sticky-top",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:ds},stickyTopFullWidth:{type:"fullWidth",name:"sticky-top-full-width",fullWidth:!0,getRowCtrls:ds},stickyBottomCenter:{type:"center",name:"sticky-bottom",getRowCtrls:cs},stickyBottomLeft:{type:"left",name:"pinned-left-sticky-bottom",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:cs},stickyBottomRight:{type:"right",name:"pinned-right-sticky-bottom",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:cs},stickyBottomFullWidth:{type:"fullWidth",name:"sticky-bottom-full-width",fullWidth:!0,getRowCtrls:cs},bottomCenter:{type:"center",name:"floating-bottom",getRowCtrls:us,getSpannedRowCtrls:ra},bottomLeft:{type:"left",name:"pinned-left-floating-bottom",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:us,getSpannedRowCtrls:ra},bottomRight:{type:"right",name:"pinned-right-floating-bottom",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:us,getSpannedRowCtrls:ra},bottomFullWidth:{type:"fullWidth",name:"floating-bottom-full-width",fullWidth:!0,getRowCtrls:us}};function yc(e){return`ag-${Qi(e).name}-viewport`}function gs(e){const t=Qi(e);return t.container??`ag-${t.name}-container`}function cC(e){return`ag-${Qi(e).name}-spanned-cells-container`}function Qi(e){return dC[e]}var uC=["topCenter","topLeft","topRight"],hC=["bottomCenter","bottomLeft","bottomRight"],gC=["center","left","right"],pC=["center","left","right","fullWidth"],fC=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],mC=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],CC=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],Sc=["stickyTopCenter","stickyTopLeft","stickyTopRight"],Rc=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],vC=[...Sc,"stickyTopFullWidth",...Rc,"stickyBottomFullWidth"],wC=[...uC,...hC,...gC,...Sc,...Rc],bC=class extends E{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=Qi(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Xm(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,o,i){this.comp=e,this.eContainer=t,this.eSpannedContainer=o,this.eViewport=i,this.createManagedBean(new lC(this.eViewport??this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:r,rangeSvc:s}=this.beans,n=()=>this.onPinnedWidthChanged();this.forContainers(mC,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r?.createPinnedWidthFeature(!0,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({leftPinnedWidthChanged:n})}),this.forContainers(CC,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r?.createPinnedWidthFeature(!1,this.eContainer,this.eSpannedContainer)),this.addManagedEventListeners({rightPinnedWidthChanged:n})}),this.forContainers(pC,()=>this.createManagedBean(new bc(this.eContainer,this.name==="center"?i:void 0))),s&&this.forContainers(wC,()=>this.createManagedBean(s.createDragListenerFeature(this.eContainer))),this.forContainers(fC,()=>this.createManagedBean(new ea(a=>this.comp.setContainerWidth(`${a}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){const{spannedRowRenderer:e,gos:t}=this.beans;this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:o=>this.onDisplayedRowsChanged(o.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged(),e&&this.options.getSpannedRowCtrls&&t.get("enableCellSpan")&&this.addManagedListeners(e,{spannedRowsUpdated:()=>{const o=this.options.getSpannedRowCtrls(e);o&&this.comp.setSpannedRowCtrls(o,!1)}})}listenOnDomOrder(){if(vC.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const o=this.gos.get("ensureDomOrder"),i=Ke(this.gos,"print");this.comp.setDomOrder(o||i)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=o=>{e.dragging&&o.cancelable&&o.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),o=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,o,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return Li(this.eViewport)}getCenterViewportScrollLeft(){return Tr(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=mo(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return ql(this.eViewport)}getViewportScrollLeft(){return Tr(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||wp(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){Ir(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const o=Ke(this.gos,"print"),r=this.gos.get("embedFullWidthRows")||o,s=t.filter(n=>{const a=n.isFullWidth();return this.options.fullWidth?!r&&a:r||!a});this.comp.setRowCtrls({rowCtrls:s,useFlushSync:e})}},xc="ag-force-vertical-scroll",yC="ag-selectable",SC="ag-column-moving",RC=class extends E{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,o,i,r,s,n){this.comp=e,this.eGridBody=t,this.eBodyViewport=o,this.eTop=i,this.eBottom=r,this.eStickyTop=s,this.eStickyBottom=n,this.eCenterColsViewport=o.querySelector(`.${yc("center")}`),this.eFullWidthContainer=o.querySelector(`.${gs("fullWidth")}`),this.eStickyTopFullWidthContainer=s.querySelector(`.${gs("stickyTopFullWidth")}`),this.eStickyBottomFullWidthContainer=n.querySelector(`.${gs("stickyBottomFullWidth")}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",a=>this.setCellTextSelection(a.currentValue)),this.createManagedBean(new Zn(this.comp)),this.scrollFeature=this.createManagedBean(new qm(this.eBodyViewport)),this.beans.rowDragSvc?.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([i,o,r,s,n]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),this.filterManager?.setupAdvFilterHeaderComp(i),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const o=t&&e.getScrollbarWidth()||0,i=$l()?16:0,r=`calc(100% + ${o+i}px)`;Pt(this.beans,()=>this.comp.setBodyViewportWidth(r)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let o=this.gos.get("treeData");if(!o){const i=t.isPivotMode();o=(e?e.columns.length:0)>=(i?2:1)}this.comp.setGridRootRole(o?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:o=>{const{target:i}=o,r=Io(i,"ag-root",t);t.classList.toggle("ag-has-focus",!r)},focusout:o=>{const{target:i,relatedTarget:r}=o,s=t.contains(r),n=Io(r,"ag-root",t);Io(i,"ag-root",t)||(!s||n)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(SC,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(yC,e)}updateScrollingClasses(){const{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(){const e=(this.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0)+(this.filterManager?.getHeaderRowCount()??0),{rowModel:t}=this.beans,o=t.isLastRowIndexKnown()?t.getRowCount():-1,i=o===-1?-1:e+o;this.comp.setRowCount(i)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?xc:null,o=Ke(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||o&&bp(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let o=t.sizesMeasured;const i=()=>{const r=o&&li(this.gos)&&!e.stretching,s=r?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(s,r)};i(),this.addManagedEventListeners({heightScaleChanged:i}),this.addManagedPropertyListener("animateRows",i),this.addManagedEventListeners({gridStylesChanged:()=>{!o&&t.sizesMeasured&&(o=!0,i())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,o=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:o}),t?.mockBodyContextMenu(this,o),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e;(i||Math.abs(t)>Math.abs(o))&&Xi(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:o,shiftKey:i}=e,r=i||Math.abs(t)>Math.abs(o),s=e.target;r?(this.eStickyTopFullWidthContainer.contains(s)||this.eStickyBottomFullWidthContainer.contains(s))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(o))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:o}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||o})}onBodyViewportContextMenu(e,t,o){if(!e&&!o)return;this.gos.get("preventDefaultOnContextMenu")&&(e||o).preventDefault();const{target:i}=e||t;(i===this.eBodyViewport||i===this.ctrlsSvc.get("center").eViewport)&&this.beans.contextMenuSvc?.showContextMenu({mouseEvent:e,touchEvent:o,value:null,anchorToElement:this.eGridBody,source:"ui"})}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e?.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=e?.getPinnedTopTotalHeight()??0,o=e?.getPinnedBottomTotalHeight()??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(o),this.comp.setTopInvisible(t<=0),this.comp.setBottomInvisible(o<=0),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(this.filterManager?.getHeaderHeight()??0),o=this.pinnedRowModel?.getPinnedTopTotalHeight()??0;let i=0;t>0&&(i+=t),o>0&&(i+=o),i>0&&(i+=1),this.comp.setStickyTopTop(`${i}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:o}=this,i=e?.getPinnedBottomTotalHeight()??0,s=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,n=i+s;o.setStickyBottomBottom(`${n}px`)}},Fc=class extends pe{constructor(e,t){super(),this.direction=t,this.eViewport=V,this.eContainer=V,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",_l()||To())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=$l(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),o=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:o,touchend:o})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Pt(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;rd(()=>ut(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},xC={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"}]},FC=class extends Fc{constructor(){super(xC,"horizontal"),this.eLeftSpacer=V,this.eRightSpacer=V,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const 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 ea(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){if(!this.invisibleScrollbar)return;const e=this.beans.pinnedRowModel?.getPinnedBottomTotalHeight()??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const o=!this.enableRtl&&e,i=this.scrollVisibleSvc.getScrollbarWidth();o&&(t+=i),zt(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=i);let r=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(r+=i),zt(this.eLeftSpacer,r),this.eLeftSpacer.classList.toggle("ag-scroller-corner",r<=i)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,o=this.gos.get("suppressHorizontalScroll"),i=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,s=o?0:i===0&&t?16:i,n=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),Bi(this.getGui(),s),Bi(this.eViewport,s),Bi(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 Tr(this.eViewport,this.enableRtl)}setScrollPosition(e){ut(this.eViewport)||this.attemptSettingScrollPosition(e),Ir(this.eViewport,e,this.enableRtl)}},DC={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:FC},kC={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"}]}]},MC=class extends Fc{constructor(){super(kC,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new bc(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,o=this.invisibleScrollbar,i=t&&e.getScrollbarWidth()||0,r=i===0&&o?16:i;this.addOrRemoveCssClass("ag-scrollbar-invisible",o),zt(this.getGui(),r),zt(this.eViewport,r),zt(this.eContainer,r),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const o=e.getGridBodyCtrl().eBodyViewport,i=this.getScrollPosition(),r=o.scrollTop;i!=r&&this.setScrollPosition(r,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!ut(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},PC={selector:"AG-FAKE-VERTICAL-SCROLL",component:MC};function EC(e){return e.cols?e.cols.treeDepth+1:-1}function jt(e){return e.ctrlsSvc.getHeaderRowContainerCtrl()?.getRowCount()??0}function sa(e){const t=[],o=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const i of o){if(!i)continue;const r=i.getGroupRowCount()||0;for(let s=0;s<r;s++){const n=i.getGroupRowCtrlAtIndex(s),a=t[s];if(n){const l=AC(e,n);(a==null||l>a)&&(t[s]=l)}}}return t}function AC(e,t){let i=e.colModel.isPivotMode()?IC(e):kc(e);const r=t.getHeaderCellCtrls();for(const s of r){const{column:n}=s,a=n.getAutoHeaderHeight();a!=null&&a>i&&n.isAutoHeaderHeight()&&(i=a)}return i}function na(e){let o=e.colModel.isPivotMode()?TC(e):ps(e);return e.colModel.forAllCols(i=>{const r=i.getAutoHeaderHeight();r!=null&&r>o&&i.isAutoHeaderHeight()&&(o=r)}),o}function ps(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function Dc(e){return e.gos.get("floatingFiltersHeight")??ps(e)}function kc(e){return e.gos.get("groupHeaderHeight")??ps(e)}function TC(e){return e.gos.get("pivotHeaderHeight")??ps(e)}function IC(e){return e.gos.get("pivotGroupHeaderHeight")??kc(e)}var LC=class extends E{setComp(e,t,o){this.comp=e,this.eGui=t;const{beans:i}=this,{headerNavigation:r,touchSvc:s,ctrlsSvc:n}=i;r&&this.createManagedBean(new gi(o,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,i),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,i)}),this.onPivotModeChanged(i),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),s?.mockHeaderContextMenu(this,a),n.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Pt(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){const{beans:e}=this;let t=0;const o=sa(e).reduce((s,n)=>s+n,0),i=na(e);if(e.filterManager?.hasFloatingFilters()&&(t+=Dc(e)),t+=o,t+=i,this.headerHeight===t)return;this.headerHeight=t;const r=`${t+1}px`;this.comp.setHeightAndMinHeight(r),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const o=e.visibleCols.allCols.some(i=>i.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",o)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),o=e.shiftKey,i=o!==t?"LEFT":"RIGHT",{beans:r}=this,{headerNavigation:s,focusSvc:n}=r;(s.navigateHorizontally(i,!0,e)||!o&&n.focusOverlay(!1)||zo(r,o,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:o}=this.beans;switch(e.key){case D.LEFT:t="LEFT";case D.RIGHT:{q(t)||(t="RIGHT"),o.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case D.UP:t="UP";case D.DOWN:{q(t)||(t="DOWN"),o.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:o,beans:i}=this;!t&&o.contains(Ee(i))||o.contains(t)||(i.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,o){const{menuSvc:i,ctrlsSvc:r}=this.beans;if(!e&&!o||!i?.isHeaderContextMenuEnabled())return;const{target:s}=e??t;(s===this.eGui||s===r.getHeaderRowContainerCtrl()?.eViewport)&&i.showHeaderContextMenu(void 0,e,o)}},aa=class extends pe{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},GC={tag:"div",cls:"ag-header-cell",role:"columnheader",children:[{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"},{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"}]},BC=class extends aa{constructor(e){super(GC,e),this.eResize=V,this.eHeaderCompWrapper=V,this.headerCompVersion=0}postConstruct(){const e=this.getGui();((r,s)=>{s!=null&&s!=""?e.setAttribute(r,s):e.removeAttribute(r)})("col-id",this.ctrl.column.getColId());const o={setWidth:r=>e.style.width=r,addOrRemoveCssClass:(r,s)=>this.addOrRemoveCssClass(r,s),setUserStyles:r=>Gi(e,r),setAriaSort:r=>r?cp(e,r):up(e),setUserCompDetails:r=>this.setUserCompDetails(r),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(o,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const i=this.ctrl.getSelectAllGui();i&&this.eResize.insertAdjacentElement("afterend",i)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(e){this.headerCompVersion++;const t=this.headerCompVersion;e.newAgStackInstance().then(o=>this.afterCompCreated(t,o))}afterCompCreated(e,t){if(e!=this.headerCompVersion||!this.isAlive()){this.destroyBean(t);return}this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},OC={tag:"div",cls:"ag-header-group-cell",role:"columnheader",children:[{tag:"div",ref:"eHeaderCompWrapper",cls:"ag-header-cell-comp-wrapper",role:"presentation"},{tag:"div",ref:"eResize",cls:"ag-header-cell-resize",role:"presentation"}]},NC=class extends aa{constructor(e){super(OC,e),this.eResize=V,this.eHeaderCompWrapper=V}postConstruct(){const e=this.getGui(),t=(i,r)=>r!=null?e.setAttribute(i,r):e.removeAttribute(i);e.setAttribute("col-id",this.ctrl.column.getUniqueId());const o={addOrRemoveCssClass:(i,r)=>this.addOrRemoveCssClass(i,r),setUserStyles:i=>Gi(e,i),setHeaderWrapperHidden:i=>{i?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:i=>{i!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${i}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",i!=null)},setResizableDisplayed:i=>ge(this.eResize,i),setWidth:i=>e.style.width=i,setAriaExpanded:i=>t("aria-expanded",i),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(o,e,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(e){e.newAgStackInstance().then(t=>this.afterHeaderCompCreated(t))}afterHeaderCompCreated(e){const t=()=>this.destroyBean(e);if(!this.isAlive()){t();return}const o=this.getGui(),i=e.getGui();this.eHeaderCompWrapper.appendChild(i),this.addDestroyFunc(t),this.headerGroupComp=e,this.ctrl.setDragSource(o)}addOrRemoveHeaderWrapperStyle(e,t){const{eHeaderCompWrapper:o}=this;t?o.style.setProperty(e,t):o.style.removeProperty(e)}},HC={tag:"div",cls:"ag-header-cell ag-floating-filter",role:"gridcell",children:[{tag:"div",ref:"eFloatingFilterBody",role:"presentation"},{tag:"div",ref:"eButtonWrapper",cls:"ag-floating-filter-button ag-hidden",role:"presentation",children:[{tag:"button",ref:"eButtonShowMainFilter",cls:"ag-button ag-floating-filter-button-button",attrs:{type:"button",tabindex:"-1"}}]}]},VC=class extends aa{constructor(e){super(HC,e),this.eFloatingFilterBody=V,this.eButtonWrapper=V,this.eButtonShowMainFilter=V}postConstruct(){const e=this.getGui(),t={addOrRemoveCssClass:(o,i)=>this.addOrRemoveCssClass(o,i),setUserStyles:o=>Gi(e,o),addOrRemoveBodyCssClass:(o,i)=>this.eFloatingFilterBody.classList.toggle(o,i),setButtonWrapperDisplayed:o=>ge(this.eButtonWrapper,o),setCompDetails:o=>this.setCompDetails(o),getFloatingFilterComp:()=>this.compPromise,setWidth:o=>e.style.width=o,setMenuIcon:o=>this.eButtonShowMainFilter.appendChild(o)};this.ctrl.setComp(t,e,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(e){if(!e){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=e.newAgStackInstance(),this.compPromise.then(t=>this.afterCompCreated(t))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(e){if(e){if(!this.isAlive()){this.destroyBean(e);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()}}},_C=class extends pe{constructor(e){super({tag:"div",cls:e.headerRowClass,role:"row"}),this.ctrl=e,this.headerComps={}}postConstruct(){Ol(this.getGui(),this.ctrl.getAriaRowIndex());const e={setHeight:t=>this.getGui().style.height=t,setTop:t=>this.getGui().style.top=t,setHeaderCtrls:(t,o)=>this.setHeaderCtrls(t,o),setWidth:t=>this.getGui().style.width=t};this.ctrl.setComp(e,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(e,t){if(!this.isAlive())return;const o=this.headerComps;if(this.headerComps={},e.forEach(i=>{const r=i.instanceId;let s=o[r];delete o[r],s==null&&(s=this.createHeaderComp(i),this.getGui().appendChild(s.getGui())),this.headerComps[r]=s}),Object.values(o).forEach(i=>{this.getGui().removeChild(i.getGui()),this.destroyBean(i)}),t){const i=Object.values(this.headerComps);i.sort((s,n)=>{const a=s.getCtrl().column.getLeft(),l=n.getCtrl().column.getLeft();return a-l});const r=i.map(s=>s.getGui());Ql(this.getGui(),r)}}createHeaderComp(e){let t;switch(this.ctrl.type){case"group":t=new NC(e);break;case"filter":t=new VC(e);break;default:t=new BC(e);break}return this.createBean(t),t.setParentComponent(this),t}},la=class extends E{constructor(e,t,o,i){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=i,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=o}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Ce(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,o=e.get("suppressColumnMoveAnimation"),i=q(this.columnOrGroup.getOldLeft());t?.isActive()&&i&&!o?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),o=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=o,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===o&&this.setLeft(o)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:o,visibleCols:i}=this.beans;if(!Ke(o,"print")||e.getPinned()==="left")return t;const s=i.getColsLeftWidth();if(e.getPinned()==="right"){const n=i.bodyWidth;return s+n+t}return s+t}setLeft(e){if(q(e)&&(this.eCell.style.left=`${e}px`),Ie(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&dp(this.ariaEl,t.length)}}},zC=0,Mc="headerCtrl",da=class extends E{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+zC++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:o}=this.beans.focusSvc.focusedHeader,i=o.getDefinition(),r=i&&i.suppressHeaderKeyboardEvent;if(!q(r))return!1;const s=Z(this.gos,{colDef:i,column:o,headerRowIndex:t,event:e});return!!r(s)}getWrapperHasFocus(){return Ee(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(){const e=this.column.getDefinition();if(!e)return;const{headerStyle:t}=e;let o;if(typeof t=="function"){const i=this.getHeaderClassParams();o=t(i)}else o=t;o&&this.comp.setUserStyles(o)}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:o,compBean:i}=e,{beans:r}=this,s=u=>{if(!this.isAlive()||!i.isAlive())return;const{paddingTop:g,paddingBottom:p,borderBottomWidth:f,borderTopWidth:m}=ii(this.eGui),C=g+p+f+m,y=t.offsetHeight+C;if(u<5){const b=Te(r),x=!b||!b.contains(t),M=y==0;if(x||M){Fn(()=>s(u+1),"raf",r);return}}this.setColHeaderHeight(this.column,y)};let n=!1,a;const l=()=>{const u=this.column.isAutoHeaderHeight();u&&!n&&d(),!u&&n&&c()},d=()=>{n=!0,s(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=mo(this.beans,t,()=>s(0))},c=()=>{n=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),i.addDestroyFunc(()=>c()),i.addManagedListeners(this.column,{widthChanged:()=>n&&s(0)}),i.addManagedEventListeners({sortChanged:()=>{n&&window.setTimeout(()=>s(0))}}),o&&o(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:o,eGui:i}=this;!e||!t||!i||(Jd(e,t,o.visibleCols),Nl(i,o.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=_o(this.beans);this.eGui&&ri(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){const t=Ee(this.beans),o=e.key===D.LEFT||e.key===D.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||o)&&(e.preventDefault(),e.stopImmediatePropagation()),!o))return;const r=e.key===D.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const s=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(s,e.shiftKey),this.resizeFeature?.toggleColumnResizing(!0)}else this.moveHeader(r)}moveHeader(e){this.beans.colMoves?.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:o}=this.beans;return o?o.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:o}=this;let i=e.key===D.LEFT!==t.get("enableRtl");const r=o.getPinned(),s=t.get("enableRtl");return r&&s!==(r==="right")&&(i=!i),(i?-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){const t=this.getWrapperHasFocus();switch(e.key){case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=Mc,{eGui:o,gos:i}=this;ni(i,o,t,this),e.addDestroyFunc(()=>ni(i,o,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){this.dragSource&&(this.beans.dragAndDrop?.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,o){const i=e??t,{menuSvc:r,gos:s}=this.beans;s.get("preventDefaultOnContextMenu")&&i.preventDefault(),r?.isHeaderContextMenuEnabled(o)&&r.showHeaderContextMenu(o,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",o)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:o}=this;e.isColumn?o.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):o.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}},WC=class extends da{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,o,i,r){this.comp=e;const{rowCtrl:s,column:n,beans:a}=this,{colResize:l,context:d,colHover:c,rangeSvc:u}=a,g=Yi(this,d,r);this.setGui(t,g),this.updateState(),this.setupWidth(g),this.setupMovingCss(g),this.setupMenuClass(g),this.setupSortableClass(g),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:i,checkMeasuringCallback:f=>this.setRefreshFunction("measuring",f),compBean:g}),this.addColumnHoverListener(g),this.setupFilterClass(g),this.setupStylesFromColDef(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(g),this.setupSelectAll(g),this.setupUserComp(),this.refreshAria(),l?this.resizeFeature=g.createManagedBean(l.createResizeFeature(s.pinned,n,o,e,this)):ge(o,!1),c?.createHoverFeature(g,[n],t),u?.createRangeHighlightFeature(g,n,e),g.createManagedBean(new la(n,t,a)),g.createManagedBean(new gi(t,{shouldStopEventPropagation:f=>this.shouldStopEventPropagation(f),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(g),g.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader","enableAdvancedFilter"],()=>this.refresh()),g.addManagedListeners(n,{colDefChanged:()=>this.refresh()}),g.addManagedListeners(n,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const p=()=>this.checkDisplayName();g.addManagedEventListeners({columnValueChanged:p,columnRowGroupChanged:p,columnPivotChanged:p,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),g.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(){const{column:e,beans:t}=this,o=e.colDef;return Z(t.gos,{colDef:o,column:e,floatingFilter:!1})}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return Nf(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:o,gos:i}=this.beans;return Z(i,{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!e?.isHeaderFilterButtonEnabled(this.column),enableFilterIcon:!!o&&(!this.openFilterEnabled||We(this.gos)),showColumnMenu:(s,n)=>{e?.showColumnMenu({column:this.column,buttonElement:s,positionBy:"button",onClosedCallback:n})},showColumnMenuAfterMouseClick:(s,n)=>{e?.showColumnMenu({column:this.column,mouseEvent:s,positionBy:"mouse",onClosedCallback:n})},showFilter:s=>{e?.showFilterMenu({column:this.column,buttonElement:s,containerType:"columnFilter",positionBy:"button"})},progressSort:s=>{t?.progressSort(this.column,!!s,"uiColumnSorted")},setSort:(s,n)=>{t?.setSortForColumn(this.column,s,!!n,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(s,n)=>{i.assertModuleRegistered("Tooltip",3),this.setupTooltip(s,n)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){return this.selectAllFeature?.getCheckboxGui()}handleKeyDown(e){super.handleKeyDown(e),e.key===D.SPACE&&this.selectAllFeature?.onSpaceKeyDown(e),e.key===D.ENTER&&this.onEnterKeyDown(e),e.key===D.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&this.beans.sortSvc?.progressSort(this.column,e.shiftKey,"uiColumnSorted")}showMenuOnKeyPress(e,t){const o=this.comp.getUserCompInstance();Pc(o)&&o.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),tc()&&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(){const e=()=>{const t=this.column.getColDef(),o=Qd(t,this.gos,this.column,null),i=this.userHeaderClasses;this.userHeaderClasses=new Set(o),o.forEach(r=>{i.has(r)?i.delete(r):this.comp.addOrRemoveCssClass(r,!0)}),i.forEach(r=>this.comp.addOrRemoveCssClass(r,!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(){const{menuSvc:e}=this.beans;this.menuEnabled=!!e?.isColumnMenuInHeaderEnabled(this.column),this.openFilterEnabled=!!e?.isFilterMenuInHeaderEnabled(this.column),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const o=this.column.getActualWidth();this.comp.setWidth(`${o}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp?.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const o=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",o),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,o=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",o)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:o,beans:i}=this,r=sa(this.beans),s=r.reduce((c,u)=>c+=u,0)===0;if(o.addOrRemoveCssClass("ag-header-parent-hidden",s),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),o.addOrRemoveCssClass("ag-header-span-height",!1),o.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:n,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();o.addOrRemoveCssClass("ag-header-span-height",n>0);const l=na(i);if(n===0){o.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}o.addOrRemoveCssClass("ag-header-span-total",a);let d=0;for(let c=0;c<n;c++)d+=r[r.length-1-c];e.style.setProperty("top",`${-d}px`),e.style.setProperty("height",`${l+d}px`)}refreshAriaSort(){if(this.sortable){const e=this.getLocaleTextFunc(),t=this.beans.sortSvc?.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(ep(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort"))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)}refreshAriaMenu(){if(this.menuEnabled){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press ALT DOWN to open column menu"))}else this.setAriaDescriptionProperty("menu",null)}refreshAriaFilterButton(){if(this.openFilterEnabled&&!We(this.gos)){const e=this.getLocaleTextFunc();this.setAriaDescriptionProperty("filterButton",e("ariaFilterColumn","Press CTRL ENTER to open filter"))}else this.setAriaDescriptionProperty("filterButton",null)}refreshAriaFiltered(){const e=this.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)}setAriaDescriptionProperty(e,t){t!=null?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)}announceAriaDescription(){if(!this.eGui.contains(Ee(this.beans)))return;const e=Array.from(this.ariaDescriptionProperties.keys()).sort((t,o)=>t==="filter"?-1:o.charCodeAt(0)-t.charCodeAt(0)).map(t=>this.ariaDescriptionProperties.get(t)).join(". ");this.beans.ariaAnnounce?.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){this.beans.colHover?.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=r=>this.handleMouseOverChange(r.type==="mouseenter"),o=()=>{this.setActiveHeader(!0),this.dispatchColumnMouseEvent("columnHeaderClicked",this.column)},i=r=>this.handleContextMenuMouseEvent(r,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return Pc(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Pc(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var $C=0,ca=class extends E{constructor(e,t,o){super(),this.rowIndex=e,this.pinned=t,this.type=o,this.instanceId=$C++,this.allCtrls=[];const i=o=="group"?"ag-header-row-column-group":o=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${i}`}postConstruct(){this.isPrintLayout=Ke(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.allCtrls.every(e=>e.eGui!=null):!1}setComp(e,t,o=!0){this.comp=e,t=Yi(this,this.beans.context,t),o&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this),o=this.onDisplayedColumnsChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:o,virtualColumnsChanged:i=>this.onVirtualColumnsChanged(i.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",o),e.addManagedPropertyListener("ensureDomOrder",i=>this.isEnsureDomOrder=i.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}onDisplayedColumnsChanged(){this.isPrintLayout=Ke(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],o=sa(this.beans),i=na(this.beans);t.push(...o),t.push(i),e?.hasFloatingFilters()&&t.push(Dc(this.beans));let r=0;for(let n=0;n<this.rowIndex;n++)r+=t[n];const s=t[this.rowIndex];return{topOffset:r,rowHeight:s}}onVirtualColumnsChanged(e=!1){const t=this.getUpdatedHeaderCtrls(),o=this.isEnsureDomOrder||this.isPrintLayout;this.comp.setHeaderCtrls(t,o,e)}getUpdatedHeaderCtrls(){const e=this.ctrlsById;this.ctrlsById=new Map;const t=this.getColumnsInViewport();for(const i of t)this.recycleAndCreateHeaderCtrls(i,this.ctrlsById,e);const o=i=>{const{focusSvc:r,visibleCols:s}=this.beans;return r.isHeaderWrapperFocused(i)?s.isVisible(i.column):!1};if(e)for(const[i,r]of e)o(r)?this.ctrlsById.set(i,r):this.destroyBean(r);return this.allCtrls=Array.from(this.ctrlsById.values()),this.allCtrls}getHeaderCellCtrls(){return this.allCtrls}recycleAndCreateHeaderCtrls(e,t,o){if(e.isEmptyGroup())return;const i=e.getUniqueId();let r;if(o&&(r=o.get(i),o.delete(i)),r&&r.column!=e&&(this.destroyBean(r),r=void 0),r==null)switch(this.type){case"filter":{r=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":r=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:r=this.createBean(new WC(e,this));break}t.set(i,r)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:o}=this.beans;return["left",null,"right"].forEach(i=>{const r=o.getHeadersToRender(i,t);e=e.concat(r)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}focusHeader(e,t){const o=this.allCtrls.find(r=>r.column==e);return o?o.focus(t):!1}destroy(){this.allCtrls=this.destroyBeans(this.allCtrls),this.ctrlsById=void 0,super.destroy()}},UC=class extends E{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:o,ctrlsSvc:i,colModel:r,colMoves:s,filterManager:n}=this.beans;this.setupCenterWidth(),o?.setupHeaderPinnedWidth(this),this.setupDragAndDrop(s,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,n);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;i.register(l,this),r.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:o,filterManager:i}=this.beans;let r=0;const s=t.getFocusHeaderToUseAfterRefresh(),n=()=>{const c=EC(o)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let u=0;u<c;u++){const g=this.createBean(new ca(r++,this.pinned,"group"));this.groupsRowCtrls.push(g)}},a=()=>{const c=r++,u=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==c);(u||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),u&&(this.columnsRowCtrl=this.createBean(new ca(c,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!i?.hasFloatingFilters()&&!this.hidden;const c=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){c();return}const u=r++;if(this.filtersRowCtrl){const g=this.filtersRowCtrl.rowIndex!==u;(!e||g)&&c()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new ca(u,this.pinned,"filter")))};n(),a(),l();const d=this.getAllCtrls();this.comp.setCtrls(d),this.restoreFocusOnHeader(t,s)}getHeaderCtrlForColumn(e){const t=o=>o?.getHeaderCellCtrls().find(i=>i.column===e);if($t(e))return t(this.columnsRowCtrl);if(this.groupsRowCtrls.length!==0)for(let o=0;o<this.groupsRowCtrls.length;o++){const i=t(this.groupsRowCtrls[o]);if(i)return i}}getHtmlElementForColumnHeader(e){return this.getHeaderCtrlForColumn(e)?.eGui??null}getRowType(e){return this.getAllCtrls()[e]?.type}focusHeader(e,t,o){const r=this.getAllCtrls()[e];return r?r.focusHeader(t,o):!1}getGroupRowCount(){return this.groupsRowCtrls.length}getGroupRowCtrlAtIndex(e){return this.groupsRowCtrls[e]}getRowCount(){return this.groupsRowCtrls.length+(this.columnsRowCtrl?1:0)+(this.filtersRowCtrl?1:0)}setHorizontalScroll(e){this.comp.setViewportScrollLeft(e)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}destroy(){this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl),this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl),this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls),super.destroy()}setupDragAndDrop(e,t){const o=e?.createBodyDropTarget(this.pinned,t);o&&this.createManagedBean(o)}restoreFocusOnHeader(e,t){if(!t)return;const{column:o}=t;o.getPinned()==this.pinned&&e.focusHeaderPosition({headerPosition:t})}onGridColumnsChanged(){this.refresh(!0)}onDisplayedColumnsChanged(e){const t=!!e?.hasFloatingFilters()&&!this.hidden;this.includeFloatingFilter!==t&&this.refresh(!0)}setupCenterWidth(){this.pinned==null&&this.createManagedBean(new ea(e=>this.comp.setCenterWidth(`${e}px`),!0))}},jC=class extends E{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:o}=this.beans,i=t&&We(this.gos)?t:o;this.showColumnMenuCommon(i,e,e.containerType,!0)}showHeaderContextMenu(e,t,o){this.activeMenuFactory?.showMenuAfterContextMenuEvent(e,t,o)}hidePopupMenu(){this.beans.contextMenuSvc?.hideActiveMenu(),this.activeMenuFactory?.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!this.activeMenuFactory?.isMenuEnabled(e)&&(We(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){return!e.getColDef().suppressHeaderFilterButton&&!!this.beans.filterManager?.isFilterAllowed(e)}isHeaderContextMenuEnabled(e){return!(e&&$t(e)?e.getColDef():e?.getColGroupDef())?.suppressHeaderContextMenu&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(To()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!We(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){return!!this.beans.filterManager?.isFilterAllowed(e)&&!We(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return We(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,o,i){const{positionBy:r,onClosedCallback:s}=t,n=t.column;if(r==="button"){const{buttonElement:a}=t;e?.showMenuAfterButtonClick(n,a,o,s,i)}else if(r==="mouse"){const{mouseEvent:a}=t;e?.showMenuAfterMouseEvent(n,a,o,s,i)}else if(n){const a=this.beans,l=a.ctrlsSvc;l.getScrollFeature().ensureColumnVisible(n,"auto"),Pt(a,()=>{const d=l.getHeaderRowContainerCtrl(n.getPinned())?.getHeaderCtrlForColumn(n);d&&e?.showMenuAfterButtonClick(n,d.getAnchorElementForMenu(i),o,s,!0)})}}};function fs(e,t,o){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",o))}var Ec=class extends pe{constructor(){super()}},KC={tag:"span",cls:"ag-overlay-loading-center",attrs:{"aria-live":"polite","aria-atomic":"true"}},YC=class extends Ec{init(){const e=et(this.gos.get("overlayLoadingTemplate")?.trim());if(this.setTemplate(e??KC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("loadingOoo","Loading...")})}}},qC={tag:"span",cls:"ag-overlay-no-rows-center"},XC=class extends Ec{init(){const e=et(this.gos.get("overlayNoRowsTemplate")?.trim());if(this.setTemplate(e??qC),!e){const t=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=t("noRowsToShow","No Rows To Show")})}}};function pi(e,t,o){const i=te(e,t,o);if(i){const{className:s}=i;if(typeof s=="string"&&s.indexOf("ag-icon")>-1||typeof s=="object"&&s["ag-icon"])return i}const r=Pe({tag:"span"});return r.appendChild(i),r}function te(e,t,o){let i=null;e==="smallDown"?_(262):e==="smallLeft"?_(263):e==="smallRight"&&_(264);const r=o&&o.getColDef().icons;if(r&&(i=r[e]),t.gos&&!i){const s=t.gos.get("icons");s&&(i=s[e])}if(i){let s;if(typeof i=="function")s=i();else if(typeof i=="string")s=i;else{_(38,{iconName:e});return}if(typeof s=="string")return Lr(s);if(Br(s))return s;_(133,{iconName:e});return}else{const s=t.registry.getIcon(e);return s||t.validation?.validateIcon(e),Pe({tag:"span",cls:`ag-icon ag-icon-${s??e}`,role:"presentation",attrs:{unselectable:"on"}})}}var QC=".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}",ZC={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"}]}]},JC=class extends pe{constructor(){super(),this.dragSource=null,this.eIcon=V,this.eLabel=V,this.eGhost=V,this.registerCSS(QC)}postConstruct(){const e=t=>pi(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(ZC),this.beans.environment.applyThemeClasses(this.eGhost)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:o,dragSource:i,dropIconMap:r,gos:s}=this;ct(o);let n=null;e||(e=i?.getDefaultIconName?i.getDefaultIconName():"notAllowed"),n=r[e],o.classList.toggle("ag-shake-left-to-right",t),!(n===r.hide&&s.get("suppressDragLeaveHidesColumns"))&&n&&o.appendChild(n)}setLabel(e){this.eLabel.textContent=e}},ev=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",tv=class extends pe{constructor(e,t,o){super(t,o),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS(ev)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:o,labelAlignment:i,disabled:r}=this.config;r!=null&&this.setDisabled(r),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),o!=null&&this.setLabelWidth(o),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ct(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(ge(t,!1),Xe(t,"presentation")):(ge(t,!0),Xe(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const o=this.getGui().classList;return o.toggle("ag-label-align-left",e==="left"),o.toggle("ag-label-align-right",e==="right"),o.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(Gr(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return yn(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},Ac=class extends tv{constructor(e,t,o,i){super(e,t,o),this.className=i}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:o}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),o!=null&&this.onValueChange(o),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),o=this.getLabel();o==null||o==""||op(e)!==null?oi(e,""):oi(e,t??"")}setAriaLabel(e){return dt(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 zt(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}};function ov(e){return{tag:"div",role:"presentation",children:[{tag:"div",ref:"eLabel",cls:"ag-input-field-label"},{tag:"div",ref:"eWrapper",cls:"ag-wrapper ag-input-wrapper",role:"presentation",children:[{tag:e,ref:"eInput",cls:"ag-input-field-input"}]}]}}var Tc=class extends Ac{constructor(e,t,o="text",i="input"){super(e,e?.template??ov(i),[],t),this.inputType=o,this.displayFieldTag=i,this.eLabel=V,this.eWrapper=V,this.eInput=V}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:o,className:i}=this;e.classList.add(`${i}-label`),t.classList.add(`${i}-input-wrapper`),o.classList.add(`${i}-input`),this.addCssClass("ag-input-field"),o.id=o.id||`ag-${this.getCompId()}-input`;const{inputName:r,inputWidth:s}=this.config;r!=null&&this.setInputName(r),s!=null&&this.setInputWidth(s),this.addInputListeners(),this.activateTabIndex([o])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return Gr(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return ri(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return dt(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return yn(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)ri(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";ri(this.eInput,"autocomplete",t)}return this}},Ic=class extends Tc{constructor(e,t="ag-checkbox",o="checkbox"){super(e,t,o),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const 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){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const o=this.eInput;o.checked=e,o.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,o){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:o});const i=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:i.id,name:i.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),o=this.selected=e.target.checked;this.refreshSelectedClass(o),this.dispatchChange(o,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},fi={selector:"AG-CHECKBOX",component:Ic},iv=".ag-checkbox-cell{height:100%}",rv={tag:"div",cls:"ag-cell-wrapper ag-checkbox-cell",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},sv=class extends pe{constructor(){super(rv,[fi]),this.eCheckbox=V,this.registerCSS(iv)}init(e){this.refresh(e);const{eCheckbox:t,beans:o}=this,i=t.getInputElement();i.setAttribute("tabindex","-1"),Al(i,"polite"),this.addManagedListeners(i,{click:r=>{if(io(r),t.isDisabled())return;const s=t.getValue();this.onCheckboxChanged(s)},dblclick:r=>{io(r)}}),this.addManagedElementListeners(e.eGridCell,{keydown:r=>{if(r.key===D.SPACE&&!t.isDisabled()){e.eGridCell===Ee(o)&&t.toggle();const s=t.getValue();this.onCheckboxChanged(s),r.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,o=!0;const{value:i,column:r,node:s}=e;if(s.group&&r)if(typeof i=="boolean")t=i;else{const u=r.getColId();u.startsWith(No)?t=i==null||i===""?void 0:i==="true":s.aggData&&s.aggData[u]!==void 0?t=i??void 0:o=!1}else t=i??void 0;const{eCheckbox:n}=this;if(!o){n.setDisplayed(!1);return}n.setValue(t);const a=e.disabled??!r?.isCellEditable(s);n.setDisabled(a);const l=this.getLocaleTextFunc(),d=Vl(l,t),c=a?d:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${d})`;n.setInputAriaLabel(c)}onCheckboxChanged(e){const{eventSvc:t,params:o}=this,{column:i,node:r,value:s}=o,n={column:i,colDef:i.getColDef(),data:r.data,node:r,rowIndex:r.rowIndex,rowPinned:r.rowPinned,value:s};t.dispatchEvent({type:"cellEditingStarted",...n});const a=r.setDataValue(i,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...n,oldValue:s,newValue:e,valueChanged:a}),a||this.updateCheckbox(o)}},nv="ROOT_NODE_ID",av=class extends E{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){return this.rootNode?.allLeafChildren?.map(e=>e.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=nv,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=e?.map((t,o)=>this.createRowNode(t,o))??[]}setImmutableRowData(e,t){const o=_i(this.gos),i=!this.gos.get("suppressMaintainUnsortedOrder"),r=e.changedRowNodes,s=new Set,n=this.rootNode,a=n.allLeafChildren,l=a.length;let d=!1,c=!1,u=!1,g=!1;for(let f=0,m=-1,C=t.length;f<C;f++){const w=t[f];let y=this.getRowNode(o({data:w,level:0}));if(!y)d=!0,y=this.createRowNode(w,-1),r.add(y);else{if(i){const b=y.sourceRowIndex;g||(g=b<=m||d),m=b}y.data!==w&&(u=!0,y.updateData(w),r.update(y))}s.add(y)}const p=[];for(let f=0;f<l;f++){const m=a[f];s.has(m)||(c=!0,m.isSelected()&&p.push(m),this.rowNodeDeleted(m),r.remove(m))}if(d||c||g){const f=new Array(s.size);let m=0;if(!i)for(let w=0;w<l;++w){const y=a[w];s.delete(y)&&(y.sourceRowIndex=m,f[m++]=y)}for(const w of s)w.sourceRowIndex=m,f[m++]=w;n.allLeafChildren=f;const C=n.sibling;C&&(C.allLeafChildren=f),e.rowNodesOrderChanged||(e.rowNodesOrderChanged=g)}(d||c||g||u)&&(this.deselectNodes(p),e.rowDataUpdated=!0)}rowNodeDeleted(e){e.clearRowTopAndRowIndex();const t=e.id,o=this.allNodesMap;o[t]===e&&delete o[t]}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const o={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},i=[],r=_i(this.gos);return this.executeRemove(r,e,o,i),this.executeUpdate(r,e,o,i),this.executeAdd(e,o),this.deselectNodes(i),o}executeAdd(e,t){const o=e.add;if(!o?.length)return;let i=this.rootNode.allLeafChildren,r=i.length;if(typeof e.addIndex=="number"&&(r=this.sanitizeAddIndex(e.addIndex),r>0&&this.gos.get("treeData")&&this.gos.get("getDataPath"))){for(let u=0;u<i.length;u++)if(i[u]?.rowIndex==r-1){r=u+1;break}}const s=o.length,n=t.changedRowNodes,a=new Array(s);for(let c=0;c<s;c++){const u=this.createRowNode(o[c],r+c);n.add(u),a[c]=u}const l=this.rootNode;if(r<i.length){const c=i.slice(0,r),u=i.slice(r,i.length),g=c.length+a.length;for(let p=0,f=u.length;p<f;++p)u[p].sourceRowIndex=g+p;i=[...c,...a,...u],t.rowsInserted=!0}else i=i.concat(a);l.allLeafChildren=i;const d=l.sibling;d&&(d.allLeafChildren=i),t.rowNodeTransaction.add=a}executeRemove(e,t,{changedRowNodes:o,rowNodeTransaction:i},r){const{remove:s}=t;if(!s?.length)return;const n={};s.forEach(d=>{const c=this.lookupRowNode(e,d);c&&(c.isSelected()&&r.push(c),c.clearRowTopAndRowIndex(),n[c.id]=!0,delete this.allNodesMap[c.id],i.remove.push(c),o.remove(c))});const a=this.rootNode;a.allLeafChildren=a.allLeafChildren?.filter(d=>!n[d.id])??null,a.allLeafChildren?.forEach((d,c)=>{d.sourceRowIndex=c});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:o,rowNodeTransaction:i},r){const{update:s}=t;s?.length&&s.forEach(n=>{const a=this.lookupRowNode(e,n);a&&(a.updateData(n),!a.selectable&&a.isSelected()&&r.push(a),i.update.push(a),o.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e?.length?e[0]:null})}deselectNodes(e){const t="rowDataChanged",o=this.beans.selectionSvc,i=e.length>0;i&&o?.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t}),o?.updateGroupsFromChildrenSelections?.(t),i&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t,selectedNodes:o?.getSelectedNodes()??null,serverSideState:null})}sanitizeAddIndex(e){const t=this.rootNode.allLeafChildren?.length??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const o=new Wo(this.beans);return o.parent=this.rootNode,o.level=0,o.group=!1,o.expanded=!1,o.sourceRowIndex=t,o.setDataAndId(e,String(this.nextId)),this.allNodesMap[o.id]&&_(2,{nodeId:o.id}),this.allNodesMap[o.id]=o,this.nextId++,o}lookupRowNode(e,t){let o;if(e){const i=e({data:t,level:0});if(o=this.allNodesMap[i],!o)return ce(4,{id:i}),null}else if(o=this.rootNode?.allLeafChildren?.find(i=>i.data===t),!o)return ce(5,{data:t}),null;return o||null}},Kt=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(Kt||{}),lv={tag:"div",cls:"ag-selection-checkbox",role:"presentation",children:[{tag:"ag-checkbox",ref:"eCheckbox",role:"presentation"}]},dv=class extends pe{constructor(){super(lv,[fi]),this.eCheckbox=V}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:o}=this,i=t.isSelected(),r=Vl(e,i),[s,n]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(s,n);o.setValue(i,!0),o.setInputAriaLabel(`${a} (${r})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:io,click:i=>{io(i),this.beans.selectionSvc?.handleSelectionEvent(i,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:i,previousValue:r})=>{const s=typeof i=="object"?Ln(i):void 0,n=typeof r=="object"?Ln(r):void 0;s!==n&&this.onSelectableChanged()}),Gn(this.gos)||typeof this.getIsVisible()=="function"){const i=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:i}),this.addManagedListeners(this.rowNode,{dataChanged:i,cellChanged:i}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:o,gos:i}=this;let r=t.selectable;const s=this.getIsVisible();if(r)if(typeof s=="function"){const l=o?.callbackParams;if(!e)r=s({...l,node:t,data:t.data});else{const d=e.createColumnFunctionCallbackParams(t);r=s({...l,...d})}}else r=s??!1;const n=i.get("rowSelection");if(n&&typeof n!="string"?!Ln(n):e?.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!r),this.setVisible(!0),this.setDisplayed(!0);return}if(o?.removeHidden){this.setDisplayed(r);return}this.setVisible(r)}getIsVisible(){const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?Go(t):this.column?.getColDef()?.checkboxSelection}},cv=class{constructor(e){this.rowModel=e,this.selectAll=!1,this.rootId=null,this.endId=null,this.cachedRange=[]}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(e){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:e?(this.setRoot(e),e):null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const o=t[0].id===this.rootId,i=t.findIndex(r=>r.id===e.id);if(i>-1){const r=t.slice(0,i),s=t.slice(i+1);return this.setEndRange(e),o?{keep:r,discard:s}:{keep:s,discard:r}}else return{keep:t,discard:[]}}extend(e,t=!1){const o=this.getRoot();if(o==null){const r=this.getRange().slice();return t&&e.depthFirstSearch(s=>!s.group&&r.push(s)),r.push(e),this.setRoot(e),{keep:r,discard:[]}}const i=this.rowModel.getNodesInRangeForSelection(o,e);if(!i)return this.setRoot(e),{keep:[e],discard:[]};if(i.find(r=>r.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const r=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:r}}}},uv=class extends E{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(Ee(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Ic);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),Xe(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:()=>this.showOrHideSelectAll(),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const r=s=>typeof s=="string"||!s||s.mode==="singleRow"?void 0:s.selectAll;r(o)!==r(i)&&this.showOrHideSelectAll()}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(e){this.isAlive()&&this.showOrHideSelectAll(e.source==="uiColumnMoved")}showOrHideSelectAll(e=!1){const t=this.isCheckboxSelection();this.cbSelectAllVisible=t,this.cbSelectAll.setDisplayed(t),t&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel(e)}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,o=this.cbSelectAll,i=t.getSelectAllState(e);o.setValue(i);const r=t.hasNodesToSelect(e);o.setDisabled(!r),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(e=!1){const t=this.getLocaleTextFunc(),{headerCellCtrl:o,cbSelectAll:i,cbSelectAllVisible:r}=this,n=i.getValue()?t("ariaChecked","checked"):t("ariaUnchecked","unchecked"),a=t("ariaRowSelectAll","Press Space to toggle all rows selection");o.setAriaDescriptionProperty("selectAll",r?`${a} (${n})`:null),i.setInputAriaLabel(t("ariaHeaderSelection","Column with Header Selection")),e||o.announceAriaDescription()}checkSelectionType(e){return Oo(this.gos)?!0:(_(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:o}=this.beans;return Et(t)||ht(t)?!0:(_(129,{feature:e,rowModel:o.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let o="uiSelectAll";t==="currentPage"?o="uiSelectAllCurrentPage":t==="filtered"&&(o="uiSelectAllFiltered");const i={source:o,selectAll:t},r=this.beans.selectionSvc;e?r.selectAllRowNodes(i):r.deselectAllRowNodes(i)}isCheckboxSelection(){const{column:e,gos:t,beans:o}=this,i=t.get("rowSelection"),r=e.getColDef(),{headerCheckboxSelection:s}=r;let n=!1;const a=typeof i=="object";if(a){const d=ro(e),c=jr(e);(zi(i)==="autoGroupColumn"&&c||d&&o.selectionColSvc?.isSelectionColumnEnabled())&&(n=zr(i))}else typeof s=="function"?n=s(Z(t,{column:e,colDef:r})):n=!!s;const l=a?"headerCheckbox":"headerCheckboxSelection";return n&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=Cd(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:o}=this.column.getColDef();return t?"currentPage":o?"filtered":"all"}},hv=class extends E{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new cv(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const o=Gn(e);o!==this.isRowSelectable&&(this.isRowSelectable=o,this.updateSelectable())}),this.isRowSelectable=Gn(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new dv}createSelectAllFeature(e){return new uv(e)}isMultiSelect(){return Oo(this.gos)}onRowCtrlSelected(e,t,o){const i=!!e.rowNode.isSelected();e.forEachGui(o,r=>{r.rowComp.addOrRemoveCssClass("ag-row-selected",i);const s=r.element;un(s,i),s.contains(Ee(this.beans))&&t(r)})}announceAriaRowSelection(e){if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(!e.selectable)return;const i=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);this.beans.ariaAnnounce?.announceValue(i,"rowSelection")}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!Wt(this.gos)}updateRowSelectable(e,t){const o=this.isRowSelectable?.(e)??!0;return this.setRowSelectable(e,o,t),o}setRowSelectable(e,t,o){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),o)return;if(Wi(this.gos)){const r=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:r??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){let t=!1,o=!1;if(!e.childrenAfterGroup?.length)return e.selectable?e.__selected:null;for(let i=0;i<e.childrenAfterGroup.length;i++){const r=e.childrenAfterGroup[i];let s=r.isSelected();if(!r.selectable){const n=this.calculateSelectedFromChildren(r);if(n===null)continue;s=n}switch(s){case!0:t=!0;break;case!1:o=!0;break;default:return}}if(!(t&&o))return t?!0:o?!1:e.selectable?e.__selected:null}selectRowNode(e,t,o,i="api"){const r=!e.selectable&&t,s=e.__selected===t;if(r||s)return!1;e.__selected=t,e.dispatchRowEvent("rowSelected");const n=e.sibling;return n&&n.footer&&n.__localEventService&&n.dispatchRowEvent("rowSelected"),this.eventSvc.dispatchEvent({...cc(e,this.gos,"rowSelected"),event:o||null,source:i}),!0}isCellCheckboxSelection(e,t){const o=this.gos.get("rowSelection");if(o&&typeof o!="string"){const i=ro(e)&&Go(o);return e.isColumnFunc(t,i)}else return e.isColumnFunc(t,e.colDef.checkboxSelection)}inferNodeSelections(e,t,o,i){const{gos:r,selectionCtx:s}=this,n=e.isSelected(),a=Wi(r),l=Hp(r),d=Vp(r),c=this.isMultiSelect(),u=i==="rowClicked";if(u&&a&&e.group||u&&!(l||d))return null;if(t&&o&&c){const g=s.getRoot();if(g)if(g.isSelected()){const p=s.isInRange(e)?s.truncate(e):s.extend(e,a);return{deselect:p.discard,select:p.keep,reset:!1}}else{const p=s.extend(e,a);return{select:[],deselect:p.keep,reset:!1}}else return null}else if(t&&c){const g=s.selectAll?this.beans.rowModel.getRow(0):void 0,p=s.getRoot(g),f=s.isInRange(e)?s.truncate(e):s.extend(e,a);return{select:f.keep,deselect:f.discard,reset:s.selectAll||!!(p&&!p.isSelected())}}else{if(o)return s.setRoot(e),u&&n&&!d?null:{node:e,newValue:!n,clearSelection:!c};{s.setRoot(e);const g=_p(r),p=md(r)==="filteredDescendants",f=u&&(!g||!l);if(p&&n===void 0&&Et(r))return{node:e,newValue:!1,clearSelection:!c||f};if(u){const m=n?!g:l;return m===n&&!f||m&&!l||!m&&!d?null:{node:e,newValue:m,clearSelection:!c||f}}return{node:e,newValue:!n,clearSelection:!c||f}}}}},gv=class extends Tc{constructor(e,t="ag-text-field",o="text"){super(e,t,o)}postConstruct(){super.postConstruct(),this.config.allowedCharPattern&&this.preventDisallowedCharacters()}setValue(e,t){const o=this.eInput;return o.value!==e&&(o.value=q(e)?e:""),super.setValue(e,t)}setStartValue(e){this.setValue(e,!0)}preventDisallowedCharacters(){const e=new RegExp(`[${this.config.allowedCharPattern}]`),t=o=>{vc(o)&&o.key&&!e.test(o.key)&&o.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:o=>{const i=o.clipboardData?.getData("text");i&&i.split("").some(r=>!e.test(r))&&o.preventDefault()}})}},ua={selector:"AG-INPUT-TEXT-FIELD",component:gv};function Lc(e,t){return e.toString().padStart(t,"0")}function Gc(e,t=!0,o="-"){if(!e)return null;let i=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(r=>Lc(r,2)).join(o);return t&&(i+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(r=>Lc(r,2)).join(":")),i}function Bc(e){if(!e)return null;const[t,o]=e.split(" ");if(!t)return null;const i=t.split("-").map(u=>parseInt(u,10));if(i.filter(u=>!isNaN(u)).length!==3)return null;const[r,s,n]=i,a=new Date(r,s-1,n);if(a.getFullYear()!==r||a.getMonth()!==s-1||a.getDate()!==n)return null;if(!o||o==="00:00:00")return a;const[l,d,c]=o.split(":").map(u=>parseInt(u,10));return l>=0&&l<24&&a.setHours(l),d>=0&&d<60&&a.setMinutes(d),c>=0&&c<60&&a.setSeconds(c),a}var pv=1e3,fv=1e3,Oc=100,Nc,ms=!1,mv=class extends E{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){return e==="show"?this.tooltipCtrl.getTooltipShowDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipShowDelay"):this.tooltipCtrl.getTooltipHideDelayOverride?.()??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!To()&&(ms?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},Oc):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){const t=e.relatedTarget,o=this.tooltipCtrl.getGui(),i=this.tooltipComp?.getGui();this.isInteractingWithTooltip||o.contains(t)||this.interactionEnabled&&i?.contains(t)||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||ms)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return Date.now()-Nc<pv}setToDoNothing(e){!e&&this.state===2&&this.hideTooltip(),this.onBodyScrollEventCallback&&(this.onBodyScrollEventCallback(),this.onBodyScrollEventCallback=void 0),this.onColumnMovedEventCallback&&(this.onColumnMovedEventCallback(),this.onColumnMovedEventCallback=void 0),this.onDocumentKeyDownCallback&&(this.onDocumentKeyDownCallback(),this.onDocumentKeyDownCallback=void 0),this.clearTimeouts(),this.state=0,this.lastMouseEvent=null}showTooltip(){const e=this.getTooltipValue(),t=this.tooltipCtrl;if(!q(e)||t.shouldDisplayTooltip&&!t.shouldDisplayTooltip()){this.setToDoNothing();return}const o=t.getRowNode?.(),i=Z(this.gos,{location:t.getLocation?.()??"UNKNOWN",colDef:t.getColDef?.(),column:t.getColumn?.(),rowIndex:t.getRowIndex?.(),node:o,data:o?.data,value:e,valueFormatted:t.getValueFormatted?.(),hideTooltipCallback:()=>this.hideTooltip(!0),...t.getAdditionalParams?.()??{}});this.state=2,this.tooltipInstanceCount++;const r=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount);Xf(this.userCompFactory,i)?.newAgStackInstance().then(r)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),Nc=Date.now()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const i=t.getGui();this.tooltipComp=t,i.classList.contains("ag-tooltip")||i.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&i.classList.add("ag-tooltip-animate"),this.interactionEnabled&&i.classList.add("ag-tooltip-interactive");const r=this.getLocaleTextFunc(),s=this.popupSvc?.addPopup({eChild:i,ariaLabel:r("ariaLabelTooltip","Tooltip")});if(s&&(this.tooltipPopupDestroyFunc=s.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const n=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:n,columnMoved:n})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(i,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Te(this.beans),{keydown:n=>{i.contains(n?.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([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(){const e=this.tooltipComp?.getGui(),t=Ee(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){const 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");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,o=this.tooltipTrigger===0?fv:0;window.setTimeout(()=>{e(),this.destroyBean(t)},o),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){ms=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},Oc)}unlockService(){ms=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function Zi(e){return e.get("tooltipShowMode")==="whenTruncated"}function ha(e,t){return Zi(e)?Ji(t):void 0}function Ji(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var Cv=class extends E{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",o=this.ctrl.getGui();o&&(e!=null&&e!=""?o.setAttribute(t,e):o.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new mv(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},vv=class extends pe{constructor(e="default",t=!1){super({tag:"div",cls:`ag-list ag-${e}-list`}),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case D.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const o=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(o)}break;case D.DOWN:case D.UP:e.preventDefault(),this.navigate(t);break;case D.PAGE_DOWN:case D.PAGE_UP:case D.PAGE_HOME:case D.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===D.DOWN;let o;const{itemEls:i,highlightedEl:r}=this;if(!r)o=i[t?0:i.length-1];else{let n=i.indexOf(r)+(t?1:-1);n=Math.min(Math.max(n,0),i.length-1),o=i[n]}this.highlightItem(o)}navigateToPage(e){const{itemEls:t,highlightedEl:o}=this;if(!o||t.length===0)return;const i=t.indexOf(o),r=this.options.length-1,s=t[0].clientHeight,n=Math.floor(this.getGui().clientHeight/s);let a=-1;e===D.PAGE_HOME?a=0:e===D.PAGE_END?a=r:e===D.PAGE_DOWN?a=Math.min(i+n,r):e===D.PAGE_UP&&(a=Math.max(i-n,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:o}=e,i=o||t;return this.options.push({value:t,text:i}),this.renderOption(t,i),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{_t(e)}),this.itemEls=[],this.refreshAriaRole()}refreshAriaRole(){const e=this.getGui();Xe(e,this.options.length===0?"presentation":"listbox")}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");this.refreshAriaRole(),e.forEach((t,o)=>{Bl(t,o+1),Gl(t,e.length)})}renderOption(e,t){const o=Te(this.beans),i=o.createElement("div");Xe(i,"option"),i.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const r=o.createElement("span");i.appendChild(r),r.textContent=t,this.unFocusable||(i.tabIndex=-1),this.itemEls.push(i),this.addManagedListeners(i,{mouseover:()=>this.highlightItem(i),mousedown:s=>{s.preventDefault(),s.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>i,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>r.scrollWidth>r.clientWidth})),this.getGui().appendChild(i)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const o=this.options.findIndex(i=>i.value===e);if(o!==-1){const i=this.options[o];this.value=i.value,this.displayValue=i.text,this.highlightItem(this.itemEls[o]),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();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!ut(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),un(e,!0);const t=this.getGui(),{scrollTop:o,clientHeight:i}=t,{offsetTop:r,offsetHeight:s}=e;(r+s>o+i||r<o)&&e.scrollIntoView({block:"nearest"}),this.unFocusable||e.focus()}clearHighlighted(){const e=this.highlightedEl;!e||!ut(e)||(e.classList.remove(this.activeClass),un(e,!1),this.highlightedEl=null)}fireChangeEvent(){this.dispatchLocalEvent({type:"fieldValueChanged"}),this.fireItemSelected()}fireItemSelected(){this.dispatchLocalEvent({type:"selectedItem"})}},wv=".ag-picker-field-display{flex:1 1 auto}.ag-picker-field{align-items:center;display:flex}.ag-picker-field-icon{border:0;cursor:pointer;display:flex;margin:0;padding:0}.ag-picker-field-wrapper{background-color:var(--ag-picker-button-background-color);border:var(--ag-picker-button-border);border-radius:5px;min-height:max(var(--ag-list-item-height),calc(var(--ag-spacing)*4));overflow:hidden;&:disabled{opacity:.5}&.ag-picker-has-focus,&:focus-within{background-color:var(--ag-picker-button-focus-background-color);border:var(--ag-picker-button-focus-border);box-shadow:var(--ag-focus-shadow)}}",bv={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"}}]}]},yv=class extends Ac{constructor(e){if(super(e,e?.template||bv,e?.agComponents||[],e?.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=V,this.eWrapper=V,this.eDisplayField=V,this.eIcon=V,this.registerCSS(wv),this.ariaRole=e?.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:o,variableWidth:i,minPickerWidth:r,maxPickerWidth:s}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!i,o!=null&&this.setPickerMaxHeight(o),r!=null&&this.setPickerMinWidth(r),s!=null&&this.setPickerMaxWidth(s)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const 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)});const{pickerIcon:o,inputWidth:i}=this.config;if(o){const r=te(o,this.beans);r&&this.eIcon.appendChild(r)}i!=null&&this.setInputWidth(i)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),to(e,!1),this.ariaRole&&Xe(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const 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 D.UP:case D.DOWN:case D.ENTER:case D.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case D.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:o,pickerAriaLabelValue:i,modalPicker:r=!0},maxPickerHeight:s,minPickerWidth:n,maxPickerWidth:a,variableWidth:l,beans:d,eWrapper:c}=this,u={modal:r,eChild:e,closeOnEsc:!0,closedCallback:()=>{const m=Hr(d);this.beforeHidePicker(),m&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(o,i),anchorToElement:c};e.style.position="absolute";const g=d.popupSvc,p=g.addPopup(u);l?(n&&(e.style.minWidth=n),e.style.width=Sn(Ar(c)),a&&(e.style.maxWidth=a)):Gr(e,a??Ar(c));const f=s??`${Er(g.getPopupParent())}px`;return e.style.setProperty("max-height",f),this.alignPickerToComponent(),p.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:o,gos:i},eWrapper:r,pickerComponent:s}=this,n=i.get("enableRtl")?"right":"left";o.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);const 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;const t=this.getAriaElement();to(t,e);const o=this.eWrapper.classList;o.toggle("ag-picker-expanded",e),o.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){this.pickerComponent?.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){this.hideCurrentPicker?.()}setInputWidth(e){return Gr(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},Sv=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",Rv=class extends yv{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(Sv)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Ji(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:o}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),o&&t==null&&(this.eDisplayField.textContent=o),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new vv("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),o=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",o),hp(this.getAriaElement(),t),e.addManagedElementListeners(e.getGui(),{mousedown:i=>{i?.preventDefault()}}),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})},fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){const{key:t}=e;switch(t===D.TAB&&this.hidePicker(),t){case D.ENTER:case D.UP:case D.DOWN:case D.PAGE_UP:case D.PAGE_DOWN:case D.PAGE_HOME:case D.PAGE_END:e.preventDefault(),this.isPickerDisplayed?this.listComponent?.handleKeyDown(e):super.onKeyDown(e);break;case D.ESCAPE:super.onKeyDown(e);break;case D.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){return this.listComponent?.clearOptions(),this.setValue(void 0,!0),this}setValue(e,t,o){const{listComponent:i,config:{placeholder:r},eDisplayField:s,tooltipFeature:n}=this;if(this.value===e||!i)return this;if(o||i.setValue(e,!0),i.getValue()===this.getValue())return this;let l=i.getDisplayValue();return l==null&&r&&(l=r),s.textContent=l,n?.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Cs={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},xv=class extends E{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:o,eBottomGuard:i,focusTrapActive:r,forceFocusOutWhenTabGuardsAreEmpty:s,isFocusableContainer:n,focusInnerElement:a,onFocusIn:l,onFocusOut:d,shouldStopEventPropagation:c,onTabKeyDown:u,handleKeyDown:g,isEmpty:p,eFocusableElement:f}=e;this.comp=t,this.eTopGuard=o,this.eBottomGuard=i,this.providedFocusInnerElement=a,this.eFocusableElement=f,this.focusTrapActive=!!r,this.forceFocusOutWhenTabGuardsAreEmpty=!!s,this.isFocusableContainer=!!n,this.providedFocusIn=l,this.providedFocusOut=d,this.providedShouldStopEventPropagation=c,this.providedOnTabKeyDown=u,this.providedHandleKeyDown=g,this.providedIsEmpty=p}postConstruct(){this.createManagedBean(new gi(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&(this.providedIsEmpty?this.providedIsEmpty():Vo(this.eFocusableElement,".ag-tab-guard").length===0)){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;!(this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t))&&this.forceFocusOutWhenTabGuardsAreEmpty&&this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard)}findNextElementOutsideAndFocus(e){const t=Te(this.beans),o=Vo(t.body,null,!0),i=o.indexOf(e?this.eTopGuard:this.eBottomGuard);if(i===-1)return;let r,s;e?(r=0,s=i):(r=i+1,s=o.length);const n=o.slice(r,s),a=this.gos.get("tabIndex");n.sort((l,d)=>{const c=parseInt(l.getAttribute("tabindex")||"0"),u=parseInt(d.getAttribute("tabindex")||"0");return u===a?1:c===a?-1:c===0?1:u===0?-1:c-u}),n[e?n.length-1:0]?.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const o=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),o&&(o.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Vo(this.eFocusableElement);return this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length?(t[e?t.length-1:0].focus({preventScroll:!0}),!0):!1}getNextFocusableElement(e){return Ut(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const 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}},Hc=class extends E{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:o,eFocusableElement:i}=this,r=[t,o],s={setTabIndex:C=>{r.forEach(w=>C!=null?w.setAttribute("tabindex",C):w.removeAttribute("tabindex"))}};this.addTabGuards(t,o);const{focusTrapActive:n=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}=e;this.tabGuardCtrl=this.createManagedBean(new xv({comp:s,focusTrapActive:n,eTopGuard:t,eBottomGuard:o,eFocusableElement:i,onFocusIn:a,onFocusOut:l,focusInnerElement:d,handleKeyDown:c,onTabKeyDown:u,shouldStopEventPropagation:g,isEmpty:p,forceFocusOutWhenTabGuardsAreEmpty:f,isFocusableContainer:m}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Te(this.beans).createElement("div"),o=e==="top"?Cs.TAB_GUARD_TOP:Cs.TAB_GUARD_BOTTOM;return t.classList.add(Cs.TAB_GUARD,o),Xe(t,"presentation"),t}addTabGuards(e,t){const o=this.eFocusableElement;o.insertAdjacentElement("afterbegin",e),o.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];ct(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,o){Br(t)||(t=t.getGui());const{eBottomGuard:i}=this;i?i.insertAdjacentElement("beforebegin",t):e(t,o)}destroy(){const{eTopGuard:e,eBottomGuard:t}=this;_t(e),_t(t),super.destroy()}},mi=class extends pe{initialiseTabGuard(e){this.tabGuardFeature=this.createManagedBean(new Hc(this)),this.tabGuardFeature.initialiseTabGuard(e)}forceFocusOutOfContainer(e=!1){this.tabGuardFeature.forceFocusOutOfContainer(e)}appendChild(e,t){this.tabGuardFeature.appendChild(super.appendChild.bind(this),e,t)}},Fv=class extends pe{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},Ci=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new eo,this.preventMouseClick=t;const o=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),r=this.onTouchEnd.bind(this);e.addEventListener("touchstart",o,{passive:!0}),e.addEventListener("touchmove",i,{passive:!0}),e.addEventListener("touchend",r,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",o,{passive:!0}),e.removeEventListener("touchmove",i,{passive:!0}),e.removeEventListener("touchend",r,{passive:!1})})}getActiveTouch(e){for(let t=0;t<e.length;t++)if(e[t].identifier===this.touchStart.identifier)return e[t];return null}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}onTouchStart(e){if(this.touching)return;this.touchStart=e.touches[0],this.touching=!0,this.moved=!1;const t=this.touchStart;window.setTimeout(()=>{const o=this.touchStart===t;if(this.touching&&o&&!this.moved){this.moved=!0;const i={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(i)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!ac(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=Date.now();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const o={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(o),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Vc=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.batchFrameworkComps=!1,this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${td}/${this.frameworkName}-data-grid`,Fp(this.baseDocLink)}setInterval(e,t){return new ke(o=>{o(window.setInterval(e,t))})}addEventListener(e,t,o,i){let r={};if(typeof i=="object"?r=i:typeof i=="boolean"&&(r={capture:i}),r.passive==null){const s=Rd(t);s!=null&&(r.passive=s)}e.addEventListener(t,o,r)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function Dv(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var kv=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","rowSpanSvc","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],_c=Object.fromEntries(kv.map((e,t)=>[e,t]));function Mv(e,t){const o=(e.beanName?_c[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,i=(t.beanName?_c[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return o-i}function Pv(e,t){return e?.beanName==="gridDestroySvc"?-1:0}var Ev={tag:"div",cls:"ag-pinned-left-header",role:"rowgroup"},Av={tag:"div",cls:"ag-pinned-right-header",role:"rowgroup"},Tv={tag:"div",cls:"ag-header-viewport",role:"presentation",attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eCenterContainer",cls:"ag-header-container",role:"rowgroup"}]},ga=class extends pe{constructor(e){super(),this.eCenterContainer=V,this.headerRowComps={},this.rowCompsList=[],this.pinned=e}postConstruct(){this.selectAndSetTemplate();const e={setDisplayed:o=>this.setDisplayed(o),setCtrls:o=>this.setCtrls(o),setCenterWidth:o=>this.eCenterContainer.style.width=o,setViewportScrollLeft:o=>this.getGui().scrollLeft=o,setPinnedContainerWidth:o=>{const i=this.getGui();i.style.width=o,i.style.maxWidth=o,i.style.minWidth=o}};this.createManagedBean(new UC(this.pinned)).setComp(e,this.getGui())}selectAndSetTemplate(){const e=this.pinned=="left",t=this.pinned=="right",o=e?Ev:t?Av:Tv;this.setTemplate(o),this.eRowContainer=this.eCenterContainer!==V?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())}setCtrls(e){const t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let o;const i=r=>{const s=r.getGui();s.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(s),o&&Xl(this.eRowContainer,s,o),o=s};e.forEach(r=>{const s=r.instanceId,n=t[s];delete t[s];const a=n||this.createBean(new _C(r));this.headerRowComps[s]=a,this.rowCompsList.push(a),i(a)}),Object.values(t).forEach(r=>this.destroyRowComp(r))}},Iv={tag:"div",cls:"ag-header",role:"presentation"},Lv=class extends pe{constructor(){super(Iv)}postConstruct(){const e={addOrRemoveCssClass:(i,r)=>this.addOrRemoveCssClass(i,r),setHeightAndMinHeight:i=>{this.getGui().style.height=i,this.getGui().style.minHeight=i}};this.createManagedBean(new LC).setComp(e,this.getGui(),this.getFocusableElement());const o=i=>{this.createManagedBean(i),this.appendChild(i)};o(new ga("left")),o(new ga(null)),o(new ga("right"))}},Gv={selector:"AG-HEADER-ROOT",component:Lv},Bv=class extends pe{constructor(e,t,o,i,r){super(),this.cellCtrl=t,this.rendererVersion=0,this.editorVersion=0,this.beans=e,this.column=t.column,this.rowNode=t.rowNode,this.eRow=i;const s=Pe({tag:"div",role:t.getCellAriaRole(),attrs:{"comp-id":`${this.getCompId()}`,"col-id":t.colIdSanitised}});this.eCell=s;let n;t.isCellSpanning()?(n=Pe({tag:"div",cls:"ag-spanned-cell-wrapper",role:"presentation"}),n.appendChild(s),this.setTemplateFromElement(n)):this.setTemplateFromElement(s),this.cellCssClassManager=new $d(()=>s),this.forceWrapper=t.isForceWrapper(),this.refreshWrapper(!1);const a={addOrRemoveCssClass:(l,d)=>this.cellCssClassManager.addOrRemoveCssClass(l,d),setUserStyles:l=>Gi(s,l),getFocusableElement:()=>s,setIncludeSelection:l=>this.includeSelection=l,setIncludeRowDrag:l=>this.includeRowDrag=l,setIncludeDndSource:l=>this.includeDndSource=l,setRenderDetails:(l,d,c)=>this.setRenderDetails(l,d,c),setEditDetails:(l,d,c)=>this.setEditDetails(l,d,c),getCellEditor:()=>this.cellEditor||null,getCellRenderer:()=>this.cellRenderer||null,getParentOfValue:()=>this.getParentOfValue()};t.setComp(a,s,n,this.eCellWrapper,o,r,void 0)}getParentOfValue(){return this.eCellValue??this.eCellWrapper??this.eCell}setRenderDetails(e,t,o){if(this.cellEditor&&!this.cellEditorPopupWrapper)return;this.firstRender=this.firstRender==null;const r=this.refreshWrapper(!1);this.refreshEditStyles(!1),e?!(o||r)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e)):(this.destroyRenderer(),this.insertValueWithoutCellRenderer(t))}setEditDetails(e,t,o){e?this.createCellEditorInstance(e,t,o):this.destroyEditor()}removeControls(){const e=this.beans.context;this.checkboxSelectionComp=e.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=e.destroyBean(this.dndSourceComp),this.rowDraggingComp=e.destroyBean(this.rowDraggingComp)}refreshWrapper(e){const t=this.includeRowDrag||this.includeDndSource||this.includeSelection,o=t||this.forceWrapper,i=o&&this.eCellWrapper==null;i&&(this.eCellWrapper=Pe({tag:"div",cls:"ag-cell-wrapper",role:"presentation"}),this.eCell.appendChild(this.eCellWrapper));const r=!o&&this.eCellWrapper!=null;r&&(_t(this.eCellWrapper),this.eCellWrapper=void 0),this.cellCssClassManager.addOrRemoveCssClass("ag-cell-value",!o);const s=!e&&o,n=s&&this.eCellValue==null;n&&(this.eCellValue=Pe({tag:"span",cls:"ag-cell-value",role:"presentation"}),this.eCellWrapper.appendChild(this.eCellValue));const a=!s&&this.eCellValue!=null;a&&(_t(this.eCellValue),this.eCellValue=void 0);const l=i||r||n||a;return l&&this.removeControls(),!e&&t&&this.addControls(),l}addControls(){const{cellCtrl:e,eCellWrapper:t,eCellValue:o,includeRowDrag:i,includeDndSource:r,includeSelection:s}=this,n=a=>{a&&t.insertBefore(a.getGui(),o)};i&&this.rowDraggingComp==null&&(this.rowDraggingComp=e.createRowDragComp(),n(this.rowDraggingComp)),r&&this.dndSourceComp==null&&(this.dndSourceComp=e.createDndSource(),n(this.dndSourceComp)),s&&this.checkboxSelectionComp==null&&(this.checkboxSelectionComp=e.createSelectionCheckbox(),n(this.checkboxSelectionComp))}createCellEditorInstance(e,t,o){const i=this.editorVersion,r=e.newAgStackInstance(),{params:s}=e;r.then(a=>this.afterCellEditorCreated(i,a,s,t,o)),De(this.cellEditor)&&s.cellStartedEdit&&this.cellCtrl.focusCell(!0)}insertValueWithoutCellRenderer(e){const t=this.getParentOfValue();ct(t);const o=e!=null?Rt(e,!0):null;o!=null&&(t.textContent=o)}destroyRenderer(){const{context:e}=this.beans;this.cellRenderer=e.destroyBean(this.cellRenderer),_t(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++}destroyEditor(){const{context:e}=this.beans;(this.cellEditorPopupWrapper?.getGui().contains(Ee(this.beans))||this.cellCtrl.hasBrowserFocus())&&this.eCell.focus({preventScroll:!0}),this.hideEditorPopup?.(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),_t(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++}refreshCellRenderer(e){if(this.cellRenderer?.refresh==null||this.cellRendererClass!==e.componentClass)return!1;const t=this.cellRenderer.refresh(e.params);return t===!0||t===void 0}createCellRendererInstance(e){const t=this.rendererVersion,{componentClass:o}=e,i=()=>{if(this.rendererVersion!==t||!this.isAlive())return;const n=e.newAgStackInstance(),a=this.afterCellRendererCreated.bind(this,t,o);n?.then(a)},{animationFrameSvc:r}=this.beans;r?.active&&this.firstRender?r.createTask(i,this.rowNode.rowIndex,"p2",e.componentFromFramework):i()}afterCellRendererCreated(e,t,o){if(!this.isAlive()||e!==this.rendererVersion){this.beans.context.destroyBean(o);return}this.cellRenderer=o,this.cellRendererClass=t;const r=o.getGui();if(this.cellRendererGui=r,r!=null){const s=this.getParentOfValue();ct(s),s.appendChild(r)}}afterCellEditorCreated(e,t,o,i,r){const s=e!==this.editorVersion,{context:n}=this.beans;if(s){n.destroyBean(t);return}if(t.isCancelBeforeStart&&t.isCancelBeforeStart()){n.destroyBean(t),this.cellCtrl.stopEditing(!0);return}if(!t.getGui){_(97,{colId:this.column.getId()}),n.destroyBean(t);return}this.cellEditor=t,this.cellEditorGui=t.getGui();const l=i||t.isPopup!==void 0&&t.isPopup();l?this.addPopupCellEditor(o,r):this.addInCellEditor(),this.refreshEditStyles(!0,l),t.afterGuiAttached?.(),this.cellCtrl.cellEditorAttached()}refreshEditStyles(e,t){const{cellCssClassManager:o}=this;o.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),o.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),o.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),this.cellCtrl.setInlineEditingCss()}addInCellEditor(){const{eCell:e}=this;e.contains(Ee(this.beans))&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),ct(this.getParentOfValue()),this.cellEditorGui&&this.getParentOfValue().appendChild(this.cellEditorGui)}addPopupCellEditor(e,t){const{gos:o,context:i,editSvc:r,popupSvc:s,localeSvc:n}=this.beans;o.get("editType")==="fullRow"&&_(98);const a=this.cellEditor;this.cellEditorPopupWrapper=i.createBean(r.createPopupEditorWrapper(e));const l=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&l.appendChild(this.cellEditorGui);const d=o.get("stopEditingWhenCellsLoseFocus"),c=t??a.getPopupPosition?.()??"over",u=o.get("enableRtl"),g={ePopup:l,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.eCell,position:c,alignSide:u?"right":"left",keepWithinBounds:!0},p=s.positionPopupByComponent.bind(s,g),f=ln(n),m=s.addPopup({modal:d,eChild:l,closeOnEsc:!0,closedCallback:()=>{this.cellCtrl.onPopupEditorClosed()},anchorToElement:this.eCell,positionCallback:p,ariaLabel:f("ariaLabelCellEditor","Cell Editor")});m&&(this.hideEditorPopup=m.hideFunc)}detach(){this.eRow.removeChild(this.getGui())}destroy(){this.cellCtrl.stopEditing(),this.destroyRenderer(),this.destroyEditor(),this.removeControls(),super.destroy()}},Ov=class extends pe{constructor(e,t,o){super(),this.cellComps=new Map,this.beans=t,this.rowCtrl=e;const i=Pe({tag:"div",role:"row",attrs:{"comp-id":`${this.getCompId()}`}});this.setInitialStyle(i,o),this.setTemplateFromElement(i);const r=i.style;this.domOrder=this.rowCtrl.getDomOrder();const s={setDomOrder:n=>this.domOrder=n,setCellCtrls:n=>this.setCellCtrls(n),showFullWidth:n=>this.showFullWidth(n),getFullWidthCellRenderer:()=>this.fullWidthCellRenderer,addOrRemoveCssClass:(n,a)=>this.addOrRemoveCssClass(n,a),setUserStyles:n=>Gi(i,n),setTop:n=>r.top=n,setTransform:n=>r.transform=n,setRowIndex:n=>i.setAttribute("row-index",n),setRowId:n=>i.setAttribute("row-id",n),setRowBusinessKey:n=>i.setAttribute("row-business-key",n),refreshFullWidth:n=>this.fullWidthCellRenderer?.refresh?.(n())??!1};e.setComp(s,this.getGui(),o,void 0),this.addDestroyFunc(()=>{e.unsetComp(o)})}setInitialStyle(e,t){const o=this.rowCtrl.getInitialTransform(t);if(o)e.style.setProperty("transform",o);else{const i=this.rowCtrl.getInitialRowTop(t);i&&e.style.setProperty("top",i)}}showFullWidth(e){const t=i=>{if(this.isAlive()){const r=i.getGui();this.getGui().appendChild(r),this.rowCtrl.setupDetailRowAutoHeight(r),this.setFullWidthRowComp(i)}else this.beans.context.destroyBean(i)};e.newAgStackInstance().then(t)}setCellCtrls(e){const t=new Map(this.cellComps);for(const o of e){const i=o.instanceId;this.cellComps.has(i)?t.delete(i):this.newCellComp(o)}this.destroyCells(t),this.ensureDomOrder(e)}ensureDomOrder(e){if(!this.domOrder)return;const t=[];for(const o of e){const i=this.cellComps.get(o.instanceId);i&&t.push(i.getGui())}Ql(this.getGui(),t)}newCellComp(e){const t=new Bv(this.beans,e,this.rowCtrl.printLayout,this.getGui(),this.rowCtrl.editing);this.cellComps.set(e.instanceId,t),this.getGui().appendChild(t.getGui())}destroy(){super.destroy(),this.destroyCells(this.cellComps)}setFullWidthRowComp(e){this.fullWidthCellRenderer=e,this.addDestroyFunc(()=>{this.fullWidthCellRenderer=this.beans.context.destroyBean(this.fullWidthCellRenderer)})}destroyCells(e){for(const t of e.values()){if(!t)return;const o=t.cellCtrl.instanceId;if(this.cellComps.get(o)!==t)return;t.detach(),t.destroy(),this.cellComps.delete(o)}}};function Nv(e,t,o){const i=!!o.gos.get("enableCellSpan")&&!!t.getSpannedRowCtrls,r={tag:"div",ref:"eContainer",cls:gs(e),role:"rowgroup"};if(t.type==="center"||i){const s={tag:"div",ref:"eSpannedContainer",cls:`ag-spanning-container ${cC(e)}`,role:"rowgroup"};return{tag:"div",ref:"eViewport",cls:`ag-viewport ${yc(e)}`,role:"presentation",children:[r,i?s:null]}}return r}var Hv=class extends pe{constructor(e){super(),this.eViewport=V,this.eContainer=V,this.eSpannedContainer=V,this.rowCompsNoSpan={},this.rowCompsWithSpan={},this.name=e?.name,this.options=Qi(this.name)}postConstruct(){this.setTemplate(Nv(this.name,this.options,this.beans));const e={setHorizontalScroll:o=>this.eViewport.scrollLeft=o,setViewportHeight:o=>this.eViewport.style.height=o,setRowCtrls:({rowCtrls:o})=>this.setRowCtrls(o),setSpannedRowCtrls:o=>this.setRowCtrls(o,!0),setDomOrder:o=>{this.domOrder=o},setContainerWidth:o=>{this.eContainer.style.width=o,this.eSpannedContainer&&(this.eSpannedContainer.style.width=o)},setOffsetTop:o=>{const i=`translateY(${o})`;this.eContainer.style.transform=i,this.eSpannedContainer&&(this.eSpannedContainer.style.transform=i)}};this.createManagedBean(new bC(this.name)).setComp(e,this.eContainer,this.eSpannedContainer,this.eViewport)}destroy(){this.setRowCtrls([]),this.setRowCtrls([],!0),super.destroy(),this.lastPlacedElement=null}setRowCtrls(e,t){const{beans:o,options:i}=this,r=t?this.eSpannedContainer:this.eContainer,s=t?{...this.rowCompsWithSpan}:{...this.rowCompsNoSpan},n={};t?this.rowCompsWithSpan=n:this.rowCompsNoSpan=n,this.lastPlacedElement=null;const a=[];for(const l of e){const d=l.instanceId,c=s[d];let u;if(c)u=c,delete s[d];else{if(!l.rowNode.displayed)continue;u=new Ov(l,o,i.type)}n[d]=u,a.push([u,!c])}this.removeOldRows(Object.values(s),r),this.addRowNodes(a,r)}addRowNodes(e,t){const{domOrder:o}=this;for(const[i,r]of e){const s=i.getGui();o?this.ensureDomOrder(s,t):r&&t.appendChild(s)}}removeOldRows(e,t){for(const o of e)t.removeChild(o.getGui()),o.destroy()}ensureDomOrder(e,t){Xl(t,e,this.lastPlacedElement),this.lastPlacedElement=e}},Vv={selector:"AG-ROW-CONTAINER",component:Hv};function er(e,t){return t.map(o=>{const i=`e${o[0].toUpperCase()+o.substring(1)}RowContainer`;return e[i]={name:o},{tag:"ag-row-container",ref:i,attrs:{name:o}}})}function _v(e){const t={},o={tag:"div",ref:"eGridRoot",cls:"ag-root ag-unselectable",children:[{tag:"ag-header-root"},{tag:"div",ref:"eTop",cls:"ag-floating-top",role:"presentation",children:er(t,["topLeft","topCenter","topRight","topFullWidth"])},{tag:"div",ref:"eBody",cls:"ag-body",role:"presentation",children:[{tag:"div",ref:"eBodyViewport",cls:"ag-body-viewport",role:"presentation",children:er(t,["left","center","right","fullWidth"])},{tag:"ag-fake-vertical-scroll"}]},{tag:"div",ref:"eStickyTop",cls:"ag-sticky-top",role:"presentation",children:er(t,["stickyTopLeft","stickyTopCenter","stickyTopRight","stickyTopFullWidth"])},{tag:"div",ref:"eStickyBottom",cls:"ag-sticky-bottom",role:"presentation",children:er(t,["stickyBottomLeft","stickyBottomCenter","stickyBottomRight","stickyBottomFullWidth"])},{tag:"div",ref:"eBottom",cls:"ag-floating-bottom",role:"presentation",children:er(t,["bottomLeft","bottomCenter","bottomRight","bottomFullWidth"])},{tag:"ag-fake-horizontal-scroll"},e?{tag:"ag-overlay-wrapper"}:null]};return{paramsMap:t,elementParams:o}}var zv=class extends pe{constructor(){super(...arguments),this.eGridRoot=V,this.eBodyViewport=V,this.eStickyTop=V,this.eStickyBottom=V,this.eTop=V,this.eBottom=V,this.eBody=V}postConstruct(){const{overlays:e,rangeSvc:t}=this.beans,o=e?.getOverlayWrapperSelector(),{paramsMap:i,elementParams:r}=_v(!!o);this.setTemplate(r,[...o?[o]:[],DC,PC,Gv,Vv],i);const s=(a,l)=>{const d=`${a}px`;l.style.minHeight=d,l.style.height=d},n={setRowAnimationCssOnBodyViewport:(a,l)=>this.setRowAnimationCssOnBodyViewport(a,l),setColumnCount:a=>lp(this.getGui(),a),setRowCount:a=>ap(this.getGui(),a),setTopHeight:a=>s(a,this.eTop),setBottomHeight:a=>s(a,this.eBottom),setTopInvisible:a=>this.eTop.classList.toggle("ag-invisible",a),setBottomInvisible:a=>this.eBottom.classList.toggle("ag-invisible",a),setStickyTopHeight:a=>this.eStickyTop.style.height=a,setStickyTopTop:a=>this.eStickyTop.style.top=a,setStickyTopWidth:a=>this.eStickyTop.style.width=a,setStickyBottomHeight:a=>{this.eStickyBottom.style.height=a,this.eStickyBottom.classList.toggle("ag-invisible",a==="0px")},setStickyBottomBottom:a=>this.eStickyBottom.style.bottom=a,setStickyBottomWidth:a=>this.eStickyBottom.style.width=a,setColumnMovingCss:(a,l)=>this.addOrRemoveCssClass(a,l),updateLayoutClasses:(a,l)=>{const d=[this.eBodyViewport.classList,this.eBody.classList];for(const c of d)c.toggle(Gt.AUTO_HEIGHT,l.autoHeight),c.toggle(Gt.NORMAL,l.normal),c.toggle(Gt.PRINT,l.print);this.addOrRemoveCssClass(Gt.AUTO_HEIGHT,l.autoHeight),this.addOrRemoveCssClass(Gt.NORMAL,l.normal),this.addOrRemoveCssClass(Gt.PRINT,l.print)},setAlwaysVerticalScrollClass:(a,l)=>this.eBodyViewport.classList.toggle(xc,l),registerBodyViewportResizeListener:a=>{const l=mo(this.beans,this.eBodyViewport,a);this.addDestroyFunc(()=>l())},setPinnedTopBottomOverflowY:a=>this.eTop.style.overflowY=this.eBottom.style.overflowY=a,setCellSelectableCss:(a,l)=>{[this.eTop,this.eBodyViewport,this.eBottom].forEach(d=>d.classList.toggle(a,l))},setBodyViewportWidth:a=>this.eBodyViewport.style.width=a,setGridRootRole:a=>Xe(this.eGridRoot,a)};this.ctrl=this.createManagedBean(new RC),this.ctrl.setComp(n,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop,this.eStickyBottom),(t&&Bo(this.gos)||Oo(this.gos))&&np(this.getGui(),!0)}setRowAnimationCssOnBodyViewport(e,t){const o=this.eBodyViewport.classList;o.toggle("ag-row-animation",t),o.toggle("ag-row-no-animation",!t)}},Wv={selector:"AG-GRID-BODY",component:zv},$v=class extends E{constructor(){super(...arguments),this.additionalFocusableContainers=new Set}setComp(e,t,o){this.view=e,this.eGridHostDiv=t,this.eGui=o,this.eGui.setAttribute("grid-id",this.beans.context.getGridId());const{dragAndDrop:i,ctrlsSvc:r}=this.beans;i?.registerGridDropTarget(()=>this.eGui,this),rc(this.gos,t),this.createManagedBean(new Zn(this.view)),this.view.setRtlClass(this.gos.get("enableRtl")?"ag-rtl":"ag-ltr");const s=mo(this.beans,this.eGridHostDiv,this.onGridSizeChanged.bind(this));this.addDestroyFunc(()=>s()),r.register("gridCtrl",this)}isDetailGrid(){return Kn(this.getGui())?.getAttribute("row-id")?.startsWith("detail")||!1}getOptionalSelectors(){const e=this.beans;return{paginationSelector:e.pagination?.getPaginationSelector(),gridHeaderDropZonesSelector:e.registry.getSelector("AG-GRID-HEADER-DROP-ZONES"),sideBarSelector:e.sideBar?.getSelector(),statusBarSelector:e.registry?.getSelector("AG-STATUS-BAR"),watermarkSelector:e.licenseManager?.getWatermarkSelector()}}onGridSizeChanged(){this.eventSvc.dispatchEvent({type:"gridSizeChanged",clientWidth:this.eGridHostDiv.clientWidth,clientHeight:this.eGridHostDiv.clientHeight})}destroyGridUi(){this.view.destroyGridUi()}getGui(){return this.eGui}setResizeCursor(e){this.view.setCursor(e?"ew-resize":null)}disableUserSelect(e){this.view.setUserSelect(e?"none":null)}focusNextInnerContainer(e){const t=this.getFocusableContainers(),{indexWithFocus:o,nextIndex:i}=this.getNextFocusableIndex(t,e);if(i<0||i>=t.length)return!1;if(i===0){if(o>0){const{visibleCols:r,focusSvc:s}=this.beans,n=r.allCols,a=Ce(n);if(s.focusGridView({column:a,backwards:!0}))return!0}return!1}return this.focusContainer(t[i],e)}focusInnerElement(e){const t=this.gos.getCallback("focusGridInnerElement");if(t&&t({fromBottom:!!e}))return!0;const o=this.getFocusableContainers(),{focusSvc:i,visibleCols:r}=this.beans,s=r.allCols;if(e){if(o.length>1)return this.focusContainer(Ce(o),e);const n=Ce(s);if(i.focusGridView({column:n,backwards:e}))return!0}if(this.gos.get("headerHeight")===0||_o(this.beans)){if(i.focusGridView({column:s[0],backwards:e}))return!0;for(let n=1;n<o.length;n++)if(Lt(o[n].getGui(),e))return!0;return!1}return i.focusFirstHeader()}forceFocusOutOfContainer(e=!1){this.view.forceFocusOutOfContainer(e)}addFocusableContainer(e){this.additionalFocusableContainers.add(e)}removeFocusableContainer(e){this.additionalFocusableContainers.delete(e)}allowFocusForNextCoreContainer(e){const t=this.view.getFocusableContainers(),{nextIndex:o,indexWithFocus:i}=this.getNextFocusableIndex(t,e);if(i===-1||o<0||o>=t.length)return;const r=t[o];r.setAllowFocus?.(!0),setTimeout(()=>{r.setAllowFocus?.(!1)})}isFocusable(){const e=this.beans;return!Yn(e)||!_o(e)||!!e.sideBar?.comp?.isDisplayed()}getNextFocusableIndex(e,t){const o=Ee(this.beans),i=e.findIndex(s=>s.getGui().contains(o)),r=i+(t?-1:1);return{indexWithFocus:i,nextIndex:r}}focusContainer(e,t){e.setAllowFocus?.(!0);const o=Lt(e.getGui(),t,!1,!0);return e.setAllowFocus?.(!1),o}getFocusableContainers(){return[...this.view.getFocusableContainers(),...this.additionalFocusableContainers]}destroy(){this.additionalFocusableContainers.clear(),super.destroy()}},Uv=class extends mi{constructor(e){super(),this.gridBody=V,this.sideBar=V,this.pagination=V,this.rootWrapperBody=V,this.eGridDiv=e}postConstruct(){const e={destroyGridUi:()=>this.destroyBean(this),setRtlClass:s=>this.addCssClass(s),forceFocusOutOfContainer:this.forceFocusOutOfContainer.bind(this),updateLayoutClasses:this.updateLayoutClasses.bind(this),getFocusableContainers:this.getFocusableContainers.bind(this),setUserSelect:s=>{this.getGui().style.userSelect=s??"",this.getGui().style.webkitUserSelect=s??""},setCursor:s=>{this.getGui().style.cursor=s??""}},t=this.createManagedBean(new $v),o=t.getOptionalSelectors(),i=this.createTemplate(o),r=[Wv,...Object.values(o).filter(s=>!!s)];this.setTemplate(i,r),t.setComp(e,this.eGridDiv,this.getGui()),this.insertGridIntoDom(),this.initialiseTabGuard({onTabKeyDown:()=>{},focusInnerElement:s=>t.focusInnerElement(s),forceFocusOutWhenTabGuardsAreEmpty:!0,isEmpty:()=>!t.isFocusable()})}insertGridIntoDom(){const e=this.getGui();this.eGridDiv.appendChild(e),this.addDestroyFunc(()=>{this.eGridDiv.removeChild(e),Ni(this.gos,"Grid removed from DOM")})}updateLayoutClasses(e,t){const o=this.rootWrapperBody.classList,{AUTO_HEIGHT:i,NORMAL:r,PRINT:s}=Gt,{autoHeight:n,normal:a,print:l}=t;o.toggle(i,n),o.toggle(r,a),o.toggle(s,l),this.addOrRemoveCssClass(i,n),this.addOrRemoveCssClass(r,a),this.addOrRemoveCssClass(s,l)}createTemplate(e){const t=e.gridHeaderDropZonesSelector?{tag:"ag-grid-header-drop-zones"}:null,o=e.sideBarSelector?{tag:"ag-side-bar",ref:"sideBar"}:null,i=e.statusBarSelector?{tag:"ag-status-bar"}:null,r=e.watermarkSelector?{tag:"ag-watermark"}:null,s=e.paginationSelector?{tag:"ag-pagination",ref:"pagination"}:null;return{tag:"div",cls:"ag-root-wrapper",role:"presentation",children:[t,{tag:"div",ref:"rootWrapperBody",cls:"ag-root-wrapper-body",role:"presentation",children:[{tag:"ag-grid-body",ref:"gridBody"},o]},i,s,r]}}getFocusableElement(){return this.rootWrapperBody}forceFocusOutOfContainer(e=!1){if(!e&&this.pagination?.isDisplayed()){this.pagination.forceFocusOutOfContainer(e);return}super.forceFocusOutOfContainer(e)}getFocusableContainers(){const e=[this.gridBody];return[this.sideBar,this.pagination].forEach(t=>{t&&e.push(t)}),e.filter(t=>ut(t.getGui()))}},oe=(e,t)=>{for(const o of Object.keys(t))t[o]=e;return t},zc={dispatchEvent:"CommunityCore",...oe("CommunityCore",{destroy:0,getGridId:0,getGridOption:0,isDestroyed:0,setGridOption:0,updateGridOptions:0}),...oe("GridState",{getState:0}),...oe("SharedRowSelection",{setNodesSelected:0,selectAll:0,deselectAll:0,selectAllFiltered:0,deselectAllFiltered:0,selectAllOnCurrentPage:0,deselectAllOnCurrentPage:0,getSelectedNodes:0,getSelectedRows:0}),...oe("RowApi",{redrawRows:0,setRowNodeExpanded:0,getRowNode:0,addRenderedRowListener:0,getRenderedNodes:0,forEachNode:0,getFirstDisplayedRowIndex:0,getLastDisplayedRowIndex:0,getDisplayedRowAtIndex:0,getDisplayedRowCount:0}),...oe("ScrollApi",{getVerticalPixelRange:0,getHorizontalPixelRange:0,ensureColumnVisible:0,ensureIndexVisible:0,ensureNodeVisible:0}),...oe("KeyboardNavigation",{getFocusedCell:0,clearFocusedCell:0,setFocusedCell:0,tabToNextCell:0,tabToPreviousCell:0,setFocusedHeader:0}),...oe("EventApi",{addEventListener:0,addGlobalListener:0,removeEventListener:0,removeGlobalListener:0}),...oe("ValueCache",{expireValueCache:0}),...oe("CellApi",{getCellValue:0}),...oe("SharedMenu",{showColumnMenu:0,hidePopupMenu:0}),...oe("Sort",{onSortChanged:0}),...oe("PinnedRow",{getPinnedTopRowCount:0,getPinnedBottomRowCount:0,getPinnedTopRow:0,getPinnedBottomRow:0}),...oe("Overlay",{showLoadingOverlay:0,showNoRowsOverlay:0,hideOverlay:0}),...oe("RenderApi",{setGridAriaProperty:0,refreshCells:0,refreshHeader:0,isAnimationFrameQueueEmpty:0,flushAllAnimationFrames:0,getSizesForCurrentTheme:0,getCellRendererInstances:0}),...oe("HighlightChanges",{flashCells:0}),...oe("RowDrag",{addRowDropZone:0,removeRowDropZone:0,getRowDropZoneParams:0}),...oe("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}),...oe("ColumnAutoSize",{sizeColumnsToFit:0,autoSizeColumns:0,autoSizeAllColumns:0}),...oe("ColumnGroup",{setColumnGroupOpened:0,getColumnGroup:0,getProvidedColumnGroup:0,getDisplayNameForColumnGroup:0,getColumnGroupState:0,setColumnGroupState:0,resetColumnGroupState:0,getLeftDisplayedColumnGroups:0,getCenterDisplayedColumnGroups:0,getRightDisplayedColumnGroups:0,getAllDisplayedColumnGroups:0}),...oe("ColumnMove",{moveColumnByIndex:0,moveColumns:0}),...oe("ColumnResize",{setColumnWidths:0}),...oe("ColumnHover",{isColumnHovered:0}),...oe("EditCore",{getCellEditorInstances:0,getEditingCells:0,stopEditing:0,startEditingCell:0}),...oe("UndoRedoEdit",{undoCellEditing:0,redoCellEditing:0,getCurrentUndoSize:0,getCurrentRedoSize:0}),...oe("FilterCore",{isAnyFilterPresent:0,onFilterChanged:0}),...oe("ColumnFilter",{isColumnFilterPresent:0,getColumnFilterInstance:0,destroyFilter:0,setFilterModel:0,getFilterModel:0,getColumnFilterModel:0,setColumnFilterModel:0,showColumnFilter:0}),...oe("QuickFilter",{isQuickFilterPresent:0,getQuickFilter:0,resetQuickFilter:0}),...oe("Find",{findGetActiveMatch:0,findGetTotalMatches:0,findGoTo:0,findNext:0,findPrevious:0,findGetNumMatches:0,findGetParts:0,findClearActive:0,findRefresh:0}),...oe("Pagination",{paginationIsLastPageFound:0,paginationGetPageSize:0,paginationGetCurrentPage:0,paginationGetTotalPages:0,paginationGetRowCount:0,paginationGoToNextPage:0,paginationGoToPreviousPage:0,paginationGoToFirstPage:0,paginationGoToLastPage:0,paginationGoToPage:0}),...oe("CsrmSsrmSharedApi",{expandAll:0,collapseAll:0,onRowHeightChanged:0}),...oe("SsrmInfiniteSharedApi",{setRowCount:0,getCacheBlockState:0,isLastRowIndexKnown:0}),...oe("ClientSideRowModelApi",{onGroupExpandedOrCollapsed:0,refreshClientSideRowModel:0,isRowDataEmpty:0,forEachLeafNode:0,forEachNodeAfterFilter:0,forEachNodeAfterFilterAndSort:0,resetRowHeights:0,applyTransaction:0,applyTransactionAsync:0,flushAsyncTransactions:0,getBestCostNodeSelection:0}),...oe("CsvExport",{getDataAsCsv:0,exportDataAsCsv:0}),...oe("InfiniteRowModel",{refreshInfiniteCache:0,purgeInfiniteCache:0,getInfiniteRowCount:0}),...oe("AdvancedFilter",{getAdvancedFilterModel:0,setAdvancedFilterModel:0,showAdvancedFilterBuilder:0,hideAdvancedFilterBuilder:0}),...oe("IntegratedCharts",{getChartModels:0,getChartRef:0,getChartImageDataURL:0,downloadChart:0,openChartToolPanel:0,closeChartToolPanel:0,createRangeChart:0,createPivotChart:0,createCrossFilterChart:0,updateChart:0,restoreChart:0}),...oe("Clipboard",{copyToClipboard:0,cutToClipboard:0,copySelectedRowsToClipboard:0,copySelectedRangeToClipboard:0,copySelectedRangeDown:0,pasteFromClipboard:0}),...oe("ExcelExport",{getDataAsExcel:0,exportDataAsExcel:0,getSheetDataForExcel:0,getMultipleSheetsAsExcel:0,exportMultipleSheetsAsExcel:0}),...oe("SharedMasterDetail",{addDetailGridInfo:0,removeDetailGridInfo:0,getDetailGridInfo:0,forEachDetailGridInfo:0}),...oe("ContextMenu",{showContextMenu:0}),...oe("ColumnMenu",{showColumnChooser:0,hideColumnChooser:0}),...oe("CellSelection",{getCellRanges:0,addCellRange:0,clearRangeSelection:0,clearCellSelection:0}),...oe("SharedRowGrouping",{setRowGroupColumns:0,removeRowGroupColumns:0,addRowGroupColumns:0,getRowGroupColumns:0,moveRowGroupColumn:0}),...oe("SharedAggregation",{addAggFuncs:0,clearAggFuncs:0,setColumnAggFunc:0}),...oe("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}),...oe("ServerSideRowModelApi",{getServerSideSelectionState:0,setServerSideSelectionState:0,applyServerSideTransaction:0,applyServerSideTransactionAsync:0,applyServerSideRowData:0,retryServerSideLoads:0,flushServerSideAsyncTransactions:0,refreshServerSide:0,getServerSideGroupLevelState:0}),...oe("SideBar",{isSideBarVisible:0,setSideBarVisible:0,setSideBarPosition:0,openToolPanel:0,closeToolPanel:0,getOpenedToolPanel:0,refreshToolPanel:0,isToolPanelShowing:0,getToolPanelInstance:0,getSideBar:0}),...oe("StatusBar",{getStatusPanel:0})},pa={isDestroyed:()=>!0,destroy(){},preConstruct(){},postConstruct(){},preWireBeans(){},wireBeans(){}},jv=(e,t)=>e.eventSvc.dispatchEvent(t),Wc=class{};Reflect.defineProperty(Wc,"name",{value:"GridApi"});var Kv=class extends E{constructor(){super(),this.beanName="apiFunctionSvc",this.api=new Wc,this.fns={...pa,dispatchEvent:jv},this.preDestroyLink="";const{api:e}=this;for(const t of Object.keys(zc))e[t]=this.makeApi(t)[t]}postConstruct(){this.preDestroyLink=this.beans.frameworkOverrides.getDocLink("grid-lifecycle/#grid-pre-destroyed")}addFunction(e,t){const{fns:o,beans:i}=this;o!==pa&&(o[e]=i?.validation?.validateApiFunction(e,t)??t)}makeApi(e){return{[e]:(...t)=>{const{beans:o,fns:{[e]:i}}=this;return i?i(o,...t):this.apiNotFound(e)}}}apiNotFound(e){const{beans:t,gos:o,preDestroyLink:i}=this;if(!t)_(26,{fnName:e,preDestroyLink:i});else{const r=zc[e];o.assertModuleRegistered(r,`api.${e}`)&&_(27,{fnName:e,module:r})}}destroy(){super.destroy(),this.fns=pa,this.beans=null}};function Yv(e){return e.context.getGridId()}function qv(e){e.gridDestroySvc.destroy()}function Xv(e){return e.gridDestroySvc.destroyCalled}function Qv(e,t){return e.gos.get(t)}function Zv(e,t,o){$c(e,{[t]:o})}function $c(e,t){e.gos.updateGridOptions({options:t})}var Jv=class extends E{constructor(){super(...arguments),this.beanName="horizontalResizeSvc"}addResizeBar(e){const 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:o}=this.beans;return o.addDragSource(t),()=>o.removeDragSource(t)}onDragStart(e,t){this.dragStartX=t.clientX,this.setResizeIcons();const o=t instanceof MouseEvent&&t.shiftKey===!0;e.onResizeStart(o)}setResizeIcons(){const e=this.beans.ctrlsSvc.get("gridCtrl");e.setResizeCursor(!0),e.disableUserSelect(!0)}onDragStop(e){e.onResizeEnd(this.resizeAmount),this.resetIcons()}resetIcons(){const 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)}},Uc={moduleName:"Drag",version:ae,beans:[Hm]},jc={moduleName:"SharedDragAndDrop",version:ae,beans:[Tm],dependsOn:[Uc],userComponents:{agDragAndDropImage:JC},icons:{columnMovePin:"pin",columnMoveHide:"eye-slash",columnMoveMove:"arrows",columnMoveLeft:"left",columnMoveRight:"right",columnMoveGroup:"group",columnMoveValue:"aggregation",columnMovePivot:"pivot",dropNotAllowed:"not-allowed",rowDrag:"grip"}},ew={moduleName:"HorizontalResize",version:ae,beans:[Jv],dependsOn:[Uc]},tw=":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}}",ow=class extends E{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;const{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++;const e=this.animationThreadCount,{gridBodyCtrl:t}=this;t.setColumnMovingCss(!0),this.executeLaterFuncs.push(()=>{this.animationThreadCount===e&&t.setColumnMovingCss(!1)})}flush(e,t){const{executeNextFuncs:o,executeLaterFuncs:i}=this;if(o.length===0&&i.length===0){e(),t();return}const r=s=>{for(;s.length;){const n=s.pop();n&&n()}};this.beans.frameworkOverrides.wrapIncoming(()=>{window.setTimeout(()=>{e(),r(o)},0),window.setTimeout(()=>{t(),r(i)},200)})}};function iw(e,t,o){e.colMoves?.moveColumnByIndex(t,o,"api")}function rw(e,t,o){e.colMoves?.moveColumns(t,o,"api")}var sw=class extends E{constructor(e){super(),this.pinned=e,this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[]}onDragEnter(e){if(this.clearColumnsList(),this.gos.get("functionsReadOnly"))return;const t=e.dragItem.columns;t&&t.forEach(o=>{o.isPrimary()&&(o.isAnyFunctionActive()||(o.isAllowValue()?this.columnsToAggregate.push(o):o.isAllowRowGroup()?this.columnsToGroup.push(o):o.isAllowPivot()&&this.columnsToPivot.push(o)))})}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){const{valueColsSvc:t,rowGroupColsSvc:o,pivotColsSvc:i}=this.beans;this.columnsToAggregate.length>0&&t?.addColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&o?.addColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&i?.addColumns(this.columnsToPivot,"toolPanelDragAndDrop")}onDragCancel(){this.clearColumnsList()}};function nw(e,t){!t||t.length<=1||t.filter(i=>e.indexOf(i)<0).length>0||t.sort((i,r)=>{const s=e.indexOf(i),n=e.indexOf(r);return s-n})}function Kc(e){const{isFromHeader:t,fromLeft:o,xPosition:i,fromEnter:r,fakeEvent:s,pinned:n,gos:a,colModel:l,colMoves:d,visibleCols:c}=e;let{allMovingColumns:u}=e;if(t){const M=[];u.forEach(P=>{let k=null,S=P.getParent();for(;S!=null&&S.getDisplayedLeafColumns().length===1;)k=S,S=S.getParent();k!=null?(!!k.getColGroupDef()?.marryChildren?k.getProvidedColumnGroup().getLeafColumns():k.getLeafColumns()).forEach(F=>{M.includes(F)||M.push(F)}):M.includes(P)||M.push(P)}),u=M}const g=u.slice();nw(l.getCols(),g);const p=cw({movingCols:g,draggingRight:o,xPosition:i,pinned:n,gos:a,colModel:l,visibleCols:c}),f=aw(g,l);if(p.length===0)return;const m=p[0];let C=f!==null&&!r;if(t&&(C=f!==null),C&&!s&&(!o&&m>=f||o&&m<=f))return;const w=c.allCols,y=[];let b=null;for(let M=0;M<p.length;M++){const P=p[M],k=d.getProposedColumnOrder(g,P);if(!d.doesOrderPassRules(k))continue;const S=k.filter(R=>w.includes(R));if(b===null)b=S;else if(!It(S,b))break;const v=lw(k);y.push({move:P,fragCount:v})}if(y.length===0)return;y.sort((M,P)=>M.fragCount-P.fragCount);const x=y[0].move;if(!(x>l.getCols().length-u.length))return{columns:u,toIndex:x}}function Yc(e){const{columns:t,toIndex:o}=Kc(e)||{},{finished:i,colMoves:r}=e;return!t||o==null?null:(r.moveColumns(t,o,"uiColumnMoved",i),i?null:{columns:t,toIndex:o})}function aw(e,t){const o=t.getCols(),i=e.map(l=>o.indexOf(l)).sort((l,d)=>l-d),r=i[0];return Ce(i)-r!==i.length-1?null:r}function lw(e){function t(i){const r=[];let s=i.getOriginalParent();for(;s!=null;)r.push(s),s=s.getOriginalParent();return r}let o=0;for(let i=0;i<e.length-1;i++){let r=t(e[i]),s=t(e[i+1]);[r,s]=r.length>s.length?[r,s]:[s,r],r.forEach(n=>{s.indexOf(n)===-1&&o++})}return o}function dw(e,t){switch(t){case"left":return e.leftCols;case"right":return e.rightCols;default:return e.centerCols}}function cw(e){const{movingCols:t,draggingRight:o,xPosition:i,pinned:r,gos:s,colModel:n,visibleCols:a}=e;if(s.get("suppressMovableColumns")||t.some(b=>b.getColDef().suppressMovable))return[];const d=dw(a,r),c=n.getCols(),u=d.filter(b=>t.includes(b)),g=d.filter(b=>!t.includes(b)),p=c.filter(b=>!t.includes(b));let f=0,m=i;if(o){let b=0;u.forEach(x=>b+=x.getActualWidth()),m-=b}if(m>0){for(let b=0;b<g.length;b++){const x=g[b];if(m-=x.getActualWidth(),m<0)break;f++}o&&f++}let C;if(f>0){const b=g[f-1];C=p.indexOf(b)+1}else C=p.indexOf(g[0]),C===-1&&(C=0);const w=[C],y=(b,x)=>b-x;if(o){let b=C+1;const x=c.length-1;for(;b<=x;)w.push(b),b++;w.sort(y)}else{let b=C;const x=c.length-1;let M=c[b];for(;b<=x&&d.indexOf(M)<0;)b++,w.push(b),M=c[b];b=C-1;const P=0;for(;b>=P;)w.push(b),b--;w.sort(y).reverse()}return w}function fa(e){const{pinned:t,fromKeyboard:o,gos:i,ctrlsSvc:r,useHeaderRow:s,skipScrollPadding:n}=e;let a=r.getHeaderRowContainerCtrl(t)?.eViewport,{x:l}=e;return a?(o&&(l-=a.getBoundingClientRect().left),i.get("enableRtl")&&(s&&(a=a.querySelector(".ag-header-row")),l=a.clientWidth-l),t==null&&!n&&(l+=r.get("center").getCenterViewportScrollLeft()),l):0}function ma(e,t){for(const o of e)o.moving=t,o.dispatchColEvent("movingChanged","uiColumnMoved")}var qc=7,Ca=100,vs=Ca/2,uw=5,hw=100,gw=class extends E{constructor(e){super(),this.pinned=e,this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.isCenterContainer=!q(e)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}getIconName(){const{pinned:e,lastDraggingEvent:t}=this,o=t?.dragItem.columns??[];for(const i of o){const r=i.getPinned();if(i.getColDef().lockPinned){if(r==e)return"move";continue}if(r===e||!e)return"move";if(!r&&e)return"pinned"}return"notAllowed"}onDragEnter(e){const t=e.dragItem,o=t.columns;if(e.dragSource.type===0)this.setColumnsVisible(o,!0,"uiColumnDragged");else{const r=t.visibleState,s=(o||[]).filter(n=>r[n.getId()]);this.setColumnsVisible(s,!0,"uiColumnDragged")}this.gos.get("suppressMoveWhenColumnDragging")||this.attemptToPinColumns(o,this.pinned),this.onDragging(e,!0,!0)}onDragging(e=this.lastDraggingEvent,t=!1,o=!1,i=!1){const{gos:r,ctrlsSvc:s}=this.beans,n=r.get("suppressMoveWhenColumnDragging");if(i&&!n){this.finishColumnMoving();return}if(this.lastDraggingEvent=e,!e||!i&&De(e.hDirection))return;const a=fa({x:e.x,pinned:this.pinned,gos:r,ctrlsSvc:s});t||this.checkCenterForScrolling(a),n?this.handleColumnDragWhileSuppressingMovement(e,t,o,a,i):this.handleColumnDragWhileAllowingMovement(e,t,o,a,i)}onDragLeave(){this.ensureIntervalCleared(),this.clearHighlighted(),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,o){if(!e)return;const i=e.filter(r=>!r.getColDef().lockVisible);this.beans.colModel.setColsVisible(i,t,o)}finishColumnMoving(){this.clearHighlighted();const e=this.lastMovedInfo;if(!e)return;const{columns:t,toIndex:o}=e;this.beans.colMoves.moveColumns(t,o,"uiColumnMoved",!0)}handleColumnDragWhileSuppressingMovement(e,t,o,i,r){const s=this.getAllMovingColumns(e,!0);if(r){const n=this.isAttemptingToPin(s);n&&this.attemptToPinColumns(s,void 0,!0);const{fromLeft:a,xPosition:l}=this.getNormalisedXPositionInfo(s,n)||{};if(a==null||l==null){this.finishColumnMoving();return}this.moveColumnsAfterHighlight({allMovingColumns:s,xPosition:l,fromEnter:t,fakeEvent:o,fromLeft:a})}else{if(!this.beans.dragAndDrop.isDropZoneWithinThisGrid(e))return;this.highlightHoveredColumn(s,i)}}handleColumnDragWhileAllowingMovement(e,t,o,i,r){const s=this.getAllMovingColumns(e),n=this.normaliseDirection(e.hDirection)==="right",a=e.dragSource.type===1,l=this.getMoveColumnParams({allMovingColumns:s,isFromHeader:a,xPosition:i,fromLeft:n,fromEnter:t,fakeEvent:o}),d=Yc({...l,finished:r});d&&(this.lastMovedInfo=d)}getAllMovingColumns(e,t=!1){const o=e.dragSource.getDragItem();let i=null;t?(i=o.columnsInSplit,i||(i=o.columns)):i=o.columns;const r=s=>s.getColDef().lockPinned?s.getPinned()==this.pinned:!0;return i?i.filter(r):[]}getMoveColumnParams(e){const{allMovingColumns:t,isFromHeader:o,xPosition:i,fromLeft:r,fromEnter:s,fakeEvent:n}=e,{gos:a,colModel:l,colMoves:d,visibleCols:c}=this.beans;return{allMovingColumns:t,isFromHeader:o,fromLeft:r,xPosition:i,pinned:this.pinned,fromEnter:s,fakeEvent:n,gos:a,colModel:l,colMoves:d,visibleCols:c}}highlightHoveredColumn(e,t){const{gos:o,colModel:i}=this.beans,r=o.get("enableRtl"),s=i.getCols().filter(c=>c.isVisible()&&c.getPinned()===this.pinned);let n=null,a=null,l=null;for(const c of s){if(a=c.getActualWidth(),n=this.getNormalisedColumnLeft(c,0,r),n!=null){const u=n+a;if(n<=t&&u>=t){l=c;break}}n=null,a=null}if(l)e.indexOf(l)!==-1&&(l=null);else{for(let c=s.length-1;c>=0;c--){const u=s[c],g=s[c].getParent();if(!g){l=u;break}const p=g?.getDisplayedLeafColumns();if(p.length){l=Ce(p);break}}if(!l)return;n=this.getNormalisedColumnLeft(l,0,r),a=l.getActualWidth()}if(this.lastHighlightedColumn?.column!==l&&this.clearHighlighted(),l==null||n==null||a==null)return;let d;t-n<a/2!==r?d=0:d=1,Xc(l,d),this.lastHighlightedColumn={column:l,position:d}}getNormalisedXPositionInfo(e,t){const{gos:o,visibleCols:i}=this.beans,r=o.get("enableRtl"),{firstMovingCol:s,column:n,position:a}=this.getColumnMoveAndTargetInfo(e,t,r);if(!s||!n||a==null)return;const l=i.allCols,d=l.indexOf(s),c=l.indexOf(n),u=a===0!==r,g=d<c||d===c&&!u;let p=0;if(u?g&&(p-=1):g||(p+=1),c+p===d)return;const f=l[c+p];if(!f)return;const m=this.getNormalisedColumnLeft(f,20,r);return{fromLeft:g,xPosition:m}}getColumnMoveAndTargetInfo(e,t,o){const i=this.lastHighlightedColumn||{},{firstMovingCol:r,lastMovingCol:s}=pw(e);if(!r||!s||i.column||!t)return{firstMovingCol:r,...i};const a=this.getPinDirection()==="left";return{firstMovingCol:r,position:a?1:0,column:a!==o?r:s}}normaliseDirection(e){if(this.gos.get("enableRtl"))switch(e){case"left":return"right";case"right":return"left"}return e}getNormalisedColumnLeft(e,t,o){const{gos:i,ctrlsSvc:r}=this.beans,s=e.getLeft();if(s==null)return null;const n=e.getActualWidth();return fa({x:o?s+n-t:s+t,pinned:e.getPinned(),useHeaderRow:o,skipScrollPadding:!0,gos:i,ctrlsSvc:r})}isAttemptingToPin(e){const t=this.needToMoveLeft||this.needToMoveRight,o=this.failedMoveAttempts>qc;return t&&o||e.some(i=>i.getPinned()!==this.pinned)}moveColumnsAfterHighlight(e){const{allMovingColumns:t,xPosition:o,fromEnter:i,fakeEvent:r,fromLeft:s}=e,n=this.getMoveColumnParams({allMovingColumns:t,isFromHeader:!0,xPosition:o,fromLeft:s,fromEnter:i,fakeEvent:r}),{columns:a,toIndex:l}=Kc(n)||{};a&&l!=null&&(this.lastMovedInfo={columns:a,toIndex:l}),this.finishColumnMoving()}clearHighlighted(){const{lastHighlightedColumn:e}=this;e&&(Xc(e.column,null),this.lastHighlightedColumn=null)}checkCenterForScrolling(e){if(!this.isCenterContainer)return;const t=this.beans.ctrlsSvc.get("center"),o=t.getCenterViewportScrollLeft(),i=o+t.getCenterWidth();let r,s;this.gos.get("enableRtl")?(r=e<o+vs,s=e>i-vs):(s=e<o+vs,r=e>i-vs),this.needToMoveRight=r,this.needToMoveLeft=s,s||r?this.ensureIntervalStarted():this.ensureIntervalCleared()}ensureIntervalStarted(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),hw),this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.needToMoveLeft?"left":"right",!0))}ensureIntervalCleared(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.failedMoveAttempts=0,this.beans.dragAndDrop.getDragAndDropImageComponent()?.setIcon(this.getIconName(),!1))}moveInterval(){let e;this.intervalCount++,e=10+this.intervalCount*uw,e>Ca&&(e=Ca);let t=null;const o=this.gridBodyCon.scrollFeature;if(this.needToMoveLeft?t=o.scrollHorizontally(-e):this.needToMoveRight&&(t=o.scrollHorizontally(e)),t!==0)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;const{pinnedCols:i,dragAndDrop:r,gos:s}=this.beans;if(this.failedMoveAttempts<=qc+1||!i)return;if(r.getDragAndDropImageComponent()?.setIcon("pinned",!1),!s.get("suppressMoveWhenColumnDragging")){const n=this.lastDraggingEvent?.dragItem.columns;this.attemptToPinColumns(n,void 0,!0)}}}getPinDirection(){if(this.needToMoveLeft||this.pinned==="left")return"left";if(this.needToMoveRight||this.pinned==="right")return"right"}attemptToPinColumns(e,t,o=!1){const i=(e||[]).filter(n=>!n.getColDef().lockPinned);if(!i.length)return 0;o&&(t=this.getPinDirection());const{pinnedCols:r,dragAndDrop:s}=this.beans;return r?.setColsPinned(i,t,"uiColumnDragged"),o&&s.nudge(),i.length}destroy(){super.destroy(),this.lastDraggingEvent=null,this.clearHighlighted(),this.lastMovedInfo=null}};function Xc(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchColEvent("headerHighlightChanged","uiColumnMoved"))}function pw(e){const t=e.length;let o,i;for(let r=0;r<t;r++){if(!o){const s=e[r];s.getLeft()!=null&&(o=s)}if(!i){const s=e[t-1-r];s.getLeft()!=null&&(i=s)}if(o&&i)break}return{firstMovingCol:o,lastMovingCol:i}}var fw=class extends E{constructor(e,t){super(),this.pinned=e,this.eContainer=t}postConstruct(){const{ctrlsSvc:e,dragAndDrop:t}=this.beans,o=this.pinned;e.whenReady(this,i=>{let r;const s=i.gridBodyCtrl.eBodyViewport;switch(o){case"left":r=[[s,i.left.eContainer],[i.bottomLeft.eContainer],[i.topLeft.eContainer]];break;case"right":r=[[s,i.right.eContainer],[i.bottomRight.eContainer],[i.topRight.eContainer]];break;default:r=[[s,i.center.eViewport],[i.bottomCenter.eViewport],[i.topCenter.eViewport]];break}this.eSecondaryContainers=r}),this.moveColumnFeature=this.createManagedBean(new gw(o)),this.bodyDropPivotTarget=this.createManagedBean(new sw(o)),t.addDropTarget(this),this.addDestroyFunc(()=>t.removeDropTarget(this))}isInterestedIn(e){return e===1||e===0&&this.gos.get("allowDragFromColumnsToolPanel")}getSecondaryContainers(){return this.eSecondaryContainers}getContainer(){return this.eContainer}getIconName(){return this.currentDropListener.getIconName()}isDropColumnInPivotMode(e){return this.beans.colModel.isPivotMode()&&e.dragSource.type===0}onDragEnter(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)}onDragLeave(e){this.currentDropListener.onDragLeave(e)}onDragging(e){this.currentDropListener.onDragging(e)}onDragStop(e){this.currentDropListener.onDragStop(e)}onDragCancel(){this.currentDropListener.onDragCancel()}},mw=class extends E{constructor(){super(...arguments),this.beanName="colMoves"}moveColumnByIndex(e,t,o){const i=this.beans.colModel.getCols();if(!i)return;const r=i[e];this.moveColumns([r],t,o)}moveColumns(e,t,o,i=!0){const{colModel:r,colAnimation:s,visibleCols:n,eventSvc:a}=this.beans,l=r.getCols();if(!l)return;if(t>l.length-e.length){_(30,{toIndex:t});return}s?.start();const d=r.getColsForKeys(e);this.doesMovePassRules(d,t)&&(kd(r.getCols(),d,t),n.refresh(o),a.dispatchEvent({type:"columnMoved",columns:d,column:d.length===1?d[0]:null,toIndex:t,finished:i,source:o})),s?.finish()}doesMovePassRules(e,t){const o=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(o)}doesOrderPassRules(e){const{colModel:t,gos:o}=this.beans;return!(!Gd(e,t.getColTree())||!(r=>{const s=d=>d?d==="left"||d===!0?-1:1:0,n=o.get("enableRtl");let a=n?1:-1,l=!0;return r.forEach(d=>{const c=s(d.getColDef().lockPosition);n?c>a&&(l=!1):c<a&&(l=!1),a=c}),l})(e))}getProposedColumnOrder(e,t){const i=this.beans.colModel.getCols().slice();return kd(i,e,t),i}createBodyDropTarget(e,t){return new fw(e,t)}moveHeader(e,t,o,i,r){const{ctrlsSvc:s,gos:n,colModel:a,visibleCols:l,focusSvc:d}=this.beans,c=t.getBoundingClientRect(),u=c.left,g=Ie(o),p=g?c.width:o.getActualWidth(),f=e==="left"!==n.get("enableRtl"),m=fa({x:f?u-20:u+p+20,pinned:i,fromKeyboard:!0,gos:n,ctrlsSvc:s}),C=d.focusedHeader;Yc({allMovingColumns:g?o.getLeafColumns():[o],isFromHeader:!0,fromLeft:e==="right",xPosition:m,pinned:i,fromEnter:!1,fakeEvent:!1,gos:n,colModel:a,colMoves:this,visibleCols:l,finished:!0});let w;if(g){const y=o.getDisplayedLeafColumns();w=f?y[0]:Ce(y)}else w=o;if(s.getScrollFeature().ensureColumnVisible(w,"auto"),(!r.isAlive()||n.get("ensureDomOrder"))&&C){let y;if(g){const b=o.getGroupId(),x=o.getLeafColumns();if(!x.length)return;const M=x[0].getParent();if(!M)return;y=Cw(M,b)}else y=o;y&&d.focusHeaderPosition({headerPosition:{...C,column:y}})}}setDragSourceForHeader(e,t,o){const{gos:i,colModel:r,dragAndDrop:s,visibleCols:n}=this.beans;let a=!i.get("suppressDragLeaveHidesColumns");const l=Ie(t),d=l?t.getProvidedColumnGroup().getLeafColumns():[t],u={type:1,eElement:e,getDefaultIconName:()=>a?"hide":"notAllowed",getDragItem:l?()=>ww(t,n.allCols):()=>vw(t),dragItemName:o,onDragStarted:()=>{a=!i.get("suppressDragLeaveHidesColumns"),ma(d,!0)},onDragStopped:()=>ma(d,!1),onDragCancelled:()=>ma(d,!1),onGridEnter:g=>{if(a){const{columns:p=[],visibleState:f}=g??{},m=l?w=>!f||f[w.getColId()]:()=>!0,C=p.filter(w=>!w.getColDef().lockVisible&&m(w));r.setColsVisible(C,!0,"uiColumnMoved")}},onGridExit:g=>{if(a){const p=g?.columns?.filter(f=>!f.getColDef().lockVisible)||[];r.setColsVisible(p,!1,"uiColumnMoved")}}};return s.addDragSource(u,!0),u}};function Cw(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}}function vw(e){const t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}}function ww(e,t){const o=e.getProvidedColumnGroup().getLeafColumns(),i={};o.forEach(a=>i[a.getId()]=a.isVisible());const r=[];t.forEach(a=>{o.indexOf(a)>=0&&(r.push(a),ot(o,a))}),o.forEach(a=>r.push(a));const s=[],n=e.getLeafColumns();for(const a of r)n.indexOf(a)!==-1&&s.push(a);return{columns:r,columnsInSplit:s,visibleState:i}}var Qc={moduleName:"ColumnMove",version:ae,beans:[mw,ow],apiFunctions:{moveColumnByIndex:iw,moveColumns:rw},dependsOn:[jc],css:[tw]},bw=class extends E{constructor(){super(...arguments),this.beanName="autoWidthCalc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowContainerCtrl=e.center})}getPreferredWidthForColumn(e,t){const o=this.getHeaderCellForColumn(e);if(!o)return-1;const i=this.beans.rowRenderer.getAllCellsNotSpanningForColumn(e);return t||i.push(o),this.getPreferredWidthForElements(i)}getPreferredWidthForColumnGroup(e){const t=this.getHeaderCellForColumn(e);return t?this.getPreferredWidthForElements([t]):-1}getPreferredWidthForElements(e,t){const o=document.createElement("form");o.style.position="fixed";const i=this.centerRowContainerCtrl.eContainer;e.forEach(s=>this.cloneItemIntoDummy(s,o)),i.appendChild(o);const r=o.offsetWidth;return i.removeChild(o),t=t??this.gos.get("autoSizePadding"),r+t}getHeaderCellForColumn(e){let t=null;return this.beans.ctrlsSvc.getHeaderRowContainerCtrls().forEach(o=>{const i=o.getHtmlElementForColumnHeader(e);i!=null&&(t=i)}),t}cloneItemIntoDummy(e,t){const o=e.cloneNode(!0);o.style.width="",o.style.position="static",o.style.left="";const i=document.createElement("div"),r=i.classList;["ag-header-cell","ag-header-group-cell"].some(a=>o.classList.contains(a))?(r.add("ag-header","ag-header-row"),i.style.position="static"):r.add("ag-row");let n=e.parentElement;for(;n;){if(["ag-header-row","ag-row"].some(l=>n.classList.contains(l))){for(let l=0;l<n.classList.length;l++){const d=n.classList[l];d!="ag-row-position-absolute"&&r.add(d)}break}n=n.parentElement}i.appendChild(o),t.appendChild(i)}},yw={moduleName:"AutoWidth",version:ae,beans:[bw]};function Sw(e,t,o=!0,i="api"){e.colResize?.setColumnWidths(t,!1,o,i)}var Rw=class extends E{constructor(e,t,o,i){super(),this.comp=e,this.eResize=t,this.pinned=o,this.columnGroup=i}postConstruct(){if(!this.columnGroup.isResizable()){this.comp.setResizableDisplayed(!1);return}const{horizontalResizeSvc:e,gos:t,colAutosize:o}=this.beans,i=e.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});this.addDestroyFunc(i),!t.get("suppressAutoSize")&&o&&this.addDestroyFunc(o.addColumnGroupResize(this.eResize,this.columnGroup,()=>this.resizeLeafColumnsToFit("uiColumnResized")))}onResizeStart(e){const{columnsToResize:t,resizeStartWidth:o,resizeRatios:i,groupAfterColumns:r,groupAfterStartWidth:s,groupAfterRatios:n}=this.getInitialValues(e);this.resizeCols=t,this.resizeStartWidth=o,this.resizeRatios=i,this.resizeTakeFromCols=r,this.resizeTakeFromStartWidth=s,this.resizeTakeFromRatios=n,this.toggleColumnResizing(!0)}onResizing(e,t,o="uiColumnResized"){const i=this.normaliseDragChange(t),r=this.resizeStartWidth+i;this.resizeColumnsFromLocalValues(r,o,e)}getInitialValues(e){const t=l=>l.reduce((d,c)=>d+c.getActualWidth(),0),o=(l,d)=>l.map(c=>c.getActualWidth()/d),i=this.getColumnsToResize(),r=t(i),s=o(i,r),n={columnsToResize:i,resizeStartWidth:r,resizeRatios:s};let a=null;if(e&&(a=this.beans.colGroupSvc?.getGroupAtDirection(this.columnGroup,"After")??null),a){const l=a.getDisplayedLeafColumns(),d=n.groupAfterColumns=l.filter(u=>u.isResizable()),c=n.groupAfterStartWidth=t(d);n.groupAfterRatios=o(d,c)}else n.groupAfterColumns=void 0,n.groupAfterStartWidth=void 0,n.groupAfterRatios=void 0;return n}resizeLeafColumnsToFit(e){const t=this.beans.autoWidthCalc.getPreferredWidthForColumnGroup(this.columnGroup),o=this.getInitialValues();t>o.resizeStartWidth&&this.resizeColumns(o,t,e,!0)}resizeColumnsFromLocalValues(e,t,o=!0){if(!this.resizeCols||!this.resizeRatios)return;const i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:this.resizeTakeFromCols,groupAfterStartWidth:this.resizeTakeFromStartWidth,groupAfterRatios:this.resizeTakeFromRatios};this.resizeColumns(i,e,t,o)}resizeColumns(e,t,o,i=!0){const{columnsToResize:r,resizeStartWidth:s,resizeRatios:n,groupAfterColumns:a,groupAfterStartWidth:l,groupAfterRatios:d}=e,c=[];if(c.push({columns:r,ratios:n,width:t}),a){const u=t-s;c.push({columns:a,ratios:d,width:l-u})}this.beans.colResize?.resizeColumnSets({resizeSets:c,finished:i,source:o}),i&&this.toggleColumnResizing(!1)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}getColumnsToResize(){return this.columnGroup.getDisplayedLeafColumns().filter(t=>t.isResizable())}normaliseDragChange(e){let t=e;return this.gos.get("enableRtl")?this.pinned!=="left"&&(t*=-1):this.pinned==="right"&&(t*=-1),t}destroy(){super.destroy(),this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0}},xw=class extends E{constructor(e,t,o,i,r){super(),this.pinned=e,this.column=t,this.eResize=o,this.comp=i,this.ctrl=r}postConstruct(){const e=[];let t,o;const i=()=>{if(ge(this.eResize,t),!t)return;const{horizontalResizeSvc:n,colAutosize:a}=this.beans,l=n.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});e.push(l),o&&a&&e.push(a.addColumnAutosize(this.eResize,this.column))},r=()=>{e.forEach(n=>n()),e.length=0},s=()=>{const n=this.column.isResizable(),a=!this.gos.get("suppressAutoSize")&&!this.column.getColDef().suppressAutoSize;(n!==t||a!==o)&&(t=n,o=a,r(),i())};s(),this.addDestroyFunc(r),this.ctrl.setRefreshFunction("resize",s)}onResizing(e,t){const{column:o,lastResizeAmount:i,resizeStartWidth:r,beans:s}=this,n=this.normaliseResizeAmount(t),a=r+n,l=[{key:o,newWidth:a}],{pinnedCols:d,ctrlsSvc:c,colResize:u}=s;if(this.column.getPinned()){const g=d?.leftWidth??0,p=d?.rightWidth??0,f=Li(c.getGridBodyCtrl().eBodyViewport)-50;if(g+p+(n-i)>f)return}this.lastResizeAmount=n,u?.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)}onResizeStart(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)}toggleColumnResizing(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)}normaliseResizeAmount(e){let t=e;const o=this.pinned!=="left",i=this.pinned==="right";return this.gos.get("enableRtl")?o&&(t*=-1):i&&(t*=-1),t}},Fw=class extends E{constructor(){super(...arguments),this.beanName="colResize"}setColumnWidths(e,t,o,i){const r=[],{colModel:s,gos:n,visibleCols:a}=this.beans;e.forEach(l=>{const d=s.getColDefCol(l.key)||s.getCol(l.key);if(!d)return;if(r.push({width:l.newWidth,ratios:[1],columns:[d]}),n.get("colResizeDefault")==="shift"&&(t=!t),t){const u=a.getColAfter(d);if(!u)return;const g=d.getActualWidth()-l.newWidth,p=u.getActualWidth()+g;r.push({width:p,ratios:[1],columns:[u]})}}),r.length!==0&&this.resizeColumnSets({resizeSets:r,finished:o,source:i})}resizeColumnSets(e){const{resizeSets:t,finished:o,source:i}=e;if(!(!t||t.every(c=>Dw(c)))){if(o){const c=t&&t.length>0?t[0].columns:null;qr(this.eventSvc,c,o,i)}return}const s=[],n=[];t.forEach(c=>{const{width:u,columns:g,ratios:p}=c,f={},m={};g.forEach(y=>n.push(y));let C=!0,w=0;for(;C;){if(w++,w>1e3){ce(31);break}C=!1;const y=[];let b=0,x=u;g.forEach((P,k)=>{if(m[P.getId()])x-=f[P.getId()];else{y.push(P);const v=p[k];b+=v}});const M=1/b;y.forEach((P,k)=>{const S=k===y.length-1;let v;S?v=x:(v=Math.round(p[k]*u*M),x-=v);const R=P.getMinWidth(),F=P.getMaxWidth();v<R?(v=R,m[P.getId()]=!0,C=!0):F>0&&v>F&&(v=F,m[P.getId()]=!0,C=!0),f[P.getId()]=v})}g.forEach(y=>{const b=f[y.getId()];y.getActualWidth()!==b&&(y.setActualWidth(b,i),s.push(y))})});const a=s.length>0;let l=[];if(a){const{colFlex:c,visibleCols:u,colViewport:g}=this.beans;l=c?.refreshFlexedColumns({resizingCols:n,skipSetLeft:!0})??[],u.setLeftValues(i),u.updateBodyWidths(),g.checkViewportColumns()}const d=n.concat(l);(a||o)&&qr(this.eventSvc,d,o,i,l)}resizeHeader(e,t,o){if(!e.isResizable())return;const i=e.getActualWidth(),r=e.getMinWidth(),s=e.getMaxWidth(),n=Math.min(Math.max(i+t,r),s);this.setColumnWidths([{key:e,newWidth:n}],o,!0,"uiColumnResized")}createResizeFeature(e,t,o,i,r){return new xw(e,t,o,i,r)}createGroupResizeFeature(e,t,o,i){return new Rw(e,t,o,i)}};function Dw(e){const{columns:t,width:o}=e;let i=0,r=0,s=!0;t.forEach(l=>{const d=l.getMinWidth();i+=d||0;const c=l.getMaxWidth();c>0?r+=c:s=!1});const n=o>=i,a=!s||o<=r;return n&&a}var kw={moduleName:"ColumnResize",version:ae,beans:[Fw],apiFunctions:{setColumnWidths:Sw},dependsOn:[ew,yw]},Mw=class extends E{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();const e=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{t.__addEventListener("widthChanged",e),t.__addEventListener("visibleChanged",e),this.removeChildListenersFuncs.push(()=>{t.__removeEventListener("widthChanged",e),t.__removeEventListener("visibleChanged",e)})})}removeListenersOnChildrenColumns(){this.removeChildListenersFuncs.forEach(e=>e()),this.removeChildListenersFuncs=[]}onDisplayedChildrenChanged(){this.addListenersToChildrenColumns(),this.onWidthChanged()}onWidthChanged(){const e=this.columnGroup.getActualWidth();this.comp.setWidth(`${e}px`),this.comp.addOrRemoveCssClass("ag-hidden",e===0)}},Pw=class extends da{constructor(){super(...arguments),this.onSuppressColMoveChange=()=>{!this.isAlive()||this.isSuppressMoving()?this.removeDragSource():this.dragSource||this.setDragSource(this.eGui)}}setComp(e,t,o,i,r){const{column:s,beans:n}=this,{context:a,colNames:l,colHover:d,rangeSvc:c,colResize:u}=n;this.comp=e,r=Yi(this,a,r),this.setGui(t,r),this.displayName=l.getDisplayNameForColumnGroup(s,"header"),this.refreshHeaderStyles(),this.addClasses(),this.setupMovingCss(r),this.setupExpandable(r),this.setupTooltip(),this.setupAutoHeight({wrapperElement:i,compBean:r}),this.setupUserComp(),this.addHeaderMouseListeners(r),this.addManagedPropertyListener("groupHeaderHeight",this.refreshMaxHeaderHeight.bind(this)),this.refreshMaxHeaderHeight();const g=this.rowCtrl.pinned,p=s.getProvidedColumnGroup().getLeafColumns();d?.createHoverFeature(r,p,t),c?.createRangeHighlightFeature(r,s,e),r.createManagedBean(new la(s,t,n)),r.createManagedBean(new Mw(e,s)),u?this.resizeFeature=r.createManagedBean(u.createGroupResizeFeature(e,o,g,s)):e.setResizableDisplayed(!1),r.createManagedBean(new gi(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:()=>{},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addHighlightListeners(r,p),r.addManagedPropertyListener("suppressMovableColumns",this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners(r),r.addDestroyFunc(()=>this.clearComponent())}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.getDefinition();return Z(t.gos,{colDef:o,columnGroup:e,floatingFilter:!1})}refreshMaxHeaderHeight(){const{gos:e,comp:t}=this,o=e.get("groupHeaderHeight");o!=null?o===0?t.setHeaderWrapperHidden(!0):t.setHeaderWrapperMaxHeight(o):(t.setHeaderWrapperHidden(!1),t.setHeaderWrapperMaxHeight(null))}addHighlightListeners(e,t){if(this.beans.gos.get("suppressMoveWhenColumnDragging"))for(const o of t)e.addManagedListeners(o,{headerHighlightChanged:this.onLeafColumnHighlightChanged.bind(this,o)})}onLeafColumnHighlightChanged(e){const t=this.column.getDisplayedLeafColumns(),o=t[0]===e,i=Ce(t)===e;if(!o&&!i)return;const r=e.getHighlighted(),s=!!this.rowCtrl.getHeaderCellCtrls().find(l=>l.column.isMoving());let n=!1,a=!1;if(s){const l=this.beans.gos.get("enableRtl"),d=r===1,c=r===0;o&&(l?a=d:n=c),i&&(l?n=c:a=d)}this.comp.addOrRemoveCssClass("ag-header-highlight-before",n),this.comp.addOrRemoveCssClass("ag-header-highlight-after",a)}resizeHeader(e,t){const{resizeFeature:o}=this;if(!o)return;const i=o.getInitialValues(t);o.resizeColumns(i,i.resizeStartWidth+e,"uiColumnResized",!0)}resizeLeafColumnsToFit(e){this.resizeFeature?.resizeLeafColumnsToFit(e)}setupUserComp(){const{colGroupSvc:e,userCompFactory:t,gos:o}=this.beans,i=Z(o,{displayName:this.displayName,columnGroup:this.column,setExpanded:s=>{e.setColumnGroupOpened(this.column.getProvidedColumnGroup(),s,"gridInitializing")},setTooltip:(s,n)=>{o.assertModuleRegistered("Tooltip",3),this.setupTooltip(s,n)}}),r=Vf(t,i);r&&this.comp.setUserCompDetails(r)}addHeaderMouseListeners(e){const t=r=>this.handleMouseOverChange(r.type==="mouseenter"),o=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column.getProvidedColumnGroup()),i=r=>this.handleContextMenuMouseEvent(r,void 0,this.column.getProvidedColumnGroup());e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:o,contextmenu:i})}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){const t=this.column.getProvidedColumnGroup();this.refreshExpanded();const o=this.refreshExpanded.bind(this);e.addManagedListeners(t,{expandedChanged:o,expandableChanged:o})}refreshExpanded(){const{column:e}=this;this.expandable=e.isExpandable();const t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0),this.refreshHeaderStyles()}addClasses(){const{column:e}=this,t=e.getColGroupDef(),o=Qd(t,this.gos,null,e);e.isPadding()?(o.push("ag-header-group-cell-no-group"),e.getLeafColumns().every(r=>r.isSpanHeaderHeight())&&o.push("ag-header-span-height")):(o.push("ag-header-group-cell-with-group"),t?.wrapHeaderText&&o.push("ag-header-cell-wrap-text")),o.forEach(i=>this.comp.addOrRemoveCssClass(i,!0))}setupMovingCss(e){const{column:t}=this,i=t.getProvidedColumnGroup().getLeafColumns(),r=()=>this.comp.addOrRemoveCssClass("ag-header-cell-moving",t.isMoving());i.forEach(s=>{e.addManagedListeners(s,{movingChanged:r})}),r()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||this.focusThis()}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();if(!(!this.expandable||!t)&&e.key===D.ENTER){const o=this.column,i=!o.isExpanded();this.beans.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),i,"uiColumnExpanded")}}setDragSource(e){!this.isAlive()||this.isSuppressMoving()||(this.removeDragSource(),e&&(this.dragSource=this.beans.colMoves?.setDragSourceForHeader(e,this.column,this.displayName)??null))}isSuppressMoving(){return this.gos.get("suppressMovableColumns")||this.column.getLeafColumns().some(e=>e.getColDef().suppressMovable||e.getColDef().lockPosition)}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function Ew(e,t,o){e.colGroupSvc?.setColumnGroupOpened(t,o,"api")}function Aw(e,t,o){return e.colGroupSvc?.getColumnGroup(t,o)??null}function Tw(e,t){return e.colGroupSvc?.getProvidedColGroup(t)??null}function Iw(e,t,o){return e.colNames.getDisplayNameForColumnGroup(t,o)||""}function Lw(e){return e.colGroupSvc?.getColumnGroupState()??[]}function Gw(e,t){e.colGroupSvc?.setColumnGroupState(t,"api")}function Bw(e){e.colGroupSvc?.resetColumnGroupState("api")}function Ow(e){return e.visibleCols.treeLeft}function Nw(e){return e.visibleCols.treeCenter}function Hw(e){return e.visibleCols.treeRight}function Vw(e){return e.visibleCols.getAllTrees()}function _w(e,t){for(let o=0;o<t.length;o++){const i=e.indexOf(t[o]);i>=0&&(e[i]=e[e.length-1],e.pop())}}var zw=class extends E{constructor(){super(...arguments),this.beanName="visibleCols",this.colsAndGroupsMap={},this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.bodyWidth=0,this.leftWidth=0,this.rightWidth=0,this.isBodyWidthDirty=!0}refresh(e,t=!1){const{colModel:o,colGroupSvc:i,colViewport:r}=this.beans;t||this.buildTrees(o,i),i?.updateOpenClosedVisibility();const s=va(this.treeLeft);this.leftCols=s,this.centerCols=va(this.treeCenter);const n=va(this.treeRight);this.rightCols=n,this.joinColsAriaOrder(o),this.joinCols(),this.setLeftValues(e),this.autoHeightCols=this.allCols.filter(a=>a.isAutoHeight()),this.beans.colFlex?.refreshFlexedColumns(),this.updateBodyWidths(),r.checkViewportColumns(!1),this.setFirstRightAndLastLeftPinned(o,s,n,e),this.eventSvc.dispatchEvent({type:"displayedColumnsChanged",source:e})}updateBodyWidths(){const e=ci(this.centerCols),t=ci(this.leftCols),o=ci(this.rightCols);this.isBodyWidthDirty=this.bodyWidth!==e,(this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==o)&&(this.bodyWidth=e,this.leftWidth=t,this.rightWidth=o,this.eventSvc.dispatchEvent({type:"columnContainerWidthChanged"}),this.eventSvc.dispatchEvent({type:"displayedColumnsWidthChanged"}))}setLeftValues(e){this.setLeftValuesOfCols(e),this.setLeftValuesOfGroups()}setFirstRightAndLastLeftPinned(e,t,o,i){let r,s;this.gos.get("enableRtl")?(r=t?t[0]:null,s=o?Ce(o):null):(r=t?Ce(t):null,s=o?o[0]:null),e.getCols().forEach(n=>{n.setLastLeftPinned(n===r,i),n.setFirstRightPinned(n===s,i)})}buildTrees(e,t){const o=e.getColsToShow(),i=o.filter(l=>l.getPinned()=="left"),r=o.filter(l=>l.getPinned()=="right"),s=o.filter(l=>l.getPinned()!="left"&&l.getPinned()!="right"),n=new Wd,a=l=>t?t.createColumnGroups(l):l.columns;this.treeLeft=a({columns:i,idCreator:n,pinned:"left",oldDisplayedGroups:this.treeLeft}),this.treeRight=a({columns:r,idCreator:n,pinned:"right",oldDisplayedGroups:this.treeRight}),this.treeCenter=a({columns:s,idCreator:n,pinned:null,oldDisplayedGroups:this.treeCenter}),this.updateColsAndGroupsMap()}clear(){this.leftCols=[],this.rightCols=[],this.centerCols=[],this.allCols=[],this.ariaOrderColumns=[]}joinColsAriaOrder(e){const t=e.getCols(),o=[],i=[],r=[];for(const s of t){const n=s.getPinned();n?n===!0||n==="left"?o.push(s):r.push(s):i.push(s)}this.ariaOrderColumns=o.concat(i).concat(r)}getAriaColIndex(e){let t;return Ie(e)?t=e.getLeafColumns()[0]:t=e,this.ariaOrderColumns.indexOf(t)+1}setLeftValuesOfGroups(){[this.treeLeft,this.treeRight,this.treeCenter].forEach(e=>{e.forEach(t=>{Ie(t)&&t.checkLeft()})})}setLeftValuesOfCols(e){const{colModel:t}=this.beans;if(!t.getColDefCols())return;const i=t.getCols().slice(0),r=this.gos.get("enableRtl");[this.leftCols,this.rightCols,this.centerCols].forEach(s=>{if(r){let n=ci(s);s.forEach(a=>{n-=a.getActualWidth(),a.setLeft(n,e)})}else{let n=0;s.forEach(a=>{a.setLeft(n,e),n+=a.getActualWidth()})}_w(i,s)}),i.forEach(s=>{s.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){const{leftCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getRightColsForRow(e){const{rightCols:t,beans:{colModel:o}}=this;return o.colSpanActive?this.getColsForRow(e,t):t}getColsForRow(e,t,o,i){const r=[];let s=null;for(let n=0;n<t.length;n++){const a=t[n],l=t.length-n,d=Math.min(a.getColSpan(e),l),c=[a];if(d>1){const g=d-1;for(let p=1;p<=g;p++)c.push(t[n+p]);n+=g}let u;o?(u=!1,c.forEach(g=>{o(g)&&(u=!0)})):u=!0,u&&(r.length===0&&s&&(i&&i(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){const t=this.allCols,o=t.indexOf(e);return o>0?t[o-1]:null}isPinningLeft(){return this.leftCols.length>0}isPinningRight(){return this.rightCols.length>0}updateColsAndGroupsMap(){this.colsAndGroupsMap={};const e=t=>{this.colsAndGroupsMap[t.getUniqueId()]=t};$o(this.treeCenter,!1,e),$o(this.treeLeft,!1,e),$o(this.treeRight,!1,e)}isVisible(e){return this.colsAndGroupsMap[e.getUniqueId()]===e}getFirstColumn(){const e=this.gos.get("enableRtl"),t=["leftCols","centerCols","rightCols"];e&&t.reverse();for(let o=0;o<t.length;o++){const i=this[t[o]];if(i.length)return e?Ce(i):i[0]}return null}getColAfter(e){const t=this.allCols,o=t.indexOf(e);return o<t.length-1?t[o+1]:null}getColsLeftWidth(){return ci(this.leftCols)}getDisplayedColumnsRightWidth(){return ci(this.rightCols)}isColAtEdge(e,t){const o=this.allCols;if(!o.length)return!1;const i=t==="first";let r;if(Ie(e)){const s=e.getDisplayedLeafColumns();if(!s.length)return!1;r=i?s[0]:Ce(s)}else r=e;return(i?o[0]:Ce(o))===r}};function $o(e,t,o){if(e)for(let i=0;i<e.length;i++){const r=e[i];if(Ie(r)){const s=t?r.getDisplayedChildren():r.getChildren();$o(s,t,o)}o(r)}}function va(e){const t=[];return $o(e,!0,o=>{$t(o)&&t.push(o)}),t}var Ww=class extends E{constructor(){super(...arguments),this.beanName="colGroupSvc"}getColumnGroupState(){const e=[],t=this.beans.colModel.getColTree();return so(null,t,o=>{_e(o)&&e.push({groupId:o.getGroupId(),open:o.isExpanded()})}),e}resetColumnGroupState(e){const t=this.beans.colModel.getColDefColTree();if(!t)return;const o=[];so(null,t,i=>{if(_e(i)){const r=i.getColGroupDef(),s={groupId:i.getGroupId(),open:r?r.openByDefault:void 0};o.push(s)}}),this.setColumnGroupState(o,e)}setColumnGroupState(e,t){const{colModel:o,colAnimation:i,visibleCols:r,eventSvc:s}=this.beans;if(!o.getColTree().length)return;i?.start();const a=[];e.forEach(l=>{const d=l.groupId,c=l.open,u=this.getProvidedColGroup(d);u&&u.isExpanded()!==c&&(u.setExpanded(c),a.push(u))}),r.refresh(t,!0),a.length&&s.dispatchEvent({type:"columnGroupOpened",columnGroup:a.length===1?a[0]:void 0,columnGroups:a}),i?.finish()}setColumnGroupOpened(e,t,o){let i;_e(e)?i=e.getId():i=e||"",this.setColumnGroupState([{groupId:i,open:t}],o)}getProvidedColGroup(e){let t=null;return so(null,this.beans.colModel.getColTree(),o=>{_e(o)&&o.getId()===e&&(t=o)}),t}getGroupAtDirection(e,t){const o=e.getProvidedColumnGroup().getLevel()+e.getPaddingLevel(),i=e.getDisplayedLeafColumns(),r=t==="After"?Ce(i):i[0],s=`getCol${t}`;for(;;){const n=this.beans.visibleCols[s](r);if(!n)return null;const a=this.getColGroupAtLevel(n,o);if(a!==e)return a}}getColGroupAtLevel(e,t){let o=e.getParent(),i,r;for(;i=o.getProvidedColumnGroup().getLevel(),r=o.getPaddingLevel(),!(i+r<=t);)o=o.getParent();return o}updateOpenClosedVisibility(){const e=this.beans.visibleCols.getAllTrees();$o(e,!1,t=>{Ie(t)&&t.calculateDisplayedColumns()})}getColumnGroup(e,t){if(!e)return null;if(Ie(e))return e;const o=this.beans.visibleCols.getAllTrees(),i=typeof t=="number";let r=null;return $o(o,!1,s=>{if(Ie(s)){const n=s;let a;i?a=e===n.getGroupId()&&t===n.getPartId():a=e===n.getGroupId(),a&&(r=n)}}),r}createColumnGroups(e){const{columns:t,idCreator:o,pinned:i,oldDisplayedGroups:r,isStandaloneStructure:s}=e,n=this.mapOldGroupsById(r),a=[];let l=t;for(;l.length;){const d=l;l=[];let c=0;const u=g=>{const p=c;c=g;const f=d[p],C=(Ie(f)?f.getProvidedColumnGroup():f).getOriginalParent();if(C==null){for(let y=p;y<g;y++)a.push(d[y]);return}const w=this.createColumnGroup(C,o,n,i,s);for(let y=p;y<g;y++)w.addChild(d[y]);l.push(w)};for(let g=1;g<d.length;g++){const p=d[g],m=(Ie(p)?p.getProvidedColumnGroup():p).getOriginalParent(),C=d[c],y=(Ie(C)?C.getProvidedColumnGroup():C).getOriginalParent();m!==y&&u(g)}c<d.length&&u(d.length)}return s||this.setupParentsIntoCols(a,null),a}createProvidedColumnGroup(e,t,o,i,r,s,n){const a=r.getUniqueKey(t.groupId||null,null),l=this.createMergedColGroupDef(t,a),d=new Ui(l,a,!1,o);this.createBean(d);const c=this.findExistingGroup(t,s);c&&s.splice(c.idx,1);const u=c?.group;u&&d.setExpanded(u.isExpanded());const g=Td(this.beans,l.children,o+1,e,i,r,s,n);return d.setChildren(g),d}balanceColumnTree(e,t,o,i){const r=[];for(let s=0;s<e.length;s++){const n=e[s];if(_e(n)){const a=n,l=this.balanceColumnTree(a.getChildren(),t+1,o,i);a.setChildren(l),r.push(a)}else{let a,l;for(let d=o-1;d>=t;d--){const c=i.getUniqueKey(null,null),u=this.createMergedColGroupDef(null,c),g=new Ui(u,c,!0,t);this.createBean(g),l&&l.setChildren([g]),l=g,a||(a=l)}if(a&&l)if(r.push(a),e.some(c=>_e(c))){l.setChildren([n]);continue}else{l.setChildren(e);break}r.push(n)}}return r}findDepth(e){let t=0,o=e;for(;o&&o[0]&&_e(o[0]);)t++,o=o[0].getChildren();return t}findMaxDepth(e,t){let o=t;for(let i=0;i<e.length;i++){const r=e[i];if(_e(r)){const s=r,n=this.findMaxDepth(s.getChildren(),t+1);o<n&&(o=n)}}return o}balanceTreeForAutoCols(e,t){const o=[];return e.forEach(i=>{let r=i;for(let s=t-1;s>=0;s--){const n=new Ui(null,`FAKE_PATH_${i.getId()}}_${s}`,!0,s);this.createBean(n),n.setChildren([r]),r.originalParent=n,r=n}t===0&&(i.originalParent=null),o.push(r)}),o}createMergedColGroupDef(e,t){const o={},{gos:i,validation:r}=this.beans;return Object.assign(o,i.get("defaultColGroupDef")),Object.assign(o,e),r?.validateColDef(o,t),o}findExistingGroup(e,t){if(e.groupId!=null)for(let i=0;i<t.length;i++){const r=t[i];if(r.getColGroupDef()&&r.getId()===e.groupId)return{idx:i,group:r}}}createColumnGroup(e,t,o,i,r){const s=e.getGroupId(),n=t.getInstanceIdForKey(s),a=lc(s,n);let l=o[a];return l&&l.getProvidedColumnGroup()!==e&&(l=null),q(l)?l.reset():(l=new dc(e,s,n,i),r||this.createBean(l)),l}mapOldGroupsById(e){const t={},o=i=>{i.forEach(r=>{if(Ie(r)){const s=r;t[r.getUniqueId()]=s,o(s.getChildren())}})};return e&&o(e),t}setupParentsIntoCols(e,t){e.forEach(o=>{if(o.parent=t,Ie(o)){const i=o;this.setupParentsIntoCols(i.getChildren(),i)}})}},Zc={moduleName:"ColumnGroup",version:ae,dynamicBeans:{headerGroupCellCtrl:Pw},beans:[Ww],apiFunctions:{getAllDisplayedColumnGroups:Vw,getCenterDisplayedColumnGroups:Nw,getColumnGroup:Aw,getColumnGroupState:Lw,getDisplayNameForColumnGroup:Iw,getLeftDisplayedColumnGroups:Ow,getProvidedColumnGroup:Tw,getRightDisplayedColumnGroups:Hw,resetColumnGroupState:Bw,setColumnGroupOpened:Ew,setColumnGroupState:Gw}},$w={moduleName:"CheckboxCellRenderer",version:ae,userComponents:{agCheckboxCellRenderer:sv}};function Uw(e,t){const o=e.colModel.getColDefCol(t);return o?o.getColDef():null}function jw(e){return e.colModel.getColumnDefs()}function Kw(e,t,o){return e.colNames.getDisplayNameForColumn(t,o)||""}function Yw(e,t){return e.colModel.getColDefCol(t)}function qw(e){return e.colModel.getColDefCols()}function Xw(e,t){return it(e,t,"api")}function Qw(e){return Ki(e)}function Zw(e){Hd(e,"api")}function Jw(e){return e.visibleCols.isPinningLeft()||e.visibleCols.isPinningRight()}function eb(e){return e.visibleCols.isPinningLeft()}function tb(e){return e.visibleCols.isPinningRight()}function ob(e,t){return e.visibleCols.getColAfter(t)}function ib(e,t){return e.visibleCols.getColBefore(t)}function rb(e,t,o){e.colModel.setColsVisible(t,o,"api")}function sb(e,t,o){e.pinnedCols?.setColsPinned(t,o,"api")}function nb(e){return e.colModel.getCols()}function ab(e){return e.visibleCols.leftCols}function lb(e){return e.visibleCols.centerCols}function db(e){return e.visibleCols.rightCols}function cb(e){return e.visibleCols.allCols}function ub(e){return e.colViewport.getViewportColumns()}function wa(e,t){if(!e)return;const o=e,i={};return Object.keys(o).forEach(r=>{if(t&&t.indexOf(r)>=0||xd.has(r))return;const s=o[r];typeof s=="object"&&s!==null&&s.constructor===Object?i[r]=wa(s):i[r]=s}),i}var hb=class extends E{constructor(){super(...arguments),this.beanName="colDefFactory"}wireBeans(e){this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc}getColumnDefs(e,t,o,i){const r=e.slice();t?r.sort((a,l)=>o.indexOf(a)-o.indexOf(l)):o&&r.sort((a,l)=>i.indexOf(a)-i.indexOf(l));const s=this.rowGroupColsSvc?.columns,n=this.pivotColsSvc?.columns;return this.buildColumnDefs(r,s,n)}buildColumnDefs(e,t=[],o=[]){const i=[],r={};return e.forEach(s=>{const n=this.createDefFromColumn(s,t,o);let a=!0,l=n,d=s.getOriginalParent(),c=null;for(;d;){let u=null;if(d.isPadding()){d=d.getOriginalParent();continue}const g=r[d.getGroupId()];if(g){g.children.push(l),a=!1;break}if(u=this.createDefFromGroup(d),u&&(u.children=[l],r[u.groupId]=u,l=u,d=d.getOriginalParent()),d!=null&&c===d){a=!1;break}c=d}a&&i.push(l)}),i}createDefFromGroup(e){const t=wa(e.getColGroupDef(),["children"]);return t&&(t.groupId=e.getGroupId()),t}createDefFromColumn(e,t,o){const i=wa(e.getColDef());return i.colId=e.getColId(),i.width=e.getActualWidth(),i.rowGroup=e.isRowGroupActive(),i.rowGroupIndex=e.isRowGroupActive()?t.indexOf(e):null,i.pivot=e.isPivotActive(),i.pivotIndex=e.isPivotActive()?o.indexOf(e):null,i.aggFunc=e.isValueActive()?e.getAggFunc():null,i.hide=e.isVisible()?void 0:!0,i.pinned=e.isPinned()?e.getPinned():null,i.sort=e.getSort()?e.getSort():null,i.sortIndex=e.getSortIndex()!=null?e.getSortIndex():null,i}},gb=class extends E{constructor(){super(...arguments),this.beanName="colFlex"}refreshFlexedColumns(e={}){const t=e.source??"flex";e.viewportWidth!=null&&(this.flexViewportWidth=e.viewportWidth);const o=this.flexViewportWidth;if(!o)return[];const{visibleCols:i}=this.beans,r=i.centerCols;let s=-1;if(e.resizingCols){const f=new Set(e.resizingCols);for(let m=r.length-1;m>=0;m--)if(f.has(r[m])){s=m;break}}let n=!1;const a=r.map((f,m)=>{const C=f.getFlex(),w=C!=null&&C>0&&m>s;return n||(n=w),{col:f,isFlex:w,flex:Math.max(0,C??0),initialSize:f.getActualWidth(),min:f.getMinWidth(),max:f.getMaxWidth(),targetSize:0}});if(!n)return[];let l=a.length,d=a.reduce((f,m)=>f+m.flex,0),c=o;const u=(f,m)=>{f.frozenSize=m,f.col.setActualWidth(m,t),c-=m,d-=f.flex,l-=1},g=f=>f.frozenSize!=null;for(const f of a)f.isFlex||u(f,f.initialSize);for(;l>0;){const f=Math.round(d<1?c*d:c);let m,C=0,w=0;for(const x of a){if(g(x))continue;m=x,w+=f*(x.flex/d);const M=w-C,P=Math.round(M);x.targetSize=P,C+=P}m&&(m.targetSize+=f-C);let y=0;for(const x of a){if(g(x))continue;const M=x.targetSize,P=Math.min(Math.max(M,x.min),x.max);y+=P-M,x.violationType=P===M?void 0:P<M?"max":"min",x.targetSize=P}const b=y===0?"all":y>0?"min":"max";for(const x of a)g(x)||(b==="all"||x.violationType===b)&&u(x,x.targetSize)}e.skipSetLeft||i.setLeftValues(t),e.updateBodyWidths&&i.updateBodyWidths();const p=a.filter(f=>f.isFlex&&!f.violationType).map(f=>f.col);if(e.fireResizedEvent){const f=a.filter(C=>C.initialSize!==C.frozenSize).map(C=>C.col),m=a.filter(C=>C.flex).map(C=>C.col);qr(this.eventSvc,f,!0,t,m)}return p}initCol(e){const{flex:t,initialFlex:o}=e.colDef;t!==void 0?e.flex=t:o!==void 0&&(e.flex=o)}setColFlex(e,t){e.flex=t??null,e.dispatchStateUpdatedEvent("flex")}},pb=class extends E{constructor(){super(...arguments),this.beanName="dataTypeSvc",this.dataTypeDefinitions={},this.isPendingInference=!1,this.isColumnTypeOverrideInDataTypeDefinitions=!1,this.columnStateUpdatesPendingInference={},this.columnStateUpdateListenerDestroyFuncs=[]}wireBeans(e){this.colModel=e.colModel}postConstruct(){this.processDataTypeDefinitions(),this.addManagedPropertyListener("dataTypeDefinitions",e=>{this.processDataTypeDefinitions(),this.colModel.recreateColumnDefs(e)})}processDataTypeDefinitions(){const e=this.getDefaultDataTypes(),t={};this.dataTypeDefinitions=t;const o={};this.formatValueFuncs=o;const i=n=>a=>{const{column:l,node:d,value:c}=a;let u=l.getColDef().valueFormatter;return u===n.groupSafeValueFormatter&&(u=n.valueFormatter),this.beans.valueSvc.formatValue(l,d,c,u)};for(const n of Object.keys(e)){const a=e[n],l={...a,groupSafeValueFormatter:tu(a,this.gos)};t[n]=l,o[n]=i(l)}const r=this.gos.get("dataTypeDefinitions")??{},s={};this.dataTypeMatchers=s;for(const n of Object.keys(r)){const a=r[n],l=this.processDataTypeDefinition(a,r,[n],e);l&&(t[n]=l,a.dataTypeMatcher&&(s[n]=a.dataTypeMatcher),o[n]=i(l))}this.checkObjectValueHandlers(e),["dateString","text","number","boolean","date"].forEach(n=>{const a=s[n];a&&delete s[n],s[n]=a??e[n].dataTypeMatcher})}processDataTypeDefinition(e,t,o,i){let r;const s=e.extendsDataType;if(e.columnTypes&&(this.isColumnTypeOverrideInDataTypeDefinitions=!0),e.extendsDataType===e.baseDataType){let n=i[s];const a=t[s];if(n&&a&&(n=a),!eu(e,n,s))return;r=Jc(n,e)}else{if(o.includes(s)){_(44);return}const n=t[s];if(!eu(e,n,s))return;const a=this.processDataTypeDefinition(n,t,[...o,s],i);if(!a)return;r=Jc(a,e)}return{...r,groupSafeValueFormatter:tu(r,this.gos)}}updateColDefAndGetColumnType(e,t,o){let{cellDataType:i}=t;const{field:r}=t;if(i===void 0&&(i=e.cellDataType),(i==null||i===!0)&&(i=this.canInferCellDataType(e,t)?this.inferCellDataType(r,o):!1),!i){e.cellDataType=!1;return}const s=this.dataTypeDefinitions[i];if(!s){_(47,{cellDataType:i});return}return e.cellDataType=i,s.groupSafeValueFormatter&&(e.valueFormatter=s.groupSafeValueFormatter),s.valueParser&&(e.valueParser=s.valueParser),s.suppressDefaultProperties||this.setColDefPropertiesForBaseDataType(e,i,s,o),s.columnTypes}addColumnListeners(e){if(!this.isPendingInference)return;const t=this.columnStateUpdatesPendingInference[e.getColId()];if(!t)return;const o=i=>{t.add(i.key)};e.__addEventListener("columnStateUpdated",o),this.columnStateUpdateListenerDestroyFuncs.push(()=>e.__removeEventListener("columnStateUpdated",o))}canInferCellDataType(e,t){const{gos:o}=this;if(!Et(o))return!1;const i={cellRenderer:!0,valueGetter:!0,valueParser:!0,refData:!0};if(ba(t,i))return!1;const r=t.type===null?e.type:t.type;if(r){const s=o.get("columnTypes")??{};if(Kr(r).some(a=>{const l=s[a.trim()];return l&&ba(l,i)}))return!1}return!ba(e,i)}inferCellDataType(e,t){if(!e)return;let o;const i=this.getInitialData();if(i){const r=e.indexOf(".")>=0&&!this.gos.get("suppressFieldDotNotation");o=$i(i,e,r)}else this.initWaitForRowData(t);if(o!=null)return Object.keys(this.dataTypeMatchers).find(r=>this.dataTypeMatchers[r](o))??"object"}getInitialData(){const e=this.gos.get("rowData");if(e?.length)return e[0];if(this.initialData)return this.initialData;{const t=this.beans.rowModel.rootNode?.allLeafChildren;if(t?.length)return t[0].data}return null}initWaitForRowData(e){if(this.columnStateUpdatesPendingInference[e]=new Set,this.isPendingInference)return;this.isPendingInference=!0;const t=this.isColumnTypeOverrideInDataTypeDefinitions,{colAutosize:o,eventSvc:i}=this.beans;t&&o&&(o.shouldQueueResizeOperations=!0);const[r]=this.addManagedEventListeners({rowDataUpdateStarted:s=>{const{firstRowData:n}=s;n&&(r?.(),this.isPendingInference=!1,this.processColumnsPendingInference(n,t),this.columnStateUpdatesPendingInference={},t&&o?.processResizeOperations(),i.dispatchEvent({type:"dataTypesInferred"}))}})}processColumnsPendingInference(e,t){this.initialData=e;const o=[];this.destroyColumnStateUpdateListeners();const i={},r={};for(const s of Object.keys(this.columnStateUpdatesPendingInference)){const n=this.columnStateUpdatesPendingInference[s],a=this.colModel.getCol(s);if(!a)return;const l=a.getColDef();if(!this.resetColDefIntoCol(a,"cellDataTypeInferred"))return;const d=a.getColDef();if(t&&d.type&&d.type!==l.type){const c=mb(a,n);c.rowGroup&&c.rowGroupIndex==null&&(i[s]=c),c.pivot&&c.pivotIndex==null&&(r[s]=c),o.push(c)}}t&&o.push(...this.generateColumnStateForRowGroupAndPivotIndexes(i,r)),o.length&&it(this.beans,{state:o},"cellDataTypeInferred"),this.initialData=null}generateColumnStateForRowGroupAndPivotIndexes(e,t){const o={},{rowGroupColsSvc:i,pivotColsSvc:r}=this.beans;return i?.restoreColumnOrder(o,e),r?.restoreColumnOrder(o,t),Object.values(o)}resetColDefIntoCol(e,t){const o=e.getUserProvidedColDef();if(!o)return!1;const i=Yr(this.beans,o,e.getColId());return e.setColDef(i,o,t),!0}checkObjectValueHandlers(e){const t=this.dataTypeDefinitions.object,o=e.object;this.hasObjectValueParser=t.valueParser!==o.valueParser,this.hasObjectValueFormatter=t.valueFormatter!==o.valueFormatter}getDateStringTypeDefinition(e){const{dateString:t}=this.dataTypeDefinitions;return e?this.getDataTypeDefinition(e)??t:t}getDateParserFunction(e){return this.getDateStringTypeDefinition(e).dateParser}getDateFormatterFunction(e){return this.getDateStringTypeDefinition(e).dateFormatter}getDataTypeDefinition(e){const t=e.getColDef();if(t.cellDataType)return this.dataTypeDefinitions[t.cellDataType]}getBaseDataType(e){return this.getDataTypeDefinition(e)?.baseDataType}checkType(e,t){if(t==null)return!0;const o=this.getDataTypeDefinition(e)?.dataTypeMatcher;return o?o(t):!0}validateColDef(e){const t=o=>_(48,{property:o});if(e.cellDataType==="object"){const{object:o}=this.dataTypeDefinitions;e.valueFormatter===o.groupSafeValueFormatter&&!this.hasObjectValueFormatter&&t("Formatter"),e.editable&&e.valueParser===o.valueParser&&!this.hasObjectValueParser&&t("Parser")}}getFormatValue(e){return this.formatValueFuncs[e]}isColPendingInference(e){return this.isPendingInference&&!!this.columnStateUpdatesPendingInference[e]}setColDefPropertiesForBaseDataType(e,t,o,i){const r=this.formatValueFuncs[t];switch(o.baseDataType){case"number":{e.cellEditor="agNumberCellEditor";break}case"boolean":{e.cellEditor="agCheckboxCellEditor",e.cellRenderer="agCheckboxCellRenderer",e.getFindText=()=>null,e.suppressKeyboardEvent=s=>!!s.colDef.editable&&s.event.key===D.SPACE;break}case"date":{e.cellEditor="agDateCellEditor",e.keyCreator=r;break}case"dateString":{e.cellEditor="agDateStringCellEditor",e.keyCreator=r;break}case"object":{e.cellEditorParams={useFormatter:!0},e.comparator=(s,n)=>{const a=this.colModel.getColDefCol(i),l=a?.getColDef();if(!a||!l)return 0;const d=s==null?"":r({column:a,node:null,value:s}),c=n==null?"":r({column:a,node:null,value:n});return d===c?0:d>c?1:-1},e.keyCreator=r;break}}this.beans.filterManager?.setColDefPropertiesForDataType(e,o,r)}getDefaultDataTypes(){const e=o=>!!o.match("^\\d{4}-\\d{2}-\\d{2}$"),t=this.getLocaleTextFunc();return{number:{baseDataType:"number",valueParser:o=>o.newValue?.trim?.()===""?null:Number(o.newValue),valueFormatter:o=>o.value==null?"":typeof o.value!="number"||isNaN(o.value)?t("invalidNumber","Invalid Number"):String(o.value),dataTypeMatcher:o=>typeof o=="number"},text:{baseDataType:"text",valueParser:o=>o.newValue===""?null:oo(o.newValue),dataTypeMatcher:o=>typeof o=="string"},boolean:{baseDataType:"boolean",valueParser:o=>o.newValue==null?o.newValue:o.newValue?.trim?.()===""?null:String(o.newValue).toLowerCase()==="true",valueFormatter:o=>o.value==null?"":String(o.value),dataTypeMatcher:o=>typeof o=="boolean"},date:{baseDataType:"date",valueParser:o=>Bc(o.newValue==null?null:String(o.newValue)),valueFormatter:o=>o.value==null?"":!(o.value instanceof Date)||isNaN(o.value.getTime())?t("invalidDate","Invalid Date"):Gc(o.value,!1)??"",dataTypeMatcher:o=>o instanceof Date},dateString:{baseDataType:"dateString",dateParser:o=>Bc(o)??void 0,dateFormatter:o=>Gc(o??null,!1)??void 0,valueParser:o=>e(String(o.newValue))?o.newValue:null,valueFormatter:o=>e(String(o.value))?o.value:"",dataTypeMatcher:o=>typeof o=="string"&&e(o)},object:{baseDataType:"object",valueParser:()=>null,valueFormatter:o=>oo(o.value)??""}}}destroyColumnStateUpdateListeners(){this.columnStateUpdateListenerDestroyFuncs.forEach(e=>e()),this.columnStateUpdateListenerDestroyFuncs=[]}destroy(){this.dataTypeDefinitions={},this.dataTypeMatchers={},this.formatValueFuncs={},this.columnStateUpdatesPendingInference={},this.destroyColumnStateUpdateListeners(),super.destroy()}};function Jc(e,t){const o={...e,...t};return e.columnTypes&&t.columnTypes&&t.appendColumnTypes&&(o.columnTypes=[...Kr(e.columnTypes),...Kr(t.columnTypes)]),o}function eu(e,t,o){return t?t.baseDataType!==e.baseDataType?(_(46),!1):!0:(_(45,{parentCellDataType:o}),!1)}function tu(e,t){if(e.valueFormatter)return o=>{if(o.node?.group){const i=(o.colDef.pivotValueColumn??o.column).getAggFunc();if(i){if(i==="first"||i==="last")return e.valueFormatter(o);if(e.baseDataType==="number"&&i!=="count"){if(typeof o.value=="number")return e.valueFormatter(o);if(typeof o.value=="object"){if(!o.value)return;if("toNumber"in o.value)return e.valueFormatter({...o,value:o.value.toNumber()});if("value"in o.value)return e.valueFormatter({...o,value:o.value.value})}}return}if(t.get("groupDisplayType")==="groupRows"&&!t.get("treeData"))return}else if(t.get("groupHideOpenParents")&&o.column.isRowGroupActive()&&typeof o.value=="string"&&!e.dataTypeMatcher?.(o.value))return;return e.valueFormatter(o)}}function fb(e,t,o,i){if(!t[o])return!1;const r=e[o];return r===null?(t[o]=!1,!1):i===void 0?!!r:r===i}function ba(e,t){return[["cellRenderer","agSparklineCellRenderer"],["valueGetter",void 0],["valueParser",void 0],["refData",void 0]].some(([o,i])=>fb(e,t,o,i))}function mb(e,t){const o=_d(e);return t.forEach(i=>{delete o[i],i==="rowGroup"?delete o.rowGroupIndex:i==="pivot"&&delete o.pivotIndex}),o}var Cb={moduleName:"DataType",version:ae,beans:[pb],dependsOn:[$w]},vb={moduleName:"ColumnFlex",version:ae,beans:[gb]},wb={moduleName:"ColumnApi",version:ae,beans:[hb],apiFunctions:{getColumnDef:Uw,getDisplayNameForColumn:Kw,getColumn:Yw,getColumns:qw,applyColumnState:Xw,getColumnState:Qw,resetColumnState:Zw,isPinning:Jw,isPinningLeft:eb,isPinningRight:tb,getDisplayedColAfter:ob,getDisplayedColBefore:ib,setColumnsVisible:rb,setColumnsPinned:sb,getAllGridColumns:nb,getDisplayedLeftColumns:ab,getDisplayedCenterColumns:lb,getDisplayedRightColumns:db,getAllDisplayedColumns:cb,getAllDisplayedVirtualColumns:ub,getColumnDefs:jw}};function bb(e){if(!e||e==null)return null;const t=/([a-z])([A-Z])/g,o=/([A-Z]+)([A-Z])([a-z])/g;return e.replace(t,"$1 $2").replace(o,"$1 $2$3").replace(/\./g," ").split(" ").map(r=>r.substring(0,1).toUpperCase()+(r.length>1?r.substring(1,r.length):"")).join(" ")}var yb=class extends E{constructor(){super(...arguments),this.beanName="colNames"}getDisplayNameForColumn(e,t,o=!1){if(!e)return null;const i=this.getHeaderName(e.getColDef(),e,null,null,t),{aggColNameSvc:r}=this.beans;return o&&r?r.getHeaderName(e,i):i}getDisplayNameForProvidedColumnGroup(e,t,o){const i=t?.getColGroupDef();return i?this.getHeaderName(i,null,e,t,o):null}getDisplayNameForColumnGroup(e,t){return this.getDisplayNameForProvidedColumnGroup(e,e.getProvidedColumnGroup(),t)}getHeaderName(e,t,o,i,r){const s=e.headerValueGetter;if(s){const n=Z(this.gos,{colDef:e,column:t,columnGroup:o,providedColumnGroup:i,location:r});return typeof s=="function"?s(n):typeof s=="string"?this.beans.expressionSvc?.evaluate(s,n)??null:""}else{if(e.headerName!=null)return e.headerName;if(e.field)return bb(e.field)}return""}},Sb=class extends E{constructor(){super(...arguments),this.beanName="colViewport",this.colsWithinViewport=[],this.headerColsWithinViewport=[],this.colsWithinViewportHash="",this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={}}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel}postConstruct(){this.suppressColumnVirtualisation=this.gos.get("suppressColumnVirtualisation")}setScrollPosition(e,t,o=!1){const{visibleCols:i}=this,r=i.isBodyWidthDirty;if(!(e===this.scrollWidth&&t===this.scrollPosition&&!r)){if(this.scrollWidth=e,this.scrollPosition=t,i.isBodyWidthDirty=!0,this.gos.get("enableRtl")){const n=i.bodyWidth;this.viewportLeft=n-t-e,this.viewportRight=n-t}else this.viewportLeft=t,this.viewportRight=e+t;this.colModel.ready&&this.checkViewportColumns(o)}}getHeadersToRender(e,t){let o;switch(e){case"left":o=this.rowsOfHeadersToRenderLeft[t];break;case"right":o=this.rowsOfHeadersToRenderRight[t];break;default:o=this.rowsOfHeadersToRenderCenter[t];break}return o||[]}extractViewportColumns(){const e=this.visibleCols.centerCols;this.isColumnVirtualisationSuppressed()?(this.colsWithinViewport=e,this.headerColsWithinViewport=e):(this.colsWithinViewport=e.filter(this.isColumnInRowViewport.bind(this)),this.headerColsWithinViewport=e.filter(this.isColumnInHeaderViewport.bind(this)))}isColumnVirtualisationSuppressed(){return this.suppressColumnVirtualisation||this.viewportRight===0}clear(e){this.rowsOfHeadersToRenderLeft={},this.rowsOfHeadersToRenderRight={},this.rowsOfHeadersToRenderCenter={},e||(this.colsWithinViewportHash="")}isColumnInHeaderViewport(e){return e.isAutoHeaderHeight()||Rb(e)?!0:this.isColumnInRowViewport(e)}isColumnInRowViewport(e){if(e.isAutoHeight())return!0;const t=e.getLeft()||0,o=t+e.getActualWidth(),i=this.viewportLeft-200,r=this.viewportRight+200,s=t<i&&o<i,n=t>r&&o>r;return!s&&!n}getViewportColumns(){const{leftCols:e,rightCols:t}=this.visibleCols;return this.colsWithinViewport.concat(e).concat(t)}getColsWithinViewport(e){if(!this.colModel.colSpanActive)return this.colsWithinViewport;const t=s=>{const n=s.getLeft();return q(n)&&n>this.viewportLeft},o=this.isColumnVirtualisationSuppressed()?void 0:this.isColumnInRowViewport.bind(this),{visibleCols:i}=this,r=i.centerCols;return i.getColsForRow(e,r,o,t)}checkViewportColumns(e=!1){this.extractViewport()&&this.eventSvc.dispatchEvent({type:"virtualColumnsChanged",afterScroll:e})}calculateHeaderRows(){this.clear(!0);const e={},{leftCols:t,rightCols:o,treeLeft:i,treeRight:r,treeCenter:s}=this.visibleCols;this.headerColsWithinViewport.concat(t).concat(o).forEach(l=>e[l.getId()]=!0);const a=(l,d,c)=>{let u=!1;for(let g=0;g<l.length;g++){const p=l[g];let f=!1;if($t(p))f=e[p.getId()]===!0;else{const C=p.getDisplayedChildren();C&&(f=a(C,d,c+1))}f&&(u=!0,d[c]||(d[c]=[]),d[c].push(p))}return u};a(i,this.rowsOfHeadersToRenderLeft,0),a(r,this.rowsOfHeadersToRenderRight,0),a(s,this.rowsOfHeadersToRenderCenter,0)}extractViewport(){const e=i=>`${i.getId()}-${i.getPinned()||"normal"}`;this.extractViewportColumns();const t=this.getViewportColumns().map(e).join("#"),o=this.colsWithinViewportHash!==t;return o&&(this.colsWithinViewportHash=t,this.calculateHeaderRows()),o}};function Rb(e){for(;e;){if(e.isAutoHeaderHeight())return!0;e=e.getParent()}return!1}var xb=class extends E{constructor(){super(...arguments),this.beanName="agCompUtils"}adaptFunction(e,t){if(!e.cellRenderer)return null;class o{refresh(){return!1}getGui(){return this.eGui}init(r){const s=t(r),n=typeof s;if(n==="string"||n==="number"||n==="boolean"){this.eGui=Lr("<span>"+s+"</span>");return}if(s==null){this.eGui=Pe({tag:"span"});return}this.eGui=s}}return o}},Fb={moduleName:"CellRendererFunction",version:ae,beans:[xb]},Db=class extends E{constructor(){super(...arguments),this.beanName="registry",this.agGridDefaults={},this.agGridDefaultParams={},this.jsComps={},this.dynamicBeans={},this.selectors={},this.icons={}}postConstruct(){const e=this.gos.get("components");if(e!=null)for(const t of Object.keys(e))this.jsComps[t]=e[t]}registerModule(e){const{icons:t,userComponents:o,dynamicBeans:i,selectors:r}=e;if(o){const s=(n,a,l)=>{this.agGridDefaults[n]=a,l&&(this.agGridDefaultParams[n]=l)};for(const n of Object.keys(o)){const a=o[n];typeof a=="object"?s(n,a.classImp,a.params):s(n,a)}}if(i)for(const s of Object.keys(i))this.dynamicBeans[s]=i[s];if(r?.forEach(s=>{this.selectors[s.selector]=s}),t)for(const s of Object.keys(t))this.icons[s]=t[s]}getUserComponent(e,t){const o=(a,l,d)=>({componentFromFramework:l,component:a,params:d}),{frameworkOverrides:i}=this.beans,r=i.frameworkComponent(t,this.gos.get("components"));if(r!=null)return o(r,!0);const s=this.jsComps[t];if(s){const a=i.isFrameworkComponent(s);return o(s,a)}const n=this.agGridDefaults[t];return n?o(n,!1,this.agGridDefaultParams[t]):(this.beans.validation?.missingUserComponent(e,t,this.agGridDefaults,this.jsComps),null)}createDynamicBean(e,t,...o){const i=this.dynamicBeans[e];if(i==null){if(t)throw new Error(Co(256));return}return new i(...o)}getSelector(e){return this.selectors[e]}getIcon(e){return this.icons[e]}},kb=23,Mb=class extends E{constructor(){super(...arguments),this.beanName="ctrlsSvc",this.params={},this.ready=!1,this.readyCallbacks=[]}postConstruct(){this.addEventListener("ready",()=>{this.updateReady(),this.ready&&(this.readyCallbacks.forEach(e=>e(this.params)),this.readyCallbacks.length=0)},this.beans.frameworkOverrides.runWhenReadyAsync?.()??!1)}updateReady(){const e=Object.values(this.params);this.ready=e.length===kb&&e.every(t=>t?.isAlive()??!1)}whenReady(e,t){this.ready?t(this.params):this.readyCallbacks.push(t),e.addDestroyFunc(()=>{const o=this.readyCallbacks.indexOf(t);o>=0&&this.readyCallbacks.splice(o,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(){const{leftHeader:e,centerHeader:t,rightHeader:o}=this.params;return[e,o,t]}getHeaderRowContainerCtrl(e){const t=this.params;switch(e){case"left":return t.leftHeader;case"right":return t.rightHeader;default:return t.centerHeader}}getScrollFeature(){return this.getGridBodyCtrl().scrollFeature}},Pb=':where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart),:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]){box-sizing:border-box;&:after,&:before{box-sizing:border-box}&:where(div,span,label):focus-visible{box-shadow:inset var(--ag-focus-shadow);outline:none}}:where(.ag-root-wrapper,.ag-popup,.ag-dnd-ghost,.ag-chart) :where([class^=ag-]) ::-ms-clear{display:none}.ag-aria-description-container{border:0;z-index:9999;clip:rect(1px,1px,1px,1px);height:1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.ag-hidden{display:none!important}.ag-invisible{visibility:hidden!important}.ag-unselectable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-selectable{-webkit-user-select:text;-moz-user-select:text;user-select:text}.ag-tab-guard{display:block;height:0;position:absolute;width:0}:where(.ag-virtual-list-viewport) .ag-tab-guard{position:sticky}.ag-tab-guard-top{top:1px}.ag-tab-guard-bottom{bottom:1px}.ag-shake-left-to-right{animation-direction:alternate;animation-duration:.2s;animation-iteration-count:infinite;animation-name:ag-shake-left-to-right}@keyframes ag-shake-left-to-right{0%{padding-left:6px;padding-right:2px}to{padding-left:2px;padding-right:6px}}.ag-body-horizontal-scroll-viewport,.ag-body-vertical-scroll-viewport,.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport,.ag-virtual-list-viewport{flex:1 1 auto;height:100%;min-width:0;overflow:hidden;position:relative}.ag-viewport{position:relative}.ag-spanning-container{position:absolute;top:0;z-index:1}.ag-body-viewport,.ag-center-cols-viewport,.ag-floating-bottom-viewport,.ag-floating-top-viewport,.ag-header-viewport,.ag-sticky-bottom-viewport,.ag-sticky-top-viewport{overflow-x:auto;-ms-overflow-style:none!important;scrollbar-width:none!important;&::-webkit-scrollbar{display:none!important}}.ag-body-viewport{display:flex;overflow-x:hidden;&:where(.ag-layout-normal){overflow-y:auto;-webkit-overflow-scrolling:touch}}.ag-floating-bottom-container,.ag-floating-top-container,.ag-sticky-bottom-container,.ag-sticky-top-container{min-height:1px}.ag-center-cols-viewport{min-height:100%;width:100%}.ag-body-horizontal-scroll-viewport{overflow-x:scroll}.ag-body-vertical-scroll-viewport{overflow-y:scroll}.ag-virtual-list-viewport{overflow:auto;width:100%}.ag-body-container,.ag-body-horizontal-scroll-container,.ag-body-vertical-scroll-container,.ag-center-cols-container,.ag-floating-bottom-container,.ag-floating-bottom-full-width-container,.ag-floating-top-container,.ag-full-width-container,.ag-header-container,.ag-pinned-left-cols-container,.ag-pinned-right-cols-container,.ag-sticky-bottom-container,.ag-sticky-top-container,.ag-virtual-list-container{position:relative}.ag-floating-bottom-container,.ag-floating-top-container,.ag-header-container,.ag-pinned-left-floating-bottom,.ag-pinned-left-floating-top,.ag-pinned-right-floating-bottom,.ag-pinned-right-floating-top,.ag-sticky-bottom-container,.ag-sticky-top-container{height:100%;white-space:nowrap}.ag-center-cols-container,.ag-pinned-right-cols-container{display:block}.ag-body-horizontal-scroll-container{height:100%}.ag-body-vertical-scroll-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container,.ag-full-width-container,.ag-sticky-bottom-full-width-container,.ag-sticky-top-full-width-container{pointer-events:none;position:absolute;top:0}:where(.ag-ltr) .ag-floating-bottom-full-width-container,:where(.ag-ltr) .ag-floating-top-full-width-container,:where(.ag-ltr) .ag-full-width-container,:where(.ag-ltr) .ag-sticky-bottom-full-width-container,:where(.ag-ltr) .ag-sticky-top-full-width-container{left:0}:where(.ag-rtl) .ag-floating-bottom-full-width-container,:where(.ag-rtl) .ag-floating-top-full-width-container,:where(.ag-rtl) .ag-full-width-container,:where(.ag-rtl) .ag-sticky-bottom-full-width-container,:where(.ag-rtl) .ag-sticky-top-full-width-container{right:0}.ag-full-width-container{width:100%}.ag-floating-bottom-full-width-container,.ag-floating-top-full-width-container{display:inline-block;height:100%;overflow:hidden;width:100%}.ag-virtual-list-container{overflow:hidden}.ag-body{display:flex;flex:1 1 auto;flex-direction:row!important;min-height:0;position:relative}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:flex;min-height:0;min-width:0;position:relative;&:where(.ag-scrollbar-invisible){bottom:0;position:absolute;&:where(.ag-apple-scrollbar){opacity:0;transition:opacity .4s;visibility:hidden;&:where(.ag-scrollbar-scrolling,.ag-scrollbar-active){opacity:1;visibility:visible}}}}.ag-body-horizontal-scroll{width:100%;&:where(.ag-scrollbar-invisible){left:0;right:0}}.ag-body-vertical-scroll{height:100%;&:where(.ag-scrollbar-invisible){top:0;z-index:10}}:where(.ag-ltr) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){right:0}}:where(.ag-rtl) .ag-body-vertical-scroll{&:where(.ag-scrollbar-invisible){left:0}}.ag-force-vertical-scroll{overflow-y:scroll!important}.ag-horizontal-left-spacer,.ag-horizontal-right-spacer{height:100%;min-width:0;overflow-x:scroll;&:where(.ag-scroller-corner){overflow-x:hidden}}:where(.ag-row-animation) .ag-row{transition:transform .4s,top .4s,opacity .2s;&:where(.ag-after-created){transition:transform .4s,top .4s,height .4s,opacity .2s}}:where(.ag-row-no-animation) .ag-row{transition:none}.ag-row-loading{align-items:center;display:flex}.ag-row-position-absolute{position:absolute}.ag-row-position-relative{position:relative}.ag-full-width-row{overflow:hidden;pointer-events:all}.ag-row-inline-editing{z-index:1}.ag-row-dragging{z-index:2}.ag-stub-cell{align-items:center;display:flex}.ag-cell{display:inline-block;height:100%;position:absolute;white-space:nowrap;&:focus-visible{box-shadow:none}}.ag-cell-value{flex:1 1 auto}.ag-cell-value,.ag-group-value{overflow:hidden;text-overflow:ellipsis}.ag-cell-wrap-text{white-space:normal;word-break:break-word}:where(.ag-cell) .ag-icon{display:inline-block;vertical-align:middle}.ag-floating-top{border-bottom:var(--ag-pinned-row-border)}.ag-floating-bottom,.ag-floating-top{display:flex;overflow:hidden;position:relative;white-space:nowrap;width:100%}.ag-floating-bottom{border-top:var(--ag-pinned-row-border)}.ag-sticky-bottom,.ag-sticky-top{background-color:var(--ag-background-color);display:flex;height:0;overflow:hidden;position:absolute;width:100%;z-index:1}.ag-opacity-zero{opacity:0!important}.ag-cell-label-container{align-items:center;display:flex;flex-direction:row-reverse;height:100%;justify-content:space-between;width:100%}:where(.ag-right-aligned-header){.ag-cell-label-container{flex-direction:row}.ag-header-cell-text{text-align:end}}.ag-column-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr){direction:ltr;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row}}:where(.ag-rtl){direction:rtl;text-align:right;.ag-body,.ag-body-horizontal-scroll,.ag-body-viewport,.ag-floating-bottom,.ag-floating-top,.ag-header,.ag-sticky-bottom,.ag-sticky-top{flex-direction:row-reverse}.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{display:block}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(180deg)}}:where(.ag-rtl){.ag-icon-contracted,.ag-icon-expanded,.ag-icon-tree-closed{transform:rotate(-180deg)}}.ag-measurement-container{height:0;overflow:hidden;visibility:hidden;width:0}.ag-measurement-element-border{display:inline-block;&:before{border-left:var(--ag-internal-measurement-border);content:"";display:block}}.ag-group{position:relative;width:100%}.ag-group-title-bar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-title{display:inline;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-group-title-bar) .ag-group-title{cursor:default}.ag-group-toolbar{align-items:center;display:flex;padding:var(--ag-spacing)}.ag-group-container{display:flex}.ag-disabled .ag-group-container{pointer-events:none}.ag-disabled-group-container,.ag-disabled-group-title-bar{opacity:.5}.ag-group-container-horizontal{flex-flow:row wrap}.ag-group-container-vertical{flex-direction:column}.ag-group-title-bar-icon{cursor:pointer;flex:none}:where(.ag-ltr) .ag-group-title-bar-icon{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-group-title-bar-icon{margin-left:var(--ag-spacing)}:where(.ag-group-item-alignment-stretch) .ag-group-item{align-items:stretch}:where(.ag-group-item-alignment-start) .ag-group-item{align-items:flex-start}:where(.ag-group-item-alignment-end) .ag-group-item{align-items:flex-end}.ag-popup-child{top:0;z-index:5;&:where(:not(.ag-tooltip-custom)){box-shadow:var(--ag-popup-shadow)}}.ag-popup-editor{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-large-text-input{display:block}:where(.ag-ltr) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-left:var(--ag-row-group-indent-size)}:where(.ag-rtl) .ag-row:not(.ag-row-level-0) .ag-pivot-leaf-group{margin-right:var(--ag-row-group-indent-size)}:where(.ag-ltr) .ag-row-group-leaf-indent{margin-left:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}:where(.ag-rtl) .ag-row-group-leaf-indent{margin-right:calc(var(--ag-cell-widget-spacing) + var(--ag-icon-size))}.ag-value-change-delta{padding:0 2px}.ag-value-change-delta-up{color:var(--ag-value-change-delta-up-color)}.ag-value-change-delta-down{color:var(--ag-value-change-delta-down-color)}.ag-value-change-value{background-color:transparent;border-radius:1px;padding-left:1px;padding-right:1px;transition:background-color 1s}.ag-value-change-value-highlight{background-color:var(--ag-value-change-value-highlight-background-color);transition:background-color .1s}.ag-cell-data-changed{background-color:var(--ag-value-change-value-highlight-background-color)!important}.ag-cell-data-changed-animation{background-color:transparent}.ag-cell-highlight{background-color:var(--ag-range-selection-highlight-color)!important}.ag-row,.ag-spanned-row{color:var(--ag-cell-text-color);font-family:var(--ag-cell-font-family);font-size:var(--ag-data-font-size);white-space:nowrap;--ag-internal-content-line-height:calc(min(var(--ag-row-height), var(--ag-line-height, 1000px)) - var(--ag-internal-row-border-width, 1px) - 2px)}.ag-row{background-color:var(--ag-background-color);border-bottom:var(--ag-row-border);height:var(--ag-row-height);width:100%}:where(.ag-body-vertical-content-no-gap>div>div>div,.ag-body-vertical-content-no-gap>div>div>div>div)>.ag-row-last{border-bottom-color:transparent}.ag-sticky-bottom{border-top:var(--ag-row-border);box-sizing:content-box!important}.ag-group-contracted,.ag-group-expanded{cursor:pointer}.ag-cell,.ag-full-width-row .ag-cell-wrapper.ag-row-group{border:1px solid transparent;line-height:var(--ag-internal-content-line-height);-webkit-font-smoothing:subpixel-antialiased}:where(.ag-ltr) .ag-cell{border-right:var(--ag-column-border)}:where(.ag-rtl) .ag-cell{border-left:var(--ag-column-border)}.ag-spanned-cell-wrapper{background-color:var(--ag-background-color);position:absolute}.ag-spanned-cell-wrapper>.ag-spanned-cell{display:block;position:relative}:where(.ag-ltr) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-right-color:transparent}:where(.ag-rtl) :where(.ag-body-horizontal-content-no-gap) .ag-column-last{border-left-color:transparent}.ag-cell-wrapper{align-items:center;display:flex;>:where(:not(.ag-cell-value,.ag-group-value)){align-items:center;display:flex;height:var(--ag-internal-content-line-height)}&:where(.ag-row-group){align-items:flex-start}:where(.ag-full-width-row) &:where(.ag-row-group){align-items:center;height:100%}}:where(.ag-ltr) .ag-cell-wrapper{padding-left:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-rtl) .ag-cell-wrapper{padding-right:calc(var(--ag-indentation-level)*var(--ag-row-group-indent-size))}:where(.ag-cell-wrap-text:not(.ag-cell-auto-height)) .ag-cell-wrapper{align-items:normal;height:100%;:where(.ag-cell-value){height:100%}}:where(.ag-ltr) .ag-row>.ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}:where(.ag-rtl) .ag-row>.ag-cell-wrapper.ag-row-group{padding-right:calc(var(--ag-cell-horizontal-padding) + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-cell-focus:not(.ag-cell-range-selected):focus-within,.ag-cell-range-single-cell,.ag-cell-range-single-cell.ag-cell-range-handle,.ag-context-menu-open .ag-cell-focus:not(.ag-cell-range-selected),.ag-context-menu-open .ag-full-width-row.ag-row-focus .ag-cell-wrapper.ag-row-group,.ag-full-width-row.ag-row-focus:focus .ag-cell-wrapper.ag-row-group{border:1px solid;border-color:var(--ag-range-selection-border-color);border-style:var(--ag-range-selection-border-style);outline:initial}.ag-full-width-row.ag-row-focus:focus{box-shadow:none}:where(.ag-ltr) .ag-group-contracted,:where(.ag-ltr) .ag-group-expanded,:where(.ag-ltr) .ag-row-drag,:where(.ag-ltr) .ag-selection-checkbox{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-contracted,:where(.ag-rtl) .ag-group-expanded,:where(.ag-rtl) .ag-row-drag,:where(.ag-rtl) .ag-selection-checkbox{margin-left:var(--ag-cell-widget-spacing)}:where(.ag-ltr) .ag-group-child-count{margin-left:3px}:where(.ag-rtl) .ag-group-child-count{margin-right:3px}.ag-row-highlight-above:after,.ag-row-highlight-below:after{background-color:var(--ag-range-selection-border-color);content:"";height:1px;position:absolute;width:calc(100% - 1px)}:where(.ag-ltr) .ag-row-highlight-above:after,:where(.ag-ltr) .ag-row-highlight-below:after{left:1px}:where(.ag-rtl) .ag-row-highlight-above:after,:where(.ag-rtl) .ag-row-highlight-below:after{right:1px}.ag-row-highlight-above:after{top:0}.ag-row-highlight-below:after{bottom:0}.ag-row-odd{background-color:var(--ag-odd-row-background-color)}.ag-row-selected:before{background-color:var(--ag-selected-row-background-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-full-width-row.ag-row-group:before,.ag-row-hover:not(.ag-full-width-row):before{background-color:var(--ag-row-hover-color);content:"";display:block;inset:0;pointer-events:none;position:absolute}.ag-row-hover.ag-row-selected:before{background-color:var(--ag-row-hover-color);background-image:linear-gradient(var(--ag-selected-row-background-color),var(--ag-selected-row-background-color))}.ag-row.ag-full-width-row.ag-row-group>*{position:relative}.ag-column-hover{background-color:var(--ag-column-hover-color)}.ag-header-range-highlight{background-color:var(--ag-range-header-highlight-color)}.ag-right-aligned-cell{font-variant-numeric:tabular-nums}:where(.ag-ltr) .ag-right-aligned-cell{text-align:right}:where(.ag-rtl) .ag-right-aligned-cell{text-align:left}.ag-right-aligned-cell .ag-cell-value,.ag-right-aligned-cell .ag-group-value{margin-left:auto}:where(.ag-ltr) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-ltr) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level));padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}:where(.ag-rtl) .ag-cell:not(.ag-cell-inline-editing),:where(.ag-rtl) .ag-full-width-row .ag-cell-wrapper.ag-row-group{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px + var(--ag-row-group-indent-size)*var(--ag-indentation-level))}.ag-row>.ag-cell-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding) - 1px);padding-right:calc(var(--ag-cell-horizontal-padding) - 1px)}.ag-row-dragging{cursor:move;opacity:.5}.ag-details-row{background-color:var(--ag-background-color);padding:calc(var(--ag-spacing)*3.75)}.ag-layout-auto-height,.ag-layout-print{.ag-center-cols-container,.ag-center-cols-viewport{min-height:150px}}.ag-overlay-loading-wrapper{background-color:var(--ag-modal-overlay-background-color)}.ag-skeleton-container{align-content:center;height:100%;width:100%}.ag-skeleton-effect{animation:ag-skeleton-loading 1.5s ease-in-out .5s infinite;background-color:var(--ag-row-loading-skeleton-effect-color);border-radius:.25rem;height:1em;width:100%}:where(.ag-ltr) .ag-right-aligned-cell .ag-skeleton-effect{margin-left:auto}:where(.ag-rtl) .ag-right-aligned-cell .ag-skeleton-effect{margin-right:auto}@keyframes ag-skeleton-loading{0%{opacity:1}50%{opacity:.4}to{opacity:1}}.ag-loading{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-loading{padding-left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-loading{padding-right:var(--ag-cell-horizontal-padding)}:where(.ag-ltr) .ag-loading-icon{padding-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-loading-icon{padding-left:var(--ag-cell-widget-spacing)}.ag-icon-loading{animation-duration:1s;animation-iteration-count:infinite;animation-name:spin;animation-timing-function:linear}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.ag-input-wrapper,.ag-picker-field-wrapper{align-items:center;display:flex;flex:1 1 auto;line-height:normal;position:relative}.ag-input-field{align-items:center;display:flex;flex-direction:row}.ag-input-field-input:where(:not([type=checkbox],[type=radio])){flex:1 1 auto;min-width:0;width:100%}.ag-header{background-color:var(--ag-header-background-color);border-bottom:var(--ag-header-row-border);color:var(--ag-header-text-color);display:flex;font-family:var(--ag-header-font-family);font-size:var(--ag-header-font-size);font-weight:var(--ag-header-font-weight);overflow:hidden;white-space:nowrap;width:100%}.ag-header-row{height:var(--ag-header-height);position:absolute}.ag-floating-filter-button-button,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,:where(.ag-header-cell-sortable) .ag-header-cell-label{cursor:pointer}:where(.ag-ltr) .ag-header-expand-icon{margin-left:4px}:where(.ag-rtl) .ag-header-expand-icon{margin-right:4px}.ag-header-row:where(:not(:first-child)){:where(.ag-header-cell:not(.ag-header-span-height.ag-header-span-total,.ag-header-parent-hidden),.ag-header-group-cell.ag-header-group-cell-with-group){border-top:var(--ag-header-row-border)}}.ag-header-row:where(:not(.ag-header-row-column-group)){overflow:hidden}:where(.ag-header.ag-header-allow-overflow) .ag-header-row{overflow:visible}.ag-header-cell{display:inline-flex;overflow:hidden}.ag-header-group-cell{contain:paint;display:flex}.ag-header-cell,.ag-header-group-cell{align-items:center;gap:var(--ag-cell-widget-spacing);height:100%;padding:0 var(--ag-cell-horizontal-padding);position:absolute}@property --ag-internal-moving-color{syntax:"<color>";inherits:false;initial-value:transparent}@property --ag-internal-hover-color{syntax:"<color>";inherits:false;initial-value:transparent}.ag-header-cell:where(:not(.ag-floating-filter)),.ag-header-group-cell{&:before{background-image:linear-gradient(var(--ag-internal-hover-color),var(--ag-internal-hover-color)),linear-gradient(var(--ag-internal-moving-color),var(--ag-internal-moving-color));content:"";inset:0;position:absolute;--ag-internal-moving-color:transparent;--ag-internal-hover-color:transparent;transition:--ag-internal-moving-color var(--ag-header-cell-background-transition-duration),--ag-internal-hover-color var(--ag-header-cell-background-transition-duration)}&:where(:hover):before{--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}&:where(.ag-header-cell-moving):before{--ag-internal-moving-color:var(--ag-header-cell-moving-background-color);--ag-internal-hover-color:var(--ag-header-cell-hover-background-color)}}:where(.ag-header-cell:not(.ag-floating-filter) *,.ag-header-group-cell *){position:relative;z-index:1}.ag-header-cell-menu-button:where(:not(.ag-header-menu-always-show)){opacity:0;transition:opacity .2s}.ag-header-cell-filter-button,:where(.ag-header-cell.ag-header-active) .ag-header-cell-menu-button{opacity:1}.ag-header-cell-label,.ag-header-group-cell-label{align-items:center;align-self:stretch;display:flex;flex:1 1 auto;overflow:hidden;padding:5px 0}:where(.ag-ltr) .ag-sort-indicator-icon{padding-left:var(--ag-spacing)}:where(.ag-rtl) .ag-sort-indicator-icon{padding-right:var(--ag-spacing)}.ag-header-cell-label{text-overflow:ellipsis}.ag-header-group-cell-label.ag-sticky-label{flex:none;max-width:100%;overflow:visible;position:sticky}:where(.ag-ltr) .ag-header-group-cell-label.ag-sticky-label{left:var(--ag-cell-horizontal-padding)}:where(.ag-rtl) .ag-header-group-cell-label.ag-sticky-label{right:var(--ag-cell-horizontal-padding)}.ag-header-cell-text,.ag-header-group-text{overflow:hidden;text-overflow:ellipsis}.ag-header-cell-text{word-break:break-word}.ag-header-cell-comp-wrapper{width:100%}:where(.ag-header-group-cell) .ag-header-cell-comp-wrapper{display:flex}:where(.ag-header-cell:not(.ag-header-cell-auto-height)) .ag-header-cell-comp-wrapper{align-items:center;display:flex;height:100%}.ag-header-cell-wrap-text .ag-header-cell-comp-wrapper{white-space:normal}.ag-header-cell-comp-wrapper-limited-height>*{overflow:hidden}:where(.ag-right-aligned-header) .ag-header-cell-label{flex-direction:row-reverse}:where(.ag-ltr) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell:not(.ag-right-aligned-header)){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-ltr) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-header-cell.ag-right-aligned-header){.ag-header-label-icon,.ag-header-menu-icon{margin-left:var(--ag-spacing)}}.ag-header-cell:after,.ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{content:"";height:var(--ag-header-column-border-height);position:absolute;top:calc(50% - var(--ag-header-column-border-height)*.5);z-index:1}:where(.ag-ltr) .ag-header-cell:after,:where(.ag-ltr) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-right:var(--ag-header-column-border);right:0}:where(.ag-rtl) .ag-header-cell:after,:where(.ag-rtl) .ag-header-group-cell:where(:not(.ag-header-span-height.ag-header-group-cell-no-group)):after{border-left:var(--ag-header-column-border);left:0}.ag-header-highlight-after:after,.ag-header-highlight-before:after{background-color:var(--ag-accent-color);content:"";height:100%;position:absolute;width:1px}:where(.ag-ltr) .ag-header-highlight-before:after{left:0}:where(.ag-rtl) .ag-header-highlight-before:after{right:0}:where(.ag-ltr) .ag-header-highlight-after:after{right:0;:where(.ag-pinned-left-header) &{right:1px}}:where(.ag-rtl) .ag-header-highlight-after:after{left:0;:where(.ag-pinned-left-header) &{left:1px}}.ag-header-cell-resize{align-items:center;cursor:ew-resize;display:flex;height:100%;position:absolute;top:0;width:8px;z-index:2;&:after{background-color:var(--ag-header-column-resize-handle-color);content:"";height:var(--ag-header-column-resize-handle-height);position:absolute;top:calc(50% - var(--ag-header-column-resize-handle-height)*.5);width:var(--ag-header-column-resize-handle-width);z-index:1}}:where(.ag-ltr) .ag-header-cell-resize{right:-3px;&:after{left:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-rtl) .ag-header-cell-resize{left:-3px;&:after{right:calc(50% - var(--ag-header-column-resize-handle-width))}}:where(.ag-header-cell.ag-header-span-height) .ag-header-cell-resize:after{height:calc(100% - var(--ag-spacing)*4);top:calc(var(--ag-spacing)*2)}.ag-header-group-cell-no-group:where(.ag-header-span-height){display:none}.ag-sort-indicator-container{display:flex;gap:var(--ag-spacing)}.ag-layout-print{&.ag-body{display:block;height:unset}&.ag-root-wrapper{display:inline-block}.ag-body-horizontal-scroll,.ag-body-vertical-scroll{display:none}&.ag-force-vertical-scroll{overflow-y:visible!important}}@media print{.ag-root-wrapper.ag-layout-print{display:table;.ag-body-horizontal-scroll-viewport,.ag-body-viewport,.ag-center-cols-container,.ag-center-cols-viewport,.ag-root,.ag-root-wrapper-body,.ag-virtual-list-viewport{display:block!important;height:auto!important;overflow:hidden!important}.ag-cell,.ag-row{-moz-column-break-inside:avoid;break-inside:avoid}}}ag-grid,ag-grid-angular{display:block}.ag-chart,.ag-dnd-ghost,.ag-popup,.ag-root-wrapper{cursor:default;line-height:normal;white-space:normal;-webkit-font-smoothing:antialiased;background-color:var(--ag-background-color);color:var(--ag-text-color);color-scheme:var(--ag-browser-color-scheme);font-family:var(--ag-font-family);font-size:var(--ag-font-size);--ag-indentation-level:0}.ag-root-wrapper{border:var(--ag-wrapper-border);border-radius:var(--ag-wrapper-border-radius);display:flex;flex-direction:column;overflow:hidden;position:relative;&.ag-layout-normal{height:100%}}.ag-root-wrapper-body{display:flex;flex-direction:row;&.ag-layout-normal{flex:1 1 auto;height:0;min-height:0}}.ag-root{display:flex;flex-direction:column;position:relative;&.ag-layout-auto-height,&.ag-layout-normal{flex:1 1 auto;overflow:hidden;width:0}&.ag-layout-normal{height:100%}}.ag-drag-handle{color:var(--ag-drag-handle-color);cursor:grab}.ag-list-item,.ag-virtual-list-item{height:var(--ag-list-item-height)}.ag-virtual-list-item{position:absolute;width:100%}.ag-select-list{background-color:var(--ag-picker-list-background-color);border:var(--ag-picker-list-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dropdown-shadow);overflow:hidden auto}.ag-list-item{align-items:center;display:flex;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;&.ag-active-item{background-color:var(--ag-row-hover-color)}}.ag-select-list-item{cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none;:where(span){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}:where(.ag-ltr) .ag-select-list-item{padding-left:calc(var(--ag-cell-horizontal-padding)/2)}:where(.ag-rtl) .ag-select-list-item{padding-right:calc(var(--ag-cell-horizontal-padding)/2)}.ag-list-item-hovered:after{background-color:var(--ag-accent-color);content:"";height:1px;left:0;position:absolute;right:0}.ag-item-highlight-top:after{top:0}.ag-item-highlight-bottom:after{bottom:0}:where(.ag-icon):before{align-items:center;background-color:currentcolor;color:inherit;content:"";display:flex;font-family:inherit;font-size:var(--ag-icon-size);font-style:normal;font-variant:normal;height:var(--ag-icon-size);justify-content:center;line-height:var(--ag-icon-size);-webkit-mask-size:contain;mask-size:contain;text-transform:none;width:var(--ag-icon-size)}.ag-icon{background-position:50%;background-repeat:no-repeat;background-size:contain;color:var(--ag-icon-color);display:block;height:var(--ag-icon-size);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--ag-icon-size)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly,.ag-disabled,[disabled]{.ag-icon{opacity:.5}&.ag-icon-grip{opacity:.35}}.ag-column-select-column-readonly{&.ag-icon-grip,.ag-icon-grip{opacity:.35}}.ag-chart-menu-icon,.ag-chart-settings-next,.ag-chart-settings-prev,.ag-column-group-icons,.ag-column-select-header-icon,.ag-filter-toolpanel-expand,.ag-floating-filter-button-button,.ag-group-title-bar-icon,.ag-header-cell-filter-button,.ag-header-cell-menu-button,.ag-header-expand-icon,.ag-panel-title-bar-button,.ag-panel-title-bar-button-icon,.ag-set-filter-group-icons,:where(.ag-group-contracted) .ag-icon,:where(.ag-group-expanded) .ag-icon{background-color:var(--ag-icon-button-background-color);border-radius:var(--ag-icon-button-border-radius);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-background-color);color:var(--ag-icon-button-color);&:hover{background-color:var(--ag-icon-button-hover-background-color);box-shadow:0 0 0 var(--ag-icon-button-background-spread) var(--ag-icon-button-hover-background-color);color:var(--ag-icon-button-hover-color)}}.ag-filter-active{background-image:linear-gradient(var(--ag-icon-button-active-background-color),var(--ag-icon-button-active-background-color));border-radius:1px;outline:solid var(--ag-icon-button-background-spread) var(--ag-icon-button-active-background-color);position:relative;&:after{background-color:var(--ag-accent-color);border-radius:50%;content:"";height:6px;position:absolute;top:-1px;width:6px}:where(.ag-icon-filter){clip-path:path("M8,0C8,4.415 11.585,8 16,8L16,16L0,16L0,0L8,0Z");color:var(--ag-icon-button-active-color)}}:where(.ag-ltr) .ag-filter-active{&:after{right:-1px}}:where(.ag-rtl) .ag-filter-active{&:after{left:-1px}}.ag-menu{background-color:var(--ag-menu-background-color);border:var(--ag-menu-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-menu-shadow);color:var(--ag-menu-text-color);max-height:100%;overflow-y:auto}.ag-menu,.ag-resizer{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ag-resizer{pointer-events:none;z-index:1}:where(.ag-resizer){&.ag-resizer-topLeft{cursor:nwse-resize;height:5px;left:0;top:0;width:5px}&.ag-resizer-top{cursor:ns-resize;height:5px;left:5px;right:5px;top:0}&.ag-resizer-topRight{cursor:nesw-resize;height:5px;right:0;top:0;width:5px}&.ag-resizer-right{bottom:5px;cursor:ew-resize;right:0;top:5px;width:5px}&.ag-resizer-bottomRight{bottom:0;cursor:nwse-resize;height:5px;right:0;width:5px}&.ag-resizer-bottom{bottom:0;cursor:ns-resize;height:5px;left:5px;right:5px}&.ag-resizer-bottomLeft{bottom:0;cursor:nesw-resize;height:5px;left:0;width:5px}&.ag-resizer-left{bottom:5px;cursor:ew-resize;left:0;top:5px;width:5px}}',ya=typeof window!="object"||!window?.document?.fonts?.forEach,Sa=new WeakMap,vi=(e,t,o,i,r,s)=>{if(ya)return;i&&(e=`@layer ${CSS.escape(i)} { ${e} }`);let n=Sa.get(t);if(n||(n=[],Sa.set(t,n)),n.find(c=>c.css===e))return;const a=document.createElement("style");s&&a.setAttribute("nonce",s),a.dataset.agGlobalCss=o,a.textContent=e;const l={css:e,el:a,priority:r};let d;for(const c of n){if(c.priority>r)break;d=c}if(d){d.el.insertAdjacentElement("afterend",a);const c=n.indexOf(d);n.splice(c+1,0,l)}else t.insertBefore(a,t.querySelector(":not(title, meta)")),n.push(l)},ou=(e,t,o)=>{vi(Pb,e,"core",t,0,o),Array.from(sm()).sort((i,r)=>i.moduleName.localeCompare(r.moduleName)).forEach(i=>i.css?.forEach(r=>vi(r,e,`module-${i.moduleName}`,t,0,o)))},Ra=new Set,Eb=e=>{Ra.add(e)},Ab=e=>{if(Ra.delete(e),Ra.size===0){Sa=new WeakMap;for(const t of document.head.querySelectorAll("style[data-ag-global-css]"))t.remove()}},no=e=>new iu(e),So="$default",Tb=0,iu=class{constructor({feature:e,params:t,modeParams:o={},css:i,cssImports:r}){this.feature=e,this.css=i,this.cssImports=r,this.modeParams={[So]:{...o[So]??{},...t??{}},...o}}use(e,t,o){let i=this._inject;if(i==null){let{css:r}=this;if(r){const s=`ag-theme-${this.feature??"part"}-${++Tb}`;typeof r=="function"&&(r=r()),r=`:where(.${s}) {
10
+ ${r}
11
+ }
12
+ `;for(const n of this.cssImports??[])r=`@import url(${JSON.stringify(n)});
13
+ ${r}`;i={css:r,class:s}}else i=!1;this._inject=i}return i&&e&&vi(i.css,e,i.class,t,1,o),i?i.class:!1}},Ib=e=>e.replace(/[A-Z]/g,t=>`-${t}`).toLowerCase(),ru=e=>`--ag-${Ib(e)}`,Yt=e=>`var(${ru(e)})`,Lb=(e,t,o)=>Math.max(t,Math.min(o,e)),Gb=e=>{const t=new Map;return o=>{const i=o;return t.has(i)||t.set(i,e(o)),t.get(i)}},qt=e=>({ref:"accentColor",mix:e}),xt=e=>({ref:"foregroundColor",mix:e}),Bt=e=>({ref:"foregroundColor",mix:e,onto:"backgroundColor"}),Bb=e=>({ref:"foregroundColor",mix:e,onto:"headerBackgroundColor"}),gt={ref:"backgroundColor"},tr={ref:"foregroundColor"},Ro={ref:"accentColor"},ws={backgroundColor:"#fff",foregroundColor:"#181d1f",borderColor:xt(.15),chromeBackgroundColor:Bt(.02),browserColorScheme:"light"},Ob={...ws,textColor:tr,accentColor:"#2196f3",invalidColor:"#e02525",wrapperBorder:!0,rowBorder:!0,headerRowBorder:!0,footerRowBorder:{ref:"rowBorder"},columnBorder:{style:"solid",width:1,color:"transparent"},headerColumnBorder:!1,headerColumnBorderHeight:"100%",pinnedColumnBorder:!0,pinnedRowBorder:!0,sidePanelBorder:!0,sideBarPanelWidth:250,sideBarBackgroundColor:{ref:"chromeBackgroundColor"},sideButtonBarBackgroundColor:{ref:"sideBarBackgroundColor"},sideButtonBarTopPadding:0,sideButtonSelectedUnderlineWidth:2,sideButtonSelectedUnderlineColor:"transparent",sideButtonSelectedUnderlineTransitionDuration:0,sideButtonBackgroundColor:"transparent",sideButtonTextColor:{ref:"textColor"},sideButtonHoverBackgroundColor:{ref:"sideButtonBackgroundColor"},sideButtonHoverTextColor:{ref:"sideButtonTextColor"},sideButtonSelectedBackgroundColor:gt,sideButtonSelectedTextColor:{ref:"sideButtonTextColor"},sideButtonBorder:"solid 1px transparent",sideButtonSelectedBorder:!0,sideButtonLeftPadding:{ref:"spacing"},sideButtonRightPadding:{ref:"spacing"},sideButtonVerticalPadding:{calc:"spacing * 3"},fontFamily:["-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu","Cantarell","Helvetica Neue","sans-serif"],headerBackgroundColor:{ref:"chromeBackgroundColor"},headerFontFamily:{ref:"fontFamily"},cellFontFamily:{ref:"fontFamily"},headerFontWeight:500,headerFontSize:{ref:"fontSize"},dataFontSize:{ref:"fontSize"},headerTextColor:{ref:"textColor"},headerCellHoverBackgroundColor:"transparent",headerCellMovingBackgroundColor:{ref:"headerCellHoverBackgroundColor"},headerCellBackgroundTransitionDuration:"0.2s",cellTextColor:{ref:"textColor"},subtleTextColor:{ref:"textColor",mix:.5},rangeSelectionBorderStyle:"solid",rangeSelectionBorderColor:Ro,rangeSelectionBackgroundColor:qt(.2),rangeSelectionChartBackgroundColor:"#0058FF1A",rangeSelectionChartCategoryBackgroundColor:"#00FF841A",rangeSelectionHighlightColor:qt(.5),rangeHeaderHighlightColor:Bb(.08),rowNumbersSelectedColor:qt(.5),rowHoverColor:qt(.08),columnHoverColor:qt(.05),selectedRowBackgroundColor:qt(.12),modalOverlayBackgroundColor:{ref:"backgroundColor",mix:.66},oddRowBackgroundColor:gt,borderRadius:4,wrapperBorderRadius:8,cellHorizontalPadding:{calc:"spacing * 2 * cellHorizontalPaddingScale"},cellWidgetSpacing:{calc:"spacing * 1.5"},cellHorizontalPaddingScale:1,rowGroupIndentSize:{calc:"cellWidgetSpacing + iconSize"},valueChangeDeltaUpColor:"#43a047",valueChangeDeltaDownColor:"#e53935",valueChangeValueHighlightBackgroundColor:"#16a08580",spacing:8,fontSize:14,rowHeight:{calc:"max(iconSize, dataFontSize) + spacing * 3.25 * rowVerticalPaddingScale"},rowVerticalPaddingScale:1,headerHeight:{calc:"max(iconSize, dataFontSize) + spacing * 4 * headerVerticalPaddingScale"},headerVerticalPaddingScale:1,popupShadow:"0 0 16px #00000026",cardShadow:"0 1px 4px 1px #00000018",dropdownShadow:{ref:"cardShadow"},dragAndDropImageBackgroundColor:gt,dragAndDropImageBorder:!0,dragAndDropImageShadow:{ref:"popupShadow"},dragHandleColor:xt(.7),focusShadow:{spread:3,color:qt(.5)},headerColumnResizeHandleHeight:"30%",headerColumnResizeHandleWidth:2,headerColumnResizeHandleColor:{ref:"borderColor"},widgetContainerHorizontalPadding:{calc:"spacing * 1.5"},widgetContainerVerticalPadding:{calc:"spacing * 1.5"},widgetHorizontalSpacing:{calc:"spacing * 1.5"},widgetVerticalSpacing:{ref:"spacing"},listItemHeight:{calc:"max(iconSize, dataFontSize) + widgetVerticalSpacing"},iconSize:16,iconColor:"inherit",iconButtonColor:{ref:"iconColor"},iconButtonBackgroundColor:"transparent",iconButtonBackgroundSpread:4,iconButtonBorderRadius:1,iconButtonHoverColor:{ref:"iconButtonColor"},iconButtonHoverBackgroundColor:xt(.1),iconButtonActiveColor:Ro,iconButtonActiveBackgroundColor:qt(.28),iconButtonActiveIndicatorColor:Ro,toggleButtonWidth:28,toggleButtonHeight:18,toggleButtonOnBackgroundColor:Ro,toggleButtonOffBackgroundColor:Bt(.3),toggleButtonSwitchBackgroundColor:gt,toggleButtonSwitchInset:2,menuBorder:{color:xt(.2)},menuBackgroundColor:Bt(.03),menuTextColor:Bt(.95),menuShadow:{ref:"popupShadow"},menuSeparatorColor:{ref:"borderColor"},setFilterIndentSize:{ref:"iconSize"},chartMenuPanelWidth:260,chartMenuLabelColor:xt(.8),dialogShadow:{ref:"popupShadow"},cellEditingBorder:{color:Ro},cellEditingShadow:{ref:"cardShadow"},dialogBorder:{color:xt(.2)},panelBackgroundColor:gt,panelTitleBarBackgroundColor:{ref:"headerBackgroundColor"},panelTitleBarIconColor:{ref:"headerTextColor"},panelTitleBarTextColor:{ref:"headerTextColor"},panelTitleBarFontWeight:{ref:"headerFontWeight"},panelTitleBarBorder:!0,columnSelectIndentSize:{ref:"iconSize"},toolPanelSeparatorBorder:!0,tooltipBackgroundColor:{ref:"chromeBackgroundColor"},tooltipTextColor:{ref:"textColor"},tooltipBorder:!0,columnDropCellBackgroundColor:xt(.07),columnDropCellTextColor:{ref:"textColor"},columnDropCellDragHandleColor:{ref:"textColor"},columnDropCellBorder:{color:xt(.13)},selectCellBackgroundColor:xt(.07),selectCellBorder:{color:xt(.13)},advancedFilterBuilderButtonBarBorder:!0,advancedFilterBuilderIndentSize:{calc:"spacing * 2 + iconSize"},advancedFilterBuilderJoinPillColor:"#f08e8d",advancedFilterBuilderColumnPillColor:"#a6e194",advancedFilterBuilderOptionPillColor:"#f3c08b",advancedFilterBuilderValuePillColor:"#85c0e4",findMatchColor:tr,findMatchBackgroundColor:"#ffff00",findActiveMatchColor:tr,findActiveMatchBackgroundColor:"#ffa500",filterToolPanelGroupIndent:{ref:"spacing"},rowLoadingSkeletonEffectColor:xt(.15),statusBarLabelColor:tr,statusBarLabelFontWeight:500,statusBarValueColor:tr,statusBarValueFontWeight:500},Nb=":where(.ag-button){background:none;border:none;color:inherit;cursor:pointer;font-family:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0;text-indent:inherit;text-shadow:inherit;text-transform:inherit;word-spacing:inherit;&:disabled{cursor:default}&:focus-visible{box-shadow:var(--ag-focus-shadow);outline:none}}.ag-standard-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--ag-button-background-color);border:var(--ag-button-border);border-radius:var(--ag-button-border-radius);color:var(--ag-button-text-color);cursor:pointer;font-weight:var(--ag-button-font-weight);padding:var(--ag-button-vertical-padding) var(--ag-button-horizontal-padding);&:hover{background-color:var(--ag-button-hover-background-color);border:var(--ag-button-hover-border);color:var(--ag-button-hover-text-color)}&:active{background-color:var(--ag-button-active-background-color);border:var(--ag-button-active-border);color:var(--ag-button-active-text-color)}&:disabled{background-color:var(--ag-button-disabled-background-color);border:var(--ag-button-disabled-border);color:var(--ag-button-disabled-text-color)}}",Hb={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"}},Vb=()=>no({feature:"buttonStyle",params:{...Hb,buttonBackgroundColor:gt,buttonBorder:!0,buttonHoverBackgroundColor:{ref:"rowHoverColor"},buttonActiveBorder:{color:Ro}},css:Nb}),_b=Vb(),zb=".ag-column-drop-vertical-empty-message{align-items:center;border:1px dashed;border-color:var(--ag-border-color);display:flex;inset:0;justify-content:center;margin:calc(var(--ag-spacing)*1.5) calc(var(--ag-spacing)*2);overflow:hidden;padding:calc(var(--ag-spacing)*2);position:absolute}",Wb=()=>no({feature:"columnDropStyle",css:zb}),su=Wb(),$b=["colorScheme","color","length","scale","borderStyle","border","shadow","image","fontFamily","fontWeight","duration"],Ub=Gb(e=>(e=e.toLowerCase(),$b.find(t=>e.endsWith(t.toLowerCase()))??"length")),bs=e=>typeof e=="object"&&e?.ref?Yt(e.ref):typeof e=="string"?e:typeof e=="number"?String(e):!1,xa=e=>{if(typeof e=="string")return e;if(e&&"ref"in e){const t=Yt(e.ref);return e.mix==null?t:`color-mix(in srgb, ${e.onto?Yt(e.onto):"transparent"}, ${t} ${Lb(e.mix*100,0,100)}%)`}return!1},jb=bs,wi=e=>typeof e=="string"?e:typeof e=="number"?`${e}px`:e&&"calc"in e?`calc(${e.calc.replace(/ ?[*/+] ?/g," $& ").replace(/-?\b[a-z][a-z0-9]*\b(?![-(])/gi,o=>o[0]==="-"?o:` ${Yt(o)} `)})`:e&&"ref"in e?Yt(e.ref):!1,Kb=bs,Yb=(e,t)=>typeof e=="string"?e:e===!0?"solid 1px var(--ag-border-color)":e===!1?t==="columnBorder"?"solid 1px transparent":"none":e&&"ref"in e?Yt(e.ref):nu(e.style??"solid")+" "+wi(e.width??1)+" "+xa(e.color??{ref:"borderColor"}),qb=e=>typeof e=="string"?e:e===!1?"none":e&&"ref"in e?Yt(e.ref):[wi(e.offsetX??0),wi(e.offsetY??0),wi(e.radius??0),wi(e.spread??0),xa(e.color??{ref:"foregroundColor"})].join(" "),nu=bs,au=e=>typeof e=="string"?e.includes(",")?e:lu(e):e&&"googleFont"in e?au(e.googleFont):e&&"ref"in e?Yt(e.ref):Array.isArray(e)?e.map(t=>(typeof t=="object"&&"googleFont"in t&&(t=t.googleFont),lu(t))).join(", "):!1,lu=e=>/^[\w-]+$|\w\(/.test(e)?e:JSON.stringify(e),Xb=bs,du=e=>typeof e=="string"?e:e&&"url"in e?`url(${JSON.stringify(e.url)})`:e&&"svg"in e?du({url:`data:image/svg+xml,${encodeURIComponent(e.svg)}`}):e&&"ref"in e?Yt(e.ref):!1,Qb=(e,t)=>typeof e=="string"?e:typeof e=="number"?(e>=10&&ce(104,{value:e,param:t}),`${e}s`):e&&"ref"in e?Yt(e.ref):!1,Zb={color:xa,colorScheme:jb,length:wi,scale:Kb,border:Yb,borderStyle:nu,shadow:qb,image:du,fontFamily:au,fontWeight:Xb,duration:Qb},Jb=(e,t)=>{const o=Ub(e);return Zb[o](t,e)},ey=()=>new cu().withPart(_b).withPart(su),cu=class Zg{constructor(t=[]){this.parts=t}withPart(t){return typeof t=="function"&&(t=t()),t instanceof iu?new Zg([...this.parts,t]):(Mn(259,{part:t},"Invalid part"),this)}withoutPart(t){return this.withPart(no({feature:t}))}withParams(t,o=So){return this.withPart(no({modeParams:{[o]:t}}))}_startUse({styleContainer:t,cssLayer:o,nonce:i,loadThemeGoogleFonts:r}){if(ya)return;oy(),ou(t,o,i);const s=ty(this);if(s.length>0)for(const n of s)r&&ry(n,i);for(const n of this.parts)n.use(t,o,i)}_getCssClass(){return this._cssClassCache??(this._cssClassCache=uu(this.parts).map(t=>t.use(void 0,void 0,void 0)).filter(Boolean).join(" "))}_getModeParams(){let t=this._paramsCache;if(!t){const o={[So]:{...Ob}};for(const i of uu(this.parts))for(const r of Object.keys(i.modeParams)){const s=i.modeParams[r];if(s){const n=o[r]??(o[r]={}),a=new Set;for(const l of Object.keys(s)){const d=s[l];d!==void 0&&(n[l]=d,a.add(l))}if(r===So)for(const l of Object.keys(o)){const d=o[l];if(l!==So)for(const c of a)delete d[c]}}}this._paramsCache=t=o}return t}_getPerGridCss(t){const o="##SELECTOR##";let i=this._paramsCssCache;if(!i){let r="",s="";const n=this._getModeParams();for(const l of Object.keys(n)){const d=n[l];if(l!==So){const u=`:where([data-ag-theme-mode="${typeof CSS=="object"?CSS.escape(l):l}"]) & {
14
+ `;r+=u,s+=u}for(const c of Object.keys(d).sort()){const u=d[c],g=Jb(c,u);if(g===!1)ce(107,{key:c,value:u});else{const p=ru(c),f=p.replace("--ag-","--ag-inherited-");r+=` ${p}: var(${f}, ${g});
15
+ `,s+=` ${f}: var(${p});
16
+ `}}l!==So&&(r+=`}
17
+ `,s+=`}
18
+ `)}let a=`${o} {
19
+ ${r}}
20
+ `;a+=`:has(> ${o}):not(${o}) {
21
+ ${s}}
22
+ `,this._paramsCssCache=i=a}return i.replaceAll(o,`:where(.${t})`)}},uu=e=>{const t=new Map;for(const i of e)t.set(i.feature,i);const o=[];for(const i of e)(!i.feature||t.get(i.feature)===i)&&o.push(i);return o},ty=e=>{const t=new Set,o=s=>{if(Array.isArray(s))s.forEach(o);else{const n=s?.googleFont;typeof n=="string"&&t.add(n)}};return Object.values(e._getModeParams()).flatMap(s=>Object.values(s)).forEach(o),Array.from(t).sort()},hu=!1,oy=()=>{if(!hu){hu=!0;for(const e of Array.from(document.head.querySelectorAll('style[data-ag-scope="legacy"]')))e.remove()}},iy=new Set,ry=async(e,t)=>{iy.add(e);const o=`@import url('https://${sy}/css2?family=${encodeURIComponent(e)}:wght@100;200;300;400;500;600;700;800;900&display=swap');
23
+ `;vi(o,document.head,`googleFont:${e}`,void 0,0,t)},sy="fonts.googleapis.com",ny='.ag-checkbox-input-wrapper,.ag-radio-button-input-wrapper{background-color:var(--ag-checkbox-unchecked-background-color);border:solid var(--ag-checkbox-border-width) var(--ag-checkbox-unchecked-border-color);flex:none;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);:where(input){-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;display:block;height:var(--ag-icon-size);margin:0;opacity:0;width:var(--ag-icon-size)}&:after{content:"";display:block;inset:0;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;pointer-events:none;position:absolute}&:where(.ag-checked){background-color:var(--ag-checkbox-checked-background-color);border-color:var(--ag-checkbox-checked-border-color);&:after{background-color:var(--ag-checkbox-checked-shape-color)}}&:where(:focus-within,:active){box-shadow:var(--ag-focus-shadow)}&:where(.ag-disabled){filter:grayscale();opacity:.5}}.ag-checkbox-input-wrapper{border-radius:var(--ag-checkbox-border-radius);&:where(.ag-checked):after{-webkit-mask-image:var(--ag-checkbox-checked-shape-image);mask-image:var(--ag-checkbox-checked-shape-image)}&:where(.ag-indeterminate){background-color:var(--ag-checkbox-indeterminate-background-color);border-color:var(--ag-checkbox-indeterminate-border-color);&:after{background-color:var(--ag-checkbox-indeterminate-shape-color);-webkit-mask-image:var(--ag-checkbox-indeterminate-shape-image);mask-image:var(--ag-checkbox-indeterminate-shape-image)}}}.ag-radio-button-input-wrapper{border-radius:100%;&:where(.ag-checked):after{-webkit-mask-image:var(--ag-radio-checked-shape-image);mask-image:var(--ag-radio-checked-shape-image)}}',ay=()=>no({feature:"checkboxStyle",params:{checkboxBorderWidth:1,checkboxBorderRadius:{ref:"borderRadius"},checkboxUncheckedBackgroundColor:gt,checkboxUncheckedBorderColor:Bt(.3),checkboxCheckedBackgroundColor:Ro,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:gt,checkboxIndeterminateBackgroundColor:Bt(.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:gt,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:ny}),ly=ay(),gu=()=>({...ws,backgroundColor:"hsl(217, 0%, 17%)",foregroundColor:"#FFF",chromeBackgroundColor:Bt(.05),rowHoverColor:qt(.15),selectedRowBackgroundColor:qt(.2),menuBackgroundColor:Bt(.1),browserColorScheme:"dark",popupShadow:"0 0px 20px #000A",cardShadow:"0 1px 4px 1px #000A",advancedFilterBuilderJoinPillColor:"#7a3a37",advancedFilterBuilderColumnPillColor:"#355f2d",advancedFilterBuilderOptionPillColor:"#5a3168",advancedFilterBuilderValuePillColor:"#374c86",findMatchColor:gt,findActiveMatchColor:gt,checkboxUncheckedBorderColor:Bt(.4),toggleButtonOffBackgroundColor:Bt(.4)}),dy=()=>({...gu(),backgroundColor:"#1f2836"}),cy=()=>no({feature:"colorScheme",params:ws,modeParams:{light:ws,dark:gu(),"dark-blue":dy()}}),uy=cy(),pu={aggregation:'<path d="M18 7V4H6l6 8-6 8h12v-3"/>',arrows:'<polyline points="5 9 2 12 5 15"/><polyline points="9 5 12 2 15 5"/><polyline points="15 19 12 22 9 19"/><polyline points="19 9 22 12 19 15"/><line x1="2" x2="22" y1="12" y2="12"/><line x1="12" x2="12" y1="2" y2="22"/>',asc:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',cancel:'<path d="m18 6-12 12"/><path d="m6 6 12 12"/>',chart:'<line x1="18" x2="18" y1="20" y2="10"/><line x1="12" x2="12" y1="20" y2="4"/><line x1="6" x2="6" y1="20" y2="14"/>',"color-picker":'<path d="m19 11-8-8-8.6 8.6a2 2 0 0 0 0 2.8l5.2 5.2c.8.8 2 .8 2.8 0L19 11Z"/><path d="m5 2 5 5"/><path d="M2 13h15"/><path d="M22 20a2 2 0 1 1-4 0c0-1.6 1.7-2.4 2-4 .3 1.6 2 2.4 2 4Z"/>',columns:'<path d="M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18"/>',contracted:'<path d="m9 18 6-6-6-6"/>',copy:'<rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/>',cross:'<path d="M18 6 6 18"/><path d="m6 6 12 12"/>',csv:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',cut:'<circle cx="6" cy="6" r="3"/><path d="M8.12 8.12 12 12"/><path d="M20 4 8.12 15.88"/><circle cx="6" cy="18" r="3"/><path d="M14.8 14.8 20 20"/>',desc:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',down:'<path d="M12 5v14"/><path d="m19 12-7 7-7-7"/>',excel:'<path d="M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"/><polyline points="14 2 14 8 20 8"/><path d="M8 13h2"/><path d="M8 17h2"/><path d="M14 13h2"/><path d="M14 17h2"/>',expanded:'<path d="m15 18-6-6 6-6"/>',"eye-slash":'<path d="M9.88 9.88a3 3 0 1 0 4.24 4.24"/><path d="M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"/><path d="M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"/><line x1="2" x2="22" y1="2" y2="22"/>',eye:'<path d="M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"/><circle cx="12" cy="12" r="3"/>',filter:'<path d="M3 6h18"/><path d="M7 12h10"/><path d="M10 18h4"/>',first:'<path d="m17 18-6-6 6-6"/><path d="M7 6v12"/>',group:'<path d="M16 12H3"/><path d="M16 18H3"/><path d="M10 6H3"/><path d="M21 18V8a2 2 0 0 0-2-2h-5"/><path d="m16 8-2-2 2-2"/>',last:'<path d="m7 18 6-6-6-6"/><path d="M17 6v12"/>',left:'<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>',linked:'<path d="M9 17H7A5 5 0 0 1 7 7h2"/><path d="M15 7h2a5 5 0 1 1 0 10h-2"/><line x1="8" x2="16" y1="12" y2="12"/>',loading:'<line x1="12" x2="12" y1="2" y2="6"/><line x1="12" x2="12" y1="18" y2="22"/><line x1="4.93" x2="7.76" y1="4.93" y2="7.76"/><line x1="16.24" x2="19.07" y1="16.24" y2="19.07"/><line x1="2" x2="6" y1="12" y2="12"/><line x1="18" x2="22" y1="12" y2="12"/><line x1="4.93" x2="7.76" y1="19.07" y2="16.24"/><line x1="16.24" x2="19.07" y1="7.76" y2="4.93"/>',maximize:'<polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/>',menu:'<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>',"menu-alt":'<circle cx="12" cy="5" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="12" r="0.75" fill="#D9D9D9"/><circle cx="12" cy="19" r="0.75" fill="#D9D9D9"/>',minimize:'<polyline points="4 14 10 14 10 20"/><polyline points="20 10 14 10 14 4"/><line x1="14" x2="21" y1="10" y2="3"/><line x1="3" x2="10" y1="21" y2="14"/>',minus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/>',next:'<path d="m9 18 6-6-6-6"/>',none:'<path d="m7 15 5 5 5-5"/><path d="m7 9 5-5 5 5"/>',"not-allowed":'<circle cx="12" cy="12" r="10"/><path d="m4.9 4.9 14.2 14.2"/>',paste:'<path d="M15 2H9a1 1 0 0 0-1 1v2c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V3c0-.6-.4-1-1-1Z"/><path d="M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2M16 4h2a2 2 0 0 1 2 2v2M11 14h10"/><path d="m17 10 4 4-4 4"/>',pin:'<line x1="12" x2="12" y1="17" y2="22"/><path d="M5 17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6h1a2 2 0 0 0 0-4H8a2 2 0 0 0 0 4h1v4.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24Z"/>',pivot:'<path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/>',plus:'<circle cx="12" cy="12" r="10"/><path d="M8 12h8"/><path d="M12 8v8"/>',previous:'<path d="m15 18-6-6 6-6"/>',right:'<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>',save:'<path d="M12 17V3"/><path d="m6 11 6 6 6-6"/><path d="M19 21H5"/>',"small-left":'<path d="m15 18-6-6 6-6"/>',"small-right":'<path d="m9 18 6-6-6-6"/>',tick:'<path d="M20 6 9 17l-5-5"/>',"tree-closed":'<path d="m9 18 6-6-6-6"/>',"tree-indeterminate":'<path d="M5 12h14"/>',"tree-open":'<path d="m6 9 6 6 6-6"/>',unlinked:'<path d="M9 17H7A5 5 0 0 1 7 7"/><path d="M15 7h2a5 5 0 0 1 4 8"/><line x1="8" x2="12" y1="12" y2="12"/><line x1="2" x2="22" y1="2" y2="22"/>',up:'<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>',grip:'<circle cx="5" cy="8" r="0.5"/><circle cx="12" cy="8" r="0.5"/><circle cx="19" cy="8" r="0.5"/><circle cx="5" cy="16" r="0.5"/><circle cx="12" cy="16" r="0.5"/><circle cx="19" cy="16" r="0.5"/><g stroke="none" fill="currentColor"><circle cx="5" cy="8" r="1"/><circle cx="12" cy="8" r="1"/><circle cx="19" cy="8" r="1"/><circle cx="5" cy="16" r="1"/><circle cx="12" cy="16" r="1"/><circle cx="19" cy="16" r="1"/></g>',settings:'<path d="M20 7h-9"/><path d="M14 17H5"/><circle cx="17" cy="17" r="3"/><circle cx="7" cy="7" r="3"/>'},fu={"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>'},hy=(e={})=>{let t="";for(const o of[...Object.keys(pu),...Object.keys(fu)]){const i=gy(o,e.strokeWidth);t+=`.ag-icon-${o}::before { mask-image: url('data:image/svg+xml,${encodeURIComponent(i)}'); }
24
+ `}return t},gy=(e,t=1.5)=>{const o=fu[e];if(o)return o;const i=pu[e];if(!i)throw new Error(`Missing icon data for ${e}`);return`<svg xmlns="http://www.w3.org/2000/svg" class="ag-icon" fill="none" stroke-linecap="round" stroke-linejoin="round" stroke="black" stroke-width="${t}" viewBox="0 0 24 24"><style>* { vector-effect: non-scaling-stroke; }</style>`+i+"</svg>"},py=(e={})=>no({feature:"iconSet",css:()=>hy(e)}),fy=py(),my=':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}}:where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){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) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-left:var(--ag-input-padding-start)}:where(.ag-rtl) :where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){padding-right:var(--ag-input-padding-start)}:where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{background-color:currentcolor;color:var(--ag-input-icon-color);content:"";display:block;height:12px;-webkit-mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");mask-image:url("data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMiIgaGVpZ2h0PSIxMiIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41Ij48cGF0aCBkPSJNNS4zIDlhMy43IDMuNyAwIDEgMCAwLTcuNSAzLjcgMy43IDAgMCAwIDAgNy41Wk0xMC41IDEwLjUgOC4zIDguMiIvPjwvc3ZnPg==");-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;opacity:.5;position:absolute;width:12px}}:where(.ag-ltr) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-left:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-left:calc(var(--ag-spacing)*1.5 + 12px)}}:where(.ag-rtl) :where(.ag-column-select-header-filter-wrapper,.ag-filter-toolpanel-search,.ag-mini-filter,.ag-filter-filter){.ag-input-wrapper:before{margin-right:var(--ag-spacing)}.ag-number-field-input,.ag-text-field-input{padding-right:calc(var(--ag-spacing)*1.5 + 12px)}}',Cy=":where(input.ag-input-field-input:not([type]),input.ag-input-field-input[type=text],input.ag-input-field-input[type=number],input.ag-input-field-input[type=tel],input.ag-input-field-input[type=date],input.ag-input-field-input[type=datetime-local],textarea.ag-input-field-input){&:focus{box-shadow:var(--ag-focus-shadow)}}",vy={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"}},wy=()=>no({feature:"inputStyle",params:{...vy,inputBackgroundColor:gt,inputBorder:!0,inputBorderRadius:{ref:"borderRadius"},inputPaddingStart:{ref:"spacing"},inputFocusBorder:{color:Ro},inputFocusShadow:{ref:"focusShadow"},inputDisabledBackgroundColor:Bt(.06),inputDisabledTextColor:{ref:"textColor",mix:.5},inputInvalidBorder:{color:{ref:"invalidColor"}},pickerButtonBorder:!0,pickerListBorder:!0},css:()=>my+Cy}),by=wy(),yy='.ag-tabs-header{background-color:var(--ag-tab-bar-background-color);border-bottom:var(--ag-tab-bar-border);display:flex;flex:1;gap:var(--ag-tab-spacing);padding:var(--ag-tab-bar-top-padding) var(--ag-tab-bar-horizontal-padding) 0}.ag-tabs-header-wrapper{display:flex}.ag-tabs-close-button-wrapper{align-items:center;border:0;display:flex;padding:var(--ag-spacing)}:where(.ag-ltr) .ag-tabs-close-button-wrapper{border-right:1px solid var(--ag-border-color)}:where(.ag-rtl) .ag-tabs-close-button-wrapper{border-left:1px solid var(--ag-border-color)}.ag-tabs-close-button{background-color:unset;border:0;cursor:pointer;padding:0}.ag-tab{align-items:center;background-color:var(--ag-tab-background-color);border-left:var(--ag-tab-selected-border-width) solid transparent;border-right:var(--ag-tab-selected-border-width) solid transparent;color:var(--ag-tab-text-color);cursor:pointer;display:flex;flex:1;justify-content:center;padding:var(--ag-tab-top-padding) var(--ag-tab-horizontal-padding) var(--ag-tab-bottom-padding);position:relative;&:hover{background-color:var(--ag-tab-hover-background-color);color:var(--ag-tab-hover-text-color)}&.ag-tab-selected{background-color:var(--ag-tab-selected-background-color);color:var(--ag-tab-selected-text-color)}&:after{background-color:var(--ag-tab-selected-underline-color);bottom:0;content:"";display:block;height:var(--ag-tab-selected-underline-width);left:0;opacity:0;position:absolute;right:0;transition:opacity var(--ag-tab-selected-underline-transition-duration)}&.ag-tab-selected:after{opacity:1}}:where(.ag-ltr) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-left-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-right-color:var(--ag-tab-selected-border-color)}}}:where(.ag-rtl) .ag-tab{&.ag-tab-selected{&:where(:not(:first-of-type)){border-right-color:var(--ag-tab-selected-border-color)}&:where(:not(:last-of-type)){border-left-color:var(--ag-tab-selected-border-color)}}}',Sy={tabBarBackgroundColor:"transparent",tabBarHorizontalPadding:0,tabBarTopPadding:0,tabBackgroundColor:"transparent",tabTextColor:{ref:"textColor"},tabHorizontalPadding:{ref:"spacing"},tabTopPadding:{ref:"spacing"},tabBottomPadding:{ref:"spacing"},tabSpacing:"0",tabHoverBackgroundColor:{ref:"tabBackgroundColor"},tabHoverTextColor:{ref:"tabTextColor"},tabSelectedBackgroundColor:{ref:"tabBackgroundColor"},tabSelectedTextColor:{ref:"tabTextColor"},tabSelectedBorderWidth:1,tabSelectedBorderColor:"transparent",tabSelectedUnderlineColor:"transparent",tabSelectedUnderlineWidth:0,tabSelectedUnderlineTransitionDuration:0,tabBarBorder:!1},Ry=()=>no({feature:"tabStyle",params:{...Sy,tabBarBorder:!0,tabBarBackgroundColor:xt(.05),tabTextColor:{ref:"textColor",mix:.7},tabSelectedTextColor:{ref:"textColor"},tabHoverTextColor:{ref:"textColor"},tabSelectedBorderColor:{ref:"borderColor"},tabSelectedBackgroundColor:gt},css:yy}),xy=Ry(),Fy=()=>ey().withPart(ly).withPart(uy).withPart(fy).withPart(xy).withPart(by).withPart(su).withParams({fontFamily:[{googleFont:"IBM Plex Sans"},"-apple-system","BlinkMacSystemFont","Segoe UI","Roboto","Oxygen-Sans","Ubuntu"]}),Fa=Fy(),Dy={cssName:"--ag-cell-horizontal-padding",changeKey:"cellHorizontalPaddingChanged",defaultValue:16},ky={cssName:"--ag-indentation-level",changeKey:"indentationLevelChanged",defaultValue:0,noWarn:!0,cacheDefault:!0},My={cssName:"--ag-row-group-indent-size",changeKey:"rowGroupIndentSizeChanged",defaultValue:0},mu={cssName:"--ag-row-height",changeKey:"rowHeightChanged",defaultValue:42},Cu={cssName:"--ag-header-height",changeKey:"headerHeightChanged",defaultValue:48},vu={cssName:"--ag-list-item-height",changeKey:"listItemHeightChanged",defaultValue:24},Da={cssName:"--ag-row-border",changeKey:"rowBorderWidthChanged",defaultValue:1,border:!0},Py=0,Ey=class extends E{constructor(){super(...arguments),this.beanName="environment",this.sizeEls=new Map,this.lastKnownValues=new Map,this.sizesMeasured=!1,this.paramsClass=`ag-theme-params-${++Py}`,this.globalCSS=[]}wireBeans(e){const{eGridDiv:t,gridOptions:o}=e;this.eGridDiv=t,this.eStyleContainer=o.themeStyleContainer??(t.getRootNode()===document?document.head:t),this.cssLayer=o.themeCssLayer,this.styleNonce=o.styleNonce}postConstruct(){this.addManagedPropertyListener("theme",()=>this.handleThemeGridOptionChange()),this.handleThemeGridOptionChange(),this.addManagedPropertyListener("rowHeight",()=>this.refreshRowHeightVariable()),this.getSizeEl(mu),this.getSizeEl(Cu),this.getSizeEl(vu),this.getSizeEl(Da),this.refreshRowBorderWidthVariable(),this.addDestroyFunc(()=>Ab(this)),this.mutationObserver=new MutationObserver(()=>{this.fireGridStylesChangedEvent("themeChanged")}),this.addDestroyFunc(()=>this.mutationObserver.disconnect())}getDefaultRowHeight(){return this.getCSSVariablePixelValue(mu)}getDefaultHeaderHeight(){return this.getCSSVariablePixelValue(Cu)}getDefaultCellHorizontalPadding(){return this.getCSSVariablePixelValue(Dy)}getDefaultIndentation(){return this.getCSSVariablePixelValue(ky)}getDefaultRowGroupIndentSize(){return this.getCSSVariablePixelValue(My)}getCellPaddingLeft(){const e=this.getDefaultCellHorizontalPadding(),t=this.getDefaultIndentation(),o=this.getDefaultRowGroupIndentSize();return e-1+o*t}getCellPaddingRight(){return this.getDefaultCellHorizontalPadding()-1}getCellPadding(){return this.getCellPaddingLeft()+this.getCellPaddingRight()}getDefaultColumnMinWidth(){return Math.min(36,this.getDefaultRowHeight())}getDefaultListItemHeight(){return this.getCSSVariablePixelValue(vu)}getRowBorderWidth(){return this.getCSSVariablePixelValue(Da)}applyThemeClasses(e){const{gridTheme:t}=this;let o="";if(t)o=`${this.paramsClass} ${t._getCssClass()}`;else{this.mutationObserver.disconnect();let i=this.eGridDiv;for(;i;){let r=!1;for(const s of Array.from(i.classList))s.startsWith("ag-theme-")&&(r=!0,o=o?`${o} ${s}`:s);r&&this.mutationObserver.observe(i,{attributes:!0,attributeFilter:["class"]}),i=i.parentElement}}for(const i of Array.from(e.classList))i.startsWith("ag-theme-")&&e.classList.remove(i);if(o){const i=e.className;e.className=i+(i?" ":"")+o}}refreshRowHeightVariable(){const{eGridDiv:e}=this,t=e.style.getPropertyValue("--ag-line-height").trim(),o=this.gos.get("rowHeight");if(o==null||isNaN(o)||!isFinite(o))return t!==null&&e.style.setProperty("--ag-line-height",null),-1;const i=`${o}px`;return t!=i?(e.style.setProperty("--ag-line-height",i),o):t!=""?parseFloat(t):-1}addGlobalCSS(e,t){this.gridTheme?vi(e,this.eStyleContainer,t,this.cssLayer,0,this.styleNonce):this.globalCSS.push([e,t])}getCSSVariablePixelValue(e){const t=this.lastKnownValues.get(e);if(t!=null)return t;const o=this.measureSizeEl(e);return o==="detached"||o==="no-styles"?(e.cacheDefault&&this.lastKnownValues.set(e,e.defaultValue),e.defaultValue):(this.lastKnownValues.set(e,o),o)}measureSizeEl(e){const t=this.getSizeEl(e);if(t.offsetParent==null)return"detached";const o=t.offsetWidth;return o===ka?"no-styles":(this.sizesMeasured=!0,o)}getMeasurementContainer(){let e=this.eMeasurementContainer;return e||(e=this.eMeasurementContainer=Pe({tag:"div",cls:"ag-measurement-container"}),this.eGridDiv.appendChild(e)),e}getSizeEl(e){let t=this.sizeEls.get(e);if(t)return t;const o=this.getMeasurementContainer();t=Pe({tag:"div"});const{border:i,noWarn:r}=e;i?(t.className="ag-measurement-element-border",t.style.setProperty("--ag-internal-measurement-border",`var(${e.cssName}, solid ${ka}px)`)):t.style.width=`var(${e.cssName}, ${ka}px)`,o.appendChild(t),this.sizeEls.set(e,t);let s=this.measureSizeEl(e);s==="no-styles"&&!r&&_(9,{variable:e});const n=mo(this.beans,t,()=>{const a=this.measureSizeEl(e);a==="detached"||a==="no-styles"||(this.lastKnownValues.set(e,a),a!==s&&(s=a,this.fireGridStylesChangedEvent(e.changeKey)))});return this.addDestroyFunc(()=>n()),t}fireGridStylesChangedEvent(e){e==="rowBorderWidthChanged"&&this.refreshRowBorderWidthVariable(),this.eventSvc.dispatchEvent({type:"gridStylesChanged",[e]:!0})}refreshRowBorderWidthVariable(){const e=this.getCSSVariablePixelValue(Da);this.eGridDiv.style.setProperty("--ag-internal-row-border-width",`${e}px`)}handleThemeGridOptionChange(){const{gos:e,eGridDiv:t,globalCSS:o,gridTheme:i}=this,r=e.get("theme");let s;if(r==="legacy")s=void 0;else{const n=r??Fa;n instanceof cu?s=n:ce(240,{theme:n})}if(s!==i){if(s){Eb(this),ou(this.eStyleContainer,this.cssLayer,this.styleNonce);for(const[a,l]of o)vi(a,this.eStyleContainer,l,this.cssLayer,0,this.styleNonce);o.length=0}this.gridTheme=s,s?._startUse({loadThemeGoogleFonts:e.get("loadThemeGoogleFonts"),styleContainer:this.eStyleContainer,cssLayer:this.cssLayer,nonce:this.styleNonce});let n=this.eParamsStyle;if(!n){n=this.eParamsStyle=Pe({tag:"style"});const a=this.gos.get("styleNonce");a&&n.setAttribute("nonce",a),t.appendChild(n)}ya||(n.textContent=s?._getPerGridCss(this.paramsClass)||""),this.applyThemeClasses(t),this.fireGridStylesChangedEvent("themeChanged")}s&&getComputedStyle(this.getMeasurementContainer()).getPropertyValue("--ag-legacy-styles-loaded")&&ce(r?106:239)}},ka=15538,Ay=class extends E{constructor(){super(...arguments),this.beanName="eventSvc",this.globalEventService=new eo}postConstruct(){const{globalListener:e,globalSyncListener:t}=this.beans;e&&this.addGlobalListener(e,!0),t&&this.addGlobalListener(t,!1)}addEventListener(e,t,o){this.globalEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.globalEventService.removeEventListener(e,t,o)}addGlobalListener(e,t=!1){this.globalEventService.addGlobalListener(e,t)}removeGlobalListener(e,t=!1){this.globalEventService.removeGlobalListener(e,t)}dispatchLocalEvent(){}dispatchEvent(e){this.globalEventService.dispatchEvent(Z(this.gos,e))}dispatchEventOnce(e){this.globalEventService.dispatchEventOnce(Z(this.gos,e))}};function wu(e){return e?e.getLeafColumns().some(t=>t.isSpanHeaderHeight()):!1}function Ma(e,t){let o;if(Ie(e)&&wu(e)&&e.isPadding()){const i=e;o=i.getLeafColumns()[0];let r=o;for(;r!==i;)t++,r=r.getParent()}return{column:o||e,headerRowIndex:t}}var Ty=class extends E{constructor(){super(...arguments),this.beanName="headerNavigation",this.currentHeaderRowWithoutSpan=-1}postConstruct(){const e=this.beans;e.ctrlsSvc.whenReady(this,o=>{this.gridBodyCon=o.gridBodyCtrl});const t=Te(e);this.addManagedElementListeners(t,{mousedown:()=>{this.currentHeaderRowWithoutSpan=-1}})}getHeaderPositionForColumn(e,t){let o;const{colModel:i,colGroupSvc:r,ctrlsSvc:s}=this.beans;if(typeof e=="string"?(o=i.getCol(e),o||(o=r?.getColumnGroup(e)??null)):o=e,!o)return null;const a=s.getHeaderRowContainerCtrl()?.getAllCtrls(),l=Ce(a||[]).type==="filter",d=jt(this.beans)-1;let c=-1,u=o;for(;u;)c++,u=u.getParent();let g=c;return t&&l&&g===d-1&&g++,g===-1?null:{headerRowIndex:g,column:o}}navigateVertically(e,t,o){const i=this.beans.focusSvc;if(t||(t=i.focusedHeader),!t)return!1;const{headerRowIndex:r}=t,s=t.column,n=jt(this.beans),a=e==="UP",l=this.getHeaderRowType(r);let{headerRowIndex:d,column:c,headerRowIndexWithoutSpan:u}=a?Iy(l,s,r):Ly(l,s,r),g=!1;return d<0&&(d=0,c=s,g=!0),d>=n?(d=-1,this.currentHeaderRowWithoutSpan=-1):u!==void 0&&(this.currentHeaderRowWithoutSpan=u),!g&&!c?!1:i.focusHeaderPosition({headerPosition:{headerRowIndex:d,column:c},allowUserOverride:!0,event:o})}navigateHorizontally(e,t=!1,o){const{focusSvc:i,gos:r}=this.beans,s=i.focusedHeader;let n,a;this.currentHeaderRowWithoutSpan!==-1?s.headerRowIndex=this.currentHeaderRowWithoutSpan:this.currentHeaderRowWithoutSpan=s.headerRowIndex,e==="LEFT"!==r.get("enableRtl")?(a="Before",n=this.findHeader(s,a)):(a="After",n=this.findHeader(s,a));const l=r.getCallback("tabToNextHeader");if(t&&l){const d=i.focusHeaderPositionFromUserFunc({userFunc:l,headerPosition:n,direction:a});if(d){const{headerRowIndex:c}=i.focusedHeader||{};c!=null&&c!=s.headerRowIndex&&(this.currentHeaderRowWithoutSpan=c)}return d}return n||!t?i.focusHeaderPosition({headerPosition:n,direction:a,fromTab:t,allowUserOverride:!0,event:o}):this.focusNextHeaderRow(s,a,o)}focusNextHeaderRow(e,t,o){const i=e.headerRowIndex;let r=null,s;const n=this.beans;if(t==="Before"?i>0&&(s=i-1,this.currentHeaderRowWithoutSpan-=1,r=this.findColAtEdgeForHeaderRow(s,"end")):(s=i+1,this.currentHeaderRowWithoutSpan<jt(n)?this.currentHeaderRowWithoutSpan+=1:this.currentHeaderRowWithoutSpan=-1,r=this.findColAtEdgeForHeaderRow(s,"start")),!r)return!1;const{column:a,headerRowIndex:l}=Ma(r.column,r?.headerRowIndex);return n.focusSvc.focusHeaderPosition({headerPosition:{column:a,headerRowIndex:l},direction:t,fromTab:!0,allowUserOverride:!0,event:o})}scrollToColumn(e,t="After"){if(e.getPinned())return;let o;if(Ie(e)){const i=e.getDisplayedLeafColumns();o=t==="Before"?Ce(i):i[0]}else o=e;this.gridBodyCon.scrollFeature.ensureColumnVisible(o)}findHeader(e,t){let o,i;const{colGroupSvc:r,visibleCols:s}=this.beans;if(Ie(e.column)?o=r?.getGroupAtDirection(e.column,t)??void 0:(i=`getCol${t}`,o=s[i](e.column)),!o)return;const{headerRowIndex:n}=e;if(this.getHeaderRowType(n)!=="filter"){const d=[o];for(;o.getParent();)o=o.getParent(),d.push(o);o=d[Math.max(0,d.length-1-n)]}const{column:a,headerRowIndex:l}=Ma(o,n);return{column:a,headerRowIndex:l}}getHeaderRowType(e){const t=this.beans.ctrlsSvc.getHeaderRowContainerCtrl();if(t)return t.getRowType(e)}findColAtEdgeForHeaderRow(e,t){const{visibleCols:o,ctrlsSvc:i,colGroupSvc:r}=this.beans,s=o.allCols,n=s[t==="start"?0:s.length-1];if(!n)return;const l=i.getHeaderRowContainerCtrl(n.getPinned())?.getRowType(e);if(l=="group"){const d=r?.getColGroupAtLevel(n,e);return{headerRowIndex:e,column:d}}return{headerRowIndex:l==null?-1:e,column:n}}};function Iy(e,t,o){const i=e==="filter",r=e==="column";let s=i?t:t.getParent(),n=o-1,a=n;if(r&&wu(t.getParent())){for(;s&&s.isPadding();)s=s.getParent(),n--;a=n,n<0&&(s=t,n=o,a=void 0)}return{column:s,headerRowIndex:n,headerRowIndexWithoutSpan:a}}function Ly(e,t,o,i="After"){let r=t,s=o+1;const n=s;if(e==="group"){const a=t.getDisplayedLeafColumns(),l=i==="After"?a[0]:Ce(a),d=[];let c=l;for(;c.getParent()!==t;)c=c.getParent(),d.push(c);if(r=l,l.isSpanHeaderHeight())for(let u=d.length-1;u>=0;u--){const g=d[u];if(!g.isPadding()){r=g;break}s++}else r=Ce(d),r||(r=l)}return{column:r,headerRowIndex:s,headerRowIndexWithoutSpan:n}}var Gy=class extends E{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(){const e=this.clearFocusedCell.bind(this);this.addManagedEventListeners({columnPivotModeChanged:e,newColumnsLoaded:this.onColumnEverythingChanged.bind(this),columnGroupOpened:e,columnRowGroupChanged:e}),this.addDestroyFunc(pm(this.beans))}attemptToRecoverFocus(){this.needsFocusRestored=!0,this.focusFallbackTimeout!=null&&clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=window.setTimeout(this.setFocusRecovered.bind(this),100)}setFocusRecovered(){this.needsFocusRestored=!1,this.focusFallbackTimeout!=null&&(clearTimeout(this.focusFallbackTimeout),this.focusFallbackTimeout=null)}shouldTakeFocus(){return this.gos.get("suppressFocusAfterRefresh")?(this.setFocusRecovered(),!1):this.needsFocusRestored?(this.setFocusRecovered(),!0):this.doesRowOrCellHaveBrowserFocus()}onColumnEverythingChanged(){if(!this.focusedCell)return;const e=this.focusedCell.column,t=this.colModel.getCol(e.getId());e!==t&&this.clearFocusedCell()}getFocusCellToUseAfterRefresh(){const{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(Ee(this.beans),Mc)?null:this.focusedHeader}doesRowOrCellHaveBrowserFocus(){const e=Ee(this.beans);return this.isDomDataPresentInHierarchy(e,ts)?!0:this.isDomDataPresentInHierarchy(e,as)}isDomDataPresentInHierarchy(e,t){let o=e;for(;o;){if(hd(this.gos,o,t))return!0;o=o.parentNode}return!1}getFocusedCell(){return this.focusedCell}getFocusEventParams(e){const{rowIndex:t,rowPinned:o,column:i}=e,r={rowIndex:t,rowPinned:o,column:i,isFullWidthCell:!1},s=this.rowRenderer.getRowByPosition({rowIndex:t,rowPinned:o});return s&&(r.isFullWidthCell=s.isFullWidth()),r}clearFocusedCell(){if(this.focusedCell==null)return;const e=this.getFocusEventParams(this.focusedCell);this.focusedCell=null,this.eventSvc.dispatchEvent({type:"cellFocusCleared",...e})}setFocusedCell(e){this.setFocusRecovered();const{column:t,rowIndex:o,rowPinned:i,forceBrowserFocus:r=!1,preventScrollOnBrowserFocus:s=!1}=e,n=this.colModel.getCol(t);if(!n){this.focusedCell=null;return}this.focusedCell={rowIndex:o,rowPinned:et(i),column:n},this.eventSvc.dispatchEvent({type:"cellFocused",...this.getFocusEventParams(this.focusedCell),forceBrowserFocus:r,preventScrollOnBrowserFocus:s})}isCellFocused(e){return this.focusedCell==null?!1:Lm(e,this.focusedCell)}isHeaderWrapperFocused(e){if(this.focusedHeader==null)return!1;const{column:t,rowCtrl:{rowIndex:o,pinned:i}}=e,{column:r,headerRowIndex:s}=this.focusedHeader;return t===r&&o===s&&i==r.getPinned()}focusHeaderPosition(e){if(this.setFocusRecovered(),_o(this.beans))return!1;const{direction:t,fromTab:o,allowUserOverride:i,event:r,fromCell:s,rowWithoutSpanValue:n}=e;let{headerPosition:a}=e;if(s&&this.filterManager?.isAdvFilterHeaderActive())return this.focusAdvancedFilter(a);if(i){const l=this.focusedHeader,d=jt(this.beans);if(o){const c=this.gos.getCallback("tabToNextHeader");c&&(a=this.getHeaderPositionFromUserFunc({userFunc:c,direction:t,currentPosition:l,headerPosition:a,headerRowCount:d}))}else{const c=this.gos.getCallback("navigateToNextHeader");if(c&&r){const u={key:r.key,previousHeaderPosition:l,nextHeaderPosition:a,headerRowCount:d,event:r};a=c(u)}}}return a?this.focusProvidedHeaderPosition({headerPosition:a,direction:t,event:r,fromCell:s,rowWithoutSpanValue:n}):!1}focusHeaderPositionFromUserFunc(e){if(_o(this.beans))return!1;const{userFunc:t,headerPosition:o,direction:i,event:r}=e,s=this.focusedHeader,n=jt(this.beans),a=this.getHeaderPositionFromUserFunc({userFunc:t,direction:i,currentPosition:s,headerPosition:o,headerRowCount:n});return!!a&&this.focusProvidedHeaderPosition({headerPosition:a,direction:i,event:r})}getHeaderPositionFromUserFunc(e){const{userFunc:t,direction:o,currentPosition:i,headerPosition:r,headerRowCount:s}=e,a=t({backwards:o==="Before",previousHeaderPosition:i,nextHeaderPosition:r,headerRowCount:s});return a===!0?i:a===!1?null:a}focusProvidedHeaderPosition(e){const{headerPosition:t,direction:o,fromCell:i,rowWithoutSpanValue:r,event:s}=e,{column:n,headerRowIndex:a}=t,{filterManager:l,ctrlsSvc:d,headerNavigation:c}=this.beans;if(a===-1)return l?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(t):this.focusGridView({column:n,event:s});c?.scrollToColumn(n,o);const g=d.getHeaderRowContainerCtrl(n.getPinned())?.focusHeader(t.headerRowIndex,n,s)||!1;return c&&g&&(r!=null||i)&&(c.currentHeaderRowWithoutSpan=r??-1),g}focusFirstHeader(){if(this.overlays?.isExclusive()&&this.focusOverlay())return!0;let e=this.visibleCols.allCols[0];if(!e)return!1;const{colGroupSvc:t}=this.beans;t&&e.getParent()&&(e=t.getColGroupAtLevel(e,0));const o=Ma(e,0);return this.focusHeaderPosition({headerPosition:o,rowWithoutSpanValue:0})}focusLastHeader(e){if(this.overlays?.isExclusive()&&this.focusOverlay(!0))return!0;const t=jt(this.beans)-1,o=Ce(this.visibleCols.allCols);return this.focusHeaderPosition({headerPosition:{headerRowIndex:t,column:o},rowWithoutSpanValue:-1,event:e})}focusPreviousFromFirstCell(e){return this.filterManager?.isAdvFilterHeaderActive()?this.focusAdvancedFilter(null):this.focusLastHeader(e)}isAnyCellFocused(){return!!this.focusedCell}isRowFocused(e,t){return this.focusedCell==null?!1:this.focusedCell.rowIndex===e&&this.focusedCell.rowPinned===et(t)}focusOverlay(e){const t=this.overlays?.isVisible()&&this.overlays.eWrapper?.getGui();return!!t&&Lt(t,e)}focusGridView(e){const{backwards:t=!1,canFocusOverlay:o=!0,event:i}=e;if(this.overlays?.isExclusive())return o&&this.focusOverlay(t);if(Yn(this.beans))return t&&!_o(this.beans)?this.focusLastHeader():o&&this.focusOverlay(t)?!0:t?!1:zo(this.beans,t);const r=t?Om(this.beans):Bm(this.beans);if(r){const s=e.column??this.focusedHeader?.column,{rowIndex:n,rowPinned:a}=r,l=qn(this.beans,r);if(!s||!l||n==null)return!1;if(s.isSuppressNavigable(l)){const d=this.gos.get("enableRtl");let c;return!i||i.key===D.TAB?c=d?D.LEFT:D.RIGHT:c=i.key,this.beans.navigation?.navigateToNextCell(null,c,{rowIndex:n,column:s,rowPinned:a||null},!0),!0}return this.navigation?.ensureCellVisible({rowIndex:n,column:s,rowPinned:a}),t&&this.rowRenderer.getRowByPosition(r)?.isFullWidth()&&this.navigation?.tryToFocusFullWidthRow(r,t)||(this.setFocusedCell({rowIndex:n,column:s,rowPinned:et(a),forceBrowserFocus:!0}),this.beans.rangeSvc?.setRangeToCell({rowIndex:n,rowPinned:a,column:s})),!0}return!!(o&&this.focusOverlay(t)||t&&this.focusLastHeader())}focusAdvancedFilter(e){return this.advFilterFocusColumn=e?.column,this.beans.advancedFilter?.getCtrl().focusHeaderComp()??!1}focusNextFromAdvancedFilter(e,t){const o=(t?void 0:this.advFilterFocusColumn)??this.visibleCols.allCols?.[0];return e?this.focusHeaderPosition({headerPosition:{column:o,headerRowIndex:jt(this.beans)-1}}):this.focusGridView({column:o})}clearAdvancedFilterColumn(){this.advFilterFocusColumn=void 0}},By=class extends E{constructor(){super(...arguments),this.beanName="scrollVisibleSvc"}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colAnimation=e.colAnimation}postConstruct(){this.getScrollbarWidth(),this.addManagedEventListeners({displayedColumnsChanged:this.updateScrollVisible.bind(this),displayedColumnsWidthChanged:this.updateScrollVisible.bind(this)})}updateScrollVisible(){const{colAnimation:e}=this;e?.isActive()?e.executeLaterVMTurn(()=>{e.executeLaterVMTurn(()=>this.updateScrollVisibleImpl())}):this.updateScrollVisibleImpl()}updateScrollVisibleImpl(){const e=this.ctrlsSvc.get("center");if(!e||this.colAnimation?.isActive())return;const t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.verticalScrollShowing};this.setScrollsVisible(t),this.updateScrollGap()}updateScrollGap(){const e=this.ctrlsSvc.get("center"),t=e.hasHorizontalScrollGap(),o=e.hasVerticalScrollGap();(this.horizontalScrollGap!==t||this.verticalScrollGap!==o)&&(this.horizontalScrollGap=t,this.verticalScrollGap=o,this.eventSvc.dispatchEvent({type:"scrollGapChanged"}))}setScrollsVisible(e){(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing)&&(this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing,this.eventSvc.dispatchEvent({type:"scrollVisibilityChanged"}))}getScrollbarWidth(){if(this.scrollbarWidth==null){const e=this.gos.get("scrollbarWidth"),o=typeof e=="number"&&e>=0?e:fp();o!=null&&(this.scrollbarWidth=o,this.eventSvc.dispatchEvent({type:"scrollbarWidthChanged"}))}return this.scrollbarWidth}},Oy=class extends E{constructor(){super(...arguments),this.beanName="gridDestroySvc",this.destroyCalled=!1}destroy(){if(this.destroyCalled)return;const{stateSvc:e,ctrlsSvc:t,context:o}=this.beans;this.eventSvc.dispatchEvent({type:"gridPreDestroyed",state:e?.getState()??{}}),this.destroyCalled=!0,t.get("gridCtrl")?.destroyGridUi(),o.destroy(),super.destroy()}},or=new Set(["gridPreDestroyed","fillStart","pasteStart"]),Ny={suppressContextMenu:!1,preventDefaultOnContextMenu:!1,allowContextMenuWithControlKey:!1,suppressMenuHide:!0,enableBrowserTooltips:!1,tooltipTrigger:"hover",tooltipShowDelay:2e3,tooltipHideDelay:1e4,tooltipMouseTrack:!1,tooltipShowMode:"standard",tooltipInteraction:!1,copyHeadersToClipboard:!1,copyGroupHeadersToClipboard:!1,clipboardDelimiter:" ",suppressCopyRowsToClipboard:!1,suppressCopySingleCellRanges:!1,suppressLastEmptyLineOnPaste:!1,suppressClipboardPaste:!1,suppressClipboardApi:!1,suppressCutToClipboard:!1,maintainColumnOrder:!1,enableStrictPivotColumnOrder:!1,suppressFieldDotNotation:!1,allowDragFromColumnsToolPanel:!1,suppressMovableColumns:!1,suppressColumnMoveAnimation:!1,suppressMoveWhenColumnDragging:!1,suppressDragLeaveHidesColumns:!1,suppressRowGroupHidesColumns:!1,suppressAutoSize:!1,autoSizePadding:20,skipHeaderOnAutoSize:!1,singleClickEdit:!1,suppressClickEdit:!1,readOnlyEdit:!1,stopEditingWhenCellsLoseFocus:!1,enterNavigatesVertically:!1,enterNavigatesVerticallyAfterEdit:!1,enableCellEditingOnBackspace:!1,undoRedoCellEditing:!1,undoRedoCellEditingLimit:10,suppressCsvExport:!1,suppressExcelExport:!1,cacheQuickFilter:!1,includeHiddenColumnsInQuickFilter:!1,excludeChildrenWhenTreeDataFiltering:!1,enableAdvancedFilter:!1,includeHiddenColumnsInAdvancedFilter:!1,enableCharts:!1,masterDetail:!1,keepDetailRows:!1,keepDetailRowsCount:10,detailRowAutoHeight:!1,tabIndex:0,rowBuffer:10,valueCache:!1,valueCacheNeverExpires:!1,enableCellExpressions:!1,suppressTouch:!1,suppressFocusAfterRefresh:!1,suppressBrowserResizeObserver:!1,suppressPropertyNamesCheck:!1,suppressChangeDetection:!1,debug:!1,suppressLoadingOverlay:!1,suppressNoRowsOverlay:!1,pagination:!1,paginationPageSize:100,paginationPageSizeSelector:!0,paginationAutoPageSize:!1,paginateChildRows:!1,suppressPaginationPanel:!1,pivotMode:!1,pivotPanelShow:"never",pivotDefaultExpanded:0,pivotSuppressAutoColumn:!1,suppressExpandablePivotGroups:!1,functionsReadOnly:!1,suppressAggFuncInHeader:!1,alwaysAggregateAtRootLevel:!1,aggregateOnlyChangedColumns:!1,suppressAggFilteredOnly:!1,removePivotHeaderRowWhenSingleValueColumn:!1,animateRows:!0,cellFlashDuration:500,cellFadeDuration:1e3,allowShowChangeAfterFilter:!1,domLayout:"normal",ensureDomOrder:!1,enableRtl:!1,suppressColumnVirtualisation:!1,suppressMaxRenderedRowRestriction:!1,suppressRowVirtualisation:!1,rowDragManaged:!1,suppressRowDrag:!1,suppressMoveWhenRowDragging:!1,rowDragEntireRow:!1,rowDragMultiRow:!1,embedFullWidthRows:!1,groupDisplayType:"singleColumn",groupDefaultExpanded:0,groupMaintainOrder:!1,groupSelectsChildren:!1,groupSuppressBlankHeader:!1,groupSelectsFiltered:!1,showOpenedGroup:!1,groupRemoveSingleChildren:!1,groupRemoveLowestSingleChildren:!1,groupHideOpenParents:!1,groupAllowUnbalanced:!1,rowGroupPanelShow:"never",suppressMakeColumnVisibleAfterUnGroup:!1,treeData:!1,rowGroupPanelSuppressSort:!1,suppressGroupRowsSticky:!1,rowModelType:"clientSide",asyncTransactionWaitMillis:50,suppressModelUpdateAfterUpdateTransaction:!1,cacheOverflowSize:1,infiniteInitialRowCount:1,serverSideInitialRowCount:1,cacheBlockSize:100,maxBlocksInCache:-1,maxConcurrentDatasourceRequests:2,blockLoadDebounceMillis:0,purgeClosedRowNodes:!1,serverSideSortAllLevels:!1,serverSideOnlyRefreshFilteredGroups:!1,serverSidePivotResultFieldSeparator:"_",viewportRowModelPageSize:5,viewportRowModelBufferSize:5,alwaysShowHorizontalScroll:!1,alwaysShowVerticalScroll:!1,debounceVerticalScrollbar:!1,suppressHorizontalScroll:!1,suppressScrollOnNewData:!1,suppressScrollWhenPopupsAreOpen:!1,suppressAnimationFrame:!1,suppressMiddleClickScrolls:!1,suppressPreventDefaultOnMouseWheel:!1,rowMultiSelectWithClick:!1,suppressRowDeselection:!1,suppressRowClickSelection:!1,suppressCellFocus:!1,suppressHeaderFocus:!1,suppressMultiRangeSelection:!1,enableCellTextSelection:!1,enableRangeSelection:!1,enableRangeHandle:!1,enableFillHandle:!1,fillHandleDirection:"xy",suppressClearOnFillReduction:!1,accentedSort:!1,unSortIcon:!1,suppressMultiSort:!1,alwaysMultiSort:!1,suppressMaintainUnsortedOrder:!1,suppressRowHoverHighlight:!1,suppressRowTransform:!1,columnHoverHighlight:!1,deltaSort:!1,enableGroupEdit:!1,groupLockGroupColumns:0,serverSideEnableClientSideSort:!1,suppressServerSideFullWidthLoadingRow:!1,pivotMaxGeneratedColumns:-1,columnMenu:"new",reactiveCustomComponents:!0,suppressSetFilterByDefault:!1,rowNumbers:!1},Hy=0,Vy=0,_y=class extends E{constructor(){super(...arguments),this.beanName="gos",this.domDataKey="__AG_"+Math.random().toString(),this.gridInstanceId=Vy++,this.propEventSvc=new eo,this.globalEventHandlerFactory=e=>(t,o)=>{if(!this.isAlive())return;const i=or.has(t);if(i&&!e||!i&&e)return;const r=On(t),s=this.gridOptions[r];typeof s=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{s(o)})}}wireBeans(e){this.gridOptions=e.gridOptions,this.validation=e.validation,this.api=e.gridApi,this.gridId=e.context.getGridId()}get gridOptionsContext(){return this.gridOptions.context}postConstruct(){this.eventSvc.addGlobalListener(this.globalEventHandlerFactory().bind(this),!0),this.eventSvc.addGlobalListener(this.globalEventHandlerFactory(!0).bind(this),!1),this.propEventSvc.setFrameworkOverrides(this.beans.frameworkOverrides),this.addManagedEventListeners({gridOptionsChanged:({options:e})=>{this.updateGridOptions({options:e,force:!0,source:"gridOptionsUpdated"})}})}get(e){return this.gridOptions[e]??Ny[e]}getCallback(e){return this.mergeGridCommonParams(this.gridOptions[e])}exists(e){return q(this.gridOptions[e])}mergeGridCommonParams(e){return e&&(o=>e(this.addGridCommonParams(o)))}updateGridOptions({options:e,force:t,source:o="api"}){const i={id:Hy++,properties:[]},r=[],{gridOptions:s,validation:n}=this;for(const a of Object.keys(e)){const l=e[a];n?.warnOnInitialPropertyUpdate(o,a);const d=t||typeof l=="object"&&o==="api",c=s[a];if(d||c!==l){s[a]=l;const u={type:a,currentValue:l,previousValue:c,changeSet:i,source:o};r.push(u)}}n?.processGridOptions(this.gridOptions),i.properties=r.map(a=>a.type),r.forEach(a=>{Ni(this,`Updated property ${a.type} from`,a.previousValue," to ",a.currentValue),this.propEventSvc.dispatchEvent(a)})}addPropertyEventListener(e,t){this.propEventSvc.addEventListener(e,t)}removePropertyEventListener(e,t){this.propEventSvc.removeEventListener(e,t)}getDomDataKey(){return this.domDataKey}addGridCommonParams(e){return e.api=this.api,e.context=this.gridOptionsContext,e}assertModuleRegistered(e,t){const o=Array.isArray(e)?e.some(i=>this.isModuleRegistered(i)):this.isModuleRegistered(e);return o||ce(200,{...this.getModuleErrorParams(),moduleName:e,reasonOrId:t}),o}getModuleErrorParams(){return{gridId:this.gridId,gridScoped:Un(),rowModelType:this.get("rowModelType"),isUmd:nm()}}isModuleRegistered(e){return qd(e,this.gridId,this.get("rowModelType"))}};function bu(e){const t={"aria-hidden":"true"};return{tag:"div",cls:"ag-cell-label-container",role:"presentation",children:[{tag:"span",ref:"eMenu",cls:"ag-header-icon ag-header-cell-menu-button",attrs:t},{tag:"span",ref:"eFilterButton",cls:"ag-header-icon ag-header-cell-filter-button",attrs:t},{tag:"div",ref:"eLabel",cls:"ag-header-cell-label",role:"presentation",children:[{tag:"span",ref:"eText",cls:"ag-header-cell-text"},{tag:"span",ref:"eFilter",cls:"ag-header-icon ag-header-label-icon ag-filter-icon",attrs:t},e?{tag:"ag-sort-indicator",ref:"eSortIndicator"}:null]}]}}var zy=bu(!0),Wy=bu(!1),$y=class extends pe{constructor(){super(...arguments),this.eFilter=V,this.eFilterButton=V,this.eSortIndicator=V,this.eMenu=V,this.eLabel=V,this.eText=V,this.eSortOrder=V,this.eSortAsc=V,this.eSortDesc=V,this.eSortMixed=V,this.eSortNone=V,this.isLoadingInnerComponent=!1}refresh(e){const t=this.params;if(this.params=e,this.workOutTemplate(e,!!this.beans?.sortSvc)!=this.currentTemplate||this.workOutShowMenu()!=this.currentShowMenu||e.enableSorting!=this.currentSort||this.currentSuppressMenuHide!=null&&this.shouldSuppressMenuHide()!=this.currentSuppressMenuHide||t.enableFilterButton!=e.enableFilterButton||t.enableFilterIcon!=e.enableFilterIcon)return!1;if(this.innerHeaderComponent){const o={...e};Ye(o,e.innerHeaderComponentParams),this.innerHeaderComponent.refresh?.(o)}else this.setDisplayName(e);return!0}workOutTemplate(e,t){const o=e.template;return o?o?.trim?o.trim():o:t?zy:Wy}init(e){this.params=e;const{sortSvc:t,touchSvc:o,rowNumbersSvc:i,userCompFactory:r}=this.beans,s=t?.getSortIndicatorSelector();this.currentTemplate=this.workOutTemplate(e,!!s),this.setTemplate(this.currentTemplate,s?[s]:void 0),o?.setupForHeader(this),this.setMenu(),this.setupSort(),i?.setupForHeader(this),this.setupFilterIcon(),this.setupFilterButton(),this.workOutInnerHeaderComponent(r,e),this.setDisplayName(e)}workOutInnerHeaderComponent(e,t){const o=Hf(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderComponent=i,this.eText.appendChild(i.getGui())):this.destroyBean(i))}))}setDisplayName(e){const{displayName:t}=e,o=this.currentDisplayName;if(this.currentDisplayName=t,o===t||this.innerHeaderComponent||this.isLoadingInnerComponent)return;const i=Rt(t,!0);this.eText.textContent=i}addInIcon(e,t,o){if(t==null)return;const i=te(e,this.beans,o);i&&t.appendChild(i)}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){_t(this.eMenu),this.eMenu=void 0;return}const{gos:e,eMenu:t,params:o}=this,i=We(e);this.addInIcon(i?"menu":"menuAlt",t,o.column),t.classList.toggle("ag-header-menu-icon",!i);const 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){const{currentSuppressMenuHide:t,params:o}=this;t||this.toggleMenuAlwaysShow(!0),o.showColumnMenu(e,()=>{t||this.toggleMenuAlwaysShow(!1)})}onMenuKeyboardShortcut(e){const{params:t,gos:o,beans:i,eMenu:r,eFilterButton:s}=this,n=t.column,a=We(o);if(e&&!a){if(i.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(){const{sortSvc:e}=this.beans;if(!e)return;const{enableSorting:t,column:o}=this.params;if(this.currentSort=t,!this.eSortIndicator){this.eSortIndicator=this.createBean(e.createSortIndicator(!0));const{eSortIndicator:i,eSortOrder:r,eSortAsc:s,eSortDesc:n,eSortMixed:a,eSortNone:l}=this;i.attachCustomElements(r,s,n,a,l)}this.eSortIndicator.setupSort(o),this.currentSort&&e.setupHeader(this,o,this.eLabel)}setupFilterIcon(){const{eFilter:e,params:t}=this;e&&this.configureFilter(t.enableFilterIcon,e,this.onFilterChangedIcon.bind(this),"filterActive")}setupFilterButton(){const{eFilterButton:e,params:t}=this;if(!e)return;this.configureFilter(t.enableFilterButton,e,this.onFilterChangedButton.bind(this),"filter")?this.addManagedElementListeners(e,{click:()=>t.showFilter(e)}):this.eFilterButton=void 0}configureFilter(e,t,o,i){if(!e)return _t(t),!1;const r=this.params.column;return this.addInIcon(i,t,r),this.addManagedListeners(r,{filterChanged:o}),o(),!0}onFilterChangedIcon(){const e=this.params.column.isFilterActive();ge(this.eFilter,e,{skipAriaHidden:!0})}onFilterChangedButton(){const e=this.params.column.isFilterActive();this.eFilterButton.classList.toggle("ag-filter-active",e)}getAnchorElementForMenu(e){const{eFilterButton:t,eMenu:o}=this;return e?t??o??this.getGui():o??t??this.getGui()}destroy(){super.destroy(),this.innerHeaderComponent&&(this.destroyBean(this.innerHeaderComponent),this.innerHeaderComponent=void 0)}},Uy={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"}]},jy=class extends pe{constructor(){super(Uy),this.agOpened=V,this.agClosed=V,this.agLabel=V,this.isLoadingInnerComponent=!1}init(e){const{userCompFactory:t}=this.beans;this.params=e,this.checkWarnings(),this.workOutInnerHeaderGroupComponent(t,e),this.setupLabel(e),this.addGroupExpandIcon(e),this.setupExpandIcons()}checkWarnings(){this.params.template&&_(89)}workOutInnerHeaderGroupComponent(e,t){const o=_f(e,t,t);o&&(this.isLoadingInnerComponent=!0,o.newAgStackInstance().then(i=>{this.isLoadingInnerComponent=!1,i&&(this.isAlive()?(this.innerHeaderGroupComponent=i,this.agLabel.appendChild(i.getGui())):this.destroyBean(i))}))}setupExpandIcons(){const{agOpened:e,agClosed:t,params:{columnGroup:o},beans:i}=this;this.addInIcon("columnGroupOpened",e),this.addInIcon("columnGroupClosed",t);const r=l=>{if(Tt(l))return;const d=!o.isExpanded();i.colGroupSvc.setColumnGroupOpened(o.getProvidedColumnGroup(),d,"uiColumnExpanded")};this.addTouchAndClickListeners(i,t,r),this.addTouchAndClickListeners(i,e,r);const s=l=>{io(l)};this.addManagedElementListeners(t,{dblclick:s}),this.addManagedElementListeners(e,{dblclick:s}),this.addManagedElementListeners(this.getGui(),{dblclick:r}),this.updateIconVisibility();const n=o.getProvidedColumnGroup(),a=this.updateIconVisibility.bind(this);this.addManagedListeners(n,{expandedChanged:a,expandableChanged:a})}addTouchAndClickListeners(e,t,o){e.touchSvc?.setupForHeaderGroup(this,t,o),this.addManagedElementListeners(t,{click:o})}updateIconVisibility(){const{agOpened:e,agClosed:t,params:{columnGroup:o}}=this;if(o.isExpandable()){const i=o.isExpanded();ge(e,i),ge(t,!i)}else ge(e,!1),ge(t,!1)}addInIcon(e,t){const o=te(e,this.beans,null);o&&t.appendChild(o)}addGroupExpandIcon(e){if(!e.columnGroup.isExpandable()){const{agOpened:t,agClosed:o}=this;ge(t,!1),ge(o,!1);return}}setupLabel(e){const{displayName:t,columnGroup:o}=e,i=this.innerHeaderGroupComponent||this.isLoadingInnerComponent;if(q(t)&&!i){const r=Rt(t,!0);this.agLabel.textContent=r}this.addOrRemoveCssClass("ag-sticky-label",!o.getColGroupDef()?.suppressStickyLabel)}destroy(){super.destroy(),this.innerHeaderGroupComponent&&(this.destroyBean(this.innerHeaderGroupComponent),this.innerHeaderGroupComponent=void 0)}},Ky={moduleName:"ColumnHeaderComp",version:ae,userComponents:{agColumnHeader:$y},icons:{menu:"menu",menuAlt:"menu-alt"}},Yy={moduleName:"ColumnGroupHeaderComp",version:ae,userComponents:{agColumnGroupHeader:jy},icons:{columnGroupOpened:"expanded",columnGroupClosed:"contracted"}},qy=class extends E{constructor(){super(...arguments),this.beanName="animationFrameSvc",this.p1={list:[],sorted:!1},this.p2={list:[],sorted:!1},this.f1={list:[],sorted:!1},this.destroyTasks=[],this.ticking=!1,this.scrollGoingDown=!0,this.lastScrollTop=0,this.taskCount=0}setScrollTop(e){this.scrollGoingDown=e>=this.lastScrollTop,e===0&&(this.scrollGoingDown=!0),this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame"),this.batchFrameworkComps=this.beans.frameworkOverrides.batchFrameworkComps}verify(){this.active===!1&&_(92)}createTask(e,t,o,i){this.verify();let r=o;i&&this.batchFrameworkComps&&(r="f1");const s={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[r],s),this.schedule()}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((o,i)=>o.index!==i.index?t*(i.index-o.index):i.createOrder-o.createOrder),e.sorted=!0}addDestroyTask(e){this.verify(),this.destroyTasks.push(e),this.schedule()}executeFrame(e){const{p1:t,p2:o,f1:i,destroyTasks:r,beans:s}=this,{ctrlsSvc:n,frameworkOverrides:a}=s,l=t.list,d=o.list,c=i.list,u=Date.now();let g=0;const p=e<=0,f=n.getScrollFeature();for(;p||g<e;){if(!f.scrollGridIfNeeded()){let C;if(l.length)this.sortTaskList(t),C=l.pop().task;else if(d.length)this.sortTaskList(o),C=d.pop().task;else if(c.length)a.wrapOutgoing(()=>{for(;(p||g<e)&&!f.scrollGridIfNeeded();){if(c.length)this.sortTaskList(i),C=c.pop().task,C();else break;g=Date.now()-u}}),C=()=>{};else if(r.length)C=r.pop();else break;C()}g=Date.now()-u}l.length||d.length||c.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(){const e=this.executeFrame.bind(this,60);Pt(this.beans,e)}isQueueEmpty(){return!this.ticking}},Xy={moduleName:"AnimationFrame",version:ae,beans:[qy]},Qy=class extends E{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(!To())return;const t=(o,i,r)=>{const{rowCtrl:s,cellCtrl:n}=e.getControlsForEventTarget(r?.target??null);n?.column&&n.dispatchCellContextMenuEvent(r??null),this.beans.contextMenuSvc?.handleContextMenuMouseEvent(void 0,r,s,n)};this.mockContextMenu(e,e.element,t)}handleCellDoubleClick(e,t){return(()=>{if(!To()||yd("dblclick"))return!1;const i=Date.now(),r=i-e.lastIPadMouseClickEvent<200;return e.lastIPadMouseClickEvent=i,r})()?(e.onCellDoubleClicked(t),t.preventDefault(),!0):!1}setupForHeader(e){const{gos:t,sortSvc:o}=this.beans;if(t.get("suppressTouch"))return;const{params:i,eMenu:r,eFilterButton:s}=e,n=new Ci(e.getGui(),!0),a=e.shouldSuppressMenuHide(),l=a&&q(r),d=l?new Ci(r,!0):n;if(i.enableMenu){const c=l?"tap":"longTap",u=g=>i.showColumnMenuAfterMouseClick(g.touchStart);e.addManagedListeners(d,{[c]:u})}if(i.enableSorting){const c=u=>{const g=u.touchStart.target;a&&(r?.contains(g)||s?.contains(g))||o?.progressSort(i.column,!1,"uiColumnSorted")};e.addManagedListeners(n,{tap:c})}if(i.enableFilterButton&&s){const c=new Ci(s,!0);e.addManagedListeners(c,{tap:()=>i.showFilter(s)}),e.addDestroyFunc(()=>c.destroy())}e.addDestroyFunc(()=>n.destroy()),l&&e.addDestroyFunc(()=>d.destroy())}setupForHeaderGroup(e,t,o){const i=new Ci(t,!0);e.addManagedListeners(i,{tap:o}),e.addDestroyFunc(()=>i.destroy())}mockContextMenu(e,t,o){if(!To())return;const i=new Ci(t),r=s=>{Xi(this.gos,s.touchEvent)&&o(void 0,s.touchStart,s.touchEvent)};e.addManagedListeners(i,{longTap:r}),e.addDestroyFunc(()=>i.destroy())}},Zy={moduleName:"Touch",version:ae,beans:[Qy]},Jy=class extends E{constructor(){super(...arguments),this.beanName="cellNavigation"}wireBeans(e){this.rowSpanSvc=e.rowSpanSvc}getNextCellToFocus(e,t,o=!1){return o?this.getNextCellToFocusWithCtrlPressed(e,t):this.getNextCellToFocusWithoutCtrlPressed(e,t)}getNextCellToFocusWithCtrlPressed(e,t){const o=e===D.UP,i=e===D.DOWN,r=e===D.LEFT;let s,n;const{pageBounds:a,gos:l,visibleCols:d}=this.beans;if(o||i)n=o?a.getFirstRow():a.getLastRow(),s=t.column;else{const c=l.get("enableRtl");n=t.rowIndex,s=(r!==c?d.allCols:[...d.allCols].reverse()).find(g=>this.isCellGoodToFocusOn({rowIndex:n,rowPinned:null,column:g}))}return s?{rowIndex:n,rowPinned:null,column:s}:null}getNextCellToFocusWithoutCtrlPressed(e,t){let o=t,i=!1;for(;!i;){switch(e){case D.UP:o=this.getCellAbove(o);break;case D.DOWN:o=this.getCellBelow(o);break;case D.RIGHT:o=this.gos.get("enableRtl")?this.getCellToLeft(o):this.getCellToRight(o);break;case D.LEFT:o=this.gos.get("enableRtl")?this.getCellToRight(o):this.getCellToLeft(o);break;default:o=null,_(8,{key:e});break}o?i=this.isCellGoodToFocusOn(o):i=!0}return o}isCellGoodToFocusOn(e){const t=e.column;let o;const{pinnedRowModel:i,rowModel:r}=this.beans;switch(e.rowPinned){case"top":o=i?.getPinnedTopRow(e.rowIndex);break;case"bottom":o=i?.getPinnedBottomRow(e.rowIndex);break;default:o=r.getRow(e.rowIndex);break}return o?!this.isSuppressNavigable(t,o):!1}getCellToLeft(e){if(!e)return null;const t=this.beans.visibleCols.getColBefore(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellToRight(e){if(!e)return null;const t=this.beans.visibleCols.getColAfter(e.column);return t?{rowIndex:e.rowIndex,column:t,rowPinned:e.rowPinned}:null}getCellBelow(e){if(!e)return null;const t=this.rowSpanSvc?.getCellEnd(e)??e,o=sc(this.beans,t);return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getCellAbove(e){if(!e)return null;const t=this.rowSpanSvc?.getCellStart(e)??e,o=ss(this.beans,{rowIndex:t.rowIndex,rowPinned:t.rowPinned});return o?{rowIndex:o.rowIndex,column:e.column,rowPinned:o.rowPinned}:null}getNextTabbedCell(e,t){return t?this.getNextTabbedCellBackwards(e):this.getNextTabbedCellForwards(e)}getNextTabbedCellForwards(e){const{visibleCols:t,pagination:o}=this.beans,i=t.allCols;let r=e.rowIndex,s=e.rowPinned,n=t.getColAfter(e.column);if(!n){n=i[0];const a=sc(this.beans,e);if(De(a)||!a.rowPinned&&!(o?.isRowInPage(a.rowIndex)??!0))return null;r=a?a.rowIndex:null,s=a?a.rowPinned:null}return{rowIndex:r,column:n,rowPinned:s}}getNextTabbedCellBackwards(e){const{beans:t}=this,{visibleCols:o,pagination:i}=t,r=o.allCols;let s=e.rowIndex,n=e.rowPinned,a=o.getColBefore(e.column);if(!a){a=Ce(r);const l=ss(t,{rowIndex:e.rowIndex,rowPinned:e.rowPinned});if(De(l)||!l.rowPinned&&!(i?.isRowInPage(l.rowIndex)??!0))return null;s=l?l.rowIndex:null,n=l?l.rowPinned:null}return{rowIndex:s,column:a,rowPinned:n}}isSuppressNavigable(e,t){const{suppressNavigable:o}=e.colDef;if(typeof o=="boolean")return o;if(typeof o=="function"){const i=e.createColumnFunctionCallbackParams(t);return o(i)}return!1}};function eS(e){return e.focusSvc.getFocusedCell()}function tS(e){return e.focusSvc.clearFocusedCell()}function oS(e,t,o,i){e.focusSvc.setFocusedCell({rowIndex:t,column:o,rowPinned:i,forceBrowserFocus:!0})}function iS(e,t){return e.navigation?.tabToNextCell(!1,t)??!1}function rS(e,t){return e.navigation?.tabToNextCell(!0,t)??!1}function sS(e,t,o=!1){const i=e.headerNavigation?.getHeaderPositionForColumn(t,o);i&&e.focusSvc.focusHeaderPosition({headerPosition:i})}var nS=class extends E{constructor(){super(),this.beanName="navigation",this.onPageDown=id(this.onPageDown,100),this.onPageUp=id(this.onPageUp,100)}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCon=e.gridBodyCtrl})}handlePageScrollingKey(e,t=!1){const o=e.key,i=e.altKey,r=e.ctrlKey||e.metaKey,s=!!this.beans.rangeSvc&&e.shiftKey,n=Am(this.gos,e);let a=!1;switch(o){case D.PAGE_HOME:case D.PAGE_END:!r&&!i&&(this.onHomeOrEndKey(o),a=!0);break;case D.LEFT:case D.RIGHT:case D.UP:case D.DOWN:if(!n)return!1;r&&!i&&!s&&(this.onCtrlUpDownLeftRight(o,n),a=!0);break;case D.PAGE_DOWN:case D.PAGE_UP:!r&&!i&&(a=this.handlePageUpDown(o,n,t));break}return a&&e.preventDefault(),a}handlePageUpDown(e,t,o){return o&&(t=this.beans.focusSvc.getFocusedCell()),t?(e===D.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0):!1}navigateTo(e){const{scrollIndex:t,scrollType:o,scrollColumn:i,focusIndex:r,focusColumn:s}=e,{scrollFeature:n}=this.gridBodyCon;q(i)&&!i.isPinned()&&n.ensureColumnVisible(i),q(t)&&n.ensureIndexVisible(t,o),e.isAsync||n.ensureIndexVisible(r);const{focusSvc:a,rangeSvc:l}=this.beans;a.setFocusedCell({rowIndex:r,column:s,rowPinned:null,forceBrowserFocus:!0}),l?.setRangeToCell({rowIndex:r,rowPinned:null,column:s})}onPageDown(e){const t=this.beans,o=Pa(t),i=this.getViewportHeight(),{pageBounds:r,rowModel:s,rowAutoHeight:n}=t,a=r.getPixelOffset(),l=o.top+i,d=s.getRowIndexAtPixel(l+a);n?.active?this.navigateToNextPageWithAutoHeight(e,d):this.navigateToNextPage(e,d)}onPageUp(e){const t=this.beans,o=Pa(t),{pageBounds:i,rowModel:r,rowAutoHeight:s}=t,n=i.getPixelOffset(),a=o.top,l=r.getRowIndexAtPixel(a+n);s?.active?this.navigateToNextPageWithAutoHeight(e,l,!0):this.navigateToNextPage(e,l,!0)}navigateToNextPage(e,t,o=!1){const{pageBounds:i,rowModel:r}=this.beans,s=this.getViewportHeight(),n=i.getFirstRow(),a=i.getLastRow(),l=i.getPixelOffset(),d=r.getRow(e.rowIndex),c=o?d?.rowHeight-s-l:s-l,u=d?.rowTop+c;let g=r.getRowIndexAtPixel(u+l);if(g===e.rowIndex){const f=o?-1:1;t=g=e.rowIndex+f}let p;o?(p="bottom",g<n&&(g=n),t<n&&(t=n)):(p="top",g>a&&(g=a),t>a&&(t=a)),this.isRowTallerThanView(r.getRow(g))&&(t=g,p="top"),this.navigateTo({scrollIndex:t,scrollType:p,scrollColumn:null,focusIndex:g,focusColumn:e.column})}navigateToNextPageWithAutoHeight(e,t,o=!1){this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout(()=>{const i=this.getNextFocusIndexForAutoHeight(e,o);this.navigateTo({scrollIndex:t,scrollType:o?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})},50)}getNextFocusIndexForAutoHeight(e,t=!1){const o=t?-1:1,i=this.getViewportHeight(),{pageBounds:r,rowModel:s}=this.beans,n=r.getLastRow();let a=0,l=e.rowIndex;for(;l>=0&&l<=n;){const d=s.getRow(l);if(d){const c=d.rowHeight??0;if(a+c>i)break;a+=c}l+=o}return Math.max(0,Math.min(l,n))}getViewportHeight(){const e=this.beans,t=Pa(e),o=this.beans.scrollVisibleSvc.getScrollbarWidth();let i=t.bottom-t.top;return e.ctrlsSvc.get("center").isHorizontalScrollShowing()&&(i-=o),i}isRowTallerThanView(e){if(!e)return!1;const t=e.rowHeight;return typeof t!="number"?!1:t>this.getViewportHeight()}onCtrlUpDownLeftRight(e,t){const o=this.beans.cellNavigation.getNextCellToFocus(e,t,!0),{rowIndex:i}=o,r=o.column;this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:r,focusIndex:i,focusColumn:r})}onHomeOrEndKey(e){const t=e===D.PAGE_HOME,{visibleCols:o,pageBounds:i,rowModel:r}=this.beans,s=o.allCols,n=t?i.getFirstRow():i.getLastRow(),a=r.getRow(n);if(!a)return;const l=(t?s:[...s].reverse()).find(d=>!d.isSuppressNavigable(a));l&&this.navigateTo({scrollIndex:n,scrollType:null,scrollColumn:l,focusIndex:n,focusColumn:l})}onTabKeyDown(e,t){const o=t.shiftKey,i=this.tabToNextCellCommon(e,o,t),r=this.beans,{ctrlsSvc:s,pageBounds:n,focusSvc:a,gos:l}=r;if(i!==!1){i?t.preventDefault():i===null&&s.get("gridCtrl").allowFocusForNextCoreContainer(o);return}if(o){const{rowIndex:d,rowPinned:c}=e.getRowPosition();(c?d===0:d===n.getFirstRow())&&(l.get("headerHeight")===0||_o(r)?zo(r,!0,!0):(t.preventDefault(),a.focusPreviousFromFirstCell(t)))}else e instanceof os&&e.focusCell(!0),(!o&&a.focusOverlay(!1)||zo(r,o))&&t.preventDefault()}tabToNextCell(e,t){const o=this.beans,{focusSvc:i,rowRenderer:r}=o,s=i.getFocusedCell();if(!s)return!1;let n=rs(o,s);return!n&&(n=r.getRowByPosition(s),!n||!n.isFullWidth())?!1:!!this.tabToNextCellCommon(n,e,t)}tabToNextCellCommon(e,t,o){let i=e.editing;if(!i&&e instanceof os){const n=e.rowCtrl;n&&(i=n.editing)}let r;return i?this.gos.get("editType")==="fullRow"?r=this.moveToNextEditingRow(e,t,o):r=this.moveToNextEditingCell(e,t,o):r=this.moveToNextCellNotEditing(e,t,o),r===null?r:r||!!this.beans.focusSvc.focusedHeader}moveToNextEditingCell(e,t,o=null){const i=e.cellPosition;e.eGui.focus(),e.stopEditing();const r=this.findNextCellToFocusOn(i,t,!0);return r===!1?null:r==null?!1:(this.beans.editSvc?.startEditing(r,null,!0,o),r.focusCell(!1),!0)}moveToNextEditingRow(e,t,o=null){const i=e.cellPosition,r=this.findNextCellToFocusOn(i,t,!0);if(r===!1)return null;if(r==null)return!1;const s=r.cellPosition,n=this.isCellEditable(i),a=this.isCellEditable(s),l=s&&i.rowIndex===s.rowIndex&&i.rowPinned===s.rowPinned,{editSvc:d,rowEditSvc:c}=this.beans;if(n&&d?.setFocusOutOnEditor(e),!l){const u=e.rowCtrl;d?.stopRowEditing(u);const g=r.rowCtrl;c?.startEditing(g,void 0,void 0,o)}return a?(d?.setFocusInOnEditor(r),r.focusCell()):r.focusCell(!0),!0}moveToNextCellNotEditing(e,t,o){const i=this.beans.visibleCols.allCols;let r;if(e instanceof ta){if(r={...e.getRowPosition(),column:t?i[0]:Ce(i)},this.gos.get("embedFullWidthRows")&&o){const n=e.findFullWidthInfoForEvent(o);n&&(r.column=n.column)}}else r=e.getFocusedCellPosition();const s=this.findNextCellToFocusOn(r,t,!1);if(s===!1)return null;if(s instanceof os)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s,t);return q(s)}findNextCellToFocusOn(e,t,o){let i=e;const r=this.beans,{cellNavigation:s,gos:n,focusSvc:a,rowRenderer:l,rangeSvc:d}=r;for(;;){e!==i&&(e=i),t||(i=this.getLastCellOfColSpan(i)),i=s.getNextTabbedCell(i,t);const c=n.getCallback("tabToNextCell");if(q(c)){const f=c({backwards:t,editing:o,previousCellPosition:e,nextCellPosition:i||null});if(f===!0)i=e;else{if(f===!1)return!1;i={rowIndex:f.rowIndex,column:f.column,rowPinned:f.rowPinned}}}if(!i)return null;if(i.rowIndex<0){const p=jt(r);return a.focusHeaderPosition({headerPosition:{headerRowIndex:p+i.rowIndex,column:i.column},fromCell:!0}),null}const u=n.get("editType")==="fullRow";if(o&&!u&&!this.isCellEditable(i))continue;this.ensureCellVisible(i);const g=rs(r,i);if(!g){const p=l.getRowByPosition(i);if(!p||!p.isFullWidth()||o)continue;return{...p.getRowPosition(),column:i?.column}}if(!s.isSuppressNavigable(g.column,g.rowNode))return g.setFocusedCellPosition(i),d?.setRangeToCell(i),g}}isCellEditable(e){const t=this.lookupRowNodeForCell(e);return t?e.column.isCellEditable(t):!1}lookupRowNodeForCell({rowIndex:e,rowPinned:t}){const{pinnedRowModel:o,rowModel:i}=this.beans;return t==="top"?o?.getPinnedTopRow(e):t==="bottom"?o?.getPinnedBottomRow(e):i.getRow(e)}navigateToNextCell(e,t,o,i){let r=o,s=!1;const n=this.beans,{cellNavigation:a,focusSvc:l,gos:d}=n;for(;r&&(r===o||!this.isValidNavigateCell(r));)d.get("enableRtl")?t===D.LEFT&&(r=this.getLastCellOfColSpan(r)):t===D.RIGHT&&(r=this.getLastCellOfColSpan(r)),r=a.getNextCellToFocus(t,r),s=De(r);if(s&&e&&e.key===D.UP&&(r={rowIndex:-1,rowPinned:null,column:o.column}),i){const u=d.getCallback("navigateToNextCell");if(q(u)){const p=u({key:t,previousCellPosition:o,nextCellPosition:r||null,event:e});q(p)?r={rowPinned:p.rowPinned,rowIndex:p.rowIndex,column:p.column}:r=null}}if(!r)return;if(r.rowIndex<0){const u=jt(n);l.focusHeaderPosition({headerPosition:{headerRowIndex:u+r.rowIndex,column:o.column},event:e||void 0,fromCell:!0});return}const c=this.getNormalisedPosition(r);c?this.focusPosition(c):this.tryToFocusFullWidthRow(r)}getNormalisedPosition(e){if(!!this.beans.spannedRowRenderer?.getCellByPosition(e))return e;this.ensureCellVisible(e);const o=rs(this.beans,e);return o?(e=o.getFocusedCellPosition(),this.ensureCellVisible(e),e):null}tryToFocusFullWidthRow(e,t){const{visibleCols:o,rowRenderer:i,focusSvc:r,eventSvc:s}=this.beans,n=o.allCols,a=i.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;const l=r.getFocusedCell(),d={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?Ce(n):n[0])};this.focusPosition(d);const c=t??(l!=null&&Gm(d,l));return s.dispatchEvent({type:"fullWidthRowFocused",rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:d.column,isFullWidthCell:!0,fromBelow:c}),!0}focusPosition(e){const{focusSvc:t,rangeSvc:o}=this.beans;t.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),o?.setRangeToCell(e)}isValidNavigateCell(e){return!!qn(this.beans,e)}getLastCellOfColSpan(e){const t=rs(this.beans,e);if(!t)return e;const o=t.getColSpanningList();return o.length===1?e:{rowIndex:e.rowIndex,column:Ce(o),rowPinned:e.rowPinned}}ensureCellVisible(e){const t=Vr(this.gos),o=this.beans.rowModel.getRow(e.rowIndex),i=t&&o?.sticky,{scrollFeature:r}=this.gridBodyCon;!i&&De(e.rowPinned)&&r.ensureIndexVisible(e.rowIndex),e.column.isPinned()||r.ensureColumnVisible(e.column)}};function Pa(e){return e.ctrlsSvc.getScrollFeature().getVScrollPosition()}var aS={moduleName:"KeyboardNavigation",version:ae,beans:[nS,Jy,Ty],apiFunctions:{getFocusedCell:eS,clearFocusedCell:tS,setFocusedCell:oS,setFocusedHeader:sS,tabToNextCell:iS,tabToPreviousCell:rS}},lS=class extends E{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(){const{pageBounds:e,pagination:t,rowModel:o}=this.beans;t?t.calculatePages():e.calculateBounds(0,o.getRowCount()-1)}},dS=class extends E{constructor(){super(...arguments),this.beanName="pageBounds",this.pixelOffset=0}getFirstRow(){return this.topRowBounds?.rowIndex??-1}getLastRow(){return this.bottomRowBounds?.rowIndex??-1}getCurrentPageHeight(){const{topRowBounds:e,bottomRowBounds:t}=this;return!e||!t?0:Math.max(t.rowTop+t.rowHeight-e.rowTop,0)}getCurrentPagePixelRange(){const{topRowBounds:e,bottomRowBounds:t}=this,o=e?.rowTop??0,i=t?t.rowTop+t.rowHeight:0;return{pageFirstPixel:o,pageLastPixel:i}}calculateBounds(e,t){const{rowModel:o}=this.beans,i=o.getRowBounds(e);i&&(i.rowIndex=e),this.topRowBounds=i;const r=o.getRowBounds(t);r&&(r.rowIndex=t),this.bottomRowBounds=r,this.calculatePixelOffset()}getPixelOffset(){return this.pixelOffset}calculatePixelOffset(){const e=this.topRowBounds?.rowTop??0;this.pixelOffset!==e&&(this.pixelOffset=e,this.eventSvc.dispatchEvent({type:"paginationPixelOffsetChanged"}))}},cS=".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}",uS=class extends E{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(){const e=this.getWidth(),t=e>0;for(const o of this.elements)o&&(ge(o,t),zt(o,e))}},hS=class extends E{constructor(){super(...arguments),this.beanName="pinnedCols"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,t=>{this.gridBodyCtrl=t.gridBodyCtrl});const e=this.checkContainerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}checkContainerWidths(){const{gos:e,visibleCols:t,eventSvc:o}=this.beans,i=Ke(e,"print"),r=i?0:t.getColsLeftWidth(),s=i?0:t.getDisplayedColumnsRightWidth();r!=this.leftWidth&&(this.leftWidth=r,o.dispatchEvent({type:"leftPinnedWidthChanged"})),s!=this.rightWidth&&(this.rightWidth=s,o.dispatchEvent({type:"rightPinnedWidthChanged"}))}keepPinnedColumnsNarrowerThanViewport(){const e=this.gridBodyCtrl.eBodyViewport,t=Li(e);if(t<=50)return;const o=this.getPinnedColumnsOverflowingViewport(t-50),i=this.gos.getCallback("processUnpinnedColumns"),{columns:r,hasLockedPinned:s}=o;let n=r;!n.length&&!s||(i&&(n=i({columns:n,viewportWidth:t})),!(!n||!n.length)&&(n=n.filter(a=>!ji(a)),this.setColsPinned(n,null,"viewportSizeFeature")))}createPinnedWidthFeature(e,...t){return new uS(e,t)}setColsPinned(e,t,o){const{colModel:i,colAnimation:r,visibleCols:s,gos:n}=this.beans;if(!i.cols||!e?.length)return;if(Ke(n,"print")){_(37);return}r?.start();let a;t===!0||t==="left"?a="left":t==="right"?a="right":a=null;const l=[];e.forEach(d=>{if(!d)return;const c=i.getCol(d);c&&c.getPinned()!==a&&(this.setColPinned(c,a),l.push(c))}),l.length&&(s.refresh(o),Od(this.eventSvc,l,o)),r?.finish()}initCol(e){const{pinned:t,initialPinned:o}=e.colDef;t!==void 0?this.setColPinned(e,t):this.setColPinned(e,o)}setColPinned(e,t){t===!0||t==="left"?e.pinned="left":t==="right"?e.pinned="right":e.pinned=null,e.dispatchStateUpdatedEvent("pinned")}setupHeaderPinnedWidth(e){const{scrollVisibleSvc:t}=this.beans;if(e.pinned==null)return;const o=e.pinned==="left",i=e.pinned==="right";e.hidden=!0;const r=()=>{const s=o?this.leftWidth:this.rightWidth;if(s==null)return;const n=s==0,a=e.hidden!==n,l=this.gos.get("enableRtl"),d=t.getScrollbarWidth(),u=t.verticalScrollShowing&&(l&&o||!l&&i)?s+d:s;e.comp.setPinnedContainerWidth(`${u}px`),e.comp.setDisplayed(!n),a&&(e.hidden=n,e.refresh())};e.addManagedEventListeners({leftPinnedWidthChanged:r,rightPinnedWidthChanged:r,scrollVisibilityChanged:r,scrollbarWidthChanged:r})}getHeaderResizeDiff(e,t){if(t.getPinned()){const{leftWidth:i,rightWidth:r}=this,s=Li(this.beans.ctrlsSvc.getGridBodyCtrl().eBodyViewport)-50;if(i+r+e>s)if(s>i+r)e=s-i-r;else return 0}return e}getPinnedColumnsOverflowingViewport(e){const t=this.rightWidth??0,o=this.leftWidth??0,i=t+o;let r=!1;if(i<e)return{columns:[],hasLockedPinned:r};const{visibleCols:s}=this.beans,n=[...s.leftCols],a=[...s.rightCols];let l=0,d=0;const c=0,u=[];let g=i-c-e;for(;(d<n.length||l<a.length)&&g>0;){if(l<a.length){const p=a[l++];if(p.colDef.lockPinned){r=!0;continue}g-=p.getActualWidth(),u.push(p)}if(d<n.length&&g>0){const p=n[d++];if(p.colDef.lockPinned){r=!0;continue}g-=p.getActualWidth(),u.push(p)}}return{columns:u,hasLockedPinned:r}}},gS={moduleName:"PinnedColumn",version:ae,beans:[hS],css:[cS]},pS=class extends E{constructor(){super(),this.beanName="ariaAnnounce",this.descriptionContainer=null,this.pendingAnnouncements=new Map,this.lastAnnouncement="",this.updateAnnouncement=tt(this,this.updateAnnouncement.bind(this),200)}postConstruct(){const e=this.beans,t=Te(e),o=this.descriptionContainer=t.createElement("div");o.classList.add("ag-aria-description-container"),Al(o,"polite"),rp(o,"additions text"),ip(o,!0),e.eGridDiv.appendChild(o)}announceValue(e,t){this.pendingAnnouncements.set(t,e),this.updateAnnouncement()}updateAnnouncement(){if(!this.descriptionContainer)return;const e=Array.from(this.pendingAnnouncements.values()).join(". ");this.pendingAnnouncements.clear(),this.descriptionContainer.textContent="",setTimeout(()=>{if(this.isAlive()&&this.descriptionContainer){let t=e;this.lastAnnouncement===t&&(t=`${t}.`),this.lastAnnouncement=t,this.descriptionContainer.textContent=t}},50)}destroy(){super.destroy();const{descriptionContainer:e}=this;e&&(ct(e),e.parentElement?.removeChild(e)),this.descriptionContainer=null,this.pendingAnnouncements.clear()}},fS={moduleName:"Aria",version:ae,beans:[pS]};function mS(e){e.overlays?.showLoadingOverlay()}function CS(e){e.overlays?.showNoRowsOverlay()}function vS(e){e.overlays?.hideOverlay()}var wS=".ag-overlay{inset:0;pointer-events:none;position:absolute;z-index:2}.ag-overlay-panel,.ag-overlay-wrapper{display:flex;height:100%;width:100%}.ag-overlay-wrapper{align-items:center;flex:none;justify-content:center;text-align:center}.ag-overlay-loading-wrapper{pointer-events:all}.ag-overlay-loading-center{background:var(--ag-background-color);border:1px solid var(--ag-border-color);border-radius:var(--ag-border-radius);box-shadow:var(--ag-popup-shadow);padding:var(--ag-spacing)}",bS={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"}]}]},yu=class extends pe{constructor(){super(bS),this.eOverlayWrapper=V,this.activePromise=null,this.activeOverlay=null,this.updateListenerDestroyFunc=null,this.activeCssClass=null,this.elToFocusAfter=null,this.registerCSS(wS)}handleKeyDown(e){if(e.key!==D.TAB||e.defaultPrevented||Tt(e))return;const t=this.beans;if(Ut(t,this.eOverlayWrapper,!1,e.shiftKey))return;let i=!1;e.shiftKey?i=t.focusSvc.focusGridView({column:Ce(t.visibleCols.allCols),backwards:!0,canFocusOverlay:!1}):i=zo(t,!1),i&&e.preventDefault()}updateLayoutClasses(e,t){const o=this.eOverlayWrapper.classList,{AUTO_HEIGHT:i,NORMAL:r,PRINT:s}=Gt;o.toggle(i,t.autoHeight),o.toggle(r,t.normal),o.toggle(s,t.print)}postConstruct(){this.createManagedBean(new Zn(this)),this.setDisplayed(!1,{skipAriaHidden:!0}),this.beans.overlays.setOverlayWrapperComp(this),this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}setWrapperTypeClass(e){const t=this.eOverlayWrapper.classList;this.activeCssClass&&t.toggle(this.activeCssClass,!1),this.activeCssClass=e,t.toggle(e,!0)}showOverlay(e,t,o,i){if(this.setWrapperTypeClass(t),this.destroyActiveOverlay(),this.elToFocusAfter=null,this.activePromise=e,!!e){if(this.setDisplayed(!0,{skipAriaHidden:!0}),o&&this.isGridFocused()){const r=Ee(this.beans);r&&!Hr(this.beans)&&(this.elToFocusAfter=r)}e.then(r=>{if(this.activePromise!==e){this.activeOverlay!==r&&(this.destroyBean(r),r=null);return}if(this.activePromise=null,!!r){if(this.activeOverlay!==r&&(this.eOverlayWrapper.appendChild(r.getGui()),this.activeOverlay=r,i)){const s=r;this.updateListenerDestroyFunc=this.addManagedPropertyListener(i,({currentValue:n})=>{s.refresh?.(Z(this.gos,{...n??{}}))})}o&&this.isGridFocused()&&Lt(this.eOverlayWrapper)}})}}updateOverlayWrapperPaddingTop(e){this.eOverlayWrapper.style.setProperty("padding-top",`${e}px`)}destroyActiveOverlay(){this.activePromise=null;const e=this.activeOverlay;if(!e)return;let t=this.elToFocusAfter;this.activeOverlay=null,this.elToFocusAfter=null,t&&!this.isGridFocused()&&(t=null);const o=this.updateListenerDestroyFunc;o&&(o(),this.updateListenerDestroyFunc=null),this.destroyBean(e),ct(this.eOverlayWrapper),t?.focus?.({preventScroll:!0})}hideOverlay(){this.destroyActiveOverlay(),this.setDisplayed(!1,{skipAriaHidden:!0})}isGridFocused(){const e=Ee(this.beans);return!!e&&this.beans.eGridDiv.contains(e)}destroy(){this.elToFocusAfter=null,this.destroyActiveOverlay(),this.beans.overlays.setOverlayWrapperComp(void 0),super.destroy()}},yS={selector:"AG-OVERLAY-WRAPPER",component:yu},SS=class extends E{constructor(){super(...arguments),this.beanName="overlays",this.state=0,this.showInitialOverlay=!0,this.wrapperPadding=0}postConstruct(){this.isClientSide=Et(this.gos),this.isServerSide=!this.isClientSide&&ht(this.gos);const e=()=>this.updateOverlayVisibility();this.addManagedEventListeners({newColumnsLoaded:e,rowDataUpdated:e,gridSizeChanged:this.refreshWrapperPadding.bind(this),rowCountReady:()=>{this.showInitialOverlay=!1,this.updateOverlayVisibility()}}),this.addManagedPropertyListener("loading",e)}setOverlayWrapperComp(e){this.eWrapper=e,this.updateOverlayVisibility()}isVisible(){return this.state!==0&&!!this.eWrapper}isExclusive(){return this.state===1&&!!this.eWrapper}showLoadingOverlay(){this.showInitialOverlay=!1;const e=this.gos,t=e.get("loading");!t&&(t!==void 0||e.get("suppressLoadingOverlay"))||this.doShowLoadingOverlay()}showNoRowsOverlay(){this.showInitialOverlay=!1;const e=this.gos;e.get("loading")||e.get("suppressNoRowsOverlay")||this.doShowNoRowsOverlay()}hideOverlay(){if(this.showInitialOverlay=!1,this.gos.get("loading")){_(99);return}this.doHideOverlay()}getOverlayWrapperSelector(){return yS}getOverlayWrapperCompClass(){return yu}updateOverlayVisibility(){if(!this.eWrapper){this.state=0;return}const{state:e,isClientSide:t,isServerSide:o,beans:{gos:i,colModel:r,rowModel:s}}=this;let n=this.gos.get("loading");n!==void 0&&(this.showInitialOverlay=!1),this.showInitialOverlay&&n===void 0&&!i.get("suppressLoadingOverlay")&&(n=!i.get("columnDefs")||!r.ready||!i.get("rowData")&&t),n?e!==1&&this.doShowLoadingOverlay():(this.showInitialOverlay=!1,t&&s.isEmpty()&&!i.get("suppressNoRowsOverlay")?e!==2&&this.doShowNoRowsOverlay():(e===1||!o&&e!==0)&&this.doHideOverlay())}doShowLoadingOverlay(){this.eWrapper&&(this.state=1,this.showOverlay(Yf(this.beans.userCompFactory,Z(this.gos,{})),"ag-overlay-loading-wrapper","loadingOverlayComponentParams"),this.updateExclusive())}doShowNoRowsOverlay(){this.eWrapper&&(this.state=2,this.showOverlay(qf(this.beans.userCompFactory,Z(this.gos,{})),"ag-overlay-no-rows-wrapper","noRowsOverlayComponentParams"),this.updateExclusive())}doHideOverlay(){this.eWrapper&&(this.state=0,this.eWrapper.hideOverlay(),this.updateExclusive())}showOverlay(e,t,o){const i=e?.newAgStackInstance()??null;this.eWrapper?.showOverlay(i,t,this.isExclusive(),o),this.refreshWrapperPadding()}updateExclusive(){const e=this.exclusive;this.exclusive=this.isExclusive(),this.exclusive!==e&&this.eventSvc.dispatchEvent({type:"overlayExclusiveChanged"})}refreshWrapperPadding(){const e=this.eWrapper;if(!e)return;let t=0;this.state===2?t=this.beans.ctrlsSvc.get("gridHeaderCtrl")?.headerHeight||0:this.wrapperPadding!==0&&(t=0),this.wrapperPadding!==t&&(this.wrapperPadding=t,e.updateOverlayWrapperPaddingTop(t))}},RS={moduleName:"Overlay",version:ae,userComponents:{agLoadingOverlay:YC,agNoRowsOverlay:XC},apiFunctions:{showLoadingOverlay:mS,showNoRowsOverlay:CS,hideOverlay:vS},beans:[SS]},xS=class extends E{constructor(){super(...arguments),this.beanName="rowContainerHeight",this.scrollY=0,this.uiBodyHeight=0}postConstruct(){this.addManagedEventListeners({bodyHeightChanged:this.updateOffset.bind(this)}),this.maxDivHeight=pp(),Ni(this.gos,"RowContainerHeightService - maxDivHeight = "+this.maxDivHeight)}updateOffset(){if(!this.stretching)return;const 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;const e=this.scrollY/this.maxScrollY,t=e*this.pixelsToShave;Ni(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){const t=typeof e=="number"?Math.floor(e):null;this.divStretchOffset!==t&&(this.divStretchOffset=t,this.eventSvc.dispatchEvent({type:"heightScaleChanged"}))}setModelHeight(e){this.modelHeight=e,this.stretching=e!=null&&this.maxDivHeight>0&&e>this.maxDivHeight,this.stretching?this.calculateOffset():this.clearOffset()}getRealPixelPosition(e){return e-this.divStretchOffset}getUiBodyHeight(){const e=this.beans.ctrlsSvc.getScrollFeature().getVScrollPosition();return e.bottom-e.top}getScrollPositionForPixel(e){if(this.pixelsToShave<=0)return e;const t=this.modelHeight-this.getUiBodyHeight(),o=e/t;return this.maxScrollY*o}},FS=400,DS=class extends E{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=()=>{const e=()=>{this.getAllCellCtrls().forEach(s=>s.onCellSelectionChanged())},t=()=>{this.getAllCellCtrls().forEach(s=>s.updateRangeBordersIfRangeCount())},o=()=>{this.eventSvc.addEventListener("cellSelectionChanged",e),this.eventSvc.addEventListener("columnMoved",t),this.eventSvc.addEventListener("columnPinned",t),this.eventSvc.addEventListener("columnVisible",t)},i=()=>{this.eventSvc.removeEventListener("cellSelectionChanged",e),this.eventSvc.removeEventListener("columnMoved",t),this.eventSvc.removeEventListener("columnPinned",t),this.eventSvc.removeEventListener("columnVisible",t)};this.addDestroyFunc(()=>i()),this.addManagedPropertyListeners(["enableRangeSelection","cellSelection"],()=>{Bo(this.gos)?o():i()}),Bo(this.gos)&&o()}}wireBeans(e){this.pageBounds=e.pageBounds,this.colModel=e.colModel,this.pinnedRowModel=e.pinnedRowModel,this.rowModel=e.rowModel,this.focusSvc=e.focusSvc,this.rowContainerHeight=e.rowContainerHeight,this.ctrlsSvc=e.ctrlsSvc}postConstruct(){this.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.initialise()})}initialise(){this.addManagedEventListeners({paginationChanged:this.onPageLoaded.bind(this),pinnedRowDataChanged:this.onPinnedRowDataChanged.bind(this),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",i=>this.onSuppressCellFocusChanged(i.currentValue)),this.addManagedPropertyListeners(["groupSuppressBlankHeader","getBusinessKeyForNode","fullWidthCellRenderer","fullWidthCellRendererParams","suppressStickyTotalRow","groupRowRenderer","groupRowRendererParams","loadingCellRenderer","loadingCellRendererParams","detailCellRenderer","detailCellRendererParams","enableRangeSelection","enableCellTextSelection"],()=>this.redrawRows()),this.addManagedPropertyListener("cellSelection",({currentValue:i,previousValue:r})=>{(!r&&i||r&&!i)&&this.redrawRows()});const{stickyRowSvc:e,gos:t,showRowGroupCols:o}=this.beans;if(o&&this.addManagedPropertyListener("showOpenedGroup",()=>{const i=o.getShowRowGroupCols();i.length&&this.refreshCells({columns:i,force:!0})}),e)this.stickyRowFeature=e.createStickyRowFeature(this,this.createRowCon.bind(this),this.destroyRowCtrls.bind(this));else{const i=this.gridBodyCtrl;i.setStickyTopHeight(0),i.setStickyBottomHeight(0)}this.registerCellEventListeners(),this.initialiseCache(),this.printLayout=Ke(t,"print"),this.embedFullWidthRows=this.printLayout||t.get("embedFullWidthRows"),this.redrawAfterModelUpdate()}initialiseCache(){if(this.gos.get("keepDetailRows")){const e=this.getKeepDetailRowsCount(),t=e??3;this.cachedRowCtrls=new kS(t)}}getKeepDetailRowsCount(){return this.gos.get("keepDetailRowsCount")}getStickyTopRowCtrls(){return this.stickyRowFeature?.stickyTopRowCtrls??[]}getStickyBottomRowCtrls(){return this.stickyRowFeature?.stickyBottomRowCtrls??[]}updateAllRowCtrls(){const e=Object.values(this.rowCtrlsByRowIndex),t=Object.values(this.zombieRowCtrls),o=this.cachedRowCtrls?.getEntries()??[];t.length>0||o.length>0?this.allRowCtrls=[...e,...t,...o]:this.allRowCtrls=e}isCellBeingRendered(e,t){const o=this.rowCtrlsByRowIndex[e];return!t||!o?!!o:o.isFullWidth()?!0:!!this.beans.spannedRowRenderer?.getCellByPosition({rowIndex:e,column:t,rowPinned:null})||!!o.getCellCtrl(t)||!o.isRowRendered()}updateCellFocus(e){this.getAllCellCtrls().forEach(t=>t.onCellFocused(e)),this.getFullWidthRowCtrls().forEach(t=>t.onFullWidthRowFocused(e))}onCellFocusChanged(e){if(e&&e.rowIndex!=null&&!e.rowPinned){const t=this.beans.colModel.getCol(e.column)??void 0;this.isCellBeingRendered(e.rowIndex,t)||this.redraw()}this.updateCellFocus(e)}onSuppressCellFocusChanged(e){this.getAllCellCtrls().forEach(t=>t.onSuppressCellFocusChanged(e)),this.getFullWidthRowCtrls().forEach(t=>t.onSuppressCellFocusChanged(e))}registerCellEventListeners(){this.addManagedEventListeners({cellFocused:e=>this.onCellFocusChanged(e),cellFocusCleared:()=>this.updateCellFocus(),flashCells:e=>{const{cellFlashSvc:t}=this.beans;t&&this.getAllCellCtrls().forEach(o=>t.onFlashCells(o,e))},columnHoverChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onColumnHover())},displayedColumnsChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onDisplayedColumnsChanged())},displayedColumnsWidthChanged:()=>{this.printLayout&&this.getAllCellCtrls().forEach(e=>e.onLeftChanged())}}),this.setupRangeSelectionListeners(),this.refreshListenersToColumnsForCellComps(),this.addManagedEventListeners({gridColumnsChanged:this.refreshListenersToColumnsForCellComps.bind(this)}),this.addDestroyFunc(this.removeGridColumnListeners.bind(this))}removeGridColumnListeners(){this.destroyFuncsForColumnListeners.forEach(e=>e()),this.destroyFuncsForColumnListeners.length=0}refreshListenersToColumnsForCellComps(){this.removeGridColumnListeners(),this.colModel.getCols().forEach(t=>{const o=l=>{this.getAllCellCtrls().forEach(d=>{d.column===t&&l(d)})},i=()=>{o(l=>l.onLeftChanged())},r=()=>{o(l=>l.onWidthChanged())},s=()=>{o(l=>l.onFirstRightPinnedChanged())},n=()=>{o(l=>l.onLastLeftPinnedChanged())},a=()=>{o(l=>l.onColDefChanged())};t.__addEventListener("leftChanged",i),t.__addEventListener("widthChanged",r),t.__addEventListener("firstRightPinnedChanged",s),t.__addEventListener("lastLeftPinnedChanged",n),t.__addEventListener("colDefChanged",a),this.destroyFuncsForColumnListeners.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("widthChanged",r),t.__removeEventListener("firstRightPinnedChanged",s),t.__removeEventListener("lastLeftPinnedChanged",n),t.__removeEventListener("colDefChanged",a)})})}onDomLayoutChanged(){const e=Ke(this.gos,"print"),t=e||this.gos.get("embedFullWidthRows"),o=t!==this.embedFullWidthRows||this.printLayout!==e;this.printLayout=e,this.embedFullWidthRows=t,o&&this.redrawAfterModelUpdate({domLayoutChanged:!0})}datasourceChanged(){this.firstRenderedRow=0,this.lastRenderedRow=-1;const e=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(e)}onPageLoaded(e){const t={recycleRows:e.keepRenderedRows,animate:e.animate,newData:e.newData,newPage:e.newPage,onlyBody:!0};this.redrawAfterModelUpdate(t)}getAllCellsNotSpanningForColumn(e){const t=[];return this.getAllRowCtrls().forEach(o=>{const i=o.getCellCtrl(e,!0)?.eGui;i&&t.push(i)}),t}refreshFloatingRowComps(){this.refreshFloatingRows(this.topRowCtrls,"top"),this.refreshFloatingRows(this.bottomRowCtrls,"bottom")}refreshFloatingRows(e,t){const{pinnedRowModel:o,beans:i,printLayout:r}=this,s=Object.fromEntries(e.map(a=>[a.rowNode.id,a]));o?.forEachPinnedRow(t,(a,l)=>{const d=e[l];d&&o.getPinnedRowById(d.rowNode.id,t)===void 0&&(d.destroyFirstPass(),d.destroySecondPass()),a.id in s?(e[l]=s[a.id],delete s[a.id]):e[l]=new ta(a,i,!1,!1,r)});const n=(t==="top"?o?.getPinnedTopRowCount():o?.getPinnedBottomRowCount())??0;e.length=n}onPinnedRowDataChanged(){const e={recycleRows:!0};this.redrawAfterModelUpdate(e)}redrawRow(e,t=!1){if(e.sticky)this.stickyRowFeature?.refreshStickyNode(e);else if(this.cachedRowCtrls?.has(e)){this.cachedRowCtrls.removeRow(e);return}else{const o=i=>{const r=i[e.rowIndex];r&&r.rowNode===e&&(r.destroyFirstPass(),r.destroySecondPass(),i[e.rowIndex]=this.createRowCon(e,!1,!1))};switch(e.rowPinned){case"top":o(this.topRowCtrls);break;case"bottom":o(this.bottomRowCtrls);break;default:o(this.rowCtrlsByRowIndex),this.updateAllRowCtrls()}}t||this.dispatchDisplayedRowsChanged(!1)}redrawRows(e){if(e!=null){e?.forEach(o=>this.redrawRow(o,!0)),this.dispatchDisplayedRowsChanged(!1);return}this.redrawAfterModelUpdate()}redrawAfterModelUpdate(e={}){this.getLockOnRefresh();const t=this.beans.focusSvc?.getFocusCellToUseAfterRefresh();this.updateContainerHeights(),this.scrollToTopIfNewData(e);const o=!e.domLayoutChanged&&!!e.recycleRows,i=e.animate&&li(this.gos),r=o?this.getRowsToRecycle():null;o||this.removeAllRowComps(),this.workOutFirstAndLastRowsToRender();const{stickyRowFeature:s}=this;if(s){s.checkStickyRows();const n=s.extraTopHeight+s.extraBottomHeight;n&&this.updateContainerHeights(n)}this.recycleRows(r,i),this.gridBodyCtrl.updateRowCount(),e.onlyBody||this.refreshFloatingRowComps(),this.dispatchDisplayedRowsChanged(),t!=null&&this.restoreFocusedCell(t),this.releaseLockOnRefresh()}scrollToTopIfNewData(e){const t=e.newData||e.newPage,o=this.gos.get("suppressScrollOnNewData");t&&!o&&(this.gridBodyCtrl.scrollFeature.scrollToTop(),this.stickyRowFeature?.resetOffsets())}updateContainerHeights(e=0){const{rowContainerHeight:t}=this;if(this.printLayout){t.setModelHeight(null);return}let o=this.pageBounds.getCurrentPageHeight();o===0&&(o=1),t.setModelHeight(o+e)}getLockOnRefresh(){if(this.refreshInProgress)throw new Error(Co(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;const t=this.beans.focusSvc,o=this.findPositionToFocus(e);if(!o){t.focusHeaderPosition({headerPosition:{headerRowIndex:jt(this.beans)-1,column:e.column}});return}if(e.rowIndex!==o.rowIndex||e.rowPinned!=o.rowPinned){t.setFocusedCell({...o,preventScrollOnBrowserFocus:!0,forceBrowserFocus:!0});return}t.doesRowOrCellHaveBrowserFocus()||this.updateCellFocus(Z(this.gos,{...o,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0,type:"cellFocused"}))}findPositionToFocus(e){const{pagination:t,pageBounds:o}=this.beans;let i=e;for(i.rowPinned==null&&t&&o&&!t.isRowInPage(i.rowIndex)&&(i={rowPinned:null,rowIndex:o.getFirstRow()});i;){if(i.rowPinned==null&&o)if(i.rowIndex<o.getFirstRow()){if(i=ss(this.beans,{rowPinned:null,rowIndex:0}),!i)return null}else i.rowIndex>o.getLastRow()&&(i={rowPinned:null,rowIndex:o.getLastRow()});const r=this.getRowByPosition(i);if(r?.isAlive())return{...r.getRowPosition(),column:e.column};i=ss(this.beans,i)}return null}getAllCellCtrls(){const e=[],t=this.getAllRowCtrls(),o=t.length;for(let i=0;i<o;i++){const r=t[i].getAllCellCtrls(),s=r.length;for(let n=0;n<s;n++)e.push(r[n])}return e}getAllRowCtrls(){const{spannedRowRenderer:e}=this.beans,t=this.getStickyTopRowCtrls(),o=this.getStickyBottomRowCtrls();return[...this.topRowCtrls,...this.bottomRowCtrls,...t,...o,...e?.getCtrls("top")??[],...e?.getCtrls("bottom")??[],...e?.getCtrls("center")??[],...Object.values(this.rowCtrlsByRowIndex)]}addRenderedRowListener(e,t,o){const i=this.rowCtrlsByRowIndex[t];i&&i.addEventListener(e,o)}refreshCells(e={}){const t={forceRefresh:e.force,newData:!1,suppressFlash:e.suppressFlash};for(const o of this.getCellCtrls(e.rowNodes,e.columns))o.refreshOrDestroyCell(t);this.refreshFullWidth(e.rowNodes)}refreshFullWidth(e){if(!e)return;let t=!1;for(const o of this.getRowCtrls(e)){if(!o.isFullWidth())continue;o.refreshFullWidth()||(t=!0,this.redrawRow(o.rowNode,!0))}t&&this.dispatchDisplayedRowsChanged(!1)}getRowCtrls(e){const t=Su(e),o=this.getAllRowCtrls();return!e||!t?o:o.filter(i=>{const r=i.rowNode;return Ru(r,t)})}getCellCtrls(e,t){let o;q(t)&&(o={},t.forEach(r=>{const s=this.colModel.getCol(r);q(s)&&(o[s.getId()]=!0)}));const i=[];return this.getRowCtrls(e).forEach(r=>{r.getAllCellCtrls().forEach(s=>{const n=s.column.getId();o&&!o[n]||i.push(s)})}),i}destroy(){this.removeAllRowComps(!0),super.destroy()}removeAllRowComps(e=!1){const t=Object.keys(this.rowCtrlsByRowIndex);this.removeRowCtrls(t,e),this.stickyRowFeature?.destroyStickyCtrls()}getRowsToRecycle(){const e=[];for(const o of Object.keys(this.rowCtrlsByRowIndex))this.rowCtrlsByRowIndex[o].rowNode.id==null&&e.push(o);this.removeRowCtrls(e);const t={};for(const o of Object.values(this.rowCtrlsByRowIndex)){const i=o.rowNode;t[i.id]=o}return this.rowCtrlsByRowIndex={},t}removeRowCtrls(e,t=!1){e.forEach(o=>{const i=this.rowCtrlsByRowIndex[o];i&&(i.destroyFirstPass(t),i.destroySecondPass()),delete this.rowCtrlsByRowIndex[o]})}onBodyScroll(e){e.direction==="vertical"&&this.redraw({afterScroll:!0})}redraw(e={}){const{focusSvc:t,animationFrameSvc:o}=this.beans,{afterScroll:i}=e;let r;const s=this.stickyRowFeature;s&&(r=t?.getFocusCellToUseAfterRefresh()||void 0);const n=this.firstRenderedRow,a=this.lastRenderedRow;this.workOutFirstAndLastRowsToRender();let l=!1;if(s){l=s.checkStickyRows();const c=s.extraTopHeight+s.extraBottomHeight;c&&this.updateContainerHeights(c)}const d=this.firstRenderedRow!==n||this.lastRenderedRow!==a;if(!(i&&!l&&!d)&&(this.getLockOnRefresh(),this.recycleRows(null,!1,i),this.releaseLockOnRefresh(),this.dispatchDisplayedRowsChanged(i&&!l),r!=null)){const c=t?.getFocusCellToUseAfterRefresh();r!=null&&c==null&&(o?.flushAllFrames(),this.restoreFocusedCell(r))}}removeRowCompsNotToDraw(e,t){const o={};e.forEach(s=>o[s]=!0);const r=Object.keys(this.rowCtrlsByRowIndex).filter(s=>!o[s]);this.removeRowCtrls(r,t)}calculateIndexesToDraw(e){const t=[];for(let n=this.firstRenderedRow;n<=this.lastRenderedRow;n++)t.push(n);const o=this.beans.pagination,i=this.beans.focusSvc?.getFocusedCell()?.rowIndex;i!=null&&(i<this.firstRenderedRow||i>this.lastRenderedRow)&&(!o||o.isRowInPage(i))&&t.push(i);const r=n=>{const a=n.rowNode.rowIndex;a==null||a===i||(a<this.firstRenderedRow||a>this.lastRenderedRow)&&this.doNotUnVirtualiseRow(n)&&t.push(a)};for(const n of Object.values(this.rowCtrlsByRowIndex))r(n);if(e)for(const n of Object.values(e))r(n);t.sort((n,a)=>n-a);const s=[];for(let n=0;n<t.length;n++){const a=t[n],l=this.rowModel.getRow(a);l&&!l.sticky&&s.push(a)}return s}recycleRows(e,t=!1,o=!1){const i=this.calculateIndexesToDraw(e);if((this.printLayout||o)&&(t=!1),this.removeRowCompsNotToDraw(i,!t),i.forEach(r=>{this.createOrUpdateRowCtrl(r,e,t,o)}),e){const{animationFrameSvc:r}=this.beans;r?.active&&o&&!this.printLayout?r.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(){const{visibleCols:e}=this.beans,t=e.isPinningLeft(),o=e.isPinningRight();(this.pinningLeft!==t||o!==this.pinningRight)&&(this.pinningLeft=t,this.pinningRight=o,this.embedFullWidthRows&&this.redrawFullWidthEmbeddedRows())}redrawFullWidthEmbeddedRows(){const e=[];this.getFullWidthRowCtrls().forEach(t=>{const o=t.rowNode.rowIndex;e.push(o.toString())}),this.refreshFloatingRowComps(),this.removeRowCtrls(e),this.redraw({afterScroll:!0})}getFullWidthRowCtrls(e){const t=Su(e);return this.getAllRowCtrls().filter(o=>{if(!o.isFullWidth())return!1;const i=o.rowNode;return!(t!=null&&!Ru(i,t))})}createOrUpdateRowCtrl(e,t,o,i){let r,s=this.rowCtrlsByRowIndex[e];if(s||(r=this.rowModel.getRow(e),q(r)&&q(t)&&t[r.id]&&r.alreadyRendered&&(s=t[r.id],t[r.id]=null)),!s)if(r||(r=this.rowModel.getRow(e)),q(r))s=this.createRowCon(r,o,i);else return;return r&&(r.alreadyRendered=!0),this.rowCtrlsByRowIndex[e]=s,s}destroyRowCtrls(e,t){const o=[];if(e){for(const i of Object.values(e))if(i){if(this.cachedRowCtrls&&i.isCacheable()){this.cachedRowCtrls.addRow(i);continue}if(i.destroyFirstPass(!t),t){const r=i.instanceId;this.zombieRowCtrls[r]=i,o.push(()=>{i.destroySecondPass(),delete this.zombieRowCtrls[r]})}else i.destroySecondPass()}}t&&(o.push(()=>{this.updateAllRowCtrls(),this.dispatchDisplayedRowsChanged()}),window.setTimeout(()=>o.forEach(i=>i()),FS))}getRowBuffer(){return this.gos.get("rowBuffer")}getRowBufferInPixels(){const e=this.getRowBuffer(),t=vo(this.beans);return e*t}workOutFirstAndLastRowsToRender(){const{rowContainerHeight:e,pageBounds:t,rowModel:o}=this;e.updateOffset();let i,r;if(!o.isRowsToRender())i=0,r=-1;else if(this.printLayout)this.beans.environment.refreshRowHeightVariable(),i=t.getFirstRow(),r=t.getLastRow();else{const c=this.getRowBufferInPixels(),u=this.ctrlsSvc.getScrollFeature(),g=this.gos.get("suppressRowVirtualisation");let p=!1,f,m;do{const x=t.getPixelOffset(),{pageFirstPixel:M,pageLastPixel:P}=t.getCurrentPagePixelRange(),k=e.divStretchOffset,S=u.getVScrollPosition(),v=S.top,R=S.bottom;g?(f=M+k,m=P+k):(f=Math.max(v+x-c,M)+k,m=Math.min(R+x+c,P)+k),this.firstVisibleVPixel=Math.max(v+x,M)+k,this.lastVisibleVPixel=Math.min(R+x,P)+k,p=this.ensureAllRowsInRangeHaveHeightsCalculated(f,m)}while(p);let C=o.getRowIndexAtPixel(f),w=o.getRowIndexAtPixel(m);const y=t.getFirstRow(),b=t.getLastRow();C<y&&(C=y),w>b&&(w=b),i=C,r=w}const s=Ke(this.gos,"normal"),n=this.gos.get("suppressMaxRenderedRowRestriction"),a=Math.max(this.getRowBuffer(),500);s&&!n&&r-i>a&&(r=i+a);const l=i!==this.firstRenderedRow,d=r!==this.lastRenderedRow;(l||d)&&(this.firstRenderedRow=i,this.lastRenderedRow=r,this.eventSvc.dispatchEvent({type:"viewportChanged",firstRow:i,lastRow:r}))}dispatchFirstDataRenderedEvent(){this.dataFirstRenderedFired||(this.dataFirstRenderedFired=!0,Pt(this.beans,()=>{this.beans.eventSvc.dispatchEvent({type:"firstDataRendered",firstRow:this.firstRenderedRow,lastRow:this.lastRenderedRow})}))}ensureAllRowsInRangeHaveHeightsCalculated(e,t){const o=this.pinnedRowModel?.ensureRowHeightsValid(),i=this.stickyRowFeature?.ensureRowHeightsValid(),{pageBounds:r,rowModel:s}=this,n=s.ensureRowHeightsValid(e,t,r.getFirstRow(),r.getLastRow());return(n||i)&&this.eventSvc.dispatchEvent({type:"recalculateRowBounds"}),i||n||o?(this.updateContainerHeights(),!0):!1}doNotUnVirtualiseRow(e){const i=e.rowNode,r=this.focusSvc.isRowFocused(i.rowIndex,i.rowPinned),s=e.editing,n=i.detail;return r||s||n?!!this.isRowPresent(i):!1}isRowPresent(e){return this.rowModel.isRowPresent(e)?this.beans.pagination?.isRowInPage(e.rowIndex)??!0:!1}createRowCon(e,t,o){const i=this.cachedRowCtrls?.getRow(e)??null;if(i)return i;const r=o&&!this.printLayout&&!!this.beans.animationFrameSvc?.active;return new ta(e,this.beans,t,r,this.printLayout)}getRenderedNodes(){const e=Object.values(this.rowCtrlsByRowIndex).map(i=>i.rowNode),t=this.getStickyTopRowCtrls().map(i=>i.rowNode),o=this.getStickyBottomRowCtrls().map(i=>i.rowNode);return[...t,...e,...o]}getRowByPosition(e){let t;const{rowIndex:o}=e;switch(e.rowPinned){case"top":t=this.topRowCtrls[o];break;case"bottom":t=this.bottomRowCtrls[o];break;default:t=this.rowCtrlsByRowIndex[o],t||(t=this.getStickyTopRowCtrls().find(i=>i.rowNode.rowIndex===o)||null,t||(t=this.getStickyBottomRowCtrls().find(i=>i.rowNode.rowIndex===o)||null));break}return t}isRangeInRenderedViewport(e,t){if(e==null||t==null)return!1;const i=e>this.lastRenderedRow;return!(t<this.firstRenderedRow)&&!i}},kS=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){const t=this.entriesList[0];t.destroyFirstPass(),t.destroySecondPass(),this.removeFromCache(t)}}getRow(e){if(e==null||e.id==null)return null;const t=this.entriesMap[e.id];return t?(this.removeFromCache(t),t.setCached(!1),t.rowNode!=e?null:t):null}has(e){return this.entriesMap[e.id]!=null}removeRow(e){const t=e.id,o=this.entriesMap[t];delete this.entriesMap[t],ot(this.entriesList,o)}removeFromCache(e){const t=e.rowNode.id;delete this.entriesMap[t],ot(this.entriesList,e)}getEntries(){return this.entriesList}};function Su(e){if(!e)return;const t={top:{},bottom:{},normal:{}};return e.forEach(o=>{const i=o.id;switch(o.rowPinned){case"top":t.top[i]=o;break;case"bottom":t.bottom[i]=o;break;default:t.normal[i]=o;break}}),t}function Ru(e,t){const o=e.id;switch(e.rowPinned){case"top":return t.top[o]!=null;case"bottom":return t.bottom[o]!=null;default:return t.normal[o]!=null}}var MS=class extends E{constructor(){super(...arguments),this.beanName="rowNodeSorter"}postConstruct(){const{gos:e}=this;this.isAccentedSort=e.get("accentedSort"),this.primaryColumnsSortGroups=At(e),this.addManagedPropertyListener("accentedSort",t=>this.isAccentedSort=t.currentValue),this.addManagedPropertyListener("autoGroupColumnDef",()=>this.primaryColumnsSortGroups=At(e))}doFullSort(e,t){const o=e.map((i,r)=>({currentPos:r,rowNode:i}));return o.sort(this.compareRowNodes.bind(this,t)),o.map(i=>i.rowNode)}compareRowNodes(e,t,o){const i=t.rowNode,r=o.rowNode;for(let s=0,n=e.length;s<n;s++){const a=e[s],l=a.sort==="desc",d=this.getValue(i,a.column),c=this.getValue(r,a.column);let u;const g=this.getComparator(a,i);if(g?u=g(d,c,i,r,l):u=Or(d,c,this.isAccentedSort),!isNaN(u)&&u!==0)return a.sort==="asc"?u:u*-1}return t.currentPos-o.currentPos}getComparator(e,t){const o=e.column,i=o.getColDef().comparator;if(i!=null)return i;if(!o.getColDef().showRowGroup)return;const r=!t.group&&o.getColDef().field;if(!r)return;const s=this.beans.colModel.getColDefCol(r);if(s)return s.getColDef().comparator}getValue(e,t){const{valueSvc:o,colModel:i,showRowGroupCols:r,gos:s}=this.beans;if(!this.primaryColumnsSortGroups)return o.getValue(t,e,!1);if(e.rowGroupColumn===t){if(_r(s,i.isPivotActive())){const d=e.allLeafChildren?.[0];return d?o.getValue(t,d,!1):void 0}const l=r?.getShowRowGroupCol(t.getId());return l?e.groupData?.[l.getId()]:void 0}if(!(e.group&&t.getColDef().showRowGroup))return o.getValue(t,e,!1)}};function PS(e){e.sortSvc?.onSortChanged("api")}var ir=(e,t)=>({tag:"span",ref:`eSort${e}`,cls:`ag-sort-indicator-icon ag-sort-${t} ag-hidden`,attrs:{"aria-hidden":"true"}}),ES={tag:"span",cls:"ag-sort-indicator-container",children:[ir("Order","order"),ir("Asc","ascending-icon"),ir("Desc","descending-icon"),ir("Mixed","mixed-icon"),ir("None","none-icon")]},Ea=class extends pe{constructor(e){super(),this.eSortOrder=V,this.eSortAsc=V,this.eSortDesc=V,this.eSortMixed=V,this.eSortNone=V,e||this.setTemplate(ES)}attachCustomElements(e,t,o,i,r){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=o,this.eSortMixed=i,this.eSortNone=r}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);const o=this.updateIcons.bind(this),i=this.onSortChanged.bind(this);this.addManagedPropertyListener("unSortIcon",o),this.addManagedEventListeners({newColumnsLoaded:o,sortChanged:i,columnRowGroupChanged:i}),this.onSortChanged()}addInIcon(e,t,o){if(t==null)return;const i=te(e,this.beans,o);i&&t.appendChild(i)}onSortChanged(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()}updateIcons(){const{eSortAsc:e,eSortDesc:t,eSortNone:o,column:i,gos:r,beans:s}=this,n=s.sortSvc.getDisplaySortForColumn(i);if(e&&ge(e,n==="asc",{skipAriaHidden:!0}),t&&ge(t,n==="desc",{skipAriaHidden:!0}),o){const a=!i.getColDef().unSortIcon&&!r.get("unSortIcon"),l=n==null;ge(o,!a&&l,{skipAriaHidden:!0})}}setupMultiSortIndicator(){const{eSortMixed:e,column:t,gos:o}=this;this.addInIcon("sortUnSort",e,t);const i=t.getColDef().showRowGroup;At(o)&&i&&(this.addManagedEventListeners({sortChanged:this.updateMultiSortIndicator.bind(this),columnRowGroupChanged:this.updateMultiSortIndicator.bind(this)}),this.updateMultiSortIndicator())}updateMultiSortIndicator(){const{eSortMixed:e,beans:t,column:o}=this;if(e){const i=t.sortSvc.getDisplaySortForColumn(o)==="mixed";ge(e,i,{skipAriaHidden:!0})}}updateSortOrder(){const{eSortOrder:e,column:t,beans:{sortSvc:o}}=this;if(!e)return;const i=o.getColumnsWithSortingOrdered(),r=o.getDisplaySortIndexForColumn(t)??-1,s=i.some(a=>o.getDisplaySortIndexForColumn(a)??!1),n=r>=0&&s;ge(e,n,{skipAriaHidden:!0}),r>=0?e.textContent=(r+1).toString():ct(e)}},AS={selector:"AG-SORT-INDICATOR",component:Ea},rr=["asc","desc",null],TS=class extends E{constructor(){super(...arguments),this.beanName="sortSvc"}progressSort(e,t,o){const i=this.getNextSortDirection(e);this.setSortForColumn(e,i,t,o)}progressSortFromEvent(e,t){const i=this.gos.get("multiSortKey")==="ctrl"?t.ctrlKey||t.metaKey:t.shiftKey;this.progressSort(e,i,"uiColumnSorted")}setSortForColumn(e,t,o,i){t!=="asc"&&t!=="desc"&&(t=null);const{gos:r,showRowGroupCols:s}=this.beans,n=At(r);let a=[e];if(n&&e.getColDef().showRowGroup){const u=s?.getSourceColumnsForGroupColumn?.(e)?.filter(g=>g.isSortable());u&&(a=[e,...u])}a.forEach(c=>this.setColSort(c,t,i));const l=(o||r.get("alwaysMultiSort"))&&!r.get("suppressMultiSort"),d=[];if(!l){const c=this.clearSortBarTheseColumns(a,i);d.push(...c)}this.updateSortIndex(e),d.push(...a),this.dispatchSortChangedEvents(i,d)}updateSortIndex(e){const{gos:t,colModel:o,showRowGroupCols:i}=this.beans,r=At(t),s=i?.getShowRowGroupCol(e.getId()),n=r&&s||e,a=this.getColumnsWithSortingOrdered();o.forAllCols(c=>this.setColSortIndex(c,null));const l=a.filter(c=>r&&c.getColDef().showRowGroup?!1:c!==n);(n.getSort()?[...l,n]:l).forEach((c,u)=>this.setColSortIndex(c,u))}onSortChanged(e,t){this.dispatchSortChangedEvents(e,t)}isSortActive(){let e=!1;return this.beans.colModel.forAllCols(t=>{t.getSort()&&(e=!0)}),e}dispatchSortChangedEvents(e,t){const o={type:"sortChanged",source:e};t&&(o.columns=t),this.eventSvc.dispatchEvent(o)}clearSortBarTheseColumns(e,t){const o=[];return this.beans.colModel.forAllCols(i=>{e.includes(i)||(i.getSort()&&o.push(i),this.setColSort(i,void 0,t))}),o}getNextSortDirection(e){const t=e.getColDef().sortingOrder??this.gos.get("sortingOrder")??rr,o=t.indexOf(e.getSort()),i=o<0,r=o==t.length-1;return i||r?t[0]:t[o+1]}getIndexedSortMap(){const{gos:e,colModel:t,showRowGroupCols:o,rowGroupColsSvc:i}=this.beans;let r=[];if(t.forAllCols(d=>{d.getSort()&&r.push(d)}),t.isPivotMode()){const d=At(e);r=r.filter(c=>{const u=!!c.getAggFunc(),g=!c.isPrimary(),p=d?o?.getShowRowGroupCol(c.getId()):c.getColDef().showRowGroup;return u||g||p})}const s=i?.columns.filter(d=>!!d.getSort())??[],n={};r.forEach((d,c)=>n[d.getId()]=c),r.sort((d,c)=>{const u=d.getSortIndex(),g=c.getSortIndex();if(u!=null&&g!=null)return u-g;if(u==null&&g==null){const p=n[d.getId()],f=n[c.getId()];return p>f?1:-1}else return g==null?-1:1});const a=At(e)&&!!s.length;a&&(r=[...new Set(r.map(d=>o?.getShowRowGroupCol(d.getId())??d))]);const l=new Map;return r.forEach((d,c)=>l.set(d,c)),a&&s.forEach(d=>{const c=o.getShowRowGroupCol(d.getId());l.set(d,l.get(c))}),l}getColumnsWithSortingOrdered(){return[...this.getIndexedSortMap().entries()].sort(([,e],[,t])=>e-t).map(([e])=>e)}getSortModel(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),colId:e.getId()}))}getSortOptions(){return this.getColumnsWithSortingOrdered().filter(e=>e.getSort()).map(e=>({sort:e.getSort(),column:e}))}canColumnDisplayMixedSort(e){const t=At(this.gos),o=!!e.getColDef().showRowGroup;return t&&o}getDisplaySortForColumn(e){const t=this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(e);if(!this.canColumnDisplayMixedSort(e)||!t?.length)return e.getSort();const i=e.getColDef().field!=null||!!e.getColDef().valueGetter?[e,...t]:t,r=i[0].getSort();return i.every(n=>n.getSort()==r)?r:"mixed"}getDisplaySortIndexForColumn(e){return this.getIndexedSortMap().get(e)}setupHeader(e,t,o){let i=0;e.addManagedListeners(t,{movingChanged:()=>{i=Date.now()}}),o&&e.addManagedElementListeners(o,{click:s=>{const n=t.isMoving(),l=Date.now()-i<50;n||l||this.progressSortFromEvent(t,s)}});const r=()=>{const s=t.getSort();if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",s==="asc"),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",s==="desc"),e.addOrRemoveCssClass("ag-header-cell-sorted-none",!s),t.getColDef().showRowGroup){const l=!this.beans.showRowGroupCols?.getSourceColumnsForGroupColumn(t)?.every(d=>t.getSort()==d.getSort());e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",l)}};e.addManagedEventListeners({sortChanged:r,columnRowGroupChanged:r})}initCol(e){const{sort:t,initialSort:o,sortIndex:i,initialSortIndex:r}=e.colDef;t!==void 0?(t==="asc"||t==="desc")&&(e.sort=t):(o==="asc"||o==="desc")&&(e.sort=o),i!==void 0?i!==null&&(e.sortIndex=i):r!==null&&(e.sortIndex=r)}updateColSort(e,t,o){t!==void 0&&(t==="desc"||t==="asc"?this.setColSort(e,t,o):this.setColSort(e,void 0,o))}setColSort(e,t,o){e.sort!==t&&(e.sort=t,e.dispatchColEvent("sortChanged",o)),e.dispatchStateUpdatedEvent("sort")}setColSortIndex(e,t){e.sortIndex=t,e.dispatchStateUpdatedEvent("sortIndex")}createSortIndicator(e){return new Ea(e)}getSortIndicatorSelector(){return AS}},Aa={moduleName:"Sort",version:ae,beans:[TS,MS],apiFunctions:{onSortChanged:PS},userComponents:{agSortIndicator:Ea},icons:{sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"}},IS=class extends E{constructor(){super(...arguments),this.beanName="syncSvc",this.waitingForColumns=!1}postConstruct(){this.addManagedPropertyListener("columnDefs",e=>this.setColumnDefs(e))}start(){this.beans.ctrlsSvc.whenReady(this,()=>{const e=this.gos.get("columnDefs");e?this.setColumnsAndData(e):this.waitingForColumns=!0,this.gridReady()})}setColumnsAndData(e){const{colModel:t,rowModel:o}=this.beans;t.setColumnDefs(e??[],"gridInitializing"),o.start()}gridReady(){const{eventSvc:e,gos:t}=this;e.dispatchEvent({type:"gridReady"}),Ni(t,`initialised successfully, enterprise = ${t.isModuleRegistered("EnterpriseCore")}`)}setColumnDefs(e){const t=this.gos.get("columnDefs");if(t){if(this.waitingForColumns){this.waitingForColumns=!1,this.setColumnsAndData(t);return}this.beans.colModel.setColumnDefs(t,Ho(e.source))}}},xu=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){const{rowNode:o,children:i}=e;if(i)for(let r=0;r<i.length;++r)this.depthFirstSearchChangedPath(i[r],t);t(o)}depthFirstSearchEverything(e,t,o){const i=e.childrenAfterGroup;if(i)for(let r=0,s=i.length;r<s;++r){const n=i[r];n.childrenAfterGroup?this.depthFirstSearchEverything(n,t,o):o&&t(n)}t(e)}forEachChangedNodeDepthFirst(e,t=!1,o=!1){this.active&&!o?this.depthFirstSearchChangedPath(this.pathRoot,e):this.depthFirstSearchEverything(this.pathRoot.rowNode,e,t)}executeFromRootNode(e){e(this.pathRoot.rowNode)}createPathItems(e){let t=e,o=0;for(;!this.mapToItems[t.id];){const i={rowNode:t,children:null};this.mapToItems[t.id]=i,o++,t=t.parent}return o}populateColumnsMap(e,t){if(!this.keepingColumns||!t)return;let o=e;for(;o;)this.nodeIdsToColumns[o.id]||(this.nodeIdsToColumns[o.id]={}),t.forEach(i=>this.nodeIdsToColumns[o.id][i.getId()]=!0),o=o.parent}linkPathItems(e,t){let o=e;for(let i=0;i<t;i++){const r=this.mapToItems[o.id],s=this.mapToItems[o.parent.id];s.children||(s.children=[]),s.children.push(r),o=o.parent}}addParentNode(e,t){if(!e||e.isRowPinned())return;const o=this.createPathItems(e);this.linkPathItems(e,o),this.populateColumnsMap(e,t)}canSkip(e){return this.active&&!this.mapToItems[e.id]}getValueColumnsForNode(e,t){if(!this.keepingColumns)return t;const o=this.nodeIdsToColumns[e.id];return t.filter(r=>o[r.getId()])}getNotValueColumnsForNode(e,t){if(!this.keepingColumns)return null;const o=this.nodeIdsToColumns[e.id];return t.filter(r=>!o[r.getId()])}},LS="paste",GS=class extends E{constructor(){super(...arguments),this.beanName="changeDetectionSvc",this.clientSideRowModel=null}postConstruct(){const{gos:e,rowModel:t}=this.beans;Et(e)&&(this.clientSideRowModel=t),this.addManagedEventListeners({cellValueChanged:this.onCellValueChanged.bind(this)})}onCellValueChanged(e){const{gos:t,rowRenderer:o}=this.beans;if(e.source===LS||t.get("suppressChangeDetection"))return;const i=e.node,r=[i],s=this.clientSideRowModel,n=s?.rootNode;if(n&&!i.isRowPinned()){const a=t.get("aggregateOnlyChangedColumns"),l=new xu(a,n);l.addParentNode(i.parent,[e.column]),s.doAggregate(l),l.forEachChangedNodeDepthFirst(d=>{r.push(d),d.sibling&&r.push(d.sibling)})}o.refreshCells({rowNodes:r})}},BS=class extends E{constructor(){super(...arguments),this.beanName="expressionSvc",this.cache={}}evaluate(e,t){if(typeof e=="string")return this.evaluateExpression(e,t);ce(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(o){return ce(16,{expression:e,params:t,e:o}),null}}createExpressionFunction(e){const t=this.cache;if(t[e])return t[e];const o=this.createFunctionBody(e),i=new Function("x, ctx, oldValue, newValue, value, node, data, colDef, rowIndex, api, getValue, column, columnGroup",o);return t[e]=i,i}createFunctionBody(e){return e.indexOf("return")>=0?e:"return "+e+";"}},OS={moduleName:"Expression",version:ae,beans:[BS]},NS={moduleName:"ChangeDetection",version:ae,beans:[GS]},HS=class extends E{constructor(){super(...arguments),this.beanName="valueSvc",this.initialised=!1,this.isSsrm=!1}wireBeans(e){this.expressionSvc=e.expressionSvc,this.colModel=e.colModel,this.valueCache=e.valueCache,this.dataTypeSvc=e.dataTypeSvc}postConstruct(){this.initialised||this.init()}init(){this.executeValueGetter=this.valueCache?this.executeValueGetterWithValueCache.bind(this):this.executeValueGetterWithoutValueCache.bind(this),this.isSsrm=ht(this.gos),this.cellExpressions=this.gos.get("enableCellExpressions"),this.isTreeData=this.gos.get("treeData"),this.initialised=!0;const e=t=>this.callColumnCellValueChangedHandler(t);this.eventSvc.addEventListener("cellValueChanged",e,!0),this.addDestroyFunc(()=>this.eventSvc.removeEventListener("cellValueChanged",e,!0)),this.addManagedPropertyListener("treeData",t=>this.isTreeData=t.currentValue)}getValueForDisplay(e,t){const o=e.getColDef().showRowGroup;if(o!=null){if(typeof o=="string"){const l=this.getDisplayedNode(t,e,!0);if(l)return this.getValue(e,l)}const a=this.getValue(e,t);if(a==null){const l=this.getDisplayedNode(t,e);if(l)return this.getValue(e,l)}return a}const i=t.leafGroup&&this.colModel.isPivotMode(),r=t.group&&t.expanded&&!t.footer&&!i,s=this.gos.get("groupSuppressBlankHeader")||!t.sibling,n=r&&!s;return this.getValue(e,t,n)}getValue(e,t,o=!1){if(this.initialised||this.init(),!t)return;const i=e.getColDef(),r=i.field,s=e.getColId(),n=t.data;let a;const l=i.showRowGroup;if(typeof l=="string"&&(this.beans.rowGroupColsSvc?.getColumnIndex(l)??-1)>t.level)return null;const d=t.groupData&&t.groupData[s]!==void 0,c=!o&&t.aggData&&t.aggData[s]!==void 0,u=this.isSsrm&&o&&!!e.getColDef().aggFunc,g=this.isSsrm&&t.footer&&t.field&&(e.getColDef().showRowGroup===!0||e.getColDef().showRowGroup===t.field);if(this.isTreeData&&c?a=t.aggData[s]:this.isTreeData&&i.valueGetter?a=this.executeValueGetter(i.valueGetter,n,e,t):this.isTreeData&&r&&n?a=$i(n,r,e.isFieldContainsDots()):d?a=t.groupData[s]:c?a=t.aggData[s]:i.valueGetter?a=this.executeValueGetter(i.valueGetter,n,e,t):g?a=$i(n,t.field,e.isFieldContainsDots()):r&&n&&!u&&(a=$i(n,r,e.isFieldContainsDots())),this.cellExpressions&&typeof a=="string"&&a.indexOf("=")===0){const p=a.substring(1);a=this.executeValueGetter(p,n,e,t)}return a}parseValue(e,t,o,i){const r=e.getColDef(),s=r.valueParser;if(q(s)){const n=Z(this.gos,{node:t,data:t?.data,oldValue:i,newValue:o,colDef:r,column:e});return typeof s=="function"?s(n):this.expressionSvc?.evaluate(s,n)}return o}getDeleteValue(e,t){return q(e.getColDef().valueParser)?this.parseValue(e,t,"",this.getValueForDisplay(e,t))??null:null}formatValue(e,t,o,i,r=!0){let s=null,n;const a=e.getColDef();if(i?n=i:r&&(n=a.valueFormatter),n){const l=Z(this.gos,{value:o,node:t,data:t?t.data:null,colDef:a,column:e});typeof n=="function"?s=n(l):s=this.expressionSvc?this.expressionSvc.evaluate(n,l):null}else if(a.refData)return a.refData[o]||"";return s==null&&Array.isArray(o)&&(s=o.join(", ")),s}getDisplayedNode(e,t,o=!1){const i=this.gos,r=i.get("groupHideOpenParents"),s=i.get("showOpenedGroup")&&!o;if(!r&&!s)return;const n=t.colDef.showRowGroup;if(n===!0)return e.group?void 0:e.parent??void 0;let a=e;for(;a&&a.rowGroupColumn?.getId()!=n;){const l=a===a.parent?.childrenAfterSort?.[0];if(!s&&!l)return;a=a.parent}if(a!==e)return a??void 0}setValue(e,t,o,i){const r=this.colModel.getColDefCol(t);if(!e||!r)return!1;De(e.data)&&(e.data={});const{field:s,valueSetter:n}=r.getColDef();if(De(s)&&De(n))return _(17),!1;if(this.dataTypeSvc&&!this.dataTypeSvc.checkType(r,o))return _(135),!1;const a=Z(this.gos,{node:e,data:e.data,oldValue:this.getValue(r,e),newValue:o,colDef:r.getColDef(),column:r});a.newValue=o;let l;if(q(n)?typeof n=="function"?l=n(a):l=this.expressionSvc?.evaluate(n,a):l=this.setValueUsingField(e.data,s,o,r.isFieldContainsDots()),l===void 0&&(l=!0),!l)return!1;e.resetQuickFilterAggregateText(),this.valueCache?.onDataChanged();const d=this.getValue(r,e);return this.eventSvc.dispatchEvent({type:"cellValueChanged",event:null,rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:a.column,colDef:a.colDef,data:e.data,node:e,oldValue:a.oldValue,newValue:d,value:d,source:i}),!0}callColumnCellValueChangedHandler(e){const t=e.colDef.onCellValueChanged;typeof t=="function"&&this.beans.frameworkOverrides.wrapOutgoing(()=>{t({node:e.node,data:e.data,oldValue:e.oldValue,newValue:e.newValue,colDef:e.colDef,column:e.column,api:e.api,context:e.context})})}setValueUsingField(e,t,o,i){if(!t)return!1;let r=!1;if(!i)r=e[t]===o,r||(e[t]=o);else{const s=t.split(".");let n=e;for(;s.length>0&&n;){const a=s.shift();s.length===0?(r=n[a]===o,r||(n[a]=o)):n=n[a]}}return!r}executeValueGetterWithValueCache(e,t,o,i){const r=o.getColId(),s=this.valueCache.getValue(i,r);if(s!==void 0)return s;const n=this.executeValueGetterWithoutValueCache(e,t,o,i);return this.valueCache.setValue(i,r,n),n}executeValueGetterWithoutValueCache(e,t,o,i){const r=Z(this.gos,{data:t,node:i,column:o,colDef:o.getColDef(),getValue:this.getValueCallback.bind(this,i)});let s;return typeof e=="function"?s=e(r):s=this.expressionSvc?.evaluate(e,r),s}getValueCallback(e,t){const o=this.colModel.getColDefCol(t);return o?this.getValue(o,e):null}getKeyForNode(e,t){const o=this.getValue(e,t),i=e.getColDef().keyCreator;let r=o;if(i){const s=Z(this.gos,{value:o,colDef:e.getColDef(),column:e,node:t,data:t.data});r=i(s)}return typeof r=="string"||r==null||(r=String(r),r==="[object Object]"&&_(121)),r}},VS={moduleName:"CommunityCore",version:ae,beans:[Oy,Kv,Db,bf,xS,zw,Ay,_y,Cf,dS,lS,DS,HS,Gy,Ey,By,Mb,IS,yb,Sb],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:Yv,destroy:qv,isDestroyed:Xv,getGridOption:Qv,setGridOption:Zv,updateGridOptions:$c},dependsOn:[Cb,Qc,kw,Aa,Ky,Zc,Yy,RS,NS,Xy,aS,gS,fS,Zy,Fb,vb,OS]},Ta=class ti{static applyGlobalGridOptions(t){if(!ti.gridOptions)return{...t};let o={};return Ye(o,ti.gridOptions,!0,!0),ti.mergeStrategy==="deep"?Ye(o,t,!0,!0):o={...o,...t},ti.gridOptions.context&&(o.context=ti.gridOptions.context),t.context&&(ti.mergeStrategy==="deep"&&o.context&&Ye(t.context,o.context,!0,!0),o.context=t.context),o}};Ta.gridOptions=void 0,Ta.mergeStrategy="shallow";var _S=Ta;function zS(e,t,o){if(!t)return ce(11),{};const i=o;let r;if(!i?.setThemeOnGridDiv){const n=Pe({tag:"div"});n.style.height="100%",e.appendChild(n),e=n,r=()=>e.remove()}return new $S().create(e,t,n=>{const a=new Uv(e);n.createBean(a)},void 0,o,r)}var WS=1,$S=class{create(e,t,o,i,r,s){const n=_S.applyGlobalGridOptions(t),a=n.gridId??String(WS++),l=n.rowModelType??"clientSide",d=this.getRegisteredModules(r,a,l),c=this.createBeansList(l,d,a),u=this.createProvidedBeans(e,n,r);if(!c)return;const g={providedBeanInstances:u,beanClasses:c,gridId:a,beanInitComparator:Mv,beanDestroyComparator:Pv,derivedBeans:[Dv],destroyCallback:s},p=new lm(g);return this.registerModuleFeatures(p,d),o(p),p.getBean("syncSvc").start(),i&&i(p),p.getBean("gridApi")}getRegisteredModules(e,t,o){return qi(VS,void 0),e?.modules?.forEach(i=>qi(i,t)),rm(t,o)}registerModuleFeatures(e,t){const o=e.getBean("registry"),i=e.getBean("apiFunctionSvc");t.forEach(r=>{o.registerModule(r);const s=r.apiFunctions;s&&Object.keys(s).forEach(a=>{i?.addFunction(a,s[a])})})}createProvidedBeans(e,t,o){let i=o?o.frameworkOverrides:null;De(i)&&(i=new Vc);const r={gridOptions:t,eGridDiv:e,globalListener:o?o.globalListener:null,globalSyncListener:o?o.globalSyncListener:null,frameworkOverrides:i};return o&&o.providedBeanInstances&&Object.assign(r,o.providedBeanInstances),r}createBeansList(e,t,o){const r={clientSide:"ClientSideRowModel",infinite:"InfiniteRowModel",serverSide:"ServerSideRowModel",viewport:"ViewportRowModel"}[e];if(!r){Mn(201,{rowModelType:e},`Unknown rowModelType ${e}.`);return}if(!qd(r,o,e)){Mn(200,{reasonOrId:`rowModelType = '${e}'`,moduleName:r,gridScoped:Un(),gridId:o,rowModelType:e},`Missing module ${r}Module for rowModelType ${e}.
25
+ If upgrading from before v33, see ${Lo}/upgrading-to-ag-grid-33/#changes-to-modules/`);return}const s=new Set;return t.forEach(n=>n.beans?.forEach(a=>s.add(a))),Array.from(s)}};function Xt(e){const t=e.rowModel;return t.getType()==="clientSide"?t:void 0}function US(e){const t=e.rowModel;return t.getType()==="infinite"?t:void 0}function bi(e){const t=e.rowModel;return t.getType()==="serverSide"?t:void 0}var jS=["columnEverythingChanged","newColumnsLoaded","columnPivotModeChanged","pivotMaxColumnsExceeded","columnRowGroupChanged","expandOrCollapseAll","columnPivotChanged","gridColumnsChanged","columnValueChanged","columnMoved","columnVisible","columnPinned","columnGroupOpened","columnResized","displayedColumnsChanged","virtualColumnsChanged","columnHeaderMouseOver","columnHeaderMouseLeave","columnHeaderClicked","columnHeaderContextMenu","asyncTransactionsFlushed","rowGroupOpened","rowDataUpdated","pinnedRowDataChanged","rangeSelectionChanged","cellSelectionChanged","chartCreated","chartRangeSelectionChanged","chartOptionsChanged","chartDestroyed","toolPanelVisibleChanged","toolPanelSizeChanged","modelUpdated","cutStart","cutEnd","pasteStart","pasteEnd","fillStart","fillEnd","cellSelectionDeleteStart","cellSelectionDeleteEnd","rangeDeleteStart","rangeDeleteEnd","undoStarted","undoEnded","redoStarted","redoEnded","cellClicked","cellDoubleClicked","cellMouseDown","cellContextMenu","cellValueChanged","cellEditRequest","rowValueChanged","headerFocused","cellFocused","rowSelected","selectionChanged","tooltipShow","tooltipHide","cellKeyDown","cellMouseOver","cellMouseOut","filterChanged","filterModified","filterOpened","advancedFilterBuilderVisibleChanged","sortChanged","virtualRowRemoved","rowClicked","rowDoubleClicked","gridReady","gridPreDestroyed","gridSizeChanged","viewportChanged","firstDataRendered","dragStarted","dragStopped","dragCancelled","rowEditingStarted","rowEditingStopped","cellEditingStarted","cellEditingStopped","bodyScroll","bodyScrollEnd","paginationChanged","componentStateChanged","storeRefreshed","stateUpdated","columnMenuVisibleChanged","contextMenuVisibleChanged","rowDragEnter","rowDragMove","rowDragLeave","rowDragEnd","rowDragCancel","findChanged"],KS=["scrollbarWidthChanged","keyShortcutChangedCellStart","keyShortcutChangedCellEnd","pinnedHeightChanged","cellFocusCleared","fullWidthRowFocused","checkboxChanged","heightScaleChanged","suppressMovableColumns","suppressMenuHide","suppressFieldDotNotation","columnPanelItemDragStart","columnPanelItemDragEnd","bodyHeightChanged","columnContainerWidthChanged","displayedColumnsWidthChanged","scrollVisibilityChanged","scrollGapChanged","columnHoverChanged","flashCells","paginationPixelOffsetChanged","displayedRowsChanged","leftPinnedWidthChanged","rightPinnedWidthChanged","rowContainerHeightChanged","headerHeightChanged","columnGroupHeaderHeightChanged","columnHeaderHeightChanged","gridStylesChanged","storeUpdated","filterDestroyed","rowDataUpdateStarted","rowCountReady","advancedFilterEnabledChanged","dataTypesInferred","fieldValueChanged","fieldPickerValueSelected","richSelectListRowSelected","sideBarUpdated","alignedGridScroll","alignedGridColumn","gridOptionsChanged","chartTitleEdit","recalculateRowBounds","stickyTopOffsetChanged","overlayExclusiveChanged","beforeRefreshModel","rowNodeDataChanged"],Fu=[...jS,...KS],YS=["overlayLoadingTemplate","overlayNoRowsTemplate","gridId","quickFilterText","rowModelType","editType","domLayout","clipboardDelimiter","rowGroupPanelShow","multiSortKey","pivotColumnGroupTotals","pivotRowTotals","pivotPanelShow","fillHandleDirection","groupDisplayType","treeDataDisplayType","treeDataChildrenField","treeDataParentIdField","colResizeDefault","tooltipTrigger","serverSidePivotResultFieldSeparator","columnMenu","tooltipShowMode","grandTotalRow","themeCssLayer","findSearchValue","styleNonce"],qS=["components","rowStyle","context","autoGroupColumnDef","localeText","icons","datasource","dragAndDropImageComponentParams","serverSideDatasource","viewportDatasource","groupRowRendererParams","aggFuncs","fullWidthCellRendererParams","defaultColGroupDef","defaultColDef","defaultCsvExportParams","defaultExcelExportParams","columnTypes","rowClassRules","detailCellRendererParams","loadingCellRendererParams","loadingOverlayComponentParams","noRowsOverlayComponentParams","popupParent","themeStyleContainer","statusBar","chartThemeOverrides","customChartThemes","chartToolPanelsDef","dataTypeDefinitions","advancedFilterParent","advancedFilterBuilderParams","initialState","autoSizeStrategy","selectionColumnDef","findOptions"],XS=["sortingOrder","alignedGrids","rowData","columnDefs","excelStyles","pinnedTopRowData","pinnedBottomRowData","chartThemes","rowClass","paginationPageSizeSelector"],Du=["rowHeight","detailRowHeight","rowBuffer","headerHeight","groupHeaderHeight","groupLockGroupColumns","floatingFiltersHeight","pivotHeaderHeight","pivotGroupHeaderHeight","groupDefaultExpanded","pivotDefaultExpanded","viewportRowModelPageSize","viewportRowModelBufferSize","autoSizePadding","maxBlocksInCache","maxConcurrentDatasourceRequests","tooltipShowDelay","tooltipHideDelay","cacheOverflowSize","paginationPageSize","cacheBlockSize","infiniteInitialRowCount","serverSideInitialRowCount","scrollbarWidth","asyncTransactionWaitMillis","blockLoadDebounceMillis","keepDetailRowsCount","undoRedoCellEditingLimit","cellFlashDuration","cellFadeDuration","tabIndex","pivotMaxGeneratedColumns"],QS=["theme","rowSelection"],ZS=["cellSelection","sideBar","rowNumbers","suppressGroupChangesColumnVisibility","groupAggFiltering","suppressStickyTotalRow","groupHideParentOfSingleChild"],ku=["loadThemeGoogleFonts","suppressMakeColumnVisibleAfterUnGroup","suppressRowClickSelection","suppressCellFocus","suppressHeaderFocus","suppressHorizontalScroll","groupSelectsChildren","alwaysShowHorizontalScroll","alwaysShowVerticalScroll","debug","enableBrowserTooltips","enableCellExpressions","groupSuppressBlankHeader","suppressMenuHide","suppressRowDeselection","unSortIcon","suppressMultiSort","alwaysMultiSort","singleClickEdit","suppressLoadingOverlay","suppressNoRowsOverlay","suppressAutoSize","skipHeaderOnAutoSize","suppressColumnMoveAnimation","suppressMoveWhenColumnDragging","suppressMovableColumns","suppressFieldDotNotation","enableRangeSelection","enableRangeHandle","enableFillHandle","suppressClearOnFillReduction","deltaSort","suppressTouch","allowContextMenuWithControlKey","suppressContextMenu","suppressDragLeaveHidesColumns","suppressRowGroupHidesColumns","suppressMiddleClickScrolls","suppressPreventDefaultOnMouseWheel","suppressCopyRowsToClipboard","copyHeadersToClipboard","copyGroupHeadersToClipboard","pivotMode","suppressAggFuncInHeader","suppressColumnVirtualisation","alwaysAggregateAtRootLevel","suppressFocusAfterRefresh","functionsReadOnly","animateRows","groupSelectsFiltered","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","enableRtl","enableCellSpan","suppressClickEdit","rowDragEntireRow","rowDragManaged","suppressRowDrag","suppressMoveWhenRowDragging","rowDragMultiRow","enableGroupEdit","embedFullWidthRows","suppressPaginationPanel","groupHideOpenParents","groupAllowUnbalanced","pagination","paginationAutoPageSize","suppressScrollOnNewData","suppressScrollWhenPopupsAreOpen","purgeClosedRowNodes","cacheQuickFilter","includeHiddenColumnsInQuickFilter","ensureDomOrder","accentedSort","suppressChangeDetection","valueCache","valueCacheNeverExpires","aggregateOnlyChangedColumns","suppressAnimationFrame","suppressExcelExport","suppressCsvExport","includeHiddenColumnsInAdvancedFilter","suppressMultiRangeSelection","enterNavigatesVerticallyAfterEdit","enterNavigatesVertically","suppressPropertyNamesCheck","rowMultiSelectWithClick","suppressRowHoverHighlight","suppressRowTransform","suppressClipboardPaste","suppressLastEmptyLineOnPaste","enableCharts","suppressMaintainUnsortedOrder","enableCellTextSelection","suppressBrowserResizeObserver","suppressMaxRenderedRowRestriction","excludeChildrenWhenTreeDataFiltering","tooltipMouseTrack","tooltipInteraction","keepDetailRows","paginateChildRows","preventDefaultOnContextMenu","undoRedoCellEditing","allowDragFromColumnsToolPanel","pivotSuppressAutoColumn","suppressExpandablePivotGroups","debounceVerticalScrollbar","detailRowAutoHeight","serverSideSortAllLevels","serverSideEnableClientSideSort","serverSideOnlyRefreshFilteredGroups","suppressAggFilteredOnly","showOpenedGroup","suppressClipboardApi","suppressModelUpdateAfterUpdateTransaction","stopEditingWhenCellsLoseFocus","groupMaintainOrder","columnHoverHighlight","readOnlyEdit","suppressRowVirtualisation","enableCellEditingOnBackspace","resetRowDataOnUpdate","removePivotHeaderRowWhenSingleValueColumn","suppressCopySingleCellRanges","suppressGroupRowsSticky","suppressCutToClipboard","rowGroupPanelSuppressSort","allowShowChangeAfterFilter","enableAdvancedFilter","masterDetail","treeData","reactiveCustomComponents","applyQuickFilterBeforePivotOrAgg","suppressServerSideFullWidthLoadingRow","suppressAdvancedFilterEval","loading","maintainColumnOrder","enableStrictPivotColumnOrder","suppressSetFilterByDefault"],JS=["doesExternalFilterPass","processPivotResultColDef","processPivotResultColGroupDef","getBusinessKeyForNode","isRowSelectable","rowDragText","groupRowRenderer","dragAndDropImageComponent","fullWidthCellRenderer","loadingCellRenderer","loadingOverlayComponent","noRowsOverlayComponent","detailCellRenderer","quickFilterParser","quickFilterMatcher","getLocaleText","isExternalFilterPresent","getRowHeight","getRowClass","getRowStyle","getContextMenuItems","getMainMenuItems","processRowPostCreate","processCellForClipboard","getGroupRowAgg","isFullWidthRow","sendToClipboard","focusGridInnerElement","navigateToNextHeader","tabToNextHeader","navigateToNextCell","tabToNextCell","processCellFromClipboard","getDocument","postProcessPopup","getChildCount","getDataPath","isRowMaster","postSortRows","processHeaderForClipboard","processUnpinnedColumns","processGroupHeaderForClipboard","paginationNumberFormatter","processDataFromClipboard","getServerSideGroupKey","isServerSideGroup","createChartContainer","getChartToolbarItems","fillOperation","isApplyServerSideTransaction","getServerSideGroupLevelParams","isServerSideGroupOpenByDefault","isGroupOpenByDefault","initialGroupOrderComparator","loadingCellRendererSelector","getRowId","chartMenuItems","groupTotalRow","alwaysPassFilter"],Ia=[...XS,...qS,...YS,...Du,...JS,...ku,...ZS,...QS],e0=class{wrap(e,t,o,i){const r=this.createWrapper(e,i);return t?.forEach(s=>{this.createMethod(r,s,!0)}),o?.forEach(s=>{this.createMethod(r,s,!1)}),r}createMethod(e,t,o){e.addMethod(t,this.createMethodProxy(e,t,o))}createMethodProxy(e,t,o){return function(){return e.hasMethod(t)?e.callMethod(t,arguments):(o&&_(49,{methodName:t}),null)}}},t0={tag:"div",cls:"ag-tooltip"},o0=class extends Fv{constructor(){super(t0)}init(e){const{value:t}=e;this.getGui().textContent=Rt(t,!0)}};function Mu(e){const{inputValue:t,allSuggestions:o,hideIrrelevant:i,filterByPercentageOfBestMatch:r}=e;let s=o.map((l,d)=>({value:l,relevance:i0(t,l),idx:d}));if(s.sort((l,d)=>d.relevance-l.relevance),i&&(s=s.filter(l=>l.relevance!==0)),s.length>0&&r&&r>0){const d=s[0].relevance*r;s=s.filter(c=>d-c.relevance<0)}const n=[],a=[];for(const l of s)n.push(l.value),a.push(l.idx);return{values:n,indices:a}}function i0(e,t){if(e===t)return 1e3;const o=e.length,i=t.length;if(o===0||i===0)return 0;const r=e.toLocaleLowerCase(),s=t.toLocaleLowerCase(),n=s.indexOf(r);if(n!==-1)return 980-n*2;if([...r].filter(u=>s.includes(u)).length===0)return 0;let l=Array.from({length:i+1},(u,g)=>g);for(let u=0;u<o;u++){const g=[u+1];for(let p=0;p<i;p++){const f=l[p+1]+1,m=g[p]+1;let C=l[p]+(e[u]!==t[p]?1:0);i>10&&p>i/2&&(C+=1),u>0&&p>0&&e[u-1]===t[p-1]&&(C-=4),g.push(Math.min(f,m,C))}l=g}const d=Math.round(l[i]),c=Math.max(1,1e3-d*30);return Math.max(1,c)}function r0(e,t){if(typeof e!="number")return"";const o=t(),i=o("thousandSeparator",","),r=o("decimalSeparator",".");return e.toString().replace(".",r).replace(/(\d)(?=(\d{3})+(?!\d))/g,`$1${i}`)}var s0=class extends E{getFileName(e){const t=this.getDefaultFileExtension();return(e==null||!e.length)&&(e=this.getDefaultFileName()),e.indexOf(".")===-1?`${e}.${t}`:e}getData(e){const t=this.createSerializingSession(e);return this.beans.gridSerializer.serialize(t,e)}getDefaultFileName(){return`export.${this.getDefaultFileExtension()}`}},n0=class{constructor(e){this.groupColumns=[];const{colModel:t,rowGroupColsSvc:o,colNames:i,valueSvc:r,gos:s,processCellCallback:n,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d}=e;this.colModel=t,this.rowGroupColsSvc=o,this.colNames=i,this.valueSvc=r,this.gos=s,this.processCellCallback=n,this.processHeaderCallback=a,this.processGroupHeaderCallback=l,this.processRowGroupCallback=d}prepare(e){this.groupColumns=e.filter(t=>!!t.getColDef().showRowGroup)}extractHeaderValue(e){return this.getHeaderName(this.processHeaderCallback,e)??""}extractRowCellValue(e,t,o,i,r){const n=(!this.gos.get("groupHideOpenParents")||r.footer)&&this.shouldRenderGroupSummaryCell(r,e,t)?this.createValueForGroupNode(e,r):this.valueSvc.getValueForDisplay(e,r);return this.processCell({accumulatedRowIndex:o,rowNode:r,column:e,value:n,processCellCallback:this.processCellCallback,type:i})}shouldRenderGroupSummaryCell(e,t,o){if(!(e.group&&!this.gos.get("treeData")))return!1;if(this.groupColumns.indexOf(t)!==-1){if(e.groupData?.[t.getId()]!==void 0||ht(this.gos)&&e.group)return!0;if(e.footer&&e.level===-1){const n=t.getColDef();return n==null||n.showRowGroup===!0||n.showRowGroup===this.rowGroupColsSvc?.columns[0].getId()}}const s=_r(this.gos,this.colModel.isPivotMode());return o===0&&s}getHeaderName(e,t){return e?e(Z(this.gos,{column:t})):this.colNames.getDisplayNameForColumn(t,"csv",!0)}createValueForGroupNode(e,t){if(this.processRowGroupCallback)return this.processRowGroupCallback(Z(this.gos,{column:e,node:t}));const o=this.gos.get("treeData"),i=a=>{if(o)return a.key;const l=a.groupData?.[e.getId()];return!l||!a.rowGroupColumn||a.rowGroupColumn.getColDef().useValueFormatterForExport===!1?l:this.valueSvc.formatValue(a.rowGroupColumn,a,l)??l},r=t.footer,s=[i(t)];if(!In(this.gos))for(;t.parent;)t=t.parent,s.push(i(t));const n=s.reverse().join(" -> ");return r?`Total ${n}`:n}processCell(e){const{accumulatedRowIndex:t,rowNode:o,column:i,value:r,processCellCallback:s,type:n}=e;return s?{value:s(Z(this.gos,{accumulatedRowIndex:t,column:i,node:o,value:r,type:n,parseValue:a=>this.valueSvc.parseValue(i,o,a,this.valueSvc.getValue(i,o)),formatValue:a=>this.valueSvc.formatValue(i,o,a)??a}))??""}:i.getColDef().useValueFormatterForExport!==!1?{value:r??"",valueFormatted:this.valueSvc.formatValue(i,o,r)}:{value:r??""}}};function a0(e,t){const o=document.defaultView||window;if(!o){_(52);return}const i=document.createElement("a"),r=o.URL.createObjectURL(t);i.setAttribute("href",r),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:o})),document.body.removeChild(i),o.setTimeout(()=>{o.URL.revokeObjectURL(r)},0)}var l0={enableBrowserTooltips:!0,tooltipTrigger:!0,tooltipMouseTrack:!0,tooltipShowMode:!0,tooltipInteraction:!0,defaultColGroupDef:!0,suppressAutoSize:!0,skipHeaderOnAutoSize:!0,autoSizeStrategy:!0,components:!0,stopEditingWhenCellsLoseFocus:!0,undoRedoCellEditing:!0,undoRedoCellEditingLimit:!0,excelStyles:!0,cacheQuickFilter:!0,customChartThemes:!0,chartThemeOverrides:!0,chartToolPanelsDef:!0,loadingCellRendererSelector:!0,localeText:!0,keepDetailRows:!0,keepDetailRowsCount:!0,detailRowHeight:!0,detailRowAutoHeight:!0,tabIndex:!0,valueCache:!0,valueCacheNeverExpires:!0,enableCellExpressions:!0,suppressTouch:!0,suppressBrowserResizeObserver:!0,suppressPropertyNamesCheck:!0,debug:!0,dragAndDropImageComponent:!0,loadingOverlayComponent:!0,suppressLoadingOverlay:!0,noRowsOverlayComponent:!0,paginationPageSizeSelector:!0,paginateChildRows:!0,pivotPanelShow:!0,pivotSuppressAutoColumn:!0,suppressExpandablePivotGroups:!0,aggFuncs:!0,allowShowChangeAfterFilter:!0,ensureDomOrder:!0,enableRtl:!0,suppressColumnVirtualisation:!0,suppressMaxRenderedRowRestriction:!0,suppressRowVirtualisation:!0,rowDragText:!0,groupLockGroupColumns:!0,suppressGroupRowsSticky:!0,rowModelType:!0,cacheOverflowSize:!0,infiniteInitialRowCount:!0,serverSideInitialRowCount:!0,maxBlocksInCache:!0,maxConcurrentDatasourceRequests:!0,blockLoadDebounceMillis:!0,serverSideOnlyRefreshFilteredGroups:!0,serverSidePivotResultFieldSeparator:!0,viewportRowModelPageSize:!0,viewportRowModelBufferSize:!0,debounceVerticalScrollbar:!0,suppressAnimationFrame:!0,suppressPreventDefaultOnMouseWheel:!0,scrollbarWidth:!0,icons:!0,suppressRowTransform:!0,gridId:!0,enableGroupEdit:!0,initialState:!0,processUnpinnedColumns:!0,createChartContainer:!0,getLocaleText:!0,getRowId:!0,reactiveCustomComponents:!0,columnMenu:!0,suppressSetFilterByDefault:!0,getDataPath:!0,enableCellSpan:!0},rt="clientSide",Qe="serverSide",yi="infinite",d0={onGroupExpandedOrCollapsed:[rt],refreshClientSideRowModel:[rt],isRowDataEmpty:[rt],forEachLeafNode:[rt],forEachNodeAfterFilter:[rt],forEachNodeAfterFilterAndSort:[rt],resetRowHeights:[rt],applyTransaction:[rt],applyTransactionAsync:[rt],flushAsyncTransactions:[rt],getBestCostNodeSelection:[rt],getServerSideSelectionState:[Qe],setServerSideSelectionState:[Qe],applyServerSideTransaction:[Qe],applyServerSideTransactionAsync:[Qe],applyServerSideRowData:[Qe],retryServerSideLoads:[Qe],flushServerSideAsyncTransactions:[Qe],refreshServerSide:[Qe],getServerSideGroupLevelState:[Qe],refreshInfiniteCache:[yi],purgeInfiniteCache:[yi],getInfiniteRowCount:[yi],isLastRowIndexKnown:[yi,Qe],expandAll:[rt,Qe],collapseAll:[rt,Qe],onRowHeightChanged:[rt,Qe],setRowCount:[yi,Qe],getCacheBlockState:[yi,Qe]},c0={showLoadingOverlay:{version:"v32",message:'`showLoadingOverlay` is deprecated. Use the grid option "loading"=true instead or setGridOption("loading", true).'},clearRangeSelection:{version:"v32.2",message:"Use `clearCellSelection` instead."},getInfiniteRowCount:{version:"v32.2",old:"getInfiniteRowCount()",new:"getDisplayedRowCount()"},selectAllFiltered:{version:"v33",old:"selectAllFiltered()",new:'selectAll("filtered")'},deselectAllFiltered:{version:"v33",old:"deselectAllFiltered()",new:'deselectAll("filtered")'},selectAllOnCurrentPage:{version:"v33",old:"selectAllOnCurrentPage()",new:'selectAll("currentPage")'},deselectAllOnCurrentPage:{version:"v33",old:"deselectAllOnCurrentPage()",new:'deselectAll("currentPage")'}};function u0(e,t,o){const i=c0[e];if(i){const{version:s,new:n,old:a,message:l}=i,d=a??e;return(...c)=>{const u=n?`Please use ${n} instead. `:"";return Hi(`Since ${s} api.${d} is deprecated. ${u}${l??""}`),t.apply(t,c)}}const r=d0[e];return r?(...s)=>{const n=o.rowModel.getType();if(!r.includes(n)){si(`api.${e} can only be called when gridOptions.rowModelType is ${r.join(" or ")}`);return}return t.apply(t,s)}:t}var Pu={AdvancedFilter:1,AllEnterprise:1,CellSelection:1,Clipboard:1,ColumnMenu:1,ColumnsToolPanel:1,ContextMenu:1,ExcelExport:1,FiltersToolPanel:1,Find:1,GridCharts:1,IntegratedCharts:1,GroupFilter:1,MasterDetail:1,Menu:1,MultiFilter:1,Pivot:1,RangeSelection:1,RichSelect:1,RowNumbers:1,RowGrouping:1,RowGroupingPanel:1,ServerSideRowModelApi:1,ServerSideRowModel:1,SetFilter:1,SideBar:1,Sparklines:1,StatusBar:1,TreeData:1,ViewportRowModel:1},La=["TextFilter","NumberFilter","DateFilter","SetFilter","MultiFilter","GroupFilter","CustomFilter"],h0={EditCore:["TextEditor","NumberEditor","DateEditor","CheckboxEditor","LargeTextEditor","SelectEditor","RichSelect","CustomEditor"],CheckboxCellRenderer:["AllCommunity"],ClientSideRowModelHierarchy:["RowGrouping","Pivot","TreeData"],ColumnFilter:La,ColumnGroupHeaderComp:["AllCommunity"],ColumnGroup:["AllCommunity"],ColumnHeaderComp:["AllCommunity"],ColumnMove:["AllCommunity"],ColumnResize:["AllCommunity"],CommunityCore:["AllCommunity"],CsrmSsrmSharedApi:["ClientSideRowModelApi","ServerSideRowModelApi"],EnterpriseCore:["AllEnterprise"],FilterCore:[...La,"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:[...La,"ColumnMenu","ContextMenu"],SharedPivot:["Pivot","ServerSideRowModel"],SharedRowGrouping:["RowGrouping","ServerSideRowModel"],SharedRowSelection:["RowSelection","ServerSideRowModel"],SkeletonCellRenderer:["ServerSideRowModel"],Sort:["AllCommunity"],SsrmInfiniteSharedApi:["InfiniteRowModel","ServerSideRowModelApi"],SharedTreeData:["TreeData","ServerSideRowModel"]},g0={InfiniteRowModel:"infinite",ClientSideRowModelApi:"clientSide",ClientSideRowModel:"clientSide",ServerSideRowModelApi:"serverSide",ServerSideRowModel:"serverSide",ViewportRowModel:"viewport"};function p0(e,t){const o=[];return(Array.isArray(e)?e:[e]).forEach(i=>{const r=h0[i];r?r.forEach(s=>{const n=g0[s];(!n||n===t)&&o.push(s)}):o.push(i)}),o}var Si={agSetColumnFilter:"SetFilter",agSetColumnFloatingFilter:"SetFilter",agMultiColumnFilter:"MultiFilter",agMultiColumnFloatingFilter:"MultiFilter",agGroupColumnFilter:"GroupFilter",agGroupColumnFloatingFilter:"GroupFilter",agGroupCellRenderer:"GroupCellRenderer",agGroupRowRenderer:"GroupCellRenderer",agRichSelect:"RichSelect",agRichSelectCellEditor:"RichSelect",agDetailCellRenderer:"SharedMasterDetail",agSparklineCellRenderer:"Sparklines",agDragAndDropImage:"SharedDragAndDrop",agColumnHeader:"ColumnHeaderComp",agColumnGroupHeader:"ColumnGroupHeaderComp",agSortIndicator:"Sort",agAnimateShowChangeCellRenderer:"HighlightChanges",agAnimateSlideCellRenderer:"HighlightChanges",agLoadingCellRenderer:"LoadingCellRenderer",agSkeletonCellRenderer:"SkeletonCellRenderer",agCheckboxCellRenderer:"CheckboxCellRenderer",agLoadingOverlay:"Overlay",agNoRowsOverlay:"Overlay",agTooltipComponent:"Tooltip",agReadOnlyFloatingFilter:"CustomFilter",agTextColumnFilter:"TextFilter",agNumberColumnFilter:"NumberFilter",agDateColumnFilter:"DateFilter",agDateInput:"DateFilter",agTextColumnFloatingFilter:"TextFilter",agNumberColumnFloatingFilter:"NumberFilter",agDateColumnFloatingFilter:"DateFilter",agCellEditor:"TextEditor",agSelectCellEditor:"SelectEditor",agTextCellEditor:"TextEditor",agNumberCellEditor:"NumberEditor",agDateCellEditor:"DateEditor",agDateStringCellEditor:"DateEditor",agCheckboxCellEditor:"CheckboxEditor",agLargeTextCellEditor:"LargeTextEditor",agMenuItem:"MenuItem",agColumnsToolPanel:"ColumnsToolPanel",agFiltersToolPanel:"FiltersToolPanel",agAggregationComponent:"StatusBar",agSelectedRowCountComponent:"StatusBar",agTotalRowCountComponent:"StatusBar",agFilteredRowCountComponent:"StatusBar",agTotalAndFilteredRowCountComponent:"StatusBar",agFindCellRenderer:"Find"},f0=e=>{const t=e.map(i=>`import { ${sr(i)} } from '${Pu[i]?"ag-grid-enterprise":"ag-grid-community"}';`);return e.some(i=>i==="IntegratedCharts"||i==="Sparklines")&&t.push("import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';"),`import { ModuleRegistry } from 'ag-grid-community';
26
+ ${t.join(`
27
+ `)}
28
+
29
+ ModuleRegistry.registerModules([ ${e.map(i=>sr(i,!0)).join(", ")} ]);
30
+
31
+ For more info see: ${Lo}/modules/`};function sr(e,t=!1){return t&&(e==="IntegratedCharts"||e==="Sparklines")?`${e}Module.with(AgChartsEnterpriseModule)`:`${e}Module`}function m0(e,t){const o=t.filter(s=>s==="IntegratedCharts"||s==="Sparklines");let i="";return!globalThis?.agCharts&&o.length>0?i=`Unable to use ${e} as either the ag-charts-community or ag-charts-enterprise script needs to be included alongside ag-grid-enterprise.
32
+ `:t.some(s=>Pu[s])&&(i=i+`Unable to use ${e} as that requires the ag-grid-enterprise script to be included.
33
+ `),i}var Eu=({reasonOrId:e,moduleName:t,gridScoped:o,gridId:i,rowModelType:r,additionalText:s,isUmd:n})=>{const a=p0(t,r),l=typeof e=="string"?e:b0[e];if(n)return m0(l,a);const d=a.filter(g=>g==="IntegratedCharts"||g==="Sparklines"),c=d.length>0?`${d.map(g=>sr(g)).join()} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.`:"";return`${`Unable to use ${l} as ${a.length>1?"one of "+a.map(g=>sr(g)).join(", "):sr(a[0])} is not registered${o?" for gridId: "+i:""}. ${c} Check if you have registered the module:
34
+ `}
35
+ ${f0(a)}`+(s?`
36
+
37
+ ${s}`:"")},Au=e=>`${e} must be initialised with an AG Charts module. One of 'AgChartsCommunityModule' / 'AgChartsEnterpriseModule'.
38
+
39
+ import { AgChartsEnterpriseModule } from 'ag-charts-enterprise';
40
+ import { ModuleRegistry } from 'ag-grid-community';
41
+ import { ${e} } from 'ag-grid-enterprise';
42
+
43
+ ModuleRegistry.registerModules([${e}.with(AgChartsEnterpriseModule)]);
44
+ `,C0=e=>`AG Grid: Unable to use the Clipboard API (navigator.clipboard.${e}()). The reason why it could not be used has been logged in the previous line. For this reason the grid has defaulted to using a workaround which doesn't perform as well. Either fix why Clipboard API is blocked, OR stop this message from appearing by setting grid property suppressClipboardApi=true (which will default the grid to using the workaround rather than the API.`,v0={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:o})=>["Processing of the expression failed","Expression = ",e,"Params = ",t,"Exception = ",o],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:
45
+ "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.
46
+ Either clear local references to the grid api, when it is destroyed, or check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.
47
+ 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}
48
+ ${C0(t)}`,41:()=>"Browser did not allow document.execCommand('copy'). Ensure 'api.copySelectedRowsToClipboard() is invoked via a user event, i.e. button click, otherwise the browser will prevent it for security reasons.",42:()=>"Browser does not support document.execCommand('copy') for clipboard operations",43:({iconName:e})=>`As of v33, icon '${e}' is deprecated. Use the icon CSS name instead.`,44:()=>'Data type definition hierarchies (via the "extendsDataType" property) cannot contain circular references.',45:({parentCellDataType:e})=>`The data type definition ${e} does not exist.`,46:()=>'The "baseDataType" property of a data type definition must match that of its parent.',47:({cellDataType:e})=>`Missing data type definition - "${e}"`,48:({property:e})=>`Cell data type is "object" but no Value ${e} has been provided. Please either provide an object data type definition with a Value ${e}, or set "colDef.value${e}"`,49:({methodName:e})=>`Framework component is missing the method ${e}()`,50:({compName:e})=>`Could not find component ${e}, did you forget to configure this component?`,51:()=>"Export cancelled. Export is not allowed as per your configuration.",52:()=>"There is no `window` associated with the current `document`",53:()=>"unknown value type during csv conversion",54:()=>"Could not find document body, it is needed for drag and drop and context menu.",55:()=>"addRowDropZone - A container target needs to be provided",56:()=>"addRowDropZone - target already exists in the list of DropZones. Use `removeRowDropZone` before adding it again.",57:()=>"unable to show popup filter, filter instantiation failed",58:()=>"no values found for select cellEditor",59:()=>"cannot select pinned rows",60:()=>"cannot select node until it has finished loading",61:()=>"since version v32.2.0, rowNode.isFullWidthCell() has been deprecated. Instead check `rowNode.detail` followed by the user provided `isFullWidthRow` grid option.",62:({colId:e})=>`setFilterModel() - no column found for colId: ${e}`,63:({colId:e})=>`setFilterModel() - unable to fully apply model, filtering disabled for colId: ${e}`,64:({colId:e})=>`setFilterModel() - unable to fully apply model, unable to create filter for colId: ${e}`,65:()=>"filter missing setModel method, which is needed for setFilterModel",66:()=>"filter API missing getModel method, which is needed for getFilterModel",67:()=>"Filter is missing isFilterActive() method",68:()=>"Column Filter API methods have been disabled as Advanced Filters are enabled.",69:({guiFromFilter:e})=>`getGui method from filter returned ${e}; it should be a DOM element.`,70:({newFilter:e})=>`Grid option quickFilterText only supports string inputs, received: ${typeof e}`,71:()=>"debounceMs is ignored when apply button is present",72:({keys:e})=>["ignoring FilterOptionDef as it doesn't contain one of ",e],73:()=>"invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'",74:()=>"no filter options for filter",75:()=>"Unknown button type specified",76:({filterModelType:e})=>['Unexpected type of filter "',e,'", it looks like the filter was configured with incorrect Filter Options'],77:()=>"Filter model is missing 'conditions'",78:()=>'Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.',79:()=>'"filterParams.maxNumConditions" must be greater than or equal to zero.',80:()=>'"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.',81:()=>'"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".',82:({param:e})=>`DateFilter ${e} is not a number`,83:()=>"DateFilter minValidYear should be <= maxValidYear",84:()=>"DateFilter minValidDate should be <= maxValidDate",85:()=>"DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored.",86:()=>"DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored.",87:()=>"DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.",88:({index:e})=>`Invalid row index for ensureIndexVisible: ${e}`,89:()=>"A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)",90:()=>"datasource is missing getRows method",91:()=>"Filter is missing method doesFilterPass",92:()=>"AnimationFrameService called but animation frames are off",93:()=>"cannot add multiple ranges when `cellSelection.suppressMultiRanges = true`",94:({paginationPageSizeOption:e,pageSizeSet:t,pageSizesSet:o,pageSizeOptions:i})=>`'paginationPageSize=${e}'${t?"":" (default value)"}, but ${e} is not included in${o?"":" the default"} paginationPageSizeSelector=[${i?.join(", ")}].`,95:({paginationPageSizeOption:e,paginationPageSizeSelector:t})=>`Either set '${t}' to an array that includes ${e} or to 'false' to disable the page size selector.`,96:({id:e,data:t})=>["Duplicate ID",e,"found for pinned row with data",t,"When `getRowId` is defined, it must return unique IDs for all pinned rows. Use the `rowPinned` parameter."],97:({colId:e})=>`cellEditor for column ${e} is missing getGui() method`,98:()=>"popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.",99:()=>"Since v32, `api.hideOverlay()` does not hide the loading overlay when `loading=true`. Set `loading=false` instead.",100:({rowModelType:e})=>`selectAll only available when rowModelType='clientSide', ie not ${e}`,101:({propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})=>{const r=[],s=[...Object.keys(o??[]).filter(a=>!["agCellEditor","agGroupRowRenderer","agSortIndicator"].includes(a)),...Object.keys(i??[])],n=Mu({inputValue:t,allSuggestions:s,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.
49
+ `),n.length>0&&r.push(` Did you mean: [${n.slice(0,3)}]?
50
+ `),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: ${Lo}/theming-migration/`,107:({key:e,value:t})=>`Invalid value for theme param ${e} - ${t}`,108:({e})=>["chart update failed",e],109:({aggFuncOrString:e})=>`unrecognised aggregation function ${e}`,110:()=>"groupHideOpenParents only works when specifying specific columns for colDef.showRowGroup",111:()=>"Invalid selection state. When `groupSelects` is enabled, the state must conform to `IServerSideGroupSelectionState`.",113:()=>"Set Filter cannot initialise because you are using a row model that does not contain all rows in the browser. Either use a different filter type, or configure Set Filter such that you provide it with values",114:({component:e})=>`Could not find component with name of ${e}. Is it in Vue.components?`,116:()=>"Invalid selection state. The state must conform to `IServerSideSelectionState`.",117:()=>"selectAll must be of boolean type.",118:()=>"Infinite scrolling must be enabled in order to set the row count.",119:()=>"Unable to instantiate filter",120:()=>"MultiFloatingFilterComp expects MultiFilter as its parent",121:()=>"a column you are grouping or pivoting by has objects as values. If you want to group by complex objects then either a) use a colDef.keyCreator (see AG Grid docs) or b) to toString() on the object to return a key",122:()=>"could not find the document, document is empty",123:()=>"Advanced Filter is only supported with the Client-Side Row Model or Server-Side Row Model.",124:()=>"No active charts to update.",125:({chartId:e})=>`Unable to update chart. No active chart found with ID: ${e}.`,126:()=>"unable to restore chart as no chart model is provided",127:({allRange:e})=>`unable to create chart as ${e?"there are no columns in the grid":"no range is selected"}.`,128:({feature:e})=>`${e} is only available if using 'multiRow' selection mode.`,129:({feature:e,rowModel:t})=>`${e} is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ${t}.`,130:()=>'cannot multi select unless selection mode is "multiRow"',132:()=>"Row selection features are not available unless `rowSelection` is enabled.",133:({iconName:e})=>`icon '${e}' function should return back a string or a dom object`,134:({iconName:e})=>`Did not find icon '${e}'`,135:()=>"Data type of the new value does not match the cell data type of the column",136:()=>"Unable to update chart as the 'type' is missing. It must be either 'rangeChartUpdate', 'pivotChartUpdate', or 'crossFilterChartUpdate'.",137:({type:e,currentChartType:t})=>`Unable to update chart as a '${e}' update type is not permitted on a ${t}.`,138:({chartType:e})=>`invalid chart type supplied: ${e}`,139:({customThemeName:e})=>`a custom chart theme with the name ${e} has been supplied but not added to the 'chartThemes' list`,140:({name:e})=>`no stock theme exists with the name '${e}' and no custom chart theme with that name was supplied to 'customChartThemes'`,141:()=>"cross filtering with row grouping is not supported.",142:()=>"cross filtering is only supported in the client side row model.",143:({panel:e})=>`'${e}' is not a valid Chart Tool Panel name`,144:({type:e})=>`Invalid charts data panel group name supplied: '${e}'`,145:({group:e})=>`As of v32, only one charts customize panel group can be expanded at a time. '${e}' will not be expanded.`,146:({comp:e})=>`Unable to instantiate component '${e}' as its module hasn't been loaded. Add 'ValidationModule' to see which module is required.`,147:({group:e})=>`Invalid charts customize panel group name supplied: '${e}'`,148:({group:e})=>`invalid chartGroupsDef config '${e}'`,149:({group:e,chartType:t})=>`invalid chartGroupsDef config '${e}.${t}'`,150:()=>"'seriesChartTypes' are required when the 'customCombo' chart type is specified.",151:({chartType:e})=>`invalid chartType '${e}' supplied in 'seriesChartTypes', converting to 'line' instead.`,152:({colId:e})=>`no 'seriesChartType' found for colId = '${e}', defaulting to 'line'.`,153:({chartDataType:e})=>`unexpected chartDataType value '${e}' supplied, instead use 'category', 'series' or 'excluded'`,154:({colId:e})=>`cross filtering requires a 'agSetColumnFilter' or 'agMultiColumnFilter' to be defined on the column with id: ${e}`,155:({option:e})=>`'${e}' is not a valid Chart Toolbar Option`,156:({panel:e})=>`Invalid panel in chartToolPanelsDef.panels: '${e}'`,157:({unrecognisedGroupIds:e})=>["unable to find group(s) for supplied groupIds:",e],158:()=>"can not expand a column item that does not represent a column group header",159:()=>"Invalid params supplied to createExcelFileForExcel() - `ExcelExportParams.data` is empty.",160:()=>"Export cancelled. Export is not allowed as per your configuration.",161:()=>"The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'",162:({id:e,dataType:t})=>`Unrecognized data type for excel export [${e}.dataType=${t}]`,163:({featureName:e})=>`Excel table export does not work with ${e}. The exported Excel file will not contain any Excel tables.
51
+ 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:o})=>["duplicate group keys for row data, keys should be unique",e,t,...o??[]],187:({rowId:e,firstData:t,secondData:o})=>[`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",o],188:()=>"getRowId callback must be provided for Server Side Row Model selection to work correctly.",189:({startRow:e})=>`invalid value ${e} for startRow, the value should be >= 0`,190:({rowGroupId:e,data:t})=>["null and undefined values are not allowed for server side row model keys",e?`column = ${e}`:"","data is ",t],194:({method:e})=>`calling gridApi.${e}() is only possible when using rowModelType=\`clientSide\`.`,195:({justCurrentPage:e})=>`selecting just ${e?"current page":"filtered"} only works when gridOptions.rowModelType='clientSide'`,196:({key:e})=>`Provided ids must be of string type. Invalid id provided: ${e}`,197:()=>"`toggledNodes` must be an array of string ids.",199:()=>"getSelectedNodes and getSelectedRows functions cannot be used with select all functionality with the server-side row model. Use `api.getServerSideSelectionState()` instead.",200:Eu,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 ${Lo}/filter-set-filter-list/#filter-value-types`,210:()=>"Set Filter has a Key Creator, but provided values are primitives. Did you mean to provide complex objects?",211:()=>"property treeList=true for Set Filter params, but you did not provide a treeListPathGetter or values of type Date.",212:()=>"please review all your toolPanel components, it seems like at least one of them doesn't have an id",213:()=>"Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled.",214:({key:e})=>`unable to lookup Tool Panel as invalid key supplied: ${e}`,215:({key:e,defaultByKey:t})=>`the key ${e} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(t??{}).join(",")}`,216:({name:e})=>`Missing component for '${e}'`,217:({invalidColIds:e})=>["unable to find grid columns for the supplied colDef(s):",e],218:({property:e,defaultOffset:t})=>`${e} must be a number, the value you provided is not a valid number. Using the default of ${t}px.`,219:({property:e})=>`Property ${e} does not exist on the target object.`,220:({lineDash:e})=>`'${e}' is not a valid 'lineDash' option.`,221:()=>"agAggregationComponent should only be used with the client and server side row model.",222:()=>"agFilteredRowCountComponent should only be used with the client side row model.",223:()=>"agSelectedRowCountComponent should only be used with the client and server side row model.",224:()=>"agTotalAndFilteredRowCountComponent should only be used with the client side row model.",225:()=>"agTotalRowCountComponent should only be used with the client side row model.",226:()=>"viewport is missing init method.",227:()=>"menu item icon must be DOM node or string",228:({menuItemOrString:e})=>`unrecognised menu item ${e}`,229:({index:e})=>["invalid row index for ensureIndexVisible: ",e],230:()=>"detailCellRendererParams.template is not supported by AG Grid React. To change the template, provide a Custom Detail Cell Renderer. See https://www.ag-grid.com/react-data-grid/master-detail-custom-detail/",231:()=>"As of v32, using custom components with `reactiveCustomComponents = false` is deprecated.",232:()=>"Using both rowData and v-model. rowData will be ignored.",233:({methodName:e})=>`Framework component is missing the method ${e}()`,234:()=>'Group Column Filter does not work with the colDef property "field". This property will be ignored.',235:()=>'Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.',236:()=>'Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.',237:()=>"Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter.",238:()=>"setRowCount can only accept a positive row count.",239:()=>'Theming API and CSS File Themes are both used in the same page. In v33 we released the Theming API as the new default method of styling the grid. See the migration docs https://www.ag-grid.com/react-data-grid/theming-migration/. Because no value was provided to the `theme` grid option it defaulted to themeQuartz. But the file (ag-grid.css) is also included and will cause styling issues. Either pass the string "legacy" to the theme grid option to use v32 style themes, or remove ag-grid.css from the page to use Theming API.',240:({theme:e})=>`theme grid option must be a Theming API theme object or the string "legacy", received: ${e}`,243:()=>"Failed to deserialize state - each provided state object must be an object.",244:()=>"Failed to deserialize state - `selectAllChildren` must be a boolean value or undefined.",245:()=>"Failed to deserialize state - `toggledNodes` must be an array.",246:()=>"Failed to deserialize state - Every `toggledNode` requires an associated string id.",247:()=>`Row selection state could not be parsed due to invalid data. Ensure all child state has toggledNodes or does not conform with the parent rule.
52
+ 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.
53
+ Your code probably called a grid API method while the grid was in the render stage.
54
+ To overcome this, put the API call into a timeout, e.g. instead of api.redrawRows(), call setTimeout(function() { api.redrawRows(); }, 0).
55
+ To see what part of your code that caused the refresh check this stacktrace.`,253:({version:e})=>["Illegal version string: ",e],254:()=>"Cannot create chart: no chart themes available.",255:({point:e})=>`Lone surrogate U+${e?.toString(16).toUpperCase()} is not a scalar value`,256:()=>"Unable to initialise. See validation error, or load ValidationModule if missing.",257:()=>Au("IntegratedChartsModule"),258:()=>Au("SparklinesModule"),259:({part:e})=>`the argument to theme.withPart must be a Theming API part object, received: ${e}`,260:({propName:e,compName:t,gridScoped:o,gridId:i,rowModelType:r})=>Eu({reasonOrId:`AG Grid '${e}' component: ${t}`,moduleName:Si[t],gridId:i,gridScoped:o,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 ${Lo}/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.`};function w0(e,t){const o=v0[e];if(!o)return[`Missing error text for error id ${e}!`];const i=o(t),s=`
56
+ See ${cd(e,t)}`;return Array.isArray(i)?i.concat(s):[i,s]}var b0={1:"Charting Aggregation",2:"pivotResultFields",3:"setTooltip"},y0=()=>({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."}}),S0=()=>({aggFunc:{module:"SharedAggregation"},autoHeight:{supportedRowModels:["clientSide","serverSide"],module:"RowAutoHeight"},cellClass:{module:"CellStyle"},cellClassRules:{module:"CellStyle"},cellEditor:({cellEditor:e,editable:t})=>{if(!t)return null;if(typeof e=="string"){const o=Si[e];if(o)return{module:o}}return{module:"CustomEditor"}},cellRenderer:({cellRenderer:e})=>{if(typeof e!="string")return null;const t=Si[e];return t?{module:t}:null},cellRendererParams:{validate:e=>(e.rowGroup!=null||e.rowGroupIndex!=null||e.cellRenderer==="agGroupCellRenderer")&&"checkbox"in e.cellRendererParams?'Since v33.0, `cellRendererParams.checkbox` has been deprecated. Use `rowSelection.checkboxLocation = "autoGroupColumn"` instead.':null},cellStyle:{module:"CellStyle"},children:()=>Tu(),columnChooserParams:{module:"ColumnMenu"},contextMenuItems:{module:"ContextMenu"},dndSource:{module:"DragAndDrop"},dndSourceOnRowDrag:{module:"DragAndDrop"},editable:({editable:e,cellEditor:t})=>e&&!t?{module:"TextEditor"}:null,enableCellChangeFlash:{module:"HighlightChanges"},enablePivot:{module:"SharedPivot"},enableRowGroup:{module:"SharedRowGrouping"},enableValue:{module:"SharedAggregation"},filter:({filter:e})=>{if(e&&typeof e!="string"&&typeof e!="boolean")return{module:"CustomFilter"};if(typeof e=="string"){const t=Si[e];if(t)return{module:t}}return{module:"ColumnFilter"}},floatingFilter:{module:"ColumnFilter"},headerCheckboxSelection:{supportedRowModels:["clientSide","serverSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelection is only supported with rowSelection=multiple"},headerCheckboxSelectionCurrentPageOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionCurrentPageOnly is only supported with rowSelection=multiple"},headerCheckboxSelectionFilteredOnly:{supportedRowModels:["clientSide"],validate:(e,{rowSelection:t})=>t==="multiple"?null:"headerCheckboxSelectionFilteredOnly is only supported with rowSelection=multiple"},headerTooltip:{module:"Tooltip"},headerValueGetter:{validate:e=>{const t=e.headerValueGetter;return typeof t=="function"||typeof t=="string"?null:"headerValueGetter must be a function or a valid string expression"}},icons:{validate:({icons:e})=>{if(e){if(e.smallDown)return Co(262);if(e.smallLeft)return Co(263);if(e.smallRight)return Co(264)}return null}},mainMenuItems:{module:"ColumnMenu"},menuTabs:e=>{const t=["columnsMenuTab","generalMenuTab"];return e.menuTabs?.some(o=>t.includes(o))?{module:"ColumnMenu"}:null},pivot:{module:"SharedPivot"},pivotIndex:{module:"SharedPivot"},rowDrag:{module:"RowDrag"},rowGroup:{module:"SharedRowGrouping"},rowGroupIndex:{module:"SharedRowGrouping"},sortingOrder:{validate:e=>{const t=e.sortingOrder;if(Array.isArray(t)&&t.length>0){const o=t.filter(i=>!rr.includes(i));if(o.length>0)return`sortingOrder must be an array with elements from [${rr.map(Nr).join()}], currently it includes [${o.map(Nr).join()}]`}else if(!Array.isArray(t)||t.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${t}`;return null}},tooltipField:{module:"Tooltip"},tooltipValueGetter:{module:"Tooltip"},type:{validate:e=>{const t=e.type;return t instanceof Array?t.some(i=>typeof i!="string")?"if colDef.type is supplied an array it should be of type 'string[]'":null:typeof t=="string"?null:"colDef.type should be of type 'string' | 'string[]'"}},rowSpan:{validate:(e,{suppressRowTransform:t})=>t?null:"colDef.rowSpan requires suppressRowTransform to be enabled."},spanRows:{module:"CellSpan",dependencies:{editable:{required:[!1,void 0]},rowDrag:{required:[!1,void 0]},colSpan:{required:[!1,void 0]},rowSpan:{required:[!1,void 0]}},validate:(e,{rowSelection:t,cellSelection:o,suppressRowTransform:i,enableCellSpan:r,rowDragEntireRow:s,enableCellTextSelection:n})=>typeof t=="object"&&t?.mode==="singleRow"&&t?.enableClickSelection?"colDef.spanRows is not supported with rowSelection.clickSelection":o?"colDef.spanRows is not supported with cellSelection.":i?"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."}}),R0={headerName:void 0,columnGroupShow:void 0,headerStyle:void 0,headerClass:void 0,toolPanelClass:void 0,headerValueGetter:void 0,pivotKeys:void 0,groupId:void 0,colId:void 0,sort:void 0,initialSort:void 0,field:void 0,type:void 0,cellDataType:void 0,tooltipComponent:void 0,tooltipField:void 0,headerTooltip:void 0,cellClass:void 0,showRowGroup:void 0,filter:void 0,initialAggFunc:void 0,defaultAggFunc:void 0,aggFunc:void 0,pinned:void 0,initialPinned:void 0,chartDataType:void 0,cellAriaRole:void 0,cellEditorPopupPosition:void 0,headerGroupComponent:void 0,headerGroupComponentParams:void 0,cellStyle:void 0,cellRenderer:void 0,cellRendererParams:void 0,cellEditor:void 0,cellEditorParams:void 0,filterParams:void 0,pivotValueColumn:void 0,headerComponent:void 0,headerComponentParams:void 0,floatingFilterComponent:void 0,floatingFilterComponentParams:void 0,tooltipComponentParams:void 0,refData:void 0,columnChooserParams:void 0,children:void 0,sortingOrder:void 0,allowedAggFuncs:void 0,menuTabs:void 0,pivotTotalColumnIds:void 0,cellClassRules:void 0,icons:void 0,sortIndex:void 0,initialSortIndex:void 0,flex:void 0,initialFlex:void 0,width:void 0,initialWidth:void 0,minWidth:void 0,maxWidth:void 0,rowGroupIndex:void 0,initialRowGroupIndex:void 0,pivotIndex:void 0,initialPivotIndex:void 0,suppressColumnsToolPanel:void 0,suppressFiltersToolPanel:void 0,openByDefault:void 0,marryChildren:void 0,suppressStickyLabel:void 0,hide:void 0,initialHide:void 0,rowGroup:void 0,initialRowGroup:void 0,pivot:void 0,initialPivot:void 0,checkboxSelection:void 0,showDisabledCheckboxes:void 0,headerCheckboxSelection:void 0,headerCheckboxSelectionFilteredOnly:void 0,headerCheckboxSelectionCurrentPageOnly:void 0,suppressHeaderMenuButton:void 0,suppressMovable:void 0,lockPosition:void 0,lockVisible:void 0,lockPinned:void 0,unSortIcon:void 0,suppressSizeToFit:void 0,suppressAutoSize:void 0,enableRowGroup:void 0,enablePivot:void 0,enableValue:void 0,editable:void 0,suppressPaste:void 0,suppressNavigable:void 0,enableCellChangeFlash:void 0,rowDrag:void 0,dndSource:void 0,autoHeight:void 0,wrapText:void 0,sortable:void 0,resizable:void 0,singleClickEdit:void 0,floatingFilter:void 0,cellEditorPopup:void 0,suppressFillHandle:void 0,wrapHeaderText:void 0,autoHeaderHeight:void 0,dndSourceOnRowDrag:void 0,valueGetter:void 0,valueSetter:void 0,filterValueGetter:void 0,keyCreator:void 0,valueFormatter:void 0,valueParser:void 0,comparator:void 0,equals:void 0,pivotComparator:void 0,suppressKeyboardEvent:void 0,suppressHeaderKeyboardEvent:void 0,colSpan:void 0,rowSpan:void 0,spanRows:void 0,getQuickFilterText:void 0,onCellValueChanged:void 0,onCellClicked:void 0,onCellDoubleClicked:void 0,onCellContextMenu:void 0,rowDragText:void 0,tooltipValueGetter:void 0,cellRendererSelector:void 0,cellEditorSelector:void 0,suppressSpanHeaderHeight:void 0,useValueFormatterForExport:void 0,useValueParserForImport:void 0,mainMenuItems:void 0,contextMenuItems:void 0,suppressFloatingFilterButton:void 0,suppressHeaderFilterButton:void 0,suppressHeaderContextMenu:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,context:void 0,dateComponent:void 0,dateComponentParams:void 0,getFindText:void 0},x0=()=>Object.keys(R0),Tu=()=>({objectName:"colDef",allProperties:x0(),docsUrl:"column-properties/",deprecations:y0(),validations:S0()}),F0=()=>({suppressLoadingOverlay:{version:"32",message:"Use `loading`=false instead."},enableFillHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeHandle:{version:"32.2",message:"Use `cellSelection.handle` instead."},enableRangeSelection:{version:"32.2",message:"Use `cellSelection = true` instead."},suppressMultiRangeSelection:{version:"32.2",message:"Use `cellSelection.suppressMultiRanges` instead."},suppressClearOnFillReduction:{version:"32.2",message:"Use `cellSelection.handle.suppressClearOnFillReduction` instead."},fillHandleDirection:{version:"32.2",message:"Use `cellSelection.handle.direction` instead."},fillOperation:{version:"32.2",message:"Use `cellSelection.handle.setFillValue` instead."},suppressRowClickSelection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},suppressRowDeselection:{version:"32.2",message:"Use `rowSelection.enableClickSelection` instead."},rowMultiSelectWithClick:{version:"32.2",message:"Use `rowSelection.enableSelectionWithoutKeys` instead."},groupSelectsChildren:{version:"32.2",message:'Use `rowSelection.groupSelects = "descendants"` instead.'},groupSelectsFiltered:{version:"32.2",message:'Use `rowSelection.groupSelects = "filteredDescendants"` instead.'},isRowSelectable:{version:"32.2",message:"Use `selectionOptions.isRowSelectable` instead."},suppressCopySingleCellRanges:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},suppressCopyRowsToClipboard:{version:"32.2",message:"Use `rowSelection.copySelectedRows` instead."},onRangeSelectionChanged:{version:"32.2",message:"Use `onCellSelectionChanged` instead."},onRangeDeleteStart:{version:"32.2",message:"Use `onCellSelectionDeleteStart` instead."},onRangeDeleteEnd:{version:"32.2",message:"Use `onCellSelectionDeleteEnd` instead."},suppressBrowserResizeObserver:{version:"32.2",message:"The grid always uses the browser's ResizeObserver, this grid option has no effect."},onColumnEverythingChanged:{version:"32.2",message:"Either use `onDisplayedColumnsChanged` which is fired at the same time, or use one of the more specific column events."},groupRemoveSingleChildren:{version:"33",message:"Use `groupHideParentOfSingleChild` instead."},groupRemoveLowestSingleChildren:{version:"33",message:'Use `groupHideParentOfSingleChild: "leafGroupsOnly"` instead.'},suppressRowGroupHidesColumns:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressHideOnGroup"` instead.'},suppressMakeColumnVisibleAfterUnGroup:{version:"33",message:'Use `suppressGroupChangesColumnVisibility: "suppressShowOnUngroup"` instead.'},unSortIcon:{version:"33",message:"Use `defaultColDef.unSortIcon` instead."},sortingOrder:{version:"33",message:"Use `defaultColDef.sortingOrder` instead."},suppressPropertyNamesCheck:{version:"33",message:"`gridOptions` and `columnDefs` both have a `context` property that should be used for arbitrary user data. This means that column definitions and gridOptions should only contain valid properties making this property redundant."}});function Qt(e,t,o,i=Number.MAX_VALUE){return typeof t=="number"||t==null?t==null||t>=o&&t<=i?null:i===Number.MAX_VALUE?`${e}: value should be greater than or equal to ${o}`:`${e}: value should be between ${o} and ${i}`:`${e}: value should be a number`}var D0=()=>{const e={alignedGrids:{module:"AlignedGrids"},allowContextMenuWithControlKey:{module:"ContextMenu"},autoSizePadding:{validate({autoSizePadding:o}){return Qt("autoSizePadding",o,0)}},autoSizeStrategy:{module:"ColumnAutoSize"},cacheBlockSize:{supportedRowModels:["serverSide","infinite"],validate({cacheBlockSize:o}){return Qt("cacheBlockSize",o,1)}},cacheOverflowSize:{validate({cacheOverflowSize:o}){return Qt("cacheOverflowSize",o,1)}},cellSelection:{module:"CellSelection"},columnHoverHighlight:{module:"ColumnHover"},datasource:{supportedRowModels:["infinite"],module:"InfiniteRowModel"},doesExternalFilterPass:{module:"ExternalFilter"},domLayout:{validate:o=>{const i=o.domLayout,r=["autoHeight","normal","print"];return i&&!r.includes(i)?`domLayout must be one of [${r.join()}], currently it's ${i}`:null}},editType:{module:"EditCore"},enableAdvancedFilter:{module:"AdvancedFilter"},enableCharts:{module:"IntegratedCharts"},enableFillHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeHandle:{dependencies:{enableRangeSelection:{required:[!0]}}},enableRangeSelection:{module:"CellSelection",dependencies:{rowDragEntireRow:{required:[!1,void 0]}}},findSearchValue:{module:"Find"},rowNumbers:{module:"RowNumbers"},getContextMenuItems:{module:"ContextMenu"},getLocaleText:{module:"Locale"},getMainMenuItems:{module:"ColumnMenu"},getRowClass:{module:"RowStyle"},getRowStyle:{module:"RowStyle"},grandTotalRow:{module:"SharedRowGrouping"},groupDefaultExpanded:{supportedRowModels:["clientSide"]},groupHideOpenParents:{supportedRowModels:["clientSide","serverSide"],dependencies:{groupTotalRow:{required:[void 0,"bottom"]},treeData:{required:[void 0,!1],reason:"Tree Data has values at the group level so it doesn't make sense to hide them."}}},groupHideParentOfSingleChild:{dependencies:{groupHideOpenParents:{required:[void 0,!1]}}},groupRemoveLowestSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveSingleChildren:{required:[void 0,!1]}}},groupRemoveSingleChildren:{dependencies:{groupHideOpenParents:{required:[void 0,!1]},groupRemoveLowestSingleChildren:{required:[void 0,!1]}}},groupSelectsChildren:{dependencies:{rowSelection:{required:["multiple"]}}},icons:{validate:({icons:o})=>{if(o){if(o.smallDown)return Co(262);if(o.smallLeft)return Co(263);if(o.smallRight)return Co(264)}return null}},infiniteInitialRowCount:{validate({infiniteInitialRowCount:o}){return Qt("infiniteInitialRowCount",o,1)}},initialGroupOrderComparator:{supportedRowModels:["clientSide"]},initialState:{module:"GridState"},isExternalFilterPresent:{module:"ExternalFilter"},keepDetailRowsCount:{validate({keepDetailRowsCount:o}){return Qt("keepDetailRowsCount",o,1)}},localeText:{module:"Locale"},masterDetail:{module:"SharedMasterDetail"},pagination:{module:"Pagination"},paginationPageSize:{validate({paginationPageSize:o}){return Qt("paginationPageSize",o,1)}},paginationPageSizeSelector:{validate:o=>{const i=o.paginationPageSizeSelector;return typeof i=="boolean"||i==null||i.length?null:`'paginationPageSizeSelector' cannot be an empty array.
57
+ If you want to hide the page size selector, set paginationPageSizeSelector to false.`}},pinnedTopRowData:{module:"PinnedRow"},pinnedBottomRowData:{module:"PinnedRow"},pivotMode:{dependencies:{treeData:{required:[!1,void 0],reason:"Pivot Mode is not supported with Tree Data."}},module:"SharedPivot"},pivotPanelShow:{module:"RowGroupingPanel"},quickFilterText:{supportedRowModels:["clientSide"],module:"QuickFilter"},rowBuffer:{validate({rowBuffer:o}){return Qt("rowBuffer",o,0)}},rowClass:{validate:o=>typeof o.rowClass=="function"?"rowClass should not be a function, please use getRowClass instead":null,module:"RowStyle"},rowClassRules:{module:"RowStyle"},rowData:{supportedRowModels:["clientSide"],module:"ClientSideRowModel"},rowDragManaged:{supportedRowModels:["clientSide"],dependencies:{treeData:{required:[!1,void 0]},pagination:{required:[!1,void 0]}},module:"RowDrag"},rowGroupPanelShow:{module:"RowGroupingPanel"},rowSelection:{validate({rowSelection:o}){return o&&typeof o=="string"?'As of version 32.2.1, using `rowSelection` with the values "single" or "multiple" has been deprecated. Use the object value instead.':o&&typeof o!="object"?"Expected `RowSelectionOptions` object for the `rowSelection` property.":o&&o.mode!=="multiRow"&&o.mode!=="singleRow"?`Selection mode "${o.mode}" is invalid. Use one of 'singleRow' or 'multiRow'.`:null},module:"SharedRowSelection"},rowStyle:{validate:o=>{const i=o.rowStyle;return i&&typeof i=="function"?"rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead":null},module:"RowStyle"},serverSideDatasource:{supportedRowModels:["serverSide"],module:"ServerSideRowModel"},serverSideInitialRowCount:{supportedRowModels:["serverSide"],validate({serverSideInitialRowCount:o}){return Qt("serverSideInitialRowCount",o,1)}},serverSideOnlyRefreshFilteredGroups:{supportedRowModels:["serverSide"]},serverSideSortAllLevels:{supportedRowModels:["serverSide"]},sideBar:{module:"SideBar"},sortingOrder:{validate:o=>{const i=o.sortingOrder;if(Array.isArray(i)&&i.length>0){const r=i.filter(s=>!rr.includes(s));if(r.length>0)return`sortingOrder must be an array with elements from [${rr.map(Nr).join()}], currently it includes [${r.map(Nr).join()}]`}else if(!Array.isArray(i)||i.length<=0)return`sortingOrder must be an array with at least one element, currently it's ${i}`;return null}},statusBar:{module:"StatusBar"},tooltipHideDelay:{validate:o=>o.tooltipHideDelay&&o.tooltipHideDelay<0?"tooltipHideDelay should not be lower than 0":null},tooltipShowDelay:{validate:o=>o.tooltipShowDelay&&o.tooltipShowDelay<0?"tooltipShowDelay should not be lower than 0":null},treeData:{supportedRowModels:["clientSide","serverSide"],module:"SharedTreeData",validate:o=>{const i=o.rowModelType??"clientSide";switch(i){case"clientSide":{const{treeDataChildrenField:r,treeDataParentIdField:s,getDataPath:n,getRowId:a}=o;if(!r&&!s&&!n)return"treeData requires either 'treeDataChildrenField' or 'treeDataParentIdField' or 'getDataPath' in the clientSide row model.";if(r){if(n)return"Cannot use both 'treeDataChildrenField' and 'getDataPath' at the same time.";if(s)return"Cannot use both 'treeDataChildrenField' and 'treeDataParentIdField' at the same time."}if(s){if(!a)return"getRowId callback not provided, tree data with parent id cannot be built.";if(n)return"Cannot use both 'treeDataParentIdField' and 'getDataPath' at the same time."}return null}case"serverSide":{const r=`treeData requires 'isServerSideGroup' and 'getServerSideGroupKey' in the ${i} row model.`;return o.isServerSideGroup&&o.getServerSideGroupKey?null:r}}return null}},treeDataChildrenField:{module:"SharedTreeData"},treeDataParentIdField:{module:"SharedTreeData"},undoRedoCellEditing:{module:"UndoRedoEdit"},valueCache:{module:"ValueCache"},viewportDatasource:{supportedRowModels:["viewport"],module:"ViewportRowModel"},viewportRowModelBufferSize:{validate({viewportRowModelBufferSize:o}){return Qt("viewportRowModelBufferSize",o,0)}},viewportRowModelPageSize:{validate({viewportRowModelPageSize:o}){return Qt("viewportRowModelPageSize",o,1)}},rowDragEntireRow:{dependencies:{cellSelection:{required:[void 0]}}},enableCellSpan:{module:"CellSpan"},autoGroupColumnDef:{validate({autoGroupColumnDef:o,showOpenedGroup:i}){return o?.field&&i?"autoGroupColumnDef.field and showOpenedGroup are not supported when used together.":o?.valueGetter&&i?"autoGroupColumnDef.valueGetter and showOpenedGroup are not supported when used together.":null}}},t={};return ku.forEach(o=>{t[o]={expectedType:"boolean"}}),Du.forEach(o=>{t[o]={expectedType:"number"}}),Ye(t,e),t},k0=()=>({objectName:"gridOptions",allProperties:[...Ia,...Fu.map(e=>On(e))],propertyExceptions:["api"],docsUrl:"grid-options/",deprecations:F0(),validations:D0()}),M0={expanded:1,contracted:1,"tree-closed":1,"tree-open":1,"tree-indeterminate":1,pin:1,"eye-slash":1,arrows:1,left:1,right:1,group:1,aggregation:1,pivot:1,"not-allowed":1,chart:1,cross:1,cancel:1,tick:1,first:1,previous:1,next:1,last:1,linked:1,unlinked:1,"color-picker":1,loading:1,menu:1,"menu-alt":1,filter:1,columns:1,maximize:1,minimize:1,copy:1,cut:1,paste:1,grip:1,save:1,csv:1,excel:1,"small-down":1,"small-left":1,"small-right":1,"small-up":1,asc:1,desc:1,none:1,up:1,down:1,plus:1,minus:1,settings:1,"checkbox-checked":1,"checkbox-indeterminate":1,"checkbox-unchecked":1,"radio-button-on":1,"radio-button-off":1,eye:1},P0={chart:"MenuCore",cancel:"EnterpriseCore",first:"Pagination",previous:"Pagination",next:"Pagination",last:"Pagination",linked:"IntegratedCharts",loadingMenuItems:"MenuCore",unlinked:"IntegratedCharts",menu:"ColumnHeaderComp",legacyMenu:"ColumnMenu",filter:"ColumnFilter",filterActive:"ColumnFilter",filterTab:"ColumnMenu",filtersToolPanel:"FiltersToolPanel",columns:["MenuCore"],columnsToolPanel:["ColumnsToolPanel"],maximize:"EnterpriseCore",minimize:"EnterpriseCore",save:"MenuCore",columnGroupOpened:"ColumnGroupHeaderComp",columnGroupClosed:"ColumnGroupHeaderComp",accordionOpen:"EnterpriseCore",accordionClosed:"EnterpriseCore",accordionIndeterminate:"EnterpriseCore",columnSelectClosed:["ColumnsToolPanel","ColumnMenu"],columnSelectOpen:["ColumnsToolPanel","ColumnMenu"],columnSelectIndeterminate:["ColumnsToolPanel","ColumnMenu"],columnMovePin:"SharedDragAndDrop",columnMoveHide:"SharedDragAndDrop",columnMoveMove:"SharedDragAndDrop",columnMoveLeft:"SharedDragAndDrop",columnMoveRight:"SharedDragAndDrop",columnMoveGroup:"SharedDragAndDrop",columnMoveValue:"SharedDragAndDrop",columnMovePivot:"SharedDragAndDrop",dropNotAllowed:"SharedDragAndDrop",groupContracted:"GroupCellRenderer",groupExpanded:"GroupCellRenderer",setFilterGroupClosed:"SetFilter",setFilterGroupOpen:"SetFilter",setFilterGroupIndeterminate:"SetFilter",setFilterLoading:"SetFilter",close:"EnterpriseCore",check:"MenuItem",colorPicker:"CommunityCore",groupLoading:"LoadingCellRenderer",menuAlt:"ColumnHeaderComp",menuPin:"MenuCore",menuValue:"MenuCore",menuAddRowGroup:["MenuCore","ColumnsToolPanel"],menuRemoveRowGroup:["MenuCore","ColumnsToolPanel"],clipboardCopy:"MenuCore",clipboardCut:"MenuCore",clipboardPaste:"MenuCore",pivotPanel:["ColumnsToolPanel","RowGroupingPanel"],rowGroupPanel:["ColumnsToolPanel","RowGroupingPanel"],valuePanel:"ColumnsToolPanel",columnDrag:"EnterpriseCore",rowDrag:["RowDrag","DragAndDrop"],csvExport:"MenuCore",excelExport:"MenuCore",smallDown:"CommunityCore",selectOpen:"CommunityCore",richSelectOpen:"RichSelect",richSelectRemove:"RichSelect",smallLeft:"CommunityCore",smallRight:"CommunityCore",subMenuOpen:"MenuItem",subMenuOpenRtl:"MenuItem",panelDelimiter:"RowGroupingPanel",panelDelimiterRtl:"RowGroupingPanel",smallUp:"CommunityCore",sortAscending:["MenuCore","Sort"],sortDescending:["MenuCore","Sort"],sortUnSort:["MenuCore","Sort"],advancedFilterBuilder:"AdvancedFilter",advancedFilterBuilderDrag:"AdvancedFilter",advancedFilterBuilderInvalid:"AdvancedFilter",advancedFilterBuilderMoveUp:"AdvancedFilter",advancedFilterBuilderMoveDown:"AdvancedFilter",advancedFilterBuilderAdd:"AdvancedFilter",advancedFilterBuilderRemove:"AdvancedFilter",advancedFilterBuilderSelectOpen:"AdvancedFilter",chartsMenu:"IntegratedCharts",chartsMenuEdit:"IntegratedCharts",chartsMenuAdvancedSettings:"IntegratedCharts",chartsMenuAdd:"IntegratedCharts",chartsColorPicker:"IntegratedCharts",chartsThemePrevious:"IntegratedCharts",chartsThemeNext:"IntegratedCharts",chartsDownload:"IntegratedCharts",checkboxChecked:"CommunityCore",checkboxIndeterminate:"CommunityCore",checkboxUnchecked:"CommunityCore",radioButtonOn:"CommunityCore",radioButtonOff:"CommunityCore"},E0=new Set(["colorPicker","smallUp","checkboxChecked","checkboxIndeterminate","checkboxUnchecked","radioButtonOn","radioButtonOff","smallDown","smallLeft","smallRight"]),A0={pinSubMenu:"PinnedColumn",pinLeft:"PinnedColumn",pinRight:"PinnedColumn",clearPinned:"PinnedColumn",valueAggSubMenu:"SharedAggregation",autoSizeThis:"ColumnAutoSize",autoSizeAll:"ColumnAutoSize",rowGroup:"SharedRowGrouping",rowUnGroup:"SharedRowGrouping",resetColumns:"CommunityCore",expandAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],contractAll:["ClientSideRowModelHierarchy","ServerSideRowModel"],copy:"Clipboard",copyWithHeaders:"Clipboard",copyWithGroupHeaders:"Clipboard",cut:"Clipboard",paste:"Clipboard",export:["CsvExport","ExcelExport"],csvExport:"CsvExport",excelExport:"ExcelExport",separator:"CommunityCore",pivotChart:"IntegratedCharts",chartRange:"IntegratedCharts",columnFilter:"ColumnFilter",columnChooser:"ColumnMenu",sortAscending:"Sort",sortDescending:"Sort",sortUnSort:"Sort"},T0=class extends E{constructor(){super(...arguments),this.beanName="validation"}wireBeans(e){this.gridOptions=e.gridOptions,xp(this)}postConstruct(){this.processGridOptions(this.gridOptions)}warnOnInitialPropertyUpdate(e,t){e==="api"&&l0[t]&&_(22,{key:t})}processGridOptions(e){this.processOptions(e,k0())}validateApiFunction(e,t){return u0(e,t,this.beans)}missingUserComponent(e,t,o,i){const r=Si[t];r?this.gos.assertModuleRegistered(r,`AG Grid '${e}' component: ${t}`):_(101,{propertyName:e,componentName:t,agGridDefaults:o,jsComps:i})}checkRowEvents(e){L0.has(e)&&_(10,{eventType:e})}validateIcon(e){if(E0.has(e)&&_(43,{iconName:e}),M0[e])return;const t=P0[e];if(t){ce(200,{reasonOrId:`icon '${e}'`,moduleName:t,gridScoped:Un(),gridId:this.beans.context.getGridId(),rowModelType:this.gos.get("rowModelType"),additionalText:"Alternatively, use the CSS icon name directly."});return}_(134,{iconName:e})}validateMenuItem(e){const t=A0[e];t&&this.gos.assertModuleRegistered(t,`menu item '${e}'`)}isProvidedUserComp(e){return!!Si[e]}validateColDef(e,t,o){(o||!this.beans.dataTypeSvc?.isColPendingInference(t))&&this.processOptions(e,Tu())}processOptions(e,t){const{validations:o,deprecations:i,allProperties:r,propertyExceptions:s,objectName:n,docsUrl:a}=t;r&&this.gridOptions.suppressPropertyNamesCheck!==!0&&this.checkProperties(e,[...s??[],...Object.keys(i)],r,n,a);const l=new Set,d=u=>{const g=o[u];if(g)if(typeof g=="function"){const p=g(e,this.gridOptions,this.beans);if(!p)return;if("objectName"in p){const f=e[u];if(Array.isArray(f)){f.forEach(m=>{this.processOptions(m,p)});return}this.processOptions(e[u],p);return}return p}else return g;else return};Object.keys(e).forEach(u=>{const g=i[u];if(g){const{message:x,version:M}=g;l.add(`As of v${M}, ${String(u)} is deprecated. ${x??""}`)}const p=e[u];if(p==null||p===!1)return;const f=d(u);if(!f)return;const{module:m,dependencies:C,validate:w,supportedRowModels:y,expectedType:b}=f;if(b){const x=typeof p;if(x!==b){l.add(`${String(u)} should be of type '${b}' but received '${x}' (${p}).`);return}}if(y){const x=this.gridOptions.rowModelType??"clientSide";if(!y.includes(x)){l.add(`${String(u)} is not supported with the '${x}' row model. It is only valid with: ${y.join(", ")}.`);return}}if(m){const x=Array.isArray(m)?m:[m];let M=!0;if(x.forEach(P=>{this.gos.assertModuleRegistered(P,String(u))||(M=!1)}),!M)return}if(C){const x=this.checkForRequiredDependencies(u,C,e);if(x){l.add(x);return}}if(w){const x=w(e,this.gridOptions,this.beans);if(x){l.add(x);return}}}),l.size>0&&l.forEach(u=>{Hi(u)})}checkForRequiredDependencies(e,t,o){const r=Object.entries(t).filter(([s,n])=>{const a=o[s];return!n.required.includes(a)});return r.length===0?null:r.map(([s,n])=>`'${String(e)}' requires '${s}' to be one of [${n.required.map(a=>a===null?"null":a===void 0?"undefined":a).join(", ")}]. ${n.reason??""}`).join(`
58
+ `)}checkProperties(e,t,o,i,r){const s=["__ob__","__v_skip","__metadata__"],n=I0(Object.getOwnPropertyNames(e),[...s,...t,...o],o),a=Object.keys(n);for(const l of a){const d=n[l];let c=`invalid ${i} property '${l}' did you mean any of these: ${d.slice(0,8).join(", ")}.`;o.includes("context")&&(c+=`
59
+ If you are trying to annotate ${i} with application data, use the '${i}.context' property instead.`),Hi(c)}if(a.length>0&&r){const l=this.beans.frameworkOverrides.getDocLink(r);Hi(`to see all the valid ${i} properties please check: ${l}`)}}getConsoleMessage(e,t){return w0(e,t)}};function I0(e,t,o){const i={},r=e.filter(s=>!t.some(n=>n===s));return r.length>0&&r.forEach(s=>i[s]=Mu({inputValue:s,allSuggestions:o}).values),i}var L0=new Set(["firstChildChanged","lastChildChanged","childIndexChanged"]),G0={moduleName:"Validation",version:ae,beans:[T0]};function Iu(e){e.sibling&&(e.sibling.childrenAfterFilter=e.childrenAfterFilter)}var B0=class extends E{constructor(){super(...arguments),this.beanName="filterStage",this.refreshProps=new Set(["excludeChildrenWhenTreeDataFiltering"]),this.step="filter"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const{changedPath:t}=e;this.filter(t)}filter(e){const t=!!this.filterManager?.isChildFilterPresent();this.filterNodes(t,e)}filterNodes(e,t){const o=(i,r)=>{i.hasChildren()&&e&&!r?i.childrenAfterFilter=i.childrenAfterGroup.filter(s=>{const n=s.childrenAfterFilter&&s.childrenAfterFilter.length>0,a=s.data&&this.filterManager.doesRowPassFilter({rowNode:s});return n||a}):i.childrenAfterFilter=i.childrenAfterGroup,Iu(i)};if(this.doingTreeDataFiltering()){const i=(s,n)=>{if(s.childrenAfterGroup)for(let a=0;a<s.childrenAfterGroup.length;a++){const l=s.childrenAfterGroup[a],d=n||this.filterManager.doesRowPassFilter({rowNode:l});l.childrenAfterGroup?i(s.childrenAfterGroup[a],d):o(l,d)}o(s,n)},r=s=>i(s,!1);t.executeFromRootNode(r)}else{const i=r=>o(r,!1);t.forEachChangedNodeDepthFirst(i,!0)}}doingTreeDataFiltering(){return this.gos.get("treeData")&&!this.gos.get("excludeChildrenWhenTreeDataFiltering")}},O0=class extends da{constructor(){super(...arguments),this.iconCreated=!1}setComp(e,t,o,i,r){this.comp=e;const s=Yi(this,this.beans.context,r);this.eButtonShowMainFilter=o,this.eFloatingFilterBody=i,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),s.addManagedListeners(this.column,{colDefChanged:()=>this.onColDefChanged(s)}),s.addDestroyFunc(()=>{this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.clearComponent()})}resizeHeader(){}moveHeader(){}getHeaderClassParams(){const{column:e,beans:t}=this,o=e.colDef;return Z(t.gos,{colDef:o,column:e,floatingFilter:!0})}setupActive(){const e=this.column.getColDef(),t=!!e.filter,o=!!e.floatingFilter;this.active=t&&o}setupUi(){if(this.comp.setButtonWrapperDisplayed(!this.suppressFilterButton&&this.active),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-full-body",this.suppressFilterButton),this.comp.addOrRemoveBodyCssClass("ag-floating-filter-body",!this.suppressFilterButton),!this.active||this.iconCreated)return;const e=te("filter",this.beans,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}setupFocus(e){e.createManagedBean(new gi(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))}setupAria(){const e=this.getLocaleTextFunc();dt(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))}onTabKeyDown(e){const{beans:t}=this;if(Ee(t)===this.eGui)return;const r=Ut(t,this.eGui,null,e.shiftKey);if(r){t.headerNavigation?.scrollToColumn(this.column),e.preventDefault(),r.focus();return}const s=this.findNextColumnWithFloatingFilter(e.shiftKey);s&&t.focusSvc.focusHeaderPosition({headerPosition:{headerRowIndex:this.rowCtrl.rowIndex,column:s},event:e})&&e.preventDefault()}findNextColumnWithFloatingFilter(e){const t=this.beans.visibleCols;let o=this.column;do if(o=e?t.getColBefore(o):t.getColAfter(o),!o)break;while(!o.getColDef().filter||!o.getColDef().floatingFilter);return o}handleKeyDown(e){super.handleKeyDown(e);const t=this.getWrapperHasFocus();switch(e.key){case D.UP:case D.DOWN:t||e.preventDefault();case D.LEFT:case D.RIGHT:if(t)return;e.stopPropagation();case D.ENTER:t&&Lt(this.eGui)&&e.preventDefault();break;case D.ESCAPE:t||this.eGui.focus()}}onFocusIn(e){if(this.eGui.contains(e.relatedTarget))return;const o=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),i=!!e.relatedTarget&&Io(e.relatedTarget,"ag-floating-filter");if(o&&i&&e.target===this.eGui){const r=this.lastFocusEvent,s=!!(r&&r.key===D.TAB);if(r&&s){const n=r.shiftKey;Lt(this.eGui,n)}}this.focusThis()}setupHover(e){this.beans.colHover?.addHeaderFilterColumnHoverListener(e,this.comp,this.column,this.eGui)}setupLeft(e){const t=new la(this.column,this.eGui,this.beans);e.createManagedBean(t)}setupFilterButton(){this.suppressFilterButton=!this.beans.menuSvc?.isFloatingFilterButtonEnabled(this.column),this.highlightFilterButtonWhenActive=!We(this.gos)}setupUserComp(){if(!this.active)return;const e=this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter());e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setCompDetails(e)}showParentFilter(){const 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;const{filterManager:t}=this.beans,o=i=>{if(i?.source==="filterDestroyed"&&!this.isAlive())return;const r=this.comp.getFloatingFilterComp();r&&r.then(s=>{if(s){const n=t?.getCurrentFloatingFilterParentModel(this.column),a=i?{...i,columns:i.columns??[],source:i.source==="api"?"api":"columnFilter"}:null;s.onParentModelChanged(n,a)}})};[this.destroySyncListener]=e.addManagedListeners(this.column,{filterChanged:o}),t?.isFilterActive(this.column)&&o(null)}setupWidth(e){const t=()=>{const o=`${this.column.getActualWidth()}px`;this.comp.setWidth(o)};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){const 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){const t=this.active;this.setupActive();const o=!t&&this.active;t&&!this.active&&(this.destroySyncListener(),this.destroyFilterChangedListener());const i=this.active?this.beans.filterManager?.getFloatingFilterCompDetails(this.column,()=>this.showParentFilter()):null,r=this.comp.getFloatingFilterComp();!r||!i?this.updateCompDetails(e,i,o):r.then(s=>{!s||this.beans.filterManager?.areFilterCompsDifferent(this.userCompDetails??null,i)?this.updateCompDetails(e,i,o):this.updateFloatingFilterParams(i)})}updateCompDetails(e,t,o){this.isAlive()&&(this.setCompDetails(t),this.setupFilterButton(),this.setupUi(),o&&(this.setupSyncWithFilter(e),this.setupFilterChangedListener(e)))}updateFloatingFilterParams(e){if(!e)return;const t=e.params;this.comp.getFloatingFilterComp()?.then(o=>{o?.refresh&&typeof o.refresh=="function"&&o.refresh(t)})}addResizeAndMoveKeyboardListeners(){}destroy(){super.destroy(),this.destroySyncListener=null,this.destroyFilterChangedListener=null}};function N0(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showColumnMenu({column:o,positionBy:"auto"})}function H0(e){e.menuSvc?.hidePopupMenu()}var Lu={moduleName:"SharedMenu",version:ae,beans:[jC],apiFunctions:{showColumnMenu:N0,hidePopupMenu:H0}},V0=0,_0=200,z0=class extends E{constructor(){super(...arguments),this.beanName="popupSvc",this.popupList=[]}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridCtrl=e.gridCtrl}),this.addManagedEventListeners({gridStylesChanged:this.handleThemeChange.bind(this)})}getPopupParent(){const e=this.gos.get("popupParent");return e||this.gridCtrl.getGui()}positionPopupForMenu(e){const{eventSource:t,ePopup:o,column:i,node:r,event:s}=e,n=t.getBoundingClientRect(),a=this.getParentRect();this.setAlignedTo(t,o);let l=!1;const d=()=>{const c=this.keepXYWithinBounds(o,n.top-a.top,0),u=o.clientWidth>0?o.clientWidth:200;l||(o.style.minWidth=`${u}px`,l=!0);const p=a.right-a.left-u;let f;return this.gos.get("enableRtl")?(f=C(),f<0&&(f=m(),this.setAlignedStyles(o,"left")),f>p&&(f=0,this.setAlignedStyles(o,"right"))):(f=m(),f>p&&(f=C(),this.setAlignedStyles(o,"right")),f<0&&(f=0,this.setAlignedStyles(o,"left"))),{x:f,y:c};function m(){return n.right-a.left-2}function C(){return n.left-a.left-u}};this.positionPopup({ePopup:o,keepWithinBounds:!0,updatePosition:d,postProcessCallback:()=>this.callPostProcessPopup("subMenu",o,t,s instanceof MouseEvent?s:void 0,i,r)})}positionPopupUnderMouseEvent(e){const{ePopup:t,nudgeX:o,nudgeY:i,skipObserver:r}=e;this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:!0,skipObserver:r,updatePosition:()=>this.calculatePointerAlign(e.mouseEvent),postProcessCallback:()=>this.callPostProcessPopup(e.type,e.ePopup,null,e.mouseEvent,e.column,e.rowNode)})}calculatePointerAlign(e){const t=this.getParentRect();return{x:e.clientX-t.left,y:e.clientY-t.top}}positionPopupByComponent(e){const{ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,eventSource:s,alignSide:n="left",position:a="over",column:l,rowNode:d,type:c}=e,u=s.getBoundingClientRect(),g=this.getParentRect();this.setAlignedTo(s,t);const p=()=>{let f=u.left-g.left;n==="right"&&(f-=t.offsetWidth-u.width);let m;return a==="over"?(m=u.top-g.top,this.setAlignedStyles(t,"over")):(this.setAlignedStyles(t,"under"),this.shouldRenderUnderOrAbove(t,u,g,e.nudgeY||0)==="under"?m=u.top-g.top+u.height:m=u.top-t.offsetHeight-(i||0)*2-g.top),{x:f,y:m}};this.positionPopup({ePopup:t,nudgeX:o,nudgeY:i,keepWithinBounds:r,updatePosition:p,postProcessCallback:()=>this.callPostProcessPopup(c,t,s,null,l,d)})}shouldRenderUnderOrAbove(e,t,o,i){const r=o.bottom-t.bottom,s=t.top-o.top,n=e.offsetHeight+i;return r>n?"under":s>n||s>r?"above":"under"}setAlignedStyles(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o],{alignedToElement:r}=i;!r||(["right","left","over","above","under"].forEach(n=>{r.classList.remove(`ag-has-popup-positioned-${n}`),e.classList.remove(`ag-popup-positioned-${n}`)}),!t)||(r.classList.add(`ag-has-popup-positioned-${t}`),e.classList.add(`ag-popup-positioned-${t}`))}setAlignedTo(e,t){const o=this.getPopupIndex(t);if(o!==-1){const i=this.popupList[o];i.alignedToElement=e}}callPostProcessPopup(e,t,o,i,r,s){const n=this.gos.getCallback("postProcessPopup");n&&n({column:r,rowNode:s,ePopup:t,type:e,eventSource:o,mouseEvent:i})}positionPopup(e){const{ePopup:t,keepWithinBounds:o,nudgeX:i,nudgeY:r,skipObserver:s,updatePosition:n}=e,a={width:0,height:0},l=(d=!1)=>{let{x:c,y:u}=n();d&&t.clientWidth===a.width&&t.clientHeight===a.height||(a.width=t.clientWidth,a.height=t.clientHeight,i&&(c+=i),r&&(u+=r),o&&(c=this.keepXYWithinBounds(t,c,1),u=this.keepXYWithinBounds(t,u,0)),t.style.left=`${c}px`,t.style.top=`${u}px`,e.postProcessCallback&&e.postProcessCallback())};if(l(),!s){const d=mo(this.beans,t,()=>l(!0));setTimeout(()=>d(),_0)}}getActivePopups(){return this.popupList.map(e=>e.element)}getParentRect(){const e=Te(this.beans);let t=this.getPopupParent();return t===e.body?t=e.documentElement:getComputedStyle(t).position==="static"&&(t=t.offsetParent),Yl(t)}keepXYWithinBounds(e,t,o){const i=o===0,r=i?"clientHeight":"clientWidth",s=i?"top":"left",n=i?"height":"width",a=i?"scrollTop":"scrollLeft",l=Te(this.beans),d=l.documentElement,c=this.getPopupParent(),u=e.getBoundingClientRect(),g=c.getBoundingClientRect(),p=l.documentElement.getBoundingClientRect(),f=c===l.body,m=Math.ceil(u[n]);let w=f?(i?Kl:Ar)(d)+d[a]:c[r];f&&(w-=Math.abs(p[s]-g[s]));const y=w-m;return Math.min(Math.max(t,0),Math.abs(y))}addPopup(e){const t=Te(this.beans),{eChild:o,ariaLabel:i,alwaysOnTop:r,positionCallback:s,anchorToElement:n}=e;if(!t)return _(122),{hideFunc:()=>{}};const a=this.getPopupIndex(o);if(a!==-1)return{hideFunc:this.popupList[a].hideFunc};this.initialisePopupPosition(o);const l=this.createPopupWrapper(o,i,!!r),d=this.addEventListenersToPopup({...e,wrapperEl:l});return s&&s(),this.addPopupToPopupList(o,l,d,n),{hideFunc:d}}initialisePopupPosition(e){const o=this.getPopupParent().getBoundingClientRect();q(e.style.top)||(e.style.top=`${o.top*-1}px`),q(e.style.left)||(e.style.left=`${o.left*-1}px`)}createPopupWrapper(e,t,o){const i=this.getPopupParent(),{environment:r,gos:s}=this.beans,n=Pe({tag:"div"});return r.applyThemeClasses(n),n.classList.add("ag-popup"),e.classList.add(s.get("enableRtl")?"ag-rtl":"ag-ltr","ag-popup-child"),e.hasAttribute("role")||Xe(e,"dialog"),dt(e,t),n.appendChild(e),i.appendChild(n),o?this.setAlwaysOnTop(e,!0):this.bringPopupToFront(e),n}handleThemeChange(e){if(e.themeChanged){const t=this.beans.environment;for(const o of this.popupList)t.applyThemeClasses(o.wrapper)}}addEventListenersToPopup(e){const t=this.beans,o=Te(t),i=this.getPopupParent(),{wrapperEl:r,eChild:s,closedCallback:n,afterGuiAttached:a,closeOnEsc:l,modal:d}=e;let c=!1;const u=m=>{if(!r.contains(Ee(t)))return;m.key===D.ESCAPE&&!Tt(m)&&f({keyboardEvent:m})},g=m=>f({mouseEvent:m}),p=m=>f({touchEvent:m}),f=(m={})=>{const{mouseEvent:C,touchEvent:w,keyboardEvent:y,forceHide:b}=m;!b&&(this.isEventFromCurrentPopup({mouseEvent:C,touchEvent:w},s)||c)||(c=!0,i.removeChild(r),o.removeEventListener("keydown",u),o.removeEventListener("mousedown",g),o.removeEventListener("touchstart",p),o.removeEventListener("contextmenu",g),this.eventSvc.removeEventListener("dragStarted",g),n&&n(C||w||y),this.removePopupFromPopupList(s))};return a&&a({hidePopup:f}),window.setTimeout(()=>{l&&o.addEventListener("keydown",u),d&&(o.addEventListener("mousedown",g),this.eventSvc.addEventListener("dragStarted",g),o.addEventListener("touchstart",p),o.addEventListener("contextmenu",g))},0),f}addPopupToPopupList(e,t,o,i){this.popupList.push({element:e,wrapper:t,hideFunc:o,instanceId:V0++,isAnchored:!!i}),i&&this.setPopupPositionRelatedToElement(e,i)}getPopupIndex(e){return this.popupList.findIndex(t=>t.element===e)}setPopupPositionRelatedToElement(e,t){const o=this.getPopupIndex(e);if(o===-1)return;const i=this.popupList[o];if(i.stopAnchoringPromise&&i.stopAnchoringPromise.then(s=>s&&s()),i.stopAnchoringPromise=void 0,i.isAnchored=!1,!t)return;const r=this.keepPopupPositionedRelativeTo({element:t,ePopup:e,hidePopup:i.hideFunc});return i.stopAnchoringPromise=r,i.isAnchored=!0,r}removePopupFromPopupList(e){this.setAlignedStyles(e,null),this.setPopupPositionRelatedToElement(e,null),this.popupList=this.popupList.filter(t=>t.element!==e)}keepPopupPositionedRelativeTo(e){const t=this.getPopupParent(),o=t.getBoundingClientRect(),{element:i,ePopup:r}=e,s=i.getBoundingClientRect(),n=u=>parseInt(u.substring(0,u.length-1),10),a=(u,g)=>{const p=o[u]-s[u],f=n(r.style[u]);return{initialDiff:p,lastDiff:p,initial:f,last:f,direction:g}},l=a("top",0),d=a("left",1),c=this.beans.frameworkOverrides;return new ke(u=>{c.wrapIncoming(()=>{c.setInterval(()=>{const g=t.getBoundingClientRect(),p=i.getBoundingClientRect();if(p.top==0&&p.left==0&&p.height==0&&p.width==0){e.hidePopup();return}const m=(C,w)=>{const y=n(r.style[w]);C.last!==y&&(C.initial=y,C.last=y);const b=g[w]-p[w];if(b!=C.lastDiff){const x=this.keepXYWithinBounds(r,C.initial+C.initialDiff-b,C.direction);r.style[w]=`${x}px`,C.last=x}C.lastDiff=b};m(l,"top"),m(d,"left")},200).then(g=>{u(()=>{g!=null&&window.clearInterval(g)})})},"popupPositioning")})}hasAnchoredPopup(){return this.popupList.some(e=>e.isAnchored)}isEventFromCurrentPopup(e,t){const{mouseEvent:o,touchEvent:i}=e,r=o||i;if(!r)return!1;const s=this.getPopupIndex(t);if(s===-1)return!1;for(let n=s;n<this.popupList.length;n++){const a=this.popupList[n];if(Hn(a.element,r))return!0}return this.isElementWithinCustomPopup(r.target)}isElementWithinCustomPopup(e){const t=Te(this.beans);for(;e&&e!==t.body;){if(e.classList.contains("ag-custom-component-popup")||e.parentElement===null)return!0;e=e.parentElement}return!1}getWrapper(e){for(;!e.classList.contains("ag-popup")&&e.parentElement;)e=e.parentElement;return e.classList.contains("ag-popup")?e:null}setAlwaysOnTop(e,t){const o=this.getWrapper(e);o&&(o.classList.toggle("ag-always-on-top",!!t),t&&this.bringPopupToFront(o))}bringPopupToFront(e){const t=this.getPopupParent(),o=Array.prototype.slice.call(t.querySelectorAll(".ag-popup")),i=o.length,r=this.getWrapper(e);if(!r||i<=1||!t.contains(e))return;const s=[],n=[];for(const g of o)g!==r&&(g.classList.contains("ag-always-on-top")?n.push(g):s.push(g));const a=[],l=n.length,u=r.classList.contains("ag-always-on-top")||!l?[...s,...n,r]:[...s,r,...n];for(let g=0;g<=i;g++){const p=u[g];if(o[g]===u[g]||p===r)continue;p.querySelectorAll("div").forEach(m=>{m.scrollTop!==0&&a.push([m,m.scrollTop])}),g===0?t.insertAdjacentElement("afterbegin",p):u[g-1].insertAdjacentElement("afterend",p)}for(;a.length;){const g=a.pop();g[0].scrollTop=g[1]}}},ys={moduleName:"Popup",version:ae,beans:[z0]},W0=".ag-set-filter{--ag-indentation-level:0}.ag-set-filter-item{align-items:center;display:flex;height:100%}:where(.ag-ltr) .ag-set-filter-item{padding-left:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}:where(.ag-rtl) .ag-set-filter-item{padding-right:calc(var(--ag-widget-container-horizontal-padding) + var(--ag-indentation-level)*var(--ag-set-filter-indent-size))}.ag-set-filter-item-checkbox{display:flex;height:100%;width:100%}.ag-set-filter-group-icons{display:block;>*{cursor:pointer}}:where(.ag-ltr) .ag-set-filter-group-icons{margin-right:var(--ag-widget-container-horizontal-padding)}:where(.ag-rtl) .ag-set-filter-group-icons{margin-left:var(--ag-widget-container-horizontal-padding)}.ag-filter-body-wrapper{display:flex;flex-direction:column}:where(.ag-menu:not(.ag-tabs) .ag-filter) .ag-filter-body-wrapper,:where(.ag-menu:not(.ag-tabs) .ag-filter)>:not(.ag-filter-wrapper){min-width:180px}.ag-filter-filter{flex:1 1 0px}.ag-filter-condition{display:flex;justify-content:center}.ag-floating-filter-body{display:flex;flex:1 1 auto;height:100%;position:relative}.ag-floating-filter-full-body{align-items:center;display:flex;flex:1 1 auto;height:100%;overflow:hidden;width:100%}:where(.ag-floating-filter-full-body)>div{flex:1 1 auto}.ag-floating-filter-input{align-items:center;display:flex;width:100%;>*{flex:1 1 auto}:where(.ag-input-field-input[type=date]){width:1px}}.ag-floating-filter-button{display:flex;flex:none}.ag-date-floating-filter-wrapper{display:flex}.ag-set-floating-filter-input [disabled]{pointer-events:none}.ag-floating-filter-button-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:var(--ag-icon-size);width:var(--ag-icon-size)}.ag-filter-loading{align-items:unset;background-color:var(--ag-chrome-background-color);height:100%;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);position:absolute;width:100%;z-index:1;:where(.ag-menu) &{background-color:var(--ag-menu-background-color)}}.ag-filter-separator{border-top:1px solid var(--menu-separator-color)}:where(.ag-filter-select) .ag-picker-field-wrapper{width:0}.ag-filter-condition-operator{height:17px}:where(.ag-ltr) .ag-filter-condition-operator-or{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-condition-operator-or{margin-right:calc(var(--ag-spacing)*2)}.ag-set-filter-select-all{padding-top:var(--ag-widget-container-vertical-padding)}.ag-filter-no-matches,.ag-set-filter-list{height:calc(var(--ag-list-item-height)*6)}.ag-filter-no-matches{padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}.ag-set-filter-tree-list{height:calc(var(--ag-list-item-height)*10)}.ag-set-filter-filter{margin-left:var(--ag-widget-container-horizontal-padding);margin-right:var(--ag-widget-container-horizontal-padding);margin-top:var(--ag-widget-container-vertical-padding)}.ag-filter-to{margin-top:var(--ag-widget-vertical-spacing)}.ag-mini-filter{margin:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}:where(.ag-ltr) .ag-set-filter-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-rtl) .ag-set-filter-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-widget-container-horizontal-padding))}:where(.ag-filter-menu) .ag-set-filter-list{min-width:200px}.ag-filter-virtual-list-item:focus-visible{box-shadow:inset var(--ag-focus-shadow)}.ag-filter-apply-panel{display:flex;justify-content:flex-end;overflow:hidden;padding:var(--ag-widget-vertical-spacing) var(--ag-widget-container-horizontal-padding) var(--ag-widget-container-vertical-padding)}.ag-filter-apply-panel-button{line-height:1.5}:where(.ag-ltr) .ag-filter-apply-panel-button{margin-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-filter-apply-panel-button{margin-right:calc(var(--ag-spacing)*2)}.ag-simple-filter-body-wrapper{display:flex;flex-direction:column;min-height:calc(var(--ag-list-item-height) + var(--ag-widget-container-vertical-padding) + var(--ag-widget-vertical-spacing));overflow-y:auto;padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);padding-bottom:calc(var(--ag-widget-container-vertical-padding) - var(--ag-widget-vertical-spacing));&>*{margin-bottom:var(--ag-widget-vertical-spacing)}:where(.ag-resizer-wrapper){margin:0}}.ag-multi-filter-menu-item{margin:var(--ag-spacing) 0}.ag-multi-filter-group-title-bar{background-color:transparent;color:var(--ag-header-text-color);font-weight:500;padding:calc(var(--ag-spacing)*1.5) var(--ag-spacing)}.ag-group-filter-field-select-wrapper{display:flex;flex-direction:column;gap:var(--ag-widget-vertical-spacing);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding)}";function $0(e){const t=e.filterManager;return!!t?.isColumnFilterPresent()||!!t?.isAggregateFilterPresent()}function U0(e,t){return e.filterManager?.getColumnFilterInstance(t)??Promise.resolve(void 0)}function j0(e,t){const o=e.colModel.getColDefCol(t);if(o)return e.filterManager?.destroyFilter(o,"api")}function K0(e,t){e.frameworkOverrides.wrapIncoming(()=>e.filterManager?.setFilterModel(t))}function Y0(e){return e.filterManager?.getFilterModel()??{}}function q0(e,t){return e.filterManager?.getColumnFilterModel(t)??null}function X0(e,t,o){return e.filterManager?.setColumnFilterModel(t,o)??Promise.resolve()}function Q0(e,t){const o=e.colModel.getCol(t);if(!o){ce(12,{colKey:t});return}e.menuSvc?.showFilterMenu({column:o,containerType:"columnFilter",positionBy:"auto"})}var Gu={january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},Bu=["january","february","march","april","may","june","july","august","september","october","november","december"];function Z0(e,t){return e==null?-1:t==null?1:parseFloat(e)-parseFloat(t)}var J0=class extends E{constructor(){super(...arguments),this.beanName="colFilter",this.allColumnFilters=new Map,this.allColumnListeners=new Map,this.activeAggregateFilters=[],this.activeColumnFilters=[],this.processingFilterChange=!1,this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue=[]}postConstruct(){this.addManagedEventListeners({gridColumnsChanged:this.onColumnsChanged.bind(this),beforeRefreshModel:({params:e})=>{(e.rowDataUpdated||e.changedProps?.has("treeData"))&&this.onNewRowsLoaded("rowDataUpdated")},dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.initialFilterModel={...this.gos.get("initialState")?.filter?.filterModel??{}}}setFilterModel(e,t="api"){const{colModel:o,dataTypeSvc:i,filterManager:r}=this.beans;if(i?.isPendingInference){this.filterModelUpdateQueue.push({model:e,source:t});return}const s=[],n=this.getFilterModel(!0);if(e){const a=new Set(Object.keys(e));this.allColumnFilters.forEach((l,d)=>{const c=e[d];s.push(Ss(l.filterPromise,c)),a.delete(d)}),a.forEach(l=>{const d=o.getColDefCol(l)||o.getCol(l);if(!d){_(62,{colId:l});return}if(!d.isFilterAllowed()){_(63,{colId:l});return}const c=this.getOrCreateFilterWrapper(d);if(!c){_(64,{colId:l});return}s.push(Ss(c.filterPromise,e[l]))})}else this.allColumnFilters.forEach(a=>{s.push(Ss(a.filterPromise,null))});ke.all(s).then(()=>{const a=this.getFilterModel(!0),l=[];this.allColumnFilters.forEach((d,c)=>{const u=n?n[c]:null,g=a?a[c]:null;Oi(u,g)||l.push(d.column)}),l.length>0&&r?.onFilterChanged({columns:l,source:t})})}getFilterModel(e){const t={},{allColumnFilters:o,initialFilterModel:i,beans:{colModel:r}}=this;if(o.forEach((s,n)=>{const a=this.getModelFromFilterWrapper(s);q(a)&&(t[n]=a)}),!e)for(const s of Object.keys(i)){const n=i[s];q(n)&&!o.has(s)&&r.getCol(s)?.isFilterAllowed()&&(t[s]=n)}return t}getModelFromFilterWrapper(e){const{filter:t}=e;return t?typeof t.getModel!="function"?(_(66),null):t.getModel():this.getModelFromInitialState(e.column)}getModelFromInitialState(e){return this.initialFilterModel[e.getColId()]??null}isColumnFilterPresent(){return this.activeColumnFilters.length>0}isAggregateFilterPresent(){return!!this.activeAggregateFilters.length}disableColumnFilters(){this.initialFilterModel={};const{allColumnFilters:e}=this;return e.size?(e.forEach(t=>this.disposeFilterWrapper(t,"advancedFilterEnabled")),!0):!1}doAggregateFiltersPass(e,t){return this.doColumnFiltersPass(e,t,!0)}updateActiveFilters(){const e=a=>a?a.isFilterActive?a.isFilterActive():(_(67),!1):!1,{colModel:t,gos:o}=this.beans,i=!!Vi(o),r=a=>{if(!a.isPrimary())return!0;const d=!t.isPivotActive();return!a.isValueActive()||!d?!1:t.isPivotMode()?!0:i},s=[],n=[];return this.forEachColumnFilter((a,l)=>{e(a)&&(r(l.column)?s.push(a):n.push(a))}).then(()=>{this.activeAggregateFilters=s,this.activeColumnFilters=n})}updateFilterFlagInColumns(e,t){return this.forEachColumnFilter((o,i)=>this.setColFilterActive(i.column,o.isFilterActive(),e,t))}forEachColumnFilter(e){const t=[];return this.allColumnFilters.forEach(o=>{const i=o.filterPromise;i&&t.push(i.then(r=>e(r,o)))}),ke.all(t)}doColumnFiltersPass(e,t,o){const{data:i,aggData:r}=e,s=o?this.activeAggregateFilters:this.activeColumnFilters,n=o?r:i;for(let a=0;a<s.length;a++){const l=s[a];if(!(l==null||l===t)){if(typeof l.doesFilterPass!="function"){ce(91);continue}if(!l.doesFilterPass({node:e,data:n}))return!1}}return!0}callOnFilterChangedOutsideRenderCycle(e){const{rowRenderer:t,filterManager:o}=this.beans,i=()=>{this.isAlive()&&o?.onFilterChanged(e)};t.isRefreshInProgress()?setTimeout(i,0):i()}updateBeforeFilterChanged(e={}){const{filterInstance:t,additionalEventAttributes:o}=e;return this.updateDependentFilters(),this.updateActiveFilters().then(()=>this.updateFilterFlagInColumns("filterChanged",o).then(()=>{this.allColumnFilters.forEach(i=>{i.filterPromise&&i.filterPromise.then(r=>{r&&r!==t&&r.onAnyFilterChanged&&r.onAnyFilterChanged()})}),this.processingFilterChange=!0}))}updateAfterFilterChanged(){this.processingFilterChange=!1}isSuppressFlashingCellsBecauseFiltering(){return!(this.gos.get("allowShowChangeAfterFilter")??!1)&&this.processingFilterChange}onNewRowsLoaded(e){this.forEachColumnFilter(t=>{t.onNewRowsLoaded?.()}).then(()=>this.updateFilterFlagInColumns(e,{afterDataChange:!0})).then(()=>this.updateActiveFilters())}createGetValue(e){const{filterValueSvc:t,colModel:o}=this.beans;return(i,r)=>{const s=r?o.getCol(r):e;return s?t.getValue(s,i):void 0}}isFilterActive(e){const{filter:t}=this.cachedFilter(e)??{};return t?t.isFilterActive():this.getModelFromInitialState(e)!=null}getOrCreateFilterWrapper(e){if(!e.isFilterAllowed())return null;let t=this.cachedFilter(e);return t||(t=this.createFilterWrapper(e),this.setColumnFilterWrapper(e,t)),t}cachedFilter(e){return this.allColumnFilters.get(e.getColId())}getDefaultFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Bn(o))t="agSetColumnFilter";else{const r=i?.getBaseDataType(e);r==="number"?t="agNumberColumnFilter":r==="date"||r==="dateString"?t="agDateColumnFilter":t="agTextColumnFilter"}return t}getDefaultFloatingFilter(e){let t;const{gos:o,dataTypeSvc:i}=this.beans;if(Bn(o))t="agSetColumnFloatingFilter";else{const r=i?.getBaseDataType(e);r==="number"?t="agNumberColumnFloatingFilter":r==="date"||r==="dateString"?t="agDateColumnFloatingFilter":t="agTextColumnFloatingFilter"}return t}createFilterInstance(e,t){const o=this.getDefaultFilter(e),i=e.getColDef();let r;const s={...this.createFilterParams(e,i),filterModifiedCallback:()=>this.filterModifiedCallbackFactory(r,e)(),filterChangedCallback:a=>this.filterChangedCallbackFactory(r,e)(a),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(r,a)??!0},n=Kf(this.beans.userCompFactory,i,s,o);return n?{filterPromise:()=>{const a=n.newAgStackInstance();return a.then(l=>{r=l,t&&(t.filter=l??void 0)}),a},compDetails:n}:{filterPromise:null,compDetails:null}}createFilterParams(e,t){return Z(this.gos,{column:e,colDef:t,rowModel:this.beans.rowModel,filterChangedCallback:()=>{},filterModifiedCallback:()=>{},getValue:this.createGetValue(e),doesRowPassOtherFilter:()=>!0})}createFilterWrapper(e){const t={column:e,filterPromise:null,compDetails:null},{filterPromise:o,compDetails:i}=this.createFilterInstance(e,t);return t.filterPromise=o?.()??null,t.compDetails=i,t}onColumnsChanged(){const e=[],{colModel:t,filterManager:o}=this.beans;this.allColumnFilters.forEach((r,s)=>{let n;r.column.isPrimary()?n=t.getColDefCol(s):n=t.getCol(s),!(n&&n===r.column)&&(e.push(r.column),this.disposeFilterWrapper(r,"columnChanged"),this.disposeColumnListener(s))});const i=e.every(Ou);e.length>0&&!i?o?.onFilterChanged({columns:e,source:"api"}):this.updateDependentFilters()}updateDependentFilters(){this.beans.autoColSvc?.getColumns()?.forEach(e=>{Ou(e)&&this.getOrCreateFilterWrapper(e)})}isFilterAllowed(e){if(!e.isFilterAllowed())return!1;const{filter:o}=this.allColumnFilters.get(e.getColId())??{};return o&&typeof o?.isFilterAllowed=="function"?o.isFilterAllowed():!0}getFloatingFilterCompDetails(e,t){const o=c=>{const u=this.getOrCreateFilterWrapper(e)?.filterPromise;u?.then(g=>{c(jd(g))})},i=e.getColDef(),r={...this.createFilterParams(e,i),filterChangedCallback:()=>o(c=>this.filterChangedCallbackFactory(c,e)())},{userCompFactory:s,frameworkOverrides:n}=this.beans,a=Jf(s,i,r);let l=Ym(n,i,()=>this.getDefaultFloatingFilter(e));l==null&&(l="agReadOnlyFloatingFilter");const d=Z(this.gos,{column:e,filterParams:a,currentParentModel:()=>this.getCurrentFloatingFilterParentModel(e),parentFilterInstance:o,showParentFilter:t});return Qf(s,i,d,l)}getCurrentFloatingFilterParentModel(e){return this.getModelFromFilterWrapper(this.cachedFilter(e)??{column:e})}destroyFilter(e,t="api"){const o=e.getColId(),i=this.allColumnFilters.get(o);this.disposeColumnListener(o),delete this.initialFilterModel[o],i&&this.disposeFilterWrapper(i,t).then(r=>{r&&this.isAlive()&&this.beans.filterManager?.onFilterChanged({columns:[e],source:"api"})})}disposeColumnListener(e){const t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())}disposeFilterWrapper(e,t){return e.filterPromise?.then(o=>{const i=!!o?.isFilterActive();return this.destroyBean(o),this.setColFilterActive(e.column,!1,"filterDestroyed"),this.allColumnFilters.delete(e.column.getColId()),this.eventSvc.dispatchEvent({type:"filterDestroyed",source:t,column:e.column}),i})??ke.resolve(!1)}filterModifiedCallbackFactory(e,t){return()=>{this.eventSvc.dispatchEvent({type:"filterModified",column:t,filterInstance:e})}}filterChangedCallbackFactory(e,t){return o=>{const i=o?.source??"columnFilter",r={filter:e,additionalEventAttributes:o,columns:[t],source:i};this.callOnFilterChangedOutsideRenderCycle(r)}}checkDestroyFilter(e){const t=this.allColumnFilters.get(e);if(!t)return;const o=t.column,{compDetails:i}=o.isFilterAllowed()?this.createFilterInstance(o):{compDetails:null};if(this.areFilterCompsDifferent(t.compDetails,i)){this.destroyFilter(o,"paramsUpdated");return}const r=o.getColDef().filterParams;if(!t.filterPromise){this.destroyFilter(o,"paramsUpdated");return}t.filterPromise.then(s=>{(s?.refresh?s.refresh({...this.createFilterParams(o,o.getColDef()),filterModifiedCallback:this.filterModifiedCallbackFactory(s,o),filterChangedCallback:this.filterChangedCallbackFactory(s,o),doesRowPassOtherFilter:a=>this.beans.filterManager?.doesRowPassOtherFilters(s,a)??!0,...r}):!0)===!1&&this.destroyFilter(o,"paramsUpdated")})}setColumnFilterWrapper(e,t){const o=e.getColId();this.allColumnFilters.set(o,t),this.allColumnListeners.set(o,this.addManagedListeners(e,{colDefChanged:()=>this.checkDestroyFilter(o)})[0])}areFilterCompsDifferent(e,t){if(!t||!e)return!0;const{componentClass:o}=e,{componentClass:i}=t;return!(o===i||o?.render&&i?.render&&o.render===i.render)}hasFloatingFilters(){return this.beans.colModel.getCols().some(t=>t.getColDef().floatingFilter)}getColumnFilterInstance(e){return new Promise(t=>{this.getFilterInstanceImpl(e).then(o=>{t(jd(o))})})}getFilterInstanceImpl(e){const t=this.beans.colModel.getColDefCol(e);return t?this.getOrCreateFilterWrapper(t)?.filterPromise??ke.resolve(null):ke.resolve(void 0)}processFilterModelUpdateQueue(){this.filterModelUpdateQueue.forEach(({model:e,source:t})=>this.setFilterModel(e,t)),this.filterModelUpdateQueue=[],this.columnFilterModelUpdateQueue.forEach(({key:e,model:t,resolve:o})=>{this.setColumnFilterModel(e,t).then(()=>o())}),this.columnFilterModelUpdateQueue=[]}getColumnFilterModel(e){const t=this.getFilterWrapper(e);return t?this.getModelFromFilterWrapper(t):null}setColumnFilterModel(e,t){const{colModel:o,dataTypeSvc:i}=this.beans;if(i?.isPendingInference){let a=()=>{};const l=new Promise(d=>{a=d});return this.columnFilterModelUpdateQueue.push({key:e,model:t,resolve:a}),l}const r=o.getColDefCol(e),s=r?this.getOrCreateFilterWrapper(r):null;return s?(a=>new Promise(l=>{a.then(d=>l(d))}))(Ss(s.filterPromise,t)):Promise.resolve()}getFilterWrapper(e){const t=this.beans.colModel.getColDefCol(e);return t?this.cachedFilter(t)??null:null}setColDefPropertiesForDataType(e,t,o){const i=Bn(this.gos),r=this.getLocaleTextFunc(),s=n=>{const{filterParams:a}=e;e.filterParams=typeof a=="object"?{...a,...n}:n};switch(t.baseDataType){case"number":{i&&s({comparator:Z0});break}case"boolean":{s(i?{valueFormatter:n=>q(n.value)?r(String(n.value),n.value?"True":"False"):r("blanks","(Blanks)")}:{maxNumConditions:1,debounceMs:0,filterOptions:["empty",{displayKey:"true",displayName:"True",predicate:(n,a)=>a,numberOfInputs:0},{displayKey:"false",displayName:"False",predicate:(n,a)=>a===!1,numberOfInputs:0}]});break}case"date":{s(i?{valueFormatter:n=>{const a=o(n);return q(a)?a:r("blanks","(Blanks)")},treeList:!0,treeListFormatter:(n,a)=>{if(n==="NaN")return r("invalidDate","Invalid Date");if(a===1&&n!=null){const l=Bu[Number(n)-1];return r(l,Gu[l])}return n??r("blanks","(Blanks)")}}:{isValidDate:Nu});break}case"dateString":{const n=t.dateParser;s(i?{valueFormatter:a=>{const l=o(a);return q(l)?l:r("blanks","(Blanks)")},treeList:!0,treeListPathGetter:a=>{const l=n(a??void 0);return l?[String(l.getFullYear()),String(l.getMonth()+1),String(l.getDate())]:null},treeListFormatter:(a,l)=>{if(l===1&&a!=null){const d=Bu[Number(a)-1];return r(d,Gu[d])}return a??r("blanks","(Blanks)")}}:{comparator:(a,l)=>{const d=n(l);return l==null||d<a?-1:d>a?1:0},isValidDate:a=>typeof a=="string"&&Nu(n(a))});break}case"object":{i?s({valueFormatter:n=>{const a=o(n);return q(a)?a:r("blanks","(Blanks)")}}):e.filterValueGetter=n=>o({column:n.column,node:n.node,value:this.beans.valueSvc.getValue(n.column,n.node)});break}}}setColFilterActive(e,t,o,i){e.filterActive!==t&&(e.filterActive=t,e.dispatchColEvent("filterActiveChanged",o)),e.dispatchColEvent("filterChanged",o,i)}destroy(){super.destroy(),this.allColumnFilters.forEach(e=>this.disposeFilterWrapper(e,"gridDestroyed")),this.allColumnListeners.clear()}};function Ss(e,t){return e?new ke(o=>{e.then(i=>{typeof i.setModel!="function"&&(_(65),o()),(i.setModel(t)||ke.resolve()).then(()=>o())})}):ke.resolve()}function Ou(e){return e.getColDef().filter==="agGroupColumnFilter"}function Nu(e){return e instanceof Date&&!isNaN(e.getTime())}function eR(e){return!!e.filterManager?.isAnyFilterPresent()}function tR(e,t="api"){e.filterManager?.onFilterChanged({source:t})}var oR=class extends E{constructor(){super(...arguments),this.beanName="filterManager",this.advFilterModelUpdateQueue=[]}wireBeans(e){this.quickFilter=e.quickFilter,this.advancedFilter=e.advancedFilter,this.colFilter=e.colFilter}postConstruct(){const e=this.refreshFiltersForAggregations.bind(this),t=this.updateAdvFilterColumns.bind(this);this.addManagedEventListeners({columnValueChanged:e,columnPivotChanged:e,columnPivotModeChanged:e,newColumnsLoaded:t,columnVisible:t,advancedFilterEnabledChanged:({enabled:i})=>this.onAdvFilterEnabledChanged(i),dataTypesInferred:this.processFilterModelUpdateQueue.bind(this)}),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],()=>{this.onFilterChanged({source:"api"})}),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",()=>{this.updateAggFiltering(),this.onFilterChanged()}),this.quickFilter&&this.addManagedListeners(this.quickFilter,{quickFilterChanged:()=>this.onFilterChanged({source:"quickFilter"})});const{gos:o}=this;this.alwaysPassFilter=o.get("alwaysPassFilter"),this.addManagedPropertyListener("alwaysPassFilter",()=>{this.alwaysPassFilter=o.get("alwaysPassFilter"),this.onFilterChanged({source:"api"})})}isExternalFilterPresentCallback(){const e=this.gos.getCallback("isExternalFilterPresent");return typeof e=="function"&&e({})}doesExternalFilterPass(e){const t=this.gos.get("doesExternalFilterPass");return typeof t=="function"&&t(e)}setFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){this.warnAdvFilters();return}this.colFilter?.setFilterModel(e,t)}getFilterModel(){return this.colFilter?.getFilterModel()??{}}isColumnFilterPresent(){return!!this.colFilter?.isColumnFilterPresent()}isAggregateFilterPresent(){return!!this.colFilter?.isAggregateFilterPresent()}isChildFilterPresent(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.externalFilterPresent||this.isAdvFilterPresent()}isAnyFilterPresent(){return this.isChildFilterPresent()||this.isAggregateFilterPresent()}isAdvFilterPresent(){return this.isAdvFilterEnabled()&&this.advancedFilter.isFilterPresent()}onAdvFilterEnabledChanged(e){e?this.colFilter?.disableColumnFilters()&&this.onFilterChanged({source:"advancedFilter"}):this.advancedFilter?.isFilterPresent()&&(this.advancedFilter.setModel(null),this.onFilterChanged({source:"advancedFilter"}))}isAdvFilterEnabled(){return!!this.advancedFilter?.isEnabled()}isAdvFilterHeaderActive(){return this.isAdvFilterEnabled()&&this.advancedFilter.isHeaderActive()}refreshFiltersForAggregations(){Vi(this.gos)&&this.onFilterChanged()}onFilterChanged(e={}){const{source:t,additionalEventAttributes:o,columns:i=[]}=e;this.externalFilterPresent=this.isExternalFilterPresentCallback(),(this.colFilter?this.colFilter.updateBeforeFilterChanged(e):ke.resolve()).then(()=>{const r={source:t,type:"filterChanged",columns:i};o&&Ye(r,o),this.eventSvc.dispatchEvent(r),this.colFilter?.updateAfterFilterChanged()})}isSuppressFlashingCellsBecauseFiltering(){return!!this.colFilter?.isSuppressFlashingCellsBecauseFiltering()}isQuickFilterPresent(){return!!this.quickFilter?.isFilterPresent()}updateAggFiltering(){this.aggFiltering=!!Vi(this.gos)}isAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&this.shouldApplyQuickFilterAfterAgg()}isNonAggregateQuickFilterPresent(){return this.isQuickFilterPresent()&&!this.shouldApplyQuickFilterAfterAgg()}shouldApplyQuickFilterAfterAgg(){return(this.aggFiltering||this.beans.colModel.isPivotMode())&&!this.gos.get("applyQuickFilterBeforePivotOrAgg")}doesRowPassOtherFilters(e,t){return this.doesRowPassFilter({rowNode:t,filterInstanceToSkip:e})}doesRowPassAggregateFilters(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.isAggregateFilterPresent()&&!this.colFilter.doAggregateFiltersPass(t,e.filterInstanceToSkip))}doesRowPassFilter(e){const{rowNode:t}=e;return this.alwaysPassFilter?.(t)?!0:!(this.isNonAggregateQuickFilterPresent()&&!this.quickFilter.doesRowPass(t)||this.externalFilterPresent&&!this.doesExternalFilterPass(t)||this.isColumnFilterPresent()&&!this.colFilter.doColumnFiltersPass(t,e.filterInstanceToSkip)||this.isAdvFilterPresent()&&!this.advancedFilter.doesFilterPass(t))}isFilterActive(e){return!!this.colFilter?.isFilterActive(e)}getOrCreateFilterWrapper(e){return this.colFilter?.getOrCreateFilterWrapper(e)??null}getDefaultFloatingFilter(e){return this.colFilter.getDefaultFloatingFilter(e)}createFilterParams(e,t){return this.colFilter.createFilterParams(e,t)}isFilterAllowed(e){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.isFilterAllowed(e)}getFloatingFilterCompDetails(e,t){return this.colFilter?.getFloatingFilterCompDetails(e,t)}getCurrentFloatingFilterParentModel(e){return this.colFilter?.getCurrentFloatingFilterParentModel(e)}destroyFilter(e,t="api"){this.colFilter?.destroyFilter(e,t)}areFilterCompsDifferent(e,t){return!!this.colFilter?.areFilterCompsDifferent(e,t)}getAdvFilterModel(){return this.isAdvFilterEnabled()?this.advancedFilter.getModel():null}setAdvFilterModel(e,t="api"){if(this.isAdvFilterEnabled()){if(this.beans.dataTypeSvc?.isPendingInference){this.advFilterModelUpdateQueue.push(e);return}this.advancedFilter.setModel(e??null),this.onFilterChanged({source:t})}}toggleAdvFilterBuilder(e,t){this.isAdvFilterEnabled()&&this.advancedFilter.getCtrl().toggleFilterBuilder({source:t,force:e})}updateAdvFilterColumns(){this.isAdvFilterEnabled()&&this.advancedFilter.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})}hasFloatingFilters(){return this.isAdvFilterEnabled()?!1:!!this.colFilter?.hasFloatingFilters()}getColumnFilterInstance(e){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve(void 0)):this.colFilter?.getColumnFilterInstance(e)??Promise.resolve(void 0)}warnAdvFilters(){_(68)}setupAdvFilterHeaderComp(e){this.advancedFilter?.getCtrl().setupHeaderComp(e)}getHeaderRowCount(){return this.isAdvFilterHeaderActive()?1:0}getHeaderHeight(){return this.isAdvFilterHeaderActive()?this.advancedFilter.getCtrl().getHeaderHeight():0}processFilterModelUpdateQueue(){this.advFilterModelUpdateQueue.forEach(e=>this.setAdvFilterModel(e)),this.advFilterModelUpdateQueue=[]}getColumnFilterModel(e){return this.colFilter?.getColumnFilterModel(e)}setColumnFilterModel(e,t){return this.isAdvFilterEnabled()?(this.warnAdvFilters(),Promise.resolve()):this.colFilter?.setColumnFilterModel(e,t)??Promise.resolve()}setColDefPropertiesForDataType(e,t,o){this.colFilter?.setColDefPropertiesForDataType(e,t,o)}},iR=class extends E{constructor(){super(...arguments),this.beanName="filterMenuFactory"}wireBeans(e){this.popupSvc=e.popupSvc}hideActiveMenu(){this.hidePopup?.()}showMenuAfterMouseEvent(e,t,o,i){this.showPopup(e,r=>{this.popupSvc?.positionPopupUnderMouseEvent({column:e,type:o,mouseEvent:t,ePopup:r})},o,t.target,We(this.gos),i)}showMenuAfterButtonClick(e,t,o,i){let r=-1,s="left";const n=We(this.gos);!n&&this.gos.get("enableRtl")&&(r=1,s="right");const a=n?void 0:4*r,l=n?void 0:4;this.showPopup(e,d=>{this.popupSvc?.positionPopupByComponent({type:o,eventSource:t,ePopup:d,nudgeX:a,nudgeY:l,alignSide:s,keepWithinBounds:!0,position:"under",column:e})},o,t,n,i)}showPopup(e,t,o,i,r,s){const n=e?this.createBean(new uc(e,"COLUMN_MENU")):void 0;if(this.activeMenu=n,!n?.hasFilter()||!e){ce(57);return}const a=Pe({tag:"div",cls:`ag-menu${r?"":" ag-filter-menu"}`,role:"presentation"});[this.tabListener]=this.addManagedElementListeners(a,{keydown:m=>this.trapFocusWithin(m,a)}),a.appendChild(n?.getGui());let l;const d=()=>n?.afterGuiDetached(),c=vd(this.gos)?i??this.beans.ctrlsSvc.getGridBodyCtrl().eGridBody:void 0,u=m=>{fs(e,!1,"contextMenu");const C=m instanceof KeyboardEvent;this.tabListener&&(this.tabListener=this.tabListener()),C&&i&&ut(i)&&Kn(i)?.focus({preventScroll:!0}),d(),this.destroyBean(this.activeMenu),this.dispatchVisibleChangedEvent(!1,o,e),s?.()},g=this.getLocaleTextFunc(),p=r&&o!=="columnFilter"?g("ariaLabelColumnMenu","Column Menu"):g("ariaLabelColumnFilter","Column Filter"),f=this.popupSvc?.addPopup({modal:!0,eChild:a,closeOnEsc:!0,closedCallback:u,positionCallback:()=>t(a),anchorToElement:c,ariaLabel:p});f&&(this.hidePopup=l=f.hideFunc),n.afterInit().then(()=>{t(a),n.afterGuiAttached({container:o,hidePopup:l})}),fs(e,!0,"contextMenu"),this.dispatchVisibleChangedEvent(!0,o,e)}trapFocusWithin(e,t){e.key!==D.TAB||e.defaultPrevented||Ut(this.beans,t,!1,e.shiftKey)||(e.preventDefault(),Lt(t,e.shiftKey))}dispatchVisibleChangedEvent(e,t,o){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:t,column:o??null,columnGroup:null})}isMenuEnabled(e){return e.isFilterAllowed()&&(e.getColDef().menuTabs??["filterMenuTab"]).includes("filterMenuTab")}showMenuAfterContextMenuEvent(){}destroy(){this.destroyBean(this.activeMenu),super.destroy()}},rR=class extends E{constructor(){super(...arguments),this.beanName="filterValueSvc"}getValue(e,t){if(!t)return;const o=e.getColDef(),{filterValueGetter:i}=o;return i?this.executeFilterValueGetter(i,t.data,e,t,o):this.beans.valueSvc.getValue(e,t)}executeFilterValueGetter(e,t,o,i,r){const{expressionSvc:s,valueSvc:n}=this.beans,a=Z(this.gos,{data:t,node:i,column:o,colDef:r,getValue:n.getValueCallback.bind(n,i)});return typeof e=="function"?e(a):s?.evaluate(e,a)}},sR={moduleName:"ClientSideRowModelFilter",version:ae,rowModels:["clientSide"],beans:[B0]},nR={moduleName:"FilterCore",version:ae,beans:[oR],apiFunctions:{isAnyFilterPresent:eR,onFilterChanged:tR},css:[W0],dependsOn:[sR]},aR={moduleName:"FilterValue",version:ae,beans:[rR]},lR={moduleName:"ColumnFilter",version:ae,beans:[J0,iR],dynamicBeans:{headerFilterCellCtrl:O0},icons:{filter:"filter",filterActive:"filter"},apiFunctions:{isColumnFilterPresent:$0,getColumnFilterInstance:U0,destroyFilter:j0,setFilterModel:K0,getFilterModel:Y0,getColumnFilterModel:q0,setColumnFilterModel:X0,showColumnFilter:Q0},dependsOn:[nR,ys,aR,Lu]},dR=class extends E{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Ho(e.source))}),this.addManagedPropertyListener("selectionColumnDef",this.updateColumns.bind(this))}addColumns(e){const t=this.columns;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),Ed(e))}createColumns(e,t){const o=()=>{wo(this.beans,this.columns?.tree),this.columns=null},i=e.treeDepth,s=(this.columns?.treeDepth??-1)==i,n=this.generateSelectionCols();if(Pd(n,this.columns?.list??[])&&s)return;o();const{colGroupSvc:l}=this.beans,d=l?.findDepth(e.tree)??0,c=l?.balanceTreeForAutoCols(n,d)??[];this.columns={list:n,tree:c,treeDepth:d,map:{}},t(g=>{if(!g)return null;const p=g.filter(f=>!ro(f));return[...n,...p]})}updateColumns(e){const t=Ho(e.source),o=e.currentValue;this.columns?.list.forEach(i=>{const r=this.createSelectionColDef(o);i.setColDef(r,null,t),it(this.beans,{state:[{colId:i.getColId(),...r}]},t)})}getColumn(e){return this.columns?.list.find(t=>zn(t,e))??null}getColumns(){return this.columns?.list??null}isSelectionColumnEnabled(){const{gos:e,beans:t}=this,o=e.get("rowSelection");if(typeof o!="object"||!Wt(e))return!1;const i=(t.autoColSvc?.getColumns()?.length??0)>0;if(o.checkboxLocation==="autoGroupColumn"&&i)return!1;const r=!!Go(o),s=zr(o);return r||s}createSelectionColDef(e){const{gos:t}=this.beans,o=e??t.get("selectionColumnDef"),i=t.get("enableRtl"),{rowSpan:r,spanRows:s,...n}=o??{};return{width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:i?"right":"left",comparator(a,l,d,c){const u=d.isSelected(),g=c.isSelected();return u===g?0:u?1:-1},editable:!1,suppressFillHandle:!0,pinned:null,...n,colId:Md}}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const e=this.createSelectionColDef(),t=e.colId;this.beans.validation?.validateColDef(e,t,!0);const o=new $r(e,null,t,!1);return this.createBean(o),[o]}onSelectionOptionsChanged(e,t,o){const i=t&&typeof t!="string"?Go(t):void 0,r=e&&typeof e!="string"?Go(e):void 0,s=i!==r,n=t&&typeof t!="string"?zr(t):void 0,a=e&&typeof e!="string"?zr(e):void 0,l=n!==a,d=zi(e),c=zi(t);(s||l||d!==c)&&this.beans.colModel.refreshAll(o)}destroy(){wo(this.beans,this.columns?.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,o=t.visibleCols.getAllTrees()??[];if(o.length!==0){if(!o.some(Hu)){const i=Ki(t).find(r=>ro(r.colId));i&&it(t,{state:[{colId:i.colId,hide:!i.hide}]},e)}if(o.length===1){const i=o[0],r=Vu(i);if(!r)return;it(t,{state:[{colId:r.getColId(),hide:!0}]},e)}}}},Hu=e=>e.isColumn?ro(e):e.getChildren()?.some(Hu)??!1;function Vu(e){if(e.isColumn)return ro(e)?e:null;const t=e.getChildren()??[];for(const o of t){const i=Vu(o);if(i)return i}return null}function cR(e,t){if(!t.nodes.every(n=>n.rowPinned?(_(59),!1):n.id===void 0?(_(60),!1):!0))return;const{nodes:i,source:r,newValue:s}=t;e.selectionSvc?.setNodesSelected({nodes:i,source:r??"api",newValue:s})}function uR(e,t,o="apiSelectAll"){e.selectionSvc?.selectAllRowNodes({source:o,selectAll:t})}function hR(e,t,o="apiSelectAll"){e.selectionSvc?.deselectAllRowNodes({source:o,selectAll:t})}function gR(e,t="apiSelectAllFiltered"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"filtered"})}function pR(e,t="apiSelectAllFiltered"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"filtered"})}function fR(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.selectAllRowNodes({source:t,selectAll:"currentPage"})}function mR(e,t="apiSelectAllCurrentPage"){e.selectionSvc?.deselectAllRowNodes({source:t,selectAll:"currentPage"})}function CR(e){return e.selectionSvc?.getSelectedNodes()??[]}function vR(e){return e.selectionSvc?.getSelectedRows()??[]}var wR={moduleName:"SharedRowSelection",version:ae,beans:[dR],apiFunctions:{setNodesSelected:cR,selectAll:uR,deselectAll:hR,selectAllFiltered:gR,deselectAllFiltered:pR,selectAllOnCurrentPage:fR,deselectAllOnCurrentPage:mR,getSelectedNodes:CR,getSelectedRows:vR}};function bR(e){e.expansionSvc?.expandAll(!0)}function yR(e){e.expansionSvc?.expandAll(!1)}function SR(e){const t=Xt(e),o=bi(e);t?t.onRowHeightChanged():o&&o.onRowHeightChanged()}function RR(e,t,o){const i=bi(e);if(i){if(e.rowGroupColsSvc?.columns.length===0){if(t<0){ce(238);return}i.setRowCount(t,o);return}ce(28);return}const r=US(e);if(r){r.setRowCount(t,o);return}}function xR(e){return ht(e.gos)?e.rowModel.getBlockStates():e.rowNodeBlockLoader?.getBlockState()??{}}function FR(e){return e.rowModel.isLastRowIndexKnown()}var _u={moduleName:"CsrmSsrmSharedApi",version:ae,apiFunctions:{expandAll:bR,collapseAll:yR,onRowHeightChanged:SR}},DR={moduleName:"SsrmInfiniteSharedApi",version:ae,apiFunctions:{setRowCount:RR,getCacheBlockState:xR,isLastRowIndexKnown:FR}},kR=class extends av{constructor(){super(...arguments),this.beanName="csrmNodeSvc"}},Ga=class{constructor(){this.removals=new Set,this.updates=new Set,this.adds=new Set}remove(e){this.adds.delete(e)||(this.updates.delete(e),this.removals.add(e))}update(e){this.adds.has(e)||this.updates.add(e)}add(e){this.adds.add(e)}};function MR(e){if(De(e.childrenAfterSort))return;const t=e.childrenAfterSort;for(let o=0;o<t.length;o++){const i=t[o],r=o===0,s=o===e.childrenAfterSort.length-1;i.setFirstChild(r),i.lastChild!==s&&(i.lastChild=s,i.dispatchRowEvent("lastChildChanged")),i.childIndex!==o&&(i.childIndex=o,i.dispatchRowEvent("childIndexChanged"))}}function zu(e){e.sibling&&(e.sibling.childrenAfterSort=e.childrenAfterSort),MR(e)}var PR=class extends E{constructor(){super(...arguments),this.beanName="sortStage",this.refreshProps=new Set(["postSortRows","groupDisplayType","accentedSort"]),this.step="sort"}execute(e){const t=this.beans,o=t.sortSvc.getSortOptions(),i=q(o)&&o.length>0,r=i&&!!e.changedRowNodes&&this.gos.get("deltaSort"),s=o.some(({column:n})=>At(t.gos)?n.isPrimary()&&n.isRowGroupActive():!!n.getColDef().showRowGroup);this.sort(t,o,i,r,e.changedRowNodes,e.changedPath,s)}sort(e,t,o,i,r,s,n){const{gos:a,colModel:l,rowGroupColsSvc:d,rowNodeSorter:c,rowRenderer:u,showRowGroupCols:g}=e,p=a.get("groupMaintainOrder"),f=l.getCols().some(b=>b.isRowGroupActive()),m=l.isPivotMode(),C=a.getCallback("postSortRows");let w=!1;const y=b=>{const x=m&&b.leafGroup,M=p&&f&&!b.leafGroup&&!n;let P;if(M){const S=d?.columns?.[b.level+1]?.getSort()===null,v=b.childrenAfterAggFilter.slice(0);if(b.childrenAfterSort&&!S){const R={};b.childrenAfterSort.forEach((F,G)=>{R[F.id]=G}),v.sort((F,G)=>(R[F.id]??0)-(R[G.id]??0))}P=v}else!o||x?P=b.childrenAfterAggFilter.slice(0):i&&r?P=ER(c,b,r,s,t):P=c.doFullSort(b.childrenAfterAggFilter,t);if(w||(w=b.childrenAfterSort?.[0]!==P[0]),b.childrenAfterSort=P,zu(b),C){const k={nodes:b.childrenAfterSort};C(k)}};if(s?.forEachChangedNodeDepthFirst(y),w&&this.gos.get("groupHideOpenParents")){const b=g?.getShowRowGroupCols();b?.length&&u.refreshCells({columns:b,force:!0})}}};function ER(e,t,o,i,r){const s=t.childrenAfterAggFilter,n=t.childrenAfterSort;if(!n)return e.doFullSort(s,r);const a=new Set,l=[],{updates:d,adds:c}=o;for(let g=0,p=s.length;g<p;++g){const f=s[g];d.has(f)||c.has(f)||i&&!i.canSkip(f)?l.push({currentPos:l.length,rowNode:f}):a.add(f.id)}const u=n.filter(g=>a.has(g.id)).map((g,p)=>({currentPos:p,rowNode:g}));return l.sort((g,p)=>e.compareRowNodes(r,g,p)),AR(e,r,l,u)}function AR(e,t,o,i){const r=[];let s=0,n=0;const a=o.length,l=i.length;for(;s<a&&n<l;){const d=o[s],c=i[n],u=e.compareRowNodes(t,d,c);let g;u<0?(g=d,++s):(g=c,++n),r.push(g.rowNode)}for(;s<a;)r.push(o[s++].rowNode);for(;n<l;)r.push(i[n++].rowNode);return r}var TR=class extends E{constructor(){super(...arguments),this.beanName="rowModel",this.rootNode=null,this.rowsToDisplay=[],this.started=!1,this.isRefreshingModel=!1,this.rowNodesCountReady=!1,this.rowCountReady=!1,this.onRowHeightChanged_debounced=tt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.valueCache=e.valueCache,this.filterStage=e.filterStage,this.sortStage=e.sortStage,this.flattenStage=e.flattenStage,this.groupStage=e.groupStage,this.aggStage=e.aggStage,this.pivotStage=e.pivotStage,this.filterAggStage=e.filterAggStage}postConstruct(){this.orderedStages=[this.groupStage,this.filterStage,this.pivotStage,this.aggStage,this.sortStage,this.filterAggStage,this.flattenStage].filter(i=>!!i);const e=this.refreshModel.bind(this,{step:"group"}),t=this.refreshModel.bind(this,{step:"group",afterColumnsChanged:!0,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame")});this.addManagedEventListeners({newColumnsLoaded:t,columnRowGroupChanged:e,columnValueChanged:this.onValueChanged.bind(this),columnPivotChanged:this.refreshModel.bind(this,{step:"pivot"}),filterChanged:this.onFilterChanged.bind(this),sortChanged:this.onSortChanged.bind(this),columnPivotModeChanged:e,gridStylesChanged:this.onGridStylesChanges.bind(this),gridReady:this.onGridReady.bind(this)}),this.addPropertyListeners(),this.rootNode=new Wo(this.beans);const o=this.getNewNodeManager();this.nodeManager=o,o.activate(this.rootNode)}getNewNodeManager(){const{gos:e,beans:t}=this;switch(wd(e)){case"treeNested":return t.csrmChildrenTreeNodeSvc??t.csrmNodeSvc;case"treePath":return t.csrmPathTreeNodeSvc??t.csrmNodeSvc;default:return t.csrmNodeSvc}}addPropertyListeners(){const e=["treeData","treeDataChildrenField",...this.orderedStages.flatMap(({refreshProps:t})=>[...t])];this.addManagedPropertyListeners(e,t=>{const o=t.changeSet?.properties;o&&this.onPropChange(o)}),this.addManagedPropertyListener("rowData",()=>this.onPropChange(["rowData"])),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights())}start(){this.started=!0,this.rowNodesCountReady?this.refreshModel({step:"group",rowDataUpdated:!0,newData:!0}):this.setInitialData()}setInitialData(){this.gos.get("rowData")&&this.onPropChange(["rowData"])}ensureRowHeightsValid(e,t,o,i){let r,s=!1;do{r=!1;const n=this.getRowIndexAtPixel(e),a=this.getRowIndexAtPixel(t),l=Math.max(n,o),d=Math.min(a,i);for(let c=l;c<=d;c++){const u=this.getRow(c);if(u.rowHeightEstimated){const g=St(this.beans,u);u.setRowHeight(g.height),r=!0,s=!0}}r&&this.setRowTopAndRowIndex()}while(r);return s}onPropChange(e){if(!this.rootNode)return;const t=this.gos,o=new Set(e),i={step:"nothing",changedProps:o},r=o.has("rowData"),s=this.nodeManager,n=this.getNewNodeManager(),a=s!==n||r&&o.has("treeData")&&t.get("treeData")||o.has("treeDataChildrenField")&&t.get("treeData");let l;if((a||r)&&(l=t.get("rowData"),l!=null&&!Array.isArray(l)&&(l=null,_(1))),a&&(r||(l=s?.extractRowData()??l),s!==n&&(s?.deactivate(),this.nodeManager=n),n.activate(this.rootNode)),l&&(!a&&!this.isEmpty()&&l.length>0&&t.exists("getRowId")&&!t.get("resetRowDataOnUpdate")?(i.keepRenderedRows=!0,i.animate=!this.gos.get("suppressAnimationFrame"),i.changedRowNodes=new Ga,n.setImmutableRowData(i,l)):(i.rowDataUpdated=!0,i.newData=!0,this.beans.selectionSvc?.reset("rowDataChanged"),this.rowNodesCountReady=!0,n.setNewRowData(l))),i.rowDataUpdated)i.step="group";else if(i.step==="nothing"){for(const{refreshProps:d,step:c}of this.orderedStages)if(e.some(u=>d.has(u))){i.step=c;break}}i.step!=="nothing"&&this.refreshModel(i)}setRowTopAndRowIndex(){const{beans:e}=this,t=e.environment.getDefaultRowHeight();let o=0;const i=new Set,r=Ke(this.gos,"normal"),s=this.rowsToDisplay;for(let n=0,a=s.length;n<a;++n){const l=s[n];if(l.id!=null&&i.add(l.id),l.rowHeight==null){const d=St(e,l,r,t);l.setRowHeight(d.height,d.estimated)}l.setRowTop(o),l.setRowIndex(n),o+=l.rowHeight}return i}clearRowTopAndRowIndex(e,t){const o=e.active,i=s=>{s&&s.id!=null&&!t.has(s.id)&&s.clearRowTopAndRowIndex()},r=s=>{if(s!==null&&(i(s),i(s.detailNode),i(s.sibling),s.hasChildren()&&s.childrenAfterGroup)){const n=s.level==-1;o&&!n&&!s.expanded||s.childrenAfterGroup.forEach(r)}};r(this.rootNode)}ensureRowsAtPixel(e,t,o=0){const i=this.getRowIndexAtPixel(t),r=this.getRow(i),s=!this.gos.get("suppressAnimationFrame");if(r===e[0])return!1;const n=this.rootNode?.allLeafChildren;return n?(e.forEach(a=>{ot(n,a)}),e.forEach((a,l)=>{n.splice(Math.max(i+o,0)+l,0,a)}),e.forEach((a,l)=>{a.sourceRowIndex=l}),this.refreshModel({step:"group",keepRenderedRows:!0,animate:s,rowNodesOrderChanged:!0}),!0):!1}highlightRowAtPixel(e,t){const o=t!=null?this.getRowIndexAtPixel(t):null,i=o!=null?this.getRow(o):null;if(!i||!e||t==null){this.clearHighlightedRow();return}const r=this.getHighlightPosition(t,i),s=this.isHighlightingCurrentPosition(e,i,r),n=this.lastHighlightedRow!=null&&this.lastHighlightedRow!==i;(s||n)&&(this.clearHighlightedRow(),s)||(this.setRowNodeHighlighted(i,r),this.lastHighlightedRow=i)}setRowNodeHighlighted(e,t){e.highlighted!==t&&(e.highlighted=t,e.dispatchRowEvent("rowHighlightChanged"))}getHighlightPosition(e,t){if(!t){const r=this.getRowIndexAtPixel(e);if(t=this.getRow(r||0),!t)return"Below"}const{rowTop:o,rowHeight:i}=t;return e-o<i/2?"Above":"Below"}getLastHighlightedRowNode(){return this.lastHighlightedRow}isHighlightingCurrentPosition(e,t,o){if(e===t)return!0;const i=o==="Above"?-1:1;return this.getRow(t.rowIndex+i)===e}clearHighlightedRow(){this.lastHighlightedRow&&(this.setRowNodeHighlighted(this.lastHighlightedRow,null),this.lastHighlightedRow=null)}isLastRowIndexKnown(){return!0}getRowCount(){return this.rowsToDisplay?this.rowsToDisplay.length:0}getTopLevelRowCount(){const e=this.rootNode;if(!e||this.rowsToDisplay.length===0)return 0;if(this.rowsToDisplay&&this.rowsToDisplay[0]===e)return 1;const o=e.childrenAfterAggFilter,i=e.sibling?1:0;return(o?o.length:0)+i}getTopLevelRowDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;const{childrenAfterSort:r}=t,s=a=>{let l=r[a];if(this.gos.get("groupHideOpenParents"))for(;l.expanded&&l.childrenAfterSort&&l.childrenAfterSort.length>0;)l=l.childrenAfterSort[0];return l.rowIndex},{footerSvc:n}=this.beans;return n?n.getTopDisplayIndex(o,e,r,s):s(e)}getTopLevelIndexFromDisplayedIndex(e){const{rootNode:t,rowsToDisplay:o}=this;if(!t||!o.length||o[0]===t)return e;let r=this.getRow(e);for(r.footer&&(r=r.sibling);r.parent&&r.parent!==t;)r=r.parent;const s=t.childrenAfterSort?.findIndex(n=>n===r);return s===-1?e:s??e}getRowBounds(e){const t=this.rowsToDisplay[e];return t?{rowTop:t.rowTop,rowHeight:t.rowHeight}:null}onRowGroupOpened(){const e=li(this.gos);this.refreshModel({step:"map",keepRenderedRows:!0,animate:e})}onFilterChanged(e){if(e.afterDataChange)return;const t=li(this.gos),i=e.columns.length===0||e.columns.some(r=>r.isPrimary())?"filter":"filter_aggregates";this.refreshModel({step:i,keepRenderedRows:!0,animate:t})}onSortChanged(){const e=li(this.gos);this.refreshModel({step:"sort",keepRenderedRows:!0,animate:e})}getType(){return"clientSide"}onValueChanged(){this.refreshModel({step:this.colModel.isPivotActive()?"pivot":"aggregate"})}createChangePath(e){const t=new xu(!1,this.rootNode);return e||(t.active=!1),t}isSuppressModelUpdateAfterUpdateTransaction(e){if(!this.gos.get("suppressModelUpdateAfterUpdateTransaction"))return!1;const{changedRowNodes:t,newData:o,rowDataUpdated:i}=e;return!(!t||o||!i||t.removals.size||t.adds.size)}refreshModel(e){if(!this.rootNode)return;const t=e.changedPath??(e.changedPath=this.createChangePath(!e.newData&&!!e.rowDataUpdated));if(this.nodeManager.refreshModel?.(e,this.started),this.eventSvc.dispatchEvent({type:"beforeRefreshModel",params:e}),!this.started||(e.rowDataUpdated&&this.eventSvc.dispatchEvent({type:"rowDataUpdated"}),this.isRefreshingModel||this.colModel.changeEventsDispatching||this.isSuppressModelUpdateAfterUpdateTransaction(e)))return;switch(this.isRefreshingModel=!0,e.step){case"group":this.doRowGrouping(e.changedRowNodes,t,!!e.rowNodesOrderChanged,!!e.afterColumnsChanged);case"filter":this.doFilter(t);case"pivot":this.doPivot(t);case"aggregate":this.doAggregate(t);case"filter_aggregates":this.doFilterAggregates(t);case"sort":this.doSort(e.changedRowNodes,t);case"map":this.doRowsToDisplay()}const o=this.setRowTopAndRowIndex();this.clearRowTopAndRowIndex(t,o),this.isRefreshingModel=!1,this.eventSvc.dispatchEvent({type:"modelUpdated",animate:e.animate,keepRenderedRows:e.keepRenderedRows,newData:e.newData,newPage:!1,keepUndoRedoStack:e.keepUndoRedoStack})}isEmpty(){return!this.rootNode?.allLeafChildren?.length||!this.colModel?.ready}isRowsToRender(){return this.rowsToDisplay.length>0}getNodesInRangeForSelection(e,t){let o=!1,i=!1;const r=[],s=Wi(this.gos);return this.forEachNodeAfterFilterAndSort(n=>{if(i)return;if(o&&(n===t||n===e)&&(i=!0,n.group&&s)){r.push(...n.allLeafChildren);return}if(!o){if(n!==t&&n!==e)return;o=!0}if(!n.group||!s){r.push(n);return}}),r}getTopLevelNodes(){return this.rootNode?.childrenAfterGroup??null}getRow(e){return this.rowsToDisplay[e]}isRowPresent(e){return this.rowsToDisplay.indexOf(e)>=0}getRowIndexAtPixel(e){const t=this.rowsToDisplay;if(this.isEmpty()||t.length===0)return-1;let o=0,i=t.length-1;if(e<=0)return 0;if(Ce(t).rowTop<=e)return t.length-1;let s=-1,n=-1;for(;;){const a=Math.floor((o+i)/2),l=t[a];if(this.isRowInPixel(l,e)||(l.rowTop<e?o=a+1:l.rowTop>e&&(i=a-1),s===o&&n===i))return a;s=o,n=i}}isRowInPixel(e,t){const o=e.rowTop,i=e.rowTop+e.rowHeight;return o<=t&&i>t}forEachLeafNode(e){this.rootNode?.allLeafChildren?.forEach((t,o)=>e(t,o))}forEachNode(e,t=!1){this.depthFirstSearchRowNodes(e,t)}forEachDisplayedNode(e){this.rowsToDisplay.forEach(e)}forEachNodeAfterFilter(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterAggFilter)}forEachNodeAfterFilterAndSort(e,t=!1){this.depthFirstSearchRowNodes(e,t,o=>o.childrenAfterSort)}forEachPivotNode(e,t=!1,o=!1){const i=o?"childrenAfterSort":"childrenAfterGroup";this.depthFirstSearchRowNodes(e,t,r=>r.leafGroup?null:r[i])}depthFirstSearchRowNodes(e,t=!1,o=s=>s.childrenAfterGroup,i=this.rootNode,r=0){let s=r;if(!i)return s;const n=i===this.rootNode;n||e(i,s++);const{footerSvc:a}=this.beans;if(i.hasChildren()&&!i.footer){const l=o(i);if(l){s=a?.addTotalRows(s,i,e,t,n,"top")??s;for(const d of l)s=this.depthFirstSearchRowNodes(e,t,o,d,s);return a?.addTotalRows(s,i,e,t,n,"bottom")??s}}return s}doAggregate(e){const t=this.rootNode;t&&this.aggStage?.execute({rowNode:t,changedPath:e})}doFilterAggregates(e){const t=this.rootNode;this.filterAggStage?this.filterAggStage.execute({rowNode:t,changedPath:e}):t.childrenAfterAggFilter=t.childrenAfterFilter}doSort(e,t){this.sortStage?this.sortStage.execute({rowNode:this.rootNode,changedRowNodes:e,changedPath:t}):t.forEachChangedNodeDepthFirst(o=>{o.childrenAfterSort=o.childrenAfterAggFilter.slice(0),zu(o)})}doRowGrouping(e,t,o,i){const r=this.rootNode;if(!this.groupStage?.execute({rowNode:r,changedPath:t,changedRowNodes:e,rowNodesOrderChanged:o,afterColumnsChanged:i})&&!this.nodeManager.treeData){const n=r.sibling;r.childrenAfterGroup=r.allLeafChildren,n&&(n.childrenAfterGroup=r.childrenAfterGroup),r.updateHasChildren()}this.rowNodesCountReady&&(this.rowCountReady=!0,this.eventSvc.dispatchEventOnce({type:"rowCountReady"}))}doFilter(e){this.filterStage?this.filterStage.execute({rowNode:this.rootNode,changedPath:e}):e.forEachChangedNodeDepthFirst(t=>{t.childrenAfterFilter=t.childrenAfterGroup,Iu(t)},!0)}doPivot(e){this.pivotStage?.execute({rowNode:this.rootNode,changedPath:e})}getRowNode(e){if(typeof e=="string"&&e.indexOf(ns)==0){let o;return this.forEachNode(i=>{i.id===e&&(o=i)}),o}return this.nodeManager.getRowNode(e)}batchUpdateRowData(e,t){if(this.applyAsyncTransactionsTimeout==null){this.rowDataTransactionBatch=[];const o=this.gos.get("asyncTransactionWaitMillis");this.applyAsyncTransactionsTimeout=window.setTimeout(()=>{this.isAlive()&&this.executeBatchUpdateRowData()},o)}this.rowDataTransactionBatch.push({rowDataTransaction:e,callback:t})}flushAsyncTransactions(){this.applyAsyncTransactionsTimeout!=null&&(clearTimeout(this.applyAsyncTransactionsTimeout),this.executeBatchUpdateRowData())}executeBatchUpdateRowData(){this.valueCache?.onDataChanged();const e=[],t=[],o=new Ga;let i=!1;this.rowDataTransactionBatch?.forEach(r=>{this.rowNodesCountReady=!0;const{rowNodeTransaction:s,rowsInserted:n}=this.nodeManager.updateRowData(r.rowDataTransaction,o);n&&(i=!0),t.push(s),r.callback&&e.push(r.callback.bind(null,s))}),this.commitTransactions(i,o),e.length>0&&window.setTimeout(()=>{e.forEach(r=>r())},0),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t}),this.rowDataTransactionBatch=null,this.applyAsyncTransactionsTimeout=void 0}updateRowData(e){this.valueCache?.onDataChanged(),this.rowNodesCountReady=!0;const t=new Ga,{rowNodeTransaction:o,rowsInserted:i}=this.nodeManager.updateRowData(e,t);return this.commitTransactions(i,t),o}commitTransactions(e,t){this.refreshModel({step:"group",rowDataUpdated:!0,rowNodesOrderChanged:e,keepRenderedRows:!0,animate:!this.gos.get("suppressAnimationFrame"),changedRowNodes:t,changedPath:this.createChangePath(!0)})}doRowsToDisplay(){const{flattenStage:e,rootNode:t}=this;let o;if(e)o=e.execute({rowNode:t});else{o=t?.childrenAfterSort??[];for(const i of o)i.setUiLevel(0)}this.rowsToDisplay=o}onRowHeightChanged(){this.refreshModel({step:"map",keepRenderedRows:!0,keepUndoRedoStack:!0})}resetRowHeights(){const e=this.rootNode;if(!e)return;const t=this.resetRowHeightsForAllRowNodes();e.setRowHeight(e.rowHeight,!0),e.sibling&&e.sibling.setRowHeight(e.sibling.rowHeight,!0),t&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{t.setRowHeight(t.rowHeight,!0);const o=t.detailNode;o&&o.setRowHeight(o.rowHeight,!0),t.sibling&&t.sibling.setRowHeight(t.sibling.rowHeight,!0),e=!0}),e}onGridStylesChanges(e){if(e.rowHeightChanged){if(this.beans.rowAutoHeight?.active)return;this.resetRowHeights()}}onGridReady(){this.started||this.setInitialData()}isRowDataLoaded(){return this.rowCountReady}destroy(){super.destroy(),this.clearHighlightedRow(),this.started=!1,this.rootNode=null,this.nodeManager=null,this.rowDataTransactionBatch=null,this.lastHighlightedRow=null,this.orderedStages=Vn,this.rowsToDisplay=Vn}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function IR(e){e.expansionSvc?.onGroupExpandedOrCollapsed()}function LR(e,t){const o=Xt(e);o&&((!t||t==="everything")&&(t="group"),o.refreshModel({step:t,keepRenderedRows:!0,animate:!e.gos.get("suppressAnimationFrame")}))}function GR(e){return Xt(e)?.isEmpty()??!0}function BR(e,t){Xt(e)?.forEachLeafNode(t)}function OR(e,t){Xt(e)?.forEachNodeAfterFilter(t)}function NR(e,t){Xt(e)?.forEachNodeAfterFilterAndSort(t)}function HR(e){if(e.rowAutoHeight?.active){_(3);return}Xt(e)?.resetRowHeights()}function VR(e,t){return e.frameworkOverrides.wrapIncoming(()=>Xt(e)?.updateRowData(t))}function _R(e,t,o){e.frameworkOverrides.wrapIncoming(()=>Xt(e)?.batchUpdateRowData(t,o))}function zR(e){e.frameworkOverrides.wrapIncoming(()=>Xt(e)?.flushAsyncTransactions())}function WR(e){return e.selectionSvc?.getBestCostNodeSelection()}var $R={moduleName:"ClientSideRowModel",version:ae,rowModels:["clientSide"],beans:[kR,TR,PR],dependsOn:[Aa]},UR={moduleName:"ClientSideRowModelApi",version:ae,apiFunctions:{onGroupExpandedOrCollapsed:IR,refreshClientSideRowModel:LR,isRowDataEmpty:GR,forEachLeafNode:BR,forEachNodeAfterFilter:OR,forEachNodeAfterFilterAndSort:NR,resetRowHeights:HR,applyTransaction:VR,applyTransactionAsync:_R,flushAsyncTransactions:zR,getBestCostNodeSelection:WR},dependsOn:[_u]},jR=class extends E{constructor(){super(...arguments),this.beanName="gridSerializer"}wireBeans(e){this.visibleCols=e.visibleCols,this.colModel=e.colModel,this.rowModel=e.rowModel,this.pinnedRowModel=e.pinnedRowModel}serialize(e,t={}){const{allColumns:o,columnKeys:i,skipRowGroups:r,exportRowNumbers:s}=t,n=this.getColumnsToExport({allColumns:o,skipRowGroups:r,columnKeys:i,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((a,l)=>l(a),e).parse()}processRow(e,t,o,i){const r=t.shouldRowBeSkipped||(()=>!1),n=t.rowPositions!=null||!!t.onlySelected,a=this.gos.get("groupHideOpenParents")&&!n,l=this.colModel.isPivotMode()?i.leafGroup:!i.group,d=!!i.footer,c=i.allChildrenCount===1&&i.childrenAfterGroup?.length===1&&Bp(this.gos,i);if(!l&&!d&&(t.skipRowGroups||c||a)||t.onlySelected&&!i.isSelected()||t.skipPinnedTop&&i.rowPinned==="top"||t.skipPinnedBottom&&i.rowPinned==="bottom"||i.level===-1&&!l&&!d||r(Z(this.gos,{node:i})))return;const p=e.onNewBodyRow(i);if(o.forEach((f,m)=>{p.onColumn(f,m,i)}),t.getCustomContentBelowRow){const f=t.getCustomContentBelowRow(Z(this.gos,{node:i}));f&&e.addCustomContent(f)}}appendContent(e){return t=>{const o=e.appendContent;return o&&t.addCustomContent(o),t}}prependContent(e){return t=>{const o=e.prependContent;return o&&t.addCustomContent(o),t}}prepareSession(e){return t=>(t.prepare(e),t)}exportColumnGroups(e,t){return o=>{if(!e.skipColumnGroupHeaders){const i=new Wd,{colGroupSvc:r}=this.beans,s=r?r.createColumnGroups({columns:t,idCreator:i,pinned:null,isStandaloneStructure:!0}):t;this.recursivelyAddHeaderGroups(s,o,e.processGroupHeaderCallback)}return o}}exportHeaders(e,t){return o=>{if(!e.skipColumnHeaders){const i=o.onNewHeaderRow();t.forEach((r,s)=>{i.onColumn(r,s,void 0)})}return o}}processPinnedTopRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="top").sort((r,s)=>r.rowIndex-s.rowIndex).map(r=>this.pinnedRowModel?.getPinnedTopRow(r.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("top",i),o}}processRows(e,t){return o=>{const i=this.rowModel,r=Et(this.gos),s=ht(this.gos),n=!r&&e.onlySelected,a=this.processRow.bind(this,o,e,t),{exportedRows:l="filteredAndSorted"}=e;if(e.rowPositions)return e.rowPositions.filter(d=>d.rowPinned==null).sort((d,c)=>d.rowIndex-c.rowIndex).map(d=>i.getRow(d.rowIndex)).forEach(a),o;if(this.colModel.isPivotMode())return r?i.forEachPivotNode(a,!0,l==="filteredAndSorted"):s?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a),o;if(e.onlySelectedAllPages||n){const d=this.beans.selectionSvc?.getSelectedNodes()??[];this.replicateSortedOrder(d),d.forEach(a)}else l==="all"?i.forEachNode(a):r||s?i.forEachNodeAfterFilterAndSort(a,!0):i.forEachNode(a);return o}}replicateSortedOrder(e){const{sortSvc:t,rowNodeSorter:o}=this.beans;if(!t||!o)return;const i=t.getSortOptions(),r=(s,n)=>s.rowIndex!=null&&n.rowIndex!=null?s.rowIndex-n.rowIndex:s.level===n.level?s.parent?.id===n.parent?.id?o.compareRowNodes(i,{rowNode:s,currentPos:s.rowIndex??-1},{rowNode:n,currentPos:n.rowIndex??-1}):r(s.parent,n.parent):s.level>n.level?r(s.parent,n):r(s,n.parent);e.sort(r)}processPinnedBottomRows(e,t){return o=>{const i=this.processRow.bind(this,o,e,t);return e.rowPositions?e.rowPositions.filter(r=>r.rowPinned==="bottom").sort((r,s)=>r.rowIndex-s.rowIndex).map(r=>this.pinnedRowModel?.getPinnedBottomRow(r.rowIndex)).forEach(i):this.pinnedRowModel?.forEachPinnedRow("bottom",i),o}}getColumnsToExport(e){const{allColumns:t=!1,skipRowGroups:o=!1,exportRowNumbers:i=!1,columnKeys:r}=e,{colModel:s,gos:n,visibleCols:a}=this,l=s.isPivotMode(),d=g=>ro(g)?!1:!ji(g)||i;if(r&&r.length)return s.getColsForKeys(r).filter(d);const c=n.get("treeData");let u=[];return t&&!l?u=s.getCols():u=a.allCols,u=u.filter(g=>d(g)&&(o&&!c?!jr(g):!0)),u}recursivelyAddHeaderGroups(e,t,o){const i=[];e.forEach(r=>{const s=r;s.getChildren&&s.getChildren().forEach(n=>i.push(n))}),e.length>0&&Ie(e[0])&&this.doAddHeaderHeader(t,e,o),i&&i.length>0&&this.recursivelyAddHeaderGroups(i,t,o)}doAddHeaderHeader(e,t,o){const i=e.onNewHeaderGroupingRow();let r=0;t.forEach(s=>{const n=s;let a;o?a=o(Z(this.gos,{columnGroup:n})):a=this.beans.colNames.getDisplayNameForColumnGroup(n,"header");const l=n.getLeafColumns().reduce((d,c,u,g)=>{let p=Ce(d);return c.getColumnGroupShow()==="open"?(!p||p[1]!=null)&&(p=[u],d.push(p)):p&&p[1]==null&&(p[1]=u-1),u===g.length-1&&p&&p[1]==null&&(p[1]=u),d},[]);i.onColumn(n,a||"",r++,n.getLeafColumns().length-1,l)})}},KR={moduleName:"SharedExport",version:ae,beans:[jR]},Wu=`\r
60
+ `,YR=class extends n0{constructor(e){super(e),this.isFirstLine=!0,this.result="";const{suppressQuotes:t,columnSeparator:o}=e;this.suppressQuotes=t,this.columnSeparator=o}addCustomContent(e){e&&(typeof e=="string"?(/^\s*\n/.test(e)||this.beginNewLine(),e=e.replace(/\r?\n/g,Wu),this.result+=e):e.forEach(t=>{this.beginNewLine(),t.forEach((o,i)=>{i!==0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(o.data.value||""),o.mergeAcross&&this.appendEmptyCells(o.mergeAcross)})}))}onNewHeaderGroupingRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderGroupingRowColumn.bind(this)}}onNewHeaderGroupingRowColumn(e,t,o,i){o!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(t),this.appendEmptyCells(i)}appendEmptyCells(e){for(let t=1;t<=e;t++)this.result+=this.columnSeparator+this.putInQuotes("")}onNewHeaderRow(){return this.beginNewLine(),{onColumn:this.onNewHeaderRowColumn.bind(this)}}onNewHeaderRowColumn(e,t){t!=0&&(this.result+=this.columnSeparator),this.result+=this.putInQuotes(this.extractHeaderValue(e))}onNewBodyRow(){return this.beginNewLine(),{onColumn:this.onNewBodyRowColumn.bind(this)}}onNewBodyRowColumn(e,t,o){t!=0&&(this.result+=this.columnSeparator);const i=this.extractRowCellValue(e,t,t,"csv",o);this.result+=this.putInQuotes(i.valueFormatted??i.value)}putInQuotes(e){if(this.suppressQuotes)return e;if(e==null)return'""';let t;return typeof e=="string"?t=e:typeof e.toString=="function"?t=e.toString():(_(53),t=""),'"'+t.replace(/"/g,'""')+'"'}parse(){return this.result}beginNewLine(){this.isFirstLine||(this.result+=Wu),this.isFirstLine=!1}},qR=class extends s0{constructor(){super(...arguments),this.beanName="csvCreator"}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc}getMergedParams(e){const t=this.gos.get("defaultCsvExportParams");return Object.assign({},t,e)}export(e){if(this.isExportSuppressed()){_(51);return}const t=this.getMergedParams(e),o=this.getData(t),i=new Blob(["\uFEFF",o],{type:"text/plain"}),r=typeof t.fileName=="function"?t.fileName(Z(this.gos,{})):t.fileName;a0(this.getFileName(r),i)}exportDataAsCsv(e){this.export(e)}getDataAsCsv(e,t=!1){const o=t?Object.assign({},e):this.getMergedParams(e);return this.getData(o)}getDefaultFileExtension(){return"csv"}createSerializingSession(e){const{colModel:t,colNames:o,rowGroupColsSvc:i,valueSvc:r,gos:s}=this,{processCellCallback:n,processHeaderCallback:a,processGroupHeaderCallback:l,processRowGroupCallback:d,suppressQuotes:c,columnSeparator:u}=e;return new YR({colModel:t,colNames:o,valueSvc:r,gos:s,processCellCallback:n||void 0,processHeaderCallback:a||void 0,processGroupHeaderCallback:l||void 0,processRowGroupCallback:d||void 0,suppressQuotes:c||!1,columnSeparator:u||",",rowGroupColsSvc:i})}isExportSuppressed(){return this.gos.get("suppressCsvExport")}};function XR(e,t){return e.csvCreator?.getDataAsCsv(t)}function QR(e,t){e.csvCreator?.exportDataAsCsv(t)}var ZR={moduleName:"CsvExport",version:ae,beans:[qR],apiFunctions:{getDataAsCsv:XR,exportDataAsCsv:QR},dependsOn:[KR]};function JR(e){return e.stateSvc?.getState()??{}}function ex(e){switch(e={...e},e.version||(e.version="32.1.0"),e.version){case"32.1.0":e=tx(e)}return e}function tx(e){return e.cellSelection=ox(e,"rangeSelection"),e}function ox(e,t){if(e&&typeof e=="object")return e[t]}var ix=class extends E{constructor(){super(...arguments),this.beanName="stateSvc",this.updateRowGroupExpansionStateTimer=0,this.suppressEvents=!0,this.queuedUpdateSources=new Set,this.dispatchStateUpdateEventDebounced=tt(this,()=>this.dispatchQueuedStateUpdateEvents(),0),this.onRowGroupOpenedDebounced=tt(this,()=>{this.updateCachedState("rowGroupExpansion",this.getRowGroupExpansionState())},0),this.onRowSelectedDebounced=tt(this,()=>{this.staleStateKeys.delete("rowSelection"),this.updateCachedState("rowSelection",this.getRowSelectionState())},0),this.staleStateKeys=new Set}postConstruct(){this.isClientSideRowModel=Et(this.gos),this.cachedState=this.getInitialState(),this.setCachedStateValue("version",ae);const e=this.suppressEventsAndDispatchInitEvent.bind(this);this.beans.ctrlsSvc.whenReady(this,()=>e(()=>this.setupStateOnGridReady()));const[t,o,i]=this.addManagedEventListeners({newColumnsLoaded:({source:r})=>{r==="gridInitializing"&&(t(),e(()=>this.setupStateOnColumnsInitialised()))},rowCountReady:()=>{o?.(),e(()=>this.setupStateOnRowCountReady())},firstDataRendered:()=>{i?.(),e(()=>this.setupStateOnFirstDataRendered())}})}destroy(){super.destroy(),clearTimeout(this.updateRowGroupExpansionStateTimer),this.queuedUpdateSources.clear()}getInitialState(){return ex(this.gos.get("initialState")??{})}getState(){return this.staleStateKeys.size&&this.refreshStaleState(),this.cachedState}setupStateOnGridReady(){const e=()=>this.updateCachedState("sideBar",this.getSideBarState());e(),this.addManagedEventListeners({toolPanelVisibleChanged:e,sideBarUpdated:e})}setupStateOnColumnsInitialised(){const e=this.getInitialState();this.setColumnState(e),this.setColumnGroupState(e),this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","pivot","rowGroup","sort"]),this.updateCachedState("columnGroup",this.getColumnGroupState());const t=o=>()=>this.updateColumnState([o]);this.addManagedEventListeners({columnValueChanged:t("aggregation"),columnMoved:t("columnOrder"),columnPinned:t("columnPinning"),columnResized:t("columnSizing"),columnVisible:t("columnVisibility"),columnPivotChanged:t("pivot"),columnPivotModeChanged:t("pivot"),columnRowGroupChanged:t("rowGroup"),sortChanged:t("sort"),newColumnsLoaded:()=>this.updateColumnState(["aggregation","columnOrder","columnPinning","columnSizing","columnVisibility","pivot","rowGroup","sort"]),columnGroupOpened:()=>this.updateCachedState("columnGroup",this.getColumnGroupState())})}setupStateOnRowCountReady(){const{filter:e,rowGroupExpansion:t,rowSelection:o,pagination:i}=this.getInitialState();e&&this.setFilterState(e),t&&this.setRowGroupExpansionState(t),o&&this.setRowSelectionState(o),i&&this.setPaginationState(i);const r=this.updateCachedState.bind(this);r("filter",this.getFilterState()),r("rowGroupExpansion",this.getRowGroupExpansionState()),r("rowSelection",this.getRowSelectionState()),r("pagination",this.getPaginationState());const s=()=>{this.updateRowGroupExpansionStateTimer=0,r("rowGroupExpansion",this.getRowGroupExpansionState())};this.addManagedEventListeners({filterChanged:()=>r("filter",this.getFilterState()),rowGroupOpened:()=>this.onRowGroupOpenedDebounced(),expandOrCollapseAll:s,columnRowGroupChanged:s,rowDataUpdated:()=>{this.gos.get("groupDefaultExpanded")!==0&&(this.updateRowGroupExpansionStateTimer||(this.updateRowGroupExpansionStateTimer=setTimeout(s)))},selectionChanged:()=>{this.staleStateKeys.add("rowSelection"),this.onRowSelectedDebounced()},paginationChanged:n=>{(n.newPage||n.newPageSize)&&r("pagination",this.getPaginationState())}})}setupStateOnFirstDataRendered(){const{scroll:e,cellSelection:t,focusedCell:o,columnOrder:i}=this.getInitialState();o&&this.setFocusedCellState(o),t&&this.setCellSelectionState(t),e&&this.setScrollState(e),this.setColumnPivotState(!!i?.orderedColIds);const r=this.updateCachedState.bind(this);r("sideBar",this.getSideBarState()),r("focusedCell",this.getFocusedCellState());const s=this.getRangeSelectionState();r("rangeSelection",s),r("cellSelection",s),r("scroll",this.getScrollState()),this.addManagedEventListeners({cellFocused:()=>r("focusedCell",this.getFocusedCellState()),cellSelectionChanged:n=>{if(n.finished){const a=this.getRangeSelectionState();r("rangeSelection",a),r("cellSelection",a)}},bodyScrollEnd:()=>r("scroll",this.getScrollState())})}getColumnState(){const e=this.beans,t=e.colModel.isPivotMode(),o=[],i=[],r=[],s=[],n=[],a=[],l=[],d=[],c=[];let u=0;const g=Ki(e);for(let p=0;p<g.length;p++){const{colId:f,sort:m,sortIndex:C,rowGroup:w,rowGroupIndex:y,aggFunc:b,pivot:x,pivotIndex:M,pinned:P,hide:k,width:S,flex:v}=g[p];c.push(f),m&&(o[C??u++]={colId:f,sort:m}),w&&(i[y??0]=f),typeof b=="string"&&r.push({colId:f,aggFunc:b}),x&&(s[M??0]=f),P&&(P==="right"?a:n).push(f),k&&l.push(f),(v!=null||S)&&d.push({colId:f,flex:v??void 0,width:S})}return{sort:o.length?{sortModel:o}:void 0,rowGroup:i.length?{groupColIds:i}:void 0,aggregation:r.length?{aggregationModel:r}:void 0,pivot:s.length||t?{pivotMode:t,pivotColIds:s}:void 0,columnPinning:n.length||a.length?{leftColIds:n,rightColIds:a}:void 0,columnVisibility:l.length?{hiddenColIds:l}:void 0,columnSizing:d.length?{columnSizingModel:d}:void 0,columnOrder:c.length?{orderedColIds:c}:void 0}}setColumnState(e){const{sort:t,rowGroup:o,aggregation:i,pivot:r,columnPinning:s,columnVisibility:n,columnSizing:a,columnOrder:l,partialColumnState:d}=e,c={},u=C=>{let w=c[C];return w||(w={colId:C},c[C]=w,w)},g=d?{}:{sort:null,sortIndex:null,rowGroup:null,rowGroupIndex:null,aggFunc:null,pivot:null,pivotIndex:null,pinned:null,hide:null,flex:null};t&&(t.sortModel.forEach(({colId:C,sort:w},y)=>{const b=u(C);b.sort=w,b.sortIndex=y}),g.sort=null,g.sortIndex=null),o&&(o.groupColIds.forEach((C,w)=>{const y=u(C);y.rowGroup=!0,y.rowGroupIndex=w}),g.rowGroup=null,g.rowGroupIndex=null),i&&(i.aggregationModel.forEach(({colId:C,aggFunc:w})=>{u(C).aggFunc=w}),g.aggFunc=null),r&&(r.pivotColIds.forEach((C,w)=>{const y=u(C);y.pivot=!0,y.pivotIndex=w}),this.gos.updateGridOptions({options:{pivotMode:r.pivotMode},source:"gridInitializing"}),g.pivot=null,g.pivotIndex=null),s&&(s.leftColIds.forEach(C=>{u(C).pinned="left"}),s.rightColIds.forEach(C=>{u(C).pinned="right"}),g.pinned=null),n&&(n.hiddenColIds.forEach(C=>{u(C).hide=!0}),g.hide=null),a&&(a.columnSizingModel.forEach(({colId:C,flex:w,width:y})=>{const b=u(C);b.flex=w??null,b.width=y}),g.flex=null);const p=l?.orderedColIds,f=!!p?.length,m=f?p.map(C=>u(C)):Object.values(c);m.length&&(this.columnStates=m,it(this.beans,{state:m,applyOrder:f,defaultState:g},"gridInitializing"))}setColumnPivotState(e){const t=this.columnStates;this.columnStates=void 0;const o=this.columnGroupStates;this.columnGroupStates=void 0;const i=this.beans,{pivotResultCols:r,colGroupSvc:s}=i;if(r?.isPivotResultColsPresent()){if(t){const n=[];for(const a of t)r.getPivotResultCol(a.colId)&&n.push(a);it(i,{state:n,applyOrder:e},"gridInitializing")}o&&s?.setColumnGroupState(o,"gridInitializing")}}getColumnGroupState(){const e=this.beans.colGroupSvc;if(!e)return;const t=e.getColumnGroupState(),o=[];return t.forEach(({groupId:i,open:r})=>{r&&o.push(i)}),o.length?{openColumnGroupIds:o}:void 0}setColumnGroupState(e){const t=this.beans.colGroupSvc;if(!Object.prototype.hasOwnProperty.call(e,"columnGroup")||!t)return;const o=new Set(e.columnGroup?.openColumnGroupIds),r=t.getColumnGroupState().map(({groupId:s})=>{const n=o.has(s);return n&&o.delete(s),{groupId:s,open:n}});o.forEach(s=>{r.push({groupId:s,open:!0})}),r.length&&(this.columnGroupStates=r),t.setColumnGroupState(r,"gridInitializing")}getFilterState(){const e=this.beans.filterManager;let t=e?.getFilterModel();t&&Object.keys(t).length===0&&(t=void 0);const o=e?.getAdvFilterModel()??void 0;return t||o?{filterModel:t,advancedFilterModel:o}:void 0}setFilterState(e){const t=this.beans.filterManager,{filterModel:o,advancedFilterModel:i}=e??{};o&&t?.setFilterModel(o,"columnFilter"),i&&t?.setAdvFilterModel(i,"advancedFilter")}getRangeSelectionState(){const e=this.beans.rangeSvc?.getCellRanges().map(t=>{const{id:o,type:i,startRow:r,endRow:s,columns:n,startColumn:a}=t;return{id:o,type:i,startRow:r,endRow:s,colIds:n.map(l=>l.getColId()),startColId:a.getColId()}});return e?.length?{cellRanges:e}:void 0}setCellSelectionState(e){const{gos:t,rangeSvc:o,colModel:i,visibleCols:r}=this.beans;if(!Bo(t)||!o)return;const s=[];e.cellRanges.forEach(n=>{const a=[];if(n.colIds.forEach(d=>{const c=i.getCol(d);c&&a.push(c)}),!a.length)return;let l=i.getCol(n.startColId);if(!l){const d=r.allCols,c=new Set(a);l=d.find(u=>c.has(u))}s.push({...n,columns:a,startColumn:l})}),o.setCellRanges(s)}getScrollState(){if(!this.isClientSideRowModel)return;const e=this.beans.ctrlsSvc.getScrollFeature(),{left:t}=e?.getHScrollPosition()??{left:0},{top:o}=e?.getVScrollPosition()??{top:0};return o||t?{top:o,left:t}:void 0}setScrollState(e){if(!this.isClientSideRowModel)return;const{top:t,left:o}=e,{frameworkOverrides:i,rowRenderer:r,animationFrameSvc:s,ctrlsSvc:n}=this.beans;i.wrapIncoming(()=>{n.get("center").setCenterViewportScrollLeft(o),n.getScrollFeature()?.setVerticalScrollPosition(t),r.redraw({afterScroll:!0}),s?.flushAllFrames()})}getSideBarState(){return this.beans.sideBar?.comp?.getState()}getFocusedCellState(){if(!this.isClientSideRowModel)return;const e=this.beans.focusSvc.getFocusedCell();if(e){const{column:t,rowIndex:o,rowPinned:i}=e;return{colId:t.getColId(),rowIndex:o,rowPinned:i}}}setFocusedCellState(e){if(!this.isClientSideRowModel)return;const{colId:t,rowIndex:o,rowPinned:i}=e,{focusSvc:r,colModel:s}=this.beans;r.setFocusedCell({column:s.getCol(t),rowIndex:o,rowPinned:i,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}getPaginationState(){const{pagination:e,gos:t}=this.beans;if(!e)return;const o=e.getCurrentPage(),i=t.get("paginationAutoPageSize")?void 0:e.getPageSize();if(!(!o&&!i))return{page:o,pageSize:i}}setPaginationState(e){const{pagination:t,gos:o}=this.beans;t&&(e.pageSize&&!o.get("paginationAutoPageSize")&&t.setPageSize(e.pageSize,"initialState"),typeof e.page=="number"&&t.setPage(e.page))}getRowSelectionState(){const e=this.beans.selectionSvc;if(!e)return;const t=e.getSelectionState();return!t||!Array.isArray(t)&&(t.selectAll===!1||t.selectAllChildren===!1)&&!t?.toggledNodes?.length?void 0:t}setRowSelectionState(e){this.beans.selectionSvc?.setSelectionState(e,"gridInitializing")}getRowGroupExpansionState(){const{expansionSvc:e,rowModel:t}=this.beans;if(!e)return;const o=[];return t.forEachNode(({expanded:i,id:r})=>{i&&r&&o.push(r)}),o.length?{expandedRowGroupIds:o}:void 0}setRowGroupExpansionState(e){this.beans.expansionSvc?.expandRows(e.expandedRowGroupIds)}updateColumnState(e){const t=this.getColumnState();let o=!1;const i=this.cachedState;for(const r of Object.keys(t)){const s=t[r];Oi(s,i[r])||(o=!0)}this.cachedState={...i,...t},o&&this.dispatchStateUpdateEvent(e)}updateCachedState(e,t){const o=this.cachedState[e];this.setCachedStateValue(e,t),Oi(t,o)||this.dispatchStateUpdateEvent([e])}setCachedStateValue(e,t){this.cachedState={...this.cachedState,[e]:t}}refreshStaleState(){const e=this.staleStateKeys;e.forEach(t=>{switch(t){case"rowSelection":this.setCachedStateValue(t,this.getRowSelectionState());break}}),e.clear()}dispatchStateUpdateEvent(e){this.suppressEvents||(e.forEach(t=>this.queuedUpdateSources.add(t)),this.dispatchStateUpdateEventDebounced())}dispatchQueuedStateUpdateEvents(){const e=this.queuedUpdateSources,t=Array.from(e);e.clear(),this.eventSvc.dispatchEvent({type:"stateUpdated",sources:t,state:this.cachedState})}suppressEventsAndDispatchInitEvent(e){this.suppressEvents=!0;const t=this.beans.colAnimation;t?.setSuppressAnimation(!0),e(),setTimeout(()=>{this.suppressEvents=!1,this.queuedUpdateSources.clear(),this.isAlive()&&(t?.setSuppressAnimation(!1),this.dispatchStateUpdateEvent(["gridInitializing"]))})}},rx={moduleName:"GridState",version:ae,beans:[ix],apiFunctions:{getState:JR}};function sx(e){return e.rowModel.isLastRowIndexKnown()}function nx(e){return e.pagination?.getPageSize()??100}function ax(e){return e.pagination?.getCurrentPage()??0}function lx(e){return e.pagination?.getTotalPages()??1}function dx(e){return e.pagination?e.pagination.getMasterRowCount():e.rowModel.getRowCount()}function cx(e){e.pagination?.goToNextPage()}function ux(e){e.pagination?.goToPreviousPage()}function hx(e){e.pagination?.goToFirstPage()}function gx(e){e.pagination?.goToLastPage()}function px(e,t){e.pagination?.goToPage(t)}var fx=class extends E{constructor(){super(...arguments),this.beanName="paginationAutoPageSizeSvc"}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.centerRowsCtrl=e.center;const t=this.checkPageSize.bind(this);this.addManagedEventListeners({bodyHeightChanged:t,scrollVisibilityChanged:t}),this.addManagedPropertyListener("paginationAutoPageSize",this.onPaginationAutoSizeChanged.bind(this)),this.checkPageSize()})}notActive(){return!this.gos.get("paginationAutoPageSize")||this.centerRowsCtrl==null}onPaginationAutoSizeChanged(){this.notActive()?this.beans.pagination.unsetAutoCalculatedPageSize():this.checkPageSize()}checkPageSize(){if(this.notActive())return;const e=this.centerRowsCtrl.viewportSizeFeature.getBodyHeight();if(e>0){const t=this.beans,o=()=>{const i=Math.max(vo(t),1),r=Math.floor(e/i);t.pagination.setPageSize(r,"autoCalculated")};this.isBodyRendered?tt(this,o,50)():(o(),this.isBodyRendered=!0)}else this.isBodyRendered=!1}},nr="paginationPageSizeSelector",mx={tag:"span",cls:"ag-paging-page-size"},Cx=class extends pe{constructor(){super(mx),this.hasEmptyOption=!1,this.handlePageSizeItemSelected=()=>{if(!this.selectPageSizeComp)return;const e=this.selectPageSizeComp.getValue();if(!e)return;const t=Number(e);isNaN(t)||t<1||t===this.pagination.getPageSize()||(this.pagination.setPageSize(t,"pageSizeSelector"),this.hasEmptyOption&&this.toggleSelectDisplay(!0),this.selectPageSizeComp.getFocusableElement().focus())}}wireBeans(e){this.pagination=e.pagination}postConstruct(){this.addManagedPropertyListener(nr,()=>{this.onPageSizeSelectorValuesChange()}),this.addManagedEventListeners({paginationChanged:e=>this.handlePaginationChanged(e)})}handlePaginationChanged(e){if(!this.selectPageSizeComp||!e?.newPageSize)return;const t=this.pagination.getPageSize();this.getPageSizeSelectorValues().includes(t)?this.selectPageSizeComp.setValue(t.toString()):this.hasEmptyOption?this.selectPageSizeComp.setValue(""):this.toggleSelectDisplay(!0)}toggleSelectDisplay(e){this.selectPageSizeComp&&!e&&this.reset(),e&&(this.reloadPageSizesSelector(),this.selectPageSizeComp)}reset(){ct(this.getGui()),this.selectPageSizeComp&&(this.selectPageSizeComp=this.destroyBean(this.selectPageSizeComp))}onPageSizeSelectorValuesChange(){this.selectPageSizeComp&&this.shouldShowPageSizeSelector()&&this.reloadPageSizesSelector()}shouldShowPageSizeSelector(){return this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel")&&!this.gos.get("paginationAutoPageSize")&&this.gos.get(nr)!==!1}reloadPageSizesSelector(){const e=this.getPageSizeSelectorValues(),t=this.pagination.getPageSize(),o=!t||!e.includes(t);if(o){const r=this.gos.exists("paginationPageSize"),s=this.gos.get(nr)!==!0;_(94,{pageSizeSet:r,pageSizesSet:s,pageSizeOptions:e,paginationPageSizeOption:t}),s||_(95,{paginationPageSizeOption:t,paginationPageSizeSelector:nr}),e.unshift("")}const i=String(o?"":t);this.selectPageSizeComp?(It(this.pageSizeOptions,e)||(this.selectPageSizeComp.clearOptions().addOptions(this.createPageSizeSelectOptions(e)),this.pageSizeOptions=e),this.selectPageSizeComp.setValue(i,!0)):this.createPageSizeSelectorComp(e,i),this.hasEmptyOption=o}createPageSizeSelectOptions(e){return e.map(t=>({value:String(t)}))}createPageSizeSelectorComp(e,t){const o=this.getLocaleTextFunc(),i=o("pageSizeSelectorLabel","Page Size:"),r=o("ariaPageSizeSelectorLabel","Page Size");this.selectPageSizeComp=this.createManagedBean(new Rv).addOptions(this.createPageSizeSelectOptions(e)).setValue(t).setAriaLabel(r).setLabel(i).onValueChange(()=>this.handlePageSizeItemSelected()),this.appendChild(this.selectPageSizeComp)}getPageSizeSelectorValues(){const e=[20,50,100],t=this.gos.get(nr);return!Array.isArray(t)||!t?.length?e:[...t].sort((o,i)=>o-i)}destroy(){this.toggleSelectDisplay(!1),super.destroy()}},vx={selector:"AG-PAGE-SIZE-SELECTOR",component:Cx},wx=".ag-paging-panel{align-items:center;border-top:var(--ag-footer-row-border);display:flex;gap:calc(var(--ag-spacing)*4);height:max(var(--ag-row-height),22px);justify-content:flex-end;padding:0 var(--ag-cell-horizontal-padding)}:where(.ag-paging-page-size) .ag-wrapper{min-width:50px}.ag-paging-page-summary-panel{align-items:center;display:flex;gap:var(--ag-cell-widget-spacing);.ag-disabled &{pointer-events:none}}.ag-paging-button{cursor:pointer;position:relative;&.ag-disabled{cursor:default;opacity:.5}}.ag-paging-number,.ag-paging-row-summary-panel-number{font-weight:500}",bx=class extends mi{constructor(){super(),this.btFirst=V,this.btPrevious=V,this.btNext=V,this.btLast=V,this.lbRecordCount=V,this.lbFirstRowOnPage=V,this.lbLastRowOnPage=V,this.lbCurrent=V,this.lbTotal=V,this.pageSizeComp=V,this.previousAndFirstButtonsDisabled=!1,this.nextButtonDisabled=!1,this.lastButtonDisabled=!1,this.areListenersSetup=!1,this.allowFocusInnerElement=!1,this.registerCSS(wx)}wireBeans(e){this.rowModel=e.rowModel,this.pagination=e.pagination,this.ariaAnnounce=e.ariaAnnounce}postConstruct(){const e=this.gos.get("enableRtl");this.setTemplate(this.getTemplate(),[vx]);const{btFirst:t,btPrevious:o,btNext:i,btLast:r}=this;this.activateTabIndex([t,o,i,r]),t.insertAdjacentElement("afterbegin",te(e?"last":"first",this.beans)),o.insertAdjacentElement("afterbegin",te(e?"next":"previous",this.beans)),i.insertAdjacentElement("afterbegin",te(e?"previous":"next",this.beans)),r.insertAdjacentElement("afterbegin",te(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:s=>this.allowFocusInnerElement?this.tabGuardFeature.getTabGuardCtrl().focusInnerElement(s):mm(this.beans,s),forceFocusOutWhenTabGuardsAreEmpty:!0}),this.onPaginationChanged()}setAllowFocus(e){this.allowFocusInnerElement=e}onPaginationChanged(){const t=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel");this.setDisplayed(t),t&&(this.setupListeners(),this.enableOrDisableButtons(),this.updateLabels(),this.onPageSizeRelatedOptionsChange())}onPageSizeRelatedOptionsChange(){this.pageSizeComp.toggleSelectDisplay(this.pageSizeComp.shouldShowPageSizeSelector())}setupListeners(){this.areListenersSetup||(this.addManagedEventListeners({paginationChanged:this.onPaginationChanged.bind(this)}),[{el:this.btFirst,fn:this.onBtFirst.bind(this)},{el:this.btPrevious,fn:this.onBtPrevious.bind(this)},{el:this.btNext,fn:this.onBtNext.bind(this)},{el:this.btLast,fn:this.onBtLast.bind(this)}].forEach(e=>{const{el:t,fn:o}=e;this.addManagedListeners(t,{click:o,keydown:i=>{(i.key===D.ENTER||i.key===D.SPACE)&&(i.preventDefault(),o())}})}),fm(this.beans,this,this.getGui()),this.areListenersSetup=!0)}onBtFirst(){this.previousAndFirstButtonsDisabled||this.pagination.goToFirstPage()}formatNumber(e){const t=this.gos.getCallback("paginationNumberFormatter");return t?t({value:e}):r0(e,this.getLocaleTextFunc.bind(this))}getTemplate(){const e=this.getLocaleTextFunc(),t=`ag-${this.getCompId()}`;return{tag:"div",cls:"ag-paging-panel ag-unselectable",attrs:{id:`${t}`},children:[{tag:"ag-page-size-selector",ref:"pageSizeComp"},{tag:"span",cls:"ag-paging-row-summary-panel",children:[{tag:"span",ref:"lbFirstRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-first-row`}},{tag:"span",attrs:{id:`${t}-to`},children:e("to","to")},{tag:"span",ref:"lbLastRowOnPage",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-last-row`}},{tag:"span",attrs:{id:`${t}-of`},children:e("of","of")},{tag:"span",ref:"lbRecordCount",cls:"ag-paging-row-summary-panel-number",attrs:{id:`${t}-row-count`}}]},{tag:"span",cls:"ag-paging-page-summary-panel",role:"presentation",children:[{tag:"div",ref:"btFirst",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("firstPage","First Page")}},{tag:"div",ref:"btPrevious",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("previousPage","Previous Page")}},{tag:"span",cls:"ag-paging-description",children:[{tag:"span",attrs:{id:`${t}-start-page`},children:e("page","Page")},{tag:"span",ref:"lbCurrent",cls:"ag-paging-number",attrs:{id:`${t}-start-page-number`}},{tag:"span",attrs:{id:`${t}-of-page`},children:e("of","of")},{tag:"span",ref:"lbTotal",cls:"ag-paging-number",attrs:{id:`${t}-of-page-number`}}]},{tag:"div",ref:"btNext",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("nextPage","Next Page")}},{tag:"div",ref:"btLast",cls:"ag-button ag-paging-button",role:"button",attrs:{"aria-label":e("lastPage","Last Page")}}]}]}}onBtNext(){this.nextButtonDisabled||this.pagination.goToNextPage()}onBtPrevious(){this.previousAndFirstButtonsDisabled||this.pagination.goToPreviousPage()}onBtLast(){this.lastButtonDisabled||this.pagination.goToLastPage()}enableOrDisableButtons(){const e=this.pagination.getCurrentPage(),t=this.rowModel.isLastRowIndexKnown(),o=this.pagination.getTotalPages();this.previousAndFirstButtonsDisabled=e===0,this.toggleButtonDisabled(this.btFirst,this.previousAndFirstButtonsDisabled),this.toggleButtonDisabled(this.btPrevious,this.previousAndFirstButtonsDisabled);const i=this.isZeroPagesToDisplay(),r=e===o-1;this.nextButtonDisabled=r||i,this.lastButtonDisabled=!t||i||e===o-1,this.toggleButtonDisabled(this.btNext,this.nextButtonDisabled),this.toggleButtonDisabled(this.btLast,this.lastButtonDisabled)}toggleButtonDisabled(e,t){Il(e,t),e.classList.toggle("ag-disabled",t)}isZeroPagesToDisplay(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages();return e&&t===0}updateLabels(){const e=this.rowModel.isLastRowIndexKnown(),t=this.pagination.getTotalPages(),o=this.pagination.getMasterRowCount(),i=e?o:null,r=this.pagination.getCurrentPage(),s=this.pagination.getPageSize();let n,a;this.isZeroPagesToDisplay()?n=a=0:(n=s*r+1,a=n+s-1,e&&a>i&&(a=i));const l=n+s-1,d=!e&&o<l,c=this.formatNumber(n);this.lbFirstRowOnPage.textContent=c;let u;const g=this.getLocaleTextFunc();d?u=g("pageLastRowUnknown","?"):u=this.formatNumber(a),this.lbLastRowOnPage.textContent=u;const f=t>0?r+1:0,m=this.formatNumber(f);this.lbCurrent.textContent=m;let C,w;if(e)C=this.formatNumber(t),w=this.formatNumber(i);else{const y=g("more","more");C=y,w=y}this.lbTotal.textContent=C,this.lbRecordCount.textContent=w,this.announceAriaStatus(c,u,w,m,C)}announceAriaStatus(e,t,o,i,r){const s=this.getLocaleTextFunc(),n=s("page","Page"),a=s("to","to"),l=s("of","of"),d=`${e} ${a} ${t} ${l} ${o}`,c=`${n} ${i} ${l} ${r}`;d!==this.ariaRowStatus&&(this.ariaRowStatus=d,this.ariaAnnounce?.announceValue(d,"paginationRow")),c!==this.ariaPageStatus&&(this.ariaPageStatus=c,this.ariaAnnounce?.announceValue(c,"paginationPage"))}setTotalLabelsToZero(){const e=this.formatNumber(0);this.lbFirstRowOnPage.textContent=e,this.lbCurrent.textContent=e,this.lbLastRowOnPage.textContent=e,this.lbTotal.textContent=e,this.lbRecordCount.textContent=e,this.announceAriaStatus(e,e,e,e,e)}},yx={selector:"AG-PAGINATION",component:bx},Sx=class extends E{constructor(){super(...arguments),this.beanName="pagination",this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=0,this.masterRowCount=0}postConstruct(){const e=this.gos;this.active=e.get("pagination"),this.pageSizeFromGridOptions=e.get("paginationPageSize"),this.paginateChildRows=this.isPaginateChildRows(),this.addManagedPropertyListener("pagination",this.onPaginationGridOptionChanged.bind(this)),this.addManagedPropertyListener("paginationPageSize",this.onPageSizeGridOptionChanged.bind(this))}getPaginationSelector(){return yx}isPaginateChildRows(){const e=this.gos;return e.get("groupHideParentOfSingleChild")||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")?!0:e.get("paginateChildRows")}onPaginationGridOptionChanged(){this.active=this.gos.get("pagination"),this.calculatePages(),this.dispatchPaginationChangedEvent({keepRenderedRows:!0})}onPageSizeGridOptionChanged(){this.setPageSize(this.gos.get("paginationPageSize"),"gridOptions")}goToPage(e){const t=this.currentPage;!this.active||t===e||typeof t!="number"||(this.currentPage=e,this.calculatePages(),this.dispatchPaginationChangedEvent({newPage:!0}))}goToPageWithIndex(e){if(!this.active)return;let t=e;this.paginateChildRows||(t=this.beans.rowModel.getTopLevelIndexFromDisplayedIndex?.(e)??e),this.goToPage(Math.floor(t/this.pageSize))}isRowInPage(e){return this.active?e>=this.topDisplayedRowIndex&&e<=this.bottomDisplayedRowIndex:!0}getCurrentPage(){return this.currentPage}goToNextPage(){this.goToPage(this.currentPage+1)}goToPreviousPage(){this.goToPage(this.currentPage-1)}goToFirstPage(){this.goToPage(0)}goToLastPage(){const e=this.beans.rowModel.getRowCount(),t=Math.floor(e/this.pageSize);this.goToPage(t)}getPageSize(){return this.pageSize}getTotalPages(){return this.totalPages}setPage(e){this.currentPage=e}get pageSize(){return q(this.pageSizeAutoCalculated)&&this.gos.get("paginationAutoPageSize")?this.pageSizeAutoCalculated:q(this.pageSizeFromPageSizeSelector)?this.pageSizeFromPageSizeSelector:q(this.pageSizeFromInitialState)?this.pageSizeFromInitialState:q(this.pageSizeFromGridOptions)?this.pageSizeFromGridOptions:this.defaultPageSize}calculatePages(){this.active?this.paginateChildRows?this.calculatePagesAllRows():this.calculatePagesMasterRowsOnly():this.calculatedPagesNotActive(),this.beans.pageBounds.calculateBounds(this.topDisplayedRowIndex,this.bottomDisplayedRowIndex)}unsetAutoCalculatedPageSize(){if(this.pageSizeAutoCalculated===void 0)return;const e=this.pageSizeAutoCalculated;this.pageSizeAutoCalculated=void 0,this.pageSize!==e&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0}))}setPageSize(e,t){const o=this.pageSize;switch(t){case"autoCalculated":this.pageSizeAutoCalculated=e;break;case"pageSizeSelector":this.pageSizeFromPageSizeSelector=e,this.currentPage!==0&&this.goToFirstPage();break;case"initialState":this.pageSizeFromInitialState=e;break;case"gridOptions":this.pageSizeFromGridOptions=e,this.pageSizeFromInitialState=void 0,this.pageSizeFromPageSizeSelector=void 0,this.currentPage!==0&&this.goToFirstPage();break}o!==this.pageSize&&(this.calculatePages(),this.dispatchPaginationChangedEvent({newPageSize:!0,keepRenderedRows:!0}))}setZeroRows(){this.masterRowCount=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=-1,this.currentPage=0,this.totalPages=0}adjustCurrentPageIfInvalid(){const e=this.totalPages;this.currentPage>=e&&(this.currentPage=e-1);const t=this.currentPage;(!isFinite(t)||isNaN(t)||t<0)&&(this.currentPage=0)}calculatePagesMasterRowsOnly(){const e=this.beans.rowModel,t=e.getTopLevelRowCount();if(this.masterRowCount=t,t<=0){this.setZeroRows();return}const o=this.pageSize,i=t-1;this.totalPages=Math.floor(i/o)+1,this.adjustCurrentPageIfInvalid();const r=this.currentPage,s=o*r;let n=o*(r+1)-1;if(n>i&&(n=i),this.topDisplayedRowIndex=e.getTopLevelRowDisplayedIndex(s),n===i)this.bottomDisplayedRowIndex=e.getRowCount()-1;else{const a=e.getTopLevelRowDisplayedIndex(n+1);this.bottomDisplayedRowIndex=a-1}}getMasterRowCount(){return this.masterRowCount}calculatePagesAllRows(){const e=this.beans.rowModel.getRowCount();if(this.masterRowCount=e,e===0){this.setZeroRows();return}const{pageSize:t,currentPage:o}=this,i=e-1;this.totalPages=Math.floor(i/t)+1,this.adjustCurrentPageIfInvalid(),this.topDisplayedRowIndex=t*o,this.bottomDisplayedRowIndex=t*(o+1)-1,this.bottomDisplayedRowIndex>i&&(this.bottomDisplayedRowIndex=i)}calculatedPagesNotActive(){this.setPageSize(void 0,"autoCalculated"),this.totalPages=1,this.currentPage=0,this.topDisplayedRowIndex=0,this.bottomDisplayedRowIndex=this.beans.rowModel.getRowCount()-1}dispatchPaginationChangedEvent(e){const{keepRenderedRows:t=!1,newPage:o=!1,newPageSize:i=!1}=e;this.eventSvc.dispatchEvent({type:"paginationChanged",animate:!1,newData:!1,newPage:o,newPageSize:i,keepRenderedRows:t})}},Rx={moduleName:"Pagination",version:ae,beans:[Sx,fx],icons:{first:"first",previous:"previous",next:"next",last:"last"},apiFunctions:{paginationIsLastPageFound:sx,paginationGetPageSize:nx,paginationGetCurrentPage:ax,paginationGetTotalPages:lx,paginationGetRowCount:dx,paginationGoToNextPage:cx,paginationGoToPreviousPage:ux,paginationGoToFirstPage:hx,paginationGoToLastPage:gx,paginationGoToPage:px},dependsOn:[ys]};function xx(e,t={}){const o=t?t.rowNodes:void 0;e.frameworkOverrides.wrapIncoming(()=>e.rowRenderer.redrawRows(o))}function $u(e,t,o,i,r){t&&(i&&t.parent&&t.parent.level!==-1&&$u(e,t.parent,o,i,r),t.setExpanded(o,void 0,r))}function Fx(e,t){return e.rowModel.getRowNode(t)}function Dx(e,t,o,i){e.rowRenderer.addRenderedRowListener(t,o,i)}function kx(e){return e.rowRenderer.getRenderedNodes()}function Mx(e,t,o){e.rowModel.forEachNode(t,o)}function Px(e){return e.rowRenderer.firstRenderedRow}function Ex(e){return e.rowRenderer.lastRenderedRow}function Ax(e,t){return e.rowModel.getRow(t)}function Tx(e){return e.rowModel.getRowCount()}var Ix={moduleName:"RowApi",version:ae,apiFunctions:{redrawRows:xx,setRowNodeExpanded:$u,getRowNode:Fx,addRenderedRowListener:Dx,getRenderedNodes:kx,forEachNode:Mx,getFirstDisplayedRowIndex:Px,getLastDisplayedRowIndex:Ex,getDisplayedRowAtIndex:Ax,getDisplayedRowCount:Tx}},Lx={moduleName:"RowStyle",version:ae,beans:[Zm]},Gx=class extends E{constructor(){super(...arguments),this.beanName="apiEventSvc",this.syncListeners=new Map,this.asyncListeners=new Map,this.syncGlobalListeners=new Set,this.globalListenerPairs=new Map}postConstruct(){this.wrapSvc=this.beans.frameworkOverrides.createGlobalEventListenerWrapper?.()}addEventListener(e,t){const o=this.wrapSvc?.wrap(t)??t,i=!or.has(e),r=i?this.asyncListeners:this.syncListeners;r.has(e)||r.set(e,new Set),r.get(e).add(o),this.eventSvc.addEventListener(e,o,i)}removeEventListener(e,t){const o=this.wrapSvc?.unwrap(t)??t,r=!!this.asyncListeners.get(e)?.delete(o);r||this.syncListeners.get(e)?.delete(o),this.eventSvc.removeEventListener(e,o,r)}addGlobalListener(e){const t=this.wrapSvc?.wrapGlobal(e)??e,o=(s,n)=>{or.has(s)&&t(s,n)},i=(s,n)=>{or.has(s)||t(s,n)};this.globalListenerPairs.set(e,{syncListener:o,asyncListener:i});const r=this.eventSvc;r.addGlobalListener(o,!1),r.addGlobalListener(i,!0)}removeGlobalListener(e){const{eventSvc:t,wrapSvc:o,globalListenerPairs:i}=this,r=o?.unwrapGlobal(e)??e;if(i.has(r)){const{syncListener:n,asyncListener:a}=i.get(r);t.removeGlobalListener(n,!1),t.removeGlobalListener(a,!0),i.delete(e)}else this.syncGlobalListeners.delete(r),t.removeGlobalListener(r,!1)}destroyEventListeners(e,t){e.forEach((o,i)=>{o.forEach(r=>this.eventSvc.removeEventListener(i,r,t)),o.clear()}),e.clear()}destroyGlobalListeners(e,t){e.forEach(o=>this.eventSvc.removeGlobalListener(o,t)),e.clear()}destroy(){super.destroy(),this.destroyEventListeners(this.syncListeners,!1),this.destroyEventListeners(this.asyncListeners,!0),this.destroyGlobalListeners(this.syncGlobalListeners,!1);const{globalListenerPairs:e,eventSvc:t}=this;e.forEach(({syncListener:o,asyncListener:i})=>{t.removeGlobalListener(o,!1),t.removeGlobalListener(i,!0)}),e.clear()}};function Bx(e,t,o){e.apiEventSvc?.addEventListener(t,o)}function Ox(e,t,o){e.apiEventSvc?.removeEventListener(t,o)}function Nx(e,t){e.apiEventSvc?.addGlobalListener(t)}function Hx(e,t){e.apiEventSvc?.removeGlobalListener(t)}var Vx={moduleName:"EventApi",version:ae,apiFunctions:{addEventListener:Bx,addGlobalListener:Nx,removeEventListener:Ox,removeGlobalListener:Hx},beans:[Gx]},_x=".ag-tooltip{background-color:var(--ag-tooltip-background-color);border:var(--ag-tooltip-border);border-radius:var(--ag-border-radius);color:var(--ag-tooltip-text-color);padding:var(--ag-widget-container-vertical-padding) var(--ag-widget-container-horizontal-padding);white-space:normal}.ag-tooltip,.ag-tooltip-custom{position:absolute;z-index:99999}.ag-tooltip-custom:where(:not(.ag-tooltip-interactive)),.ag-tooltip:where(:not(.ag-tooltip-interactive)){pointer-events:none}.ag-tooltip-animate{transition:opacity 1s;&:where(.ag-tooltip-hiding){opacity:0}}",zx=class extends E{constructor(){super(...arguments),this.beanName="tooltipSvc"}setupHeaderTooltip(e,t,o,i){e&&t.destroyBean(e);const r=Zi(this.gos),{column:s,eGui:n}=t,a=s.getColDef();!i&&r&&!a.headerComponent&&(i=Ji(()=>n.querySelector(".ag-header-cell-text")));const l={getColumn:()=>s,getColDef:()=>s.getColDef(),getGui:()=>n,getLocation:()=>"header",getTooltipValue:()=>o??s.getColDef().headerTooltip,shouldDisplayTooltip:i};let d=this.createTooltipFeature(l);return d&&(d=t.createBean(d),t.setRefreshFunction("tooltip",()=>d.refreshTooltip())),d}setupHeaderGroupTooltip(e,t,o,i){e&&t.destroyBean(e);const r=Zi(this.gos),{column:s,eGui:n}=t,a=s.getColGroupDef();!i&&r&&!a?.headerGroupComponent&&(i=Ji(()=>n.querySelector(".ag-header-group-text")));const l={getColumn:()=>s,getGui:()=>n,getLocation:()=>"headerGroup",getTooltipValue:()=>o??(a&&a.headerTooltip),shouldDisplayTooltip:i};a&&(l.getColDef=()=>a);const d=this.createTooltipFeature(l);return d&&t.createBean(d)}enableCellTooltipFeature(e,t,o){const{column:i,rowNode:r}=e,s=()=>{const l=i.getColDef(),d=r.data;if(l.tooltipField&&q(d))return $i(d,l.tooltipField,i.isTooltipFieldContainsDots());const c=l.tooltipValueGetter;return c?c(Z(this.gos,{location:"cell",colDef:i.getColDef(),column:i,rowIndex:e.cellPosition.rowIndex,node:r,data:r.data,value:e.value,valueFormatted:e.valueFormatted})):null},n=Zi(this.gos);!o&&n&&!e.isCellRenderer()&&(o=Ji(()=>{const l=e.eGui;return l.children.length===0?l:l.querySelector(".ag-cell-value")}));const a={getColumn:()=>i,getColDef:()=>i.getColDef(),getRowIndex:()=>e.cellPosition.rowIndex,getRowNode:()=>r,getGui:()=>e.eGui,getLocation:()=>"cell",getTooltipValue:t!=null?()=>t:s,getValueFormatted:()=>e.valueFormatted,shouldDisplayTooltip:o};return this.createTooltipFeature(a,this.beans)}refreshRowTooltip(e,t,o,i){const r={getGui:()=>t.getFullWidthElement(),getTooltipValue:()=>o,getLocation:()=>"fullWidthRow",shouldDisplayTooltip:i},s=this.beans,n=s.context;e&&t.destroyBean(e,n);const a=this.createTooltipFeature(r,s);return t.createBean(a,n)}initCol(e){const{colDef:t}=e;e.tooltipEnabled=q(t.tooltipField)||q(t.tooltipValueGetter)||q(t.tooltipComponent)}createTooltipFeature(e,t){return this.beans.registry.createDynamicBean("tooltipFeature",!1,e,t)}},Wx={moduleName:"Tooltip",version:ae,beans:[zx],dynamicBeans:{tooltipFeature:Cv},userComponents:{agTooltipComponent:o0},dependsOn:[ys],css:[_x]},$x=Object.defineProperty,Ux=(e,t,o)=>t in e?$x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ri=(e,t,o)=>Ux(e,typeof t!="symbol"?t+"":t,o);class ar{static getComponentDefinition(t,o){let i;return typeof t=="string"?i=this.searchForComponentInstance(o,t):i={extends:h.defineComponent({...t})},i||ce(114,{component:t}),i.extends?(i.extends.setup&&(i.setup=i.extends.setup),i.extends.props=this.addParamsToProps(i.extends.props)):i.props=this.addParamsToProps(i.props),i}static addParamsToProps(t){return!t||Array.isArray(t)&&t.indexOf("params")===-1?t=["params",...t||[]]:typeof t=="object"&&!t.params&&(t.params={type:Object}),t}static createAndMountComponent(t,o,i,r){const s=ar.getComponentDefinition(t,i);if(!s)return;const{vNode:n,destroy:a,el:l}=this.mount(s,{params:Object.freeze(o)},i,r||{});return{componentInstance:n.component.proxy,element:l,destroy:a}}static mount(t,o,i,r){let s=h.createVNode(t,o);s.appContext={...i.appContext,provides:r};let n=document.createElement("div");return h.render(s,n),{vNode:s,destroy:()=>{n&&h.render(null,n),n=null,s=null},el:n}}static searchForComponentInstance(t,o,i=10,r=!1){let s=null,n=0,a=t.parent;for(;!s&&a&&a.components&&++n<i;)a.components&&a.components[o]&&(s=a.components[o]),a=a.parent;for(n=0,a=t.parent;!s&&a&&a.$options&&++n<i;){const l=a;l.$options&&l.$options.components&&l.$options.components[o]?s=l.$options.components[o]:l[o]&&(s=l[o]),a=a.parent}for(n=0,a=t.parent;!s&&a&&++n<i;){if(a.exposed){const l=a;l.exposed&&l.exposed[o]?s=l.exposed[o]:l[o]&&(s=l[o])}a=a.parent}if(!s){const l=t.appContext.components;l&&l[o]&&(s=l[o])}return!s&&!r?(ce(114,{component:o}),null):s}}class jx extends e0{constructor(t,o){super(),Ri(this,"parent"),Ri(this,"provides"),this.parent=t,this.provides=o}createWrapper(t){const o=this;class i extends Kx{init(n){super.init(n)}hasMethod(n){var a,l;const d=r.getFrameworkComponentInstance();return d[n]?!0:((a=d.$.exposed)==null?void 0:a[n])!=null||((l=d.exposed)==null?void 0:l[n])!=null||d.$.setupState[n]!=null}callMethod(n,a){var l,d;const c=this.getFrameworkComponentInstance(),u=r.getFrameworkComponentInstance();if(u[n])return u[n].apply(c,a);{const g=((l=c.$.exposed)==null?void 0:l[n])||((d=c.exposed)==null?void 0:d[n])||c.$.setupState[n];return g?.apply(c,a)}}addMethod(n,a){r[n]=a}processMethod(n,a){return n==="refresh"&&(this.getFrameworkComponentInstance().params=a[0]),this.hasMethod(n)?this.callMethod(n,a):n==="refresh"}createComponent(n){return o.createComponent(t,n)}}const r=new i;return r}createComponent(t,o){return ar.createAndMountComponent(t,o,this.parent,this.provides)}createMethodProxy(t,o,i){return function(){return t.hasMethod(o)?t.callMethod(o,arguments):(i&&_(233,{methodName:o}),null)}}destroy(){this.parent=null}}class Kx{constructor(){Ri(this,"componentInstance"),Ri(this,"element"),Ri(this,"unmount")}getGui(){return this.element}destroy(){this.getFrameworkComponentInstance()&&typeof this.getFrameworkComponentInstance().destroy=="function"&&this.getFrameworkComponentInstance().destroy(),this.unmount()}getFrameworkComponentInstance(){return this.componentInstance}init(t){const{componentInstance:o,element:i,destroy:r}=this.createComponent(t);this.componentInstance=o,this.unmount=r,this.element=i.firstElementChild??i}}class Yx extends Vc{constructor(t){super("vue"),Ri(this,"parent"),this.parent=t}frameworkComponent(t,o){let i=ar.searchForComponentInstance(this.parent,t,10,!0)?t:null;if(!i&&o&&o[t]){const r=o[t];i=ar.searchForComponentInstance(this.parent,r,10,!0)?r:null}return i}isFrameworkComponent(t){return typeof t=="object"}}function qx(){return{gridOptions:{},modules:[],statusBar:void 0,sideBar:void 0,suppressContextMenu:void 0,preventDefaultOnContextMenu:void 0,allowContextMenuWithControlKey:void 0,columnMenu:void 0,suppressMenuHide:void 0,enableBrowserTooltips:void 0,tooltipTrigger:void 0,tooltipShowDelay:void 0,tooltipHideDelay:void 0,tooltipMouseTrack:void 0,tooltipShowMode:void 0,tooltipInteraction:void 0,popupParent:void 0,copyHeadersToClipboard:void 0,copyGroupHeadersToClipboard:void 0,clipboardDelimiter:void 0,suppressCopyRowsToClipboard:void 0,suppressCopySingleCellRanges:void 0,suppressLastEmptyLineOnPaste:void 0,suppressClipboardPaste:void 0,suppressClipboardApi:void 0,suppressCutToClipboard:void 0,columnDefs:void 0,defaultColDef:void 0,defaultColGroupDef:void 0,columnTypes:void 0,dataTypeDefinitions:void 0,maintainColumnOrder:void 0,enableStrictPivotColumnOrder:void 0,suppressFieldDotNotation:void 0,headerHeight:void 0,groupHeaderHeight:void 0,floatingFiltersHeight:void 0,pivotHeaderHeight:void 0,pivotGroupHeaderHeight:void 0,allowDragFromColumnsToolPanel:void 0,suppressMovableColumns:void 0,suppressColumnMoveAnimation:void 0,suppressMoveWhenColumnDragging:void 0,suppressDragLeaveHidesColumns:void 0,suppressGroupChangesColumnVisibility:void 0,suppressMakeColumnVisibleAfterUnGroup:void 0,suppressRowGroupHidesColumns:void 0,colResizeDefault:void 0,suppressAutoSize:void 0,autoSizePadding:void 0,skipHeaderOnAutoSize:void 0,autoSizeStrategy:void 0,components:void 0,editType:void 0,singleClickEdit:void 0,suppressClickEdit:void 0,readOnlyEdit:void 0,stopEditingWhenCellsLoseFocus:void 0,enterNavigatesVertically:void 0,enterNavigatesVerticallyAfterEdit:void 0,enableCellEditingOnBackspace:void 0,undoRedoCellEditing:void 0,undoRedoCellEditingLimit:void 0,defaultCsvExportParams:void 0,suppressCsvExport:void 0,defaultExcelExportParams:void 0,suppressExcelExport:void 0,excelStyles:void 0,findSearchValue:void 0,findOptions:void 0,quickFilterText:void 0,cacheQuickFilter:void 0,includeHiddenColumnsInQuickFilter:void 0,quickFilterParser:void 0,quickFilterMatcher:void 0,applyQuickFilterBeforePivotOrAgg:void 0,excludeChildrenWhenTreeDataFiltering:void 0,enableAdvancedFilter:void 0,alwaysPassFilter:void 0,includeHiddenColumnsInAdvancedFilter:void 0,advancedFilterParent:void 0,advancedFilterBuilderParams:void 0,suppressAdvancedFilterEval:void 0,suppressSetFilterByDefault:void 0,enableCharts:void 0,chartThemes:void 0,customChartThemes:void 0,chartThemeOverrides:void 0,chartToolPanelsDef:void 0,chartMenuItems:void 0,loadingCellRenderer:void 0,loadingCellRendererParams:void 0,loadingCellRendererSelector:void 0,localeText:void 0,masterDetail:void 0,keepDetailRows:void 0,keepDetailRowsCount:void 0,detailCellRenderer:void 0,detailCellRendererParams:void 0,detailRowHeight:void 0,detailRowAutoHeight:void 0,context:void 0,dragAndDropImageComponent:void 0,dragAndDropImageComponentParams:void 0,alignedGrids:void 0,tabIndex:void 0,rowBuffer:void 0,valueCache:void 0,valueCacheNeverExpires:void 0,enableCellExpressions:void 0,suppressTouch:void 0,suppressFocusAfterRefresh:void 0,suppressBrowserResizeObserver:void 0,suppressPropertyNamesCheck:void 0,suppressChangeDetection:void 0,debug:void 0,loading:void 0,overlayLoadingTemplate:void 0,loadingOverlayComponent:void 0,loadingOverlayComponentParams:void 0,suppressLoadingOverlay:void 0,overlayNoRowsTemplate:void 0,noRowsOverlayComponent:void 0,noRowsOverlayComponentParams:void 0,suppressNoRowsOverlay:void 0,pagination:void 0,paginationPageSize:void 0,paginationPageSizeSelector:void 0,paginationAutoPageSize:void 0,paginateChildRows:void 0,suppressPaginationPanel:void 0,pivotMode:void 0,pivotPanelShow:void 0,pivotMaxGeneratedColumns:void 0,pivotDefaultExpanded:void 0,pivotColumnGroupTotals:void 0,pivotRowTotals:void 0,pivotSuppressAutoColumn:void 0,suppressExpandablePivotGroups:void 0,functionsReadOnly:void 0,aggFuncs:void 0,suppressAggFuncInHeader:void 0,alwaysAggregateAtRootLevel:void 0,aggregateOnlyChangedColumns:void 0,suppressAggFilteredOnly:void 0,removePivotHeaderRowWhenSingleValueColumn:void 0,animateRows:void 0,cellFlashDuration:void 0,cellFadeDuration:void 0,allowShowChangeAfterFilter:void 0,domLayout:void 0,ensureDomOrder:void 0,enableCellSpan:void 0,enableRtl:void 0,suppressColumnVirtualisation:void 0,suppressMaxRenderedRowRestriction:void 0,suppressRowVirtualisation:void 0,rowDragManaged:void 0,suppressRowDrag:void 0,suppressMoveWhenRowDragging:void 0,rowDragEntireRow:void 0,rowDragMultiRow:void 0,rowDragText:void 0,fullWidthCellRenderer:void 0,fullWidthCellRendererParams:void 0,embedFullWidthRows:void 0,groupDisplayType:void 0,groupDefaultExpanded:void 0,autoGroupColumnDef:void 0,groupMaintainOrder:void 0,groupSelectsChildren:void 0,groupLockGroupColumns:void 0,groupAggFiltering:void 0,groupTotalRow:void 0,grandTotalRow:void 0,suppressStickyTotalRow:void 0,groupSuppressBlankHeader:void 0,groupSelectsFiltered:void 0,showOpenedGroup:void 0,groupHideParentOfSingleChild:void 0,groupRemoveSingleChildren:void 0,groupRemoveLowestSingleChildren:void 0,groupHideOpenParents:void 0,groupAllowUnbalanced:void 0,rowGroupPanelShow:void 0,groupRowRenderer:void 0,groupRowRendererParams:void 0,treeData:void 0,treeDataChildrenField:void 0,treeDataParentIdField:void 0,rowGroupPanelSuppressSort:void 0,suppressGroupRowsSticky:void 0,pinnedTopRowData:void 0,pinnedBottomRowData:void 0,rowModelType:void 0,rowData:void 0,asyncTransactionWaitMillis:void 0,suppressModelUpdateAfterUpdateTransaction:void 0,datasource:void 0,cacheOverflowSize:void 0,infiniteInitialRowCount:void 0,serverSideInitialRowCount:void 0,suppressServerSideFullWidthLoadingRow:void 0,cacheBlockSize:void 0,maxBlocksInCache:void 0,maxConcurrentDatasourceRequests:void 0,blockLoadDebounceMillis:void 0,purgeClosedRowNodes:void 0,serverSideDatasource:void 0,serverSideSortAllLevels:void 0,serverSideEnableClientSideSort:void 0,serverSideOnlyRefreshFilteredGroups:void 0,serverSidePivotResultFieldSeparator:void 0,viewportDatasource:void 0,viewportRowModelPageSize:void 0,viewportRowModelBufferSize:void 0,alwaysShowHorizontalScroll:void 0,alwaysShowVerticalScroll:void 0,debounceVerticalScrollbar:void 0,suppressHorizontalScroll:void 0,suppressScrollOnNewData:void 0,suppressScrollWhenPopupsAreOpen:void 0,suppressAnimationFrame:void 0,suppressMiddleClickScrolls:void 0,suppressPreventDefaultOnMouseWheel:void 0,scrollbarWidth:void 0,rowSelection:void 0,cellSelection:void 0,rowMultiSelectWithClick:void 0,suppressRowDeselection:void 0,suppressRowClickSelection:void 0,suppressCellFocus:void 0,suppressHeaderFocus:void 0,selectionColumnDef:void 0,rowNumbers:void 0,suppressMultiRangeSelection:void 0,enableCellTextSelection:void 0,enableRangeSelection:void 0,enableRangeHandle:void 0,enableFillHandle:void 0,fillHandleDirection:void 0,suppressClearOnFillReduction:void 0,sortingOrder:void 0,accentedSort:void 0,unSortIcon:void 0,suppressMultiSort:void 0,alwaysMultiSort:void 0,multiSortKey:void 0,suppressMaintainUnsortedOrder:void 0,icons:void 0,rowHeight:void 0,rowStyle:void 0,rowClass:void 0,rowClassRules:void 0,suppressRowHoverHighlight:void 0,suppressRowTransform:void 0,columnHoverHighlight:void 0,gridId:void 0,deltaSort:void 0,treeDataDisplayType:void 0,enableGroupEdit:void 0,initialState:void 0,theme:void 0,loadThemeGoogleFonts:void 0,themeCssLayer:void 0,styleNonce:void 0,themeStyleContainer:void 0,getContextMenuItems:void 0,getMainMenuItems:void 0,postProcessPopup:void 0,processUnpinnedColumns:void 0,processCellForClipboard:void 0,processHeaderForClipboard:void 0,processGroupHeaderForClipboard:void 0,processCellFromClipboard:void 0,sendToClipboard:void 0,processDataFromClipboard:void 0,isExternalFilterPresent:void 0,doesExternalFilterPass:void 0,getChartToolbarItems:void 0,createChartContainer:void 0,focusGridInnerElement:void 0,navigateToNextHeader:void 0,tabToNextHeader:void 0,navigateToNextCell:void 0,tabToNextCell:void 0,getLocaleText:void 0,getDocument:void 0,paginationNumberFormatter:void 0,getGroupRowAgg:void 0,isGroupOpenByDefault:void 0,initialGroupOrderComparator:void 0,processPivotResultColDef:void 0,processPivotResultColGroupDef:void 0,getDataPath:void 0,getChildCount:void 0,getServerSideGroupLevelParams:void 0,isServerSideGroupOpenByDefault:void 0,isApplyServerSideTransaction:void 0,isServerSideGroup:void 0,getServerSideGroupKey:void 0,getBusinessKeyForNode:void 0,getRowId:void 0,resetRowDataOnUpdate:void 0,processRowPostCreate:void 0,isRowSelectable:void 0,isRowMaster:void 0,fillOperation:void 0,postSortRows:void 0,getRowStyle:void 0,getRowClass:void 0,getRowHeight:void 0,isFullWidthRow:void 0,"onColumn-everything-changed":void 0,"onNew-columns-loaded":void 0,"onColumn-pivot-mode-changed":void 0,"onPivot-max-columns-exceeded":void 0,"onColumn-row-group-changed":void 0,"onExpand-or-collapse-all":void 0,"onColumn-pivot-changed":void 0,"onGrid-columns-changed":void 0,"onColumn-value-changed":void 0,"onColumn-moved":void 0,"onColumn-visible":void 0,"onColumn-pinned":void 0,"onColumn-group-opened":void 0,"onColumn-resized":void 0,"onDisplayed-columns-changed":void 0,"onVirtual-columns-changed":void 0,"onColumn-header-mouse-over":void 0,"onColumn-header-mouse-leave":void 0,"onColumn-header-clicked":void 0,"onColumn-header-context-menu":void 0,"onAsync-transactions-flushed":void 0,"onRow-group-opened":void 0,"onRow-data-updated":void 0,"onPinned-row-data-changed":void 0,"onRange-selection-changed":void 0,"onCell-selection-changed":void 0,"onChart-created":void 0,"onChart-range-selection-changed":void 0,"onChart-options-changed":void 0,"onChart-destroyed":void 0,"onTool-panel-visible-changed":void 0,"onTool-panel-size-changed":void 0,"onModel-updated":void 0,"onCut-start":void 0,"onCut-end":void 0,"onPaste-start":void 0,"onPaste-end":void 0,"onFill-start":void 0,"onFill-end":void 0,"onCell-selection-delete-start":void 0,"onCell-selection-delete-end":void 0,"onRange-delete-start":void 0,"onRange-delete-end":void 0,"onUndo-started":void 0,"onUndo-ended":void 0,"onRedo-started":void 0,"onRedo-ended":void 0,"onCell-clicked":void 0,"onCell-double-clicked":void 0,"onCell-mouse-down":void 0,"onCell-context-menu":void 0,"onCell-value-changed":void 0,"onCell-edit-request":void 0,"onRow-value-changed":void 0,"onHeader-focused":void 0,"onCell-focused":void 0,"onRow-selected":void 0,"onSelection-changed":void 0,"onTooltip-show":void 0,"onTooltip-hide":void 0,"onCell-key-down":void 0,"onCell-mouse-over":void 0,"onCell-mouse-out":void 0,"onFilter-changed":void 0,"onFilter-modified":void 0,"onFilter-opened":void 0,"onAdvanced-filter-builder-visible-changed":void 0,"onSort-changed":void 0,"onVirtual-row-removed":void 0,"onRow-clicked":void 0,"onRow-double-clicked":void 0,"onGrid-ready":void 0,"onGrid-pre-destroyed":void 0,"onGrid-size-changed":void 0,"onViewport-changed":void 0,"onFirst-data-rendered":void 0,"onDrag-started":void 0,"onDrag-stopped":void 0,"onDrag-cancelled":void 0,"onRow-editing-started":void 0,"onRow-editing-stopped":void 0,"onCell-editing-started":void 0,"onCell-editing-stopped":void 0,"onBody-scroll":void 0,"onBody-scroll-end":void 0,"onPagination-changed":void 0,"onComponent-state-changed":void 0,"onStore-refreshed":void 0,"onState-updated":void 0,"onColumn-menu-visible-changed":void 0,"onContext-menu-visible-changed":void 0,"onRow-drag-enter":void 0,"onRow-drag-move":void 0,"onRow-drag-leave":void 0,"onRow-drag-end":void 0,"onRow-drag-cancel":void 0,"onFind-changed":void 0}}const Xx=(e,t)=>{let o;return()=>{const i=function(){e()};window.clearTimeout(o),o=window.setTimeout(i,t)}};function Qx(e){return e&&e.constructor&&e.constructor.toString().substring(0,5)==="class"}function lr(e){const t=o=>Qx(o)?h.toRaw(o):Array.isArray(o)?o.map(i=>t(i)):h.isRef(o)||h.isReactive(o)||h.isProxy(o)?t(h.toRaw(o)):o;return t(e)}const Zx={ref:"root"},Jx=h.defineComponent({__name:"AgGridVue",props:h.mergeModels(h.mergeDefaults({gridOptions:{},modules:{},statusBar:{},sideBar:{type:[Object,String,Array,Boolean,null]},suppressContextMenu:{type:Boolean},preventDefaultOnContextMenu:{type:Boolean},allowContextMenuWithControlKey:{type:Boolean},columnMenu:{},suppressMenuHide:{type:Boolean},enableBrowserTooltips:{type:Boolean},tooltipTrigger:{},tooltipShowDelay:{},tooltipHideDelay:{},tooltipMouseTrack:{type:Boolean},tooltipShowMode:{},tooltipInteraction:{type:Boolean},popupParent:{},copyHeadersToClipboard:{type:Boolean},copyGroupHeadersToClipboard:{type:Boolean},clipboardDelimiter:{},suppressCopyRowsToClipboard:{type:Boolean},suppressCopySingleCellRanges:{type:Boolean},suppressLastEmptyLineOnPaste:{type:Boolean},suppressClipboardPaste:{type:Boolean},suppressClipboardApi:{type:Boolean},suppressCutToClipboard:{type:Boolean},columnDefs:{},defaultColDef:{},defaultColGroupDef:{},columnTypes:{},dataTypeDefinitions:{},maintainColumnOrder:{type:Boolean},enableStrictPivotColumnOrder:{type:Boolean},suppressFieldDotNotation:{type:Boolean},headerHeight:{},groupHeaderHeight:{},floatingFiltersHeight:{},pivotHeaderHeight:{},pivotGroupHeaderHeight:{},allowDragFromColumnsToolPanel:{type:Boolean},suppressMovableColumns:{type:Boolean},suppressColumnMoveAnimation:{type:Boolean},suppressMoveWhenColumnDragging:{type:Boolean},suppressDragLeaveHidesColumns:{type:Boolean},suppressGroupChangesColumnVisibility:{type:[Boolean,String]},suppressMakeColumnVisibleAfterUnGroup:{type:Boolean},suppressRowGroupHidesColumns:{type:Boolean},colResizeDefault:{},suppressAutoSize:{type:Boolean},autoSizePadding:{},skipHeaderOnAutoSize:{type:Boolean},autoSizeStrategy:{},components:{},editType:{},singleClickEdit:{type:Boolean},suppressClickEdit:{type:Boolean},readOnlyEdit:{type:Boolean},stopEditingWhenCellsLoseFocus:{type:Boolean},enterNavigatesVertically:{type:Boolean},enterNavigatesVerticallyAfterEdit:{type:Boolean},enableCellEditingOnBackspace:{type:Boolean},undoRedoCellEditing:{type:Boolean},undoRedoCellEditingLimit:{},defaultCsvExportParams:{},suppressCsvExport:{type:Boolean},defaultExcelExportParams:{},suppressExcelExport:{type:Boolean},excelStyles:{},findSearchValue:{},findOptions:{},quickFilterText:{},cacheQuickFilter:{type:Boolean},includeHiddenColumnsInQuickFilter:{type:Boolean},quickFilterParser:{type:Function},quickFilterMatcher:{type:Function},applyQuickFilterBeforePivotOrAgg:{type:Boolean},excludeChildrenWhenTreeDataFiltering:{type:Boolean},enableAdvancedFilter:{type:Boolean},alwaysPassFilter:{type:Function},includeHiddenColumnsInAdvancedFilter:{type:Boolean},advancedFilterParent:{},advancedFilterBuilderParams:{},suppressAdvancedFilterEval:{type:Boolean},suppressSetFilterByDefault:{type:Boolean},enableCharts:{type:Boolean},chartThemes:{},customChartThemes:{},chartThemeOverrides:{},chartToolPanelsDef:{},chartMenuItems:{type:[Array,Function]},loadingCellRenderer:{},loadingCellRendererParams:{},loadingCellRendererSelector:{type:Function},localeText:{},masterDetail:{type:Boolean},keepDetailRows:{type:Boolean},keepDetailRowsCount:{},detailCellRenderer:{},detailCellRendererParams:{},detailRowHeight:{},detailRowAutoHeight:{type:Boolean},context:{},dragAndDropImageComponent:{},dragAndDropImageComponentParams:{},alignedGrids:{type:[Array,Function]},tabIndex:{},rowBuffer:{},valueCache:{type:Boolean},valueCacheNeverExpires:{type:Boolean},enableCellExpressions:{type:Boolean},suppressTouch:{type:Boolean},suppressFocusAfterRefresh:{type:Boolean},suppressBrowserResizeObserver:{type:Boolean},suppressPropertyNamesCheck:{type:Boolean},suppressChangeDetection:{type:Boolean},debug:{type:Boolean},loading:{type:Boolean},overlayLoadingTemplate:{},loadingOverlayComponent:{},loadingOverlayComponentParams:{},suppressLoadingOverlay:{type:Boolean},overlayNoRowsTemplate:{},noRowsOverlayComponent:{},noRowsOverlayComponentParams:{},suppressNoRowsOverlay:{type:Boolean},pagination:{type:Boolean},paginationPageSize:{},paginationPageSizeSelector:{type:[Array,Boolean]},paginationAutoPageSize:{type:Boolean},paginateChildRows:{type:Boolean},suppressPaginationPanel:{type:Boolean},pivotMode:{type:Boolean},pivotPanelShow:{},pivotMaxGeneratedColumns:{},pivotDefaultExpanded:{},pivotColumnGroupTotals:{},pivotRowTotals:{},pivotSuppressAutoColumn:{type:Boolean},suppressExpandablePivotGroups:{type:Boolean},functionsReadOnly:{type:Boolean},aggFuncs:{},suppressAggFuncInHeader:{type:Boolean},alwaysAggregateAtRootLevel:{type:Boolean},aggregateOnlyChangedColumns:{type:Boolean},suppressAggFilteredOnly:{type:Boolean},removePivotHeaderRowWhenSingleValueColumn:{type:Boolean},animateRows:{type:Boolean},cellFlashDuration:{},cellFadeDuration:{},allowShowChangeAfterFilter:{type:Boolean},domLayout:{},ensureDomOrder:{type:Boolean},enableCellSpan:{type:Boolean},enableRtl:{type:Boolean},suppressColumnVirtualisation:{type:Boolean},suppressMaxRenderedRowRestriction:{type:Boolean},suppressRowVirtualisation:{type:Boolean},rowDragManaged:{type:Boolean},suppressRowDrag:{type:Boolean},suppressMoveWhenRowDragging:{type:Boolean},rowDragEntireRow:{type:Boolean},rowDragMultiRow:{type:Boolean},rowDragText:{type:Function},fullWidthCellRenderer:{},fullWidthCellRendererParams:{},embedFullWidthRows:{type:Boolean},groupDisplayType:{},groupDefaultExpanded:{},autoGroupColumnDef:{},groupMaintainOrder:{type:Boolean},groupSelectsChildren:{type:Boolean},groupLockGroupColumns:{},groupAggFiltering:{type:[Boolean,Function]},groupTotalRow:{type:[String,Function]},grandTotalRow:{},suppressStickyTotalRow:{type:[Boolean,String]},groupSuppressBlankHeader:{type:Boolean},groupSelectsFiltered:{type:Boolean},showOpenedGroup:{type:Boolean},groupHideParentOfSingleChild:{type:[Boolean,String]},groupRemoveSingleChildren:{type:Boolean},groupRemoveLowestSingleChildren:{type:Boolean},groupHideOpenParents:{type:Boolean},groupAllowUnbalanced:{type:Boolean},rowGroupPanelShow:{},groupRowRenderer:{},groupRowRendererParams:{},treeData:{type:Boolean},treeDataChildrenField:{},treeDataParentIdField:{},rowGroupPanelSuppressSort:{type:Boolean},suppressGroupRowsSticky:{type:Boolean},pinnedTopRowData:{},pinnedBottomRowData:{},rowModelType:{},rowData:{},asyncTransactionWaitMillis:{},suppressModelUpdateAfterUpdateTransaction:{type:Boolean},datasource:{},cacheOverflowSize:{},infiniteInitialRowCount:{},serverSideInitialRowCount:{},suppressServerSideFullWidthLoadingRow:{type:Boolean},cacheBlockSize:{},maxBlocksInCache:{},maxConcurrentDatasourceRequests:{},blockLoadDebounceMillis:{},purgeClosedRowNodes:{type:Boolean},serverSideDatasource:{},serverSideSortAllLevels:{type:Boolean},serverSideEnableClientSideSort:{type:Boolean},serverSideOnlyRefreshFilteredGroups:{type:Boolean},serverSidePivotResultFieldSeparator:{},viewportDatasource:{},viewportRowModelPageSize:{},viewportRowModelBufferSize:{},alwaysShowHorizontalScroll:{type:Boolean},alwaysShowVerticalScroll:{type:Boolean},debounceVerticalScrollbar:{type:Boolean},suppressHorizontalScroll:{type:Boolean},suppressScrollOnNewData:{type:Boolean},suppressScrollWhenPopupsAreOpen:{type:Boolean},suppressAnimationFrame:{type:Boolean},suppressMiddleClickScrolls:{type:Boolean},suppressPreventDefaultOnMouseWheel:{type:Boolean},scrollbarWidth:{},rowSelection:{},cellSelection:{type:[Boolean,Object]},rowMultiSelectWithClick:{type:Boolean},suppressRowDeselection:{type:Boolean},suppressRowClickSelection:{type:Boolean},suppressCellFocus:{type:Boolean},suppressHeaderFocus:{type:Boolean},selectionColumnDef:{},rowNumbers:{type:[Boolean,Object]},suppressMultiRangeSelection:{type:Boolean},enableCellTextSelection:{type:Boolean},enableRangeSelection:{type:Boolean},enableRangeHandle:{type:Boolean},enableFillHandle:{type:Boolean},fillHandleDirection:{},suppressClearOnFillReduction:{type:Boolean},sortingOrder:{},accentedSort:{type:Boolean},unSortIcon:{type:Boolean},suppressMultiSort:{type:Boolean},alwaysMultiSort:{type:Boolean},multiSortKey:{},suppressMaintainUnsortedOrder:{type:Boolean},icons:{},rowHeight:{},rowStyle:{},rowClass:{},rowClassRules:{},suppressRowHoverHighlight:{type:Boolean},suppressRowTransform:{type:Boolean},columnHoverHighlight:{type:Boolean},gridId:{},deltaSort:{type:Boolean},treeDataDisplayType:{},enableGroupEdit:{type:Boolean},initialState:{},theme:{},loadThemeGoogleFonts:{type:Boolean},themeCssLayer:{},styleNonce:{},themeStyleContainer:{},getContextMenuItems:{type:Function},getMainMenuItems:{type:Function},postProcessPopup:{type:Function},processUnpinnedColumns:{type:Function},processCellForClipboard:{type:Function},processHeaderForClipboard:{type:Function},processGroupHeaderForClipboard:{type:Function},processCellFromClipboard:{type:Function},sendToClipboard:{type:Function},processDataFromClipboard:{type:Function},isExternalFilterPresent:{type:Function},doesExternalFilterPass:{type:Function},getChartToolbarItems:{type:Function},createChartContainer:{type:Function},focusGridInnerElement:{type:Function},navigateToNextHeader:{type:Function},tabToNextHeader:{type:Function},navigateToNextCell:{type:Function},tabToNextCell:{type:Function},getLocaleText:{type:Function},getDocument:{type:Function},paginationNumberFormatter:{type:Function},getGroupRowAgg:{type:Function},isGroupOpenByDefault:{type:Function},initialGroupOrderComparator:{type:Function},processPivotResultColDef:{type:Function},processPivotResultColGroupDef:{type:Function},getDataPath:{type:Function},getChildCount:{type:Function},getServerSideGroupLevelParams:{type:Function},isServerSideGroupOpenByDefault:{type:Function},isApplyServerSideTransaction:{type:Function},isServerSideGroup:{type:Function},getServerSideGroupKey:{type:Function},getBusinessKeyForNode:{type:Function},getRowId:{type:Function},resetRowDataOnUpdate:{type:Boolean},processRowPostCreate:{type:Function},isRowSelectable:{type:Function},isRowMaster:{type:Function},fillOperation:{type:Function},postSortRows:{type:Function},getRowStyle:{type:Function},getRowClass:{type:Function},getRowHeight:{type:Function},isFullWidthRow:{type:Function},"onTool-panel-visible-changed":{},"onTool-panel-size-changed":{},"onColumn-menu-visible-changed":{},"onContext-menu-visible-changed":{},"onCut-start":{},"onCut-end":{},"onPaste-start":{},"onPaste-end":{},"onColumn-visible":{},"onColumn-pinned":{},"onColumn-resized":{},"onColumn-moved":{},"onColumn-value-changed":{},"onColumn-pivot-mode-changed":{},"onColumn-pivot-changed":{},"onColumn-group-opened":{},"onNew-columns-loaded":{},"onGrid-columns-changed":{},"onDisplayed-columns-changed":{},"onVirtual-columns-changed":{},"onColumn-everything-changed":{},"onColumn-header-mouse-over":{},"onColumn-header-mouse-leave":{},"onColumn-header-clicked":{},"onColumn-header-context-menu":{},"onComponent-state-changed":{},"onCell-value-changed":{},"onCell-edit-request":{},"onRow-value-changed":{},"onCell-editing-started":{},"onCell-editing-stopped":{},"onRow-editing-started":{},"onRow-editing-stopped":{},"onUndo-started":{},"onUndo-ended":{},"onRedo-started":{},"onRedo-ended":{},"onCell-selection-delete-start":{},"onCell-selection-delete-end":{},"onRange-delete-start":{},"onRange-delete-end":{},"onFill-start":{},"onFill-end":{},"onFilter-opened":{},"onFilter-changed":{},"onFilter-modified":{},"onAdvanced-filter-builder-visible-changed":{},"onFind-changed":{},"onChart-created":{},"onChart-range-selection-changed":{},"onChart-options-changed":{},"onChart-destroyed":{},"onCell-key-down":{},"onGrid-ready":{},"onGrid-pre-destroyed":{},"onFirst-data-rendered":{},"onGrid-size-changed":{},"onModel-updated":{},"onVirtual-row-removed":{},"onViewport-changed":{},"onBody-scroll":{},"onBody-scroll-end":{},"onDrag-started":{},"onDrag-stopped":{},"onDrag-cancelled":{},"onState-updated":{},"onPagination-changed":{},"onRow-drag-enter":{},"onRow-drag-move":{},"onRow-drag-leave":{},"onRow-drag-end":{},"onRow-drag-cancel":{},"onColumn-row-group-changed":{},"onRow-group-opened":{},"onExpand-or-collapse-all":{},"onPivot-max-columns-exceeded":{},"onPinned-row-data-changed":{},"onRow-data-updated":{},"onAsync-transactions-flushed":{},"onStore-refreshed":{},"onHeader-focused":{},"onCell-clicked":{},"onCell-double-clicked":{},"onCell-focused":{},"onCell-mouse-over":{},"onCell-mouse-out":{},"onCell-mouse-down":{},"onRow-clicked":{},"onRow-double-clicked":{},"onRow-selected":{},"onSelection-changed":{},"onCell-context-menu":{},"onRange-selection-changed":{},"onCell-selection-changed":{},"onTooltip-show":{},"onTooltip-hide":{},"onSort-changed":{}},qx()),{modelValue:{},modelModifiers:{}}),emits:h.mergeModels(["update:modelValue"],["update:modelValue"]),setup(e,{expose:t,emit:o}){const i=e,r=h.useTemplateRef("root"),s=h.ref(void 0),n=h.ref(!1),a=h.ref(!1),l=h.ref(!1),d=h.ref({}),c=h.ref(null),u=h.toRefs(i);Ia.filter(v=>v!="gridOptions").forEach(v=>{h.watch(()=>u[v],(R,F)=>{(v==="rowData"&&!m.value||v!=="rowData")&&k(v,R),m.value=!1},{deep:!0})});const g=new Set(["rowDataUpdated","cellValueChanged","rowValueChanged"]),p=h.useModel(e,"modelValue"),f=h.ref(!1),m=h.ref(!1),C=o;h.watch(p,(v,R)=>{n.value&&(m.value||(f.value=!0,k("rowData",lr(v),lr(R))),m.value=!1)},{deep:!0});const w=Xx(()=>{m.value=!0,C("update:modelValue",M())},10),y=h.getCurrentInstance(),b=v=>{var R,F;l.value&&g.has(v)&&(F=(R=y?.vnode)==null?void 0:R.props)!=null&&F["onUpdate:modelValue"]&&w()},x=()=>p.value||i.rowData||i.gridOptions.rowData,M=()=>{const v=[];return s?.value.forEachLeafNode(R=>{v.push(R.data)}),v},P=v=>R=>{if(a.value)return;R==="gridReady"&&(l.value=!0);const F=or.has(R);F&&!v||!F&&v||g.has(R)&&(f.value||b(R),f.value=!1)},k=(v,R,F)=>{if(n.value){let G=R.value||R;v==="rowData"&&G!=null&&(G=lr(G)),d.value[v]=G,c.value==null&&(c.value=window.setTimeout(()=>{c.value=null,Wp(d.value,s.value),d.value={}},0))}},S=()=>Object.create(h.getCurrentInstance().provides);return h.onMounted(()=>{Xd.registerModules([Ix]);const v=new jx(h.getCurrentInstance(),S()),R={globalListener:P(),globalSyncListener:P(!0),frameworkOverrides:new Yx(h.getCurrentInstance()),providedBeanInstances:{frameworkCompWrapper:v},modules:i.modules},F=h.markRaw(zp(lr(i.gridOptions),i,[...Ia,...Fu.map(z=>On(z))])),G=x();G!==void 0&&(F.rowData=lr(G)),s.value=zS(r.value,F,R),n.value=!0}),h.onUnmounted(()=>{var v;n.value&&((v=s?.value)==null||v.destroy(),a.value=!0)}),t({api:s}),(v,R)=>(h.openBlock(),h.createElementBlock("div",Zx,null,512))}});var eF=class{constructor(){this.ieCompatibility=!1}init(){this.ieCompatibility=this.md5("hello")!="5d41402abc4b2a76b9719d911017c592"}md5cycle(e,t){let o=e[0],i=e[1],r=e[2],s=e[3];o=this.ff(o,i,r,s,t[0],7,-680876936),s=this.ff(s,o,i,r,t[1],12,-389564586),r=this.ff(r,s,o,i,t[2],17,606105819),i=this.ff(i,r,s,o,t[3],22,-1044525330),o=this.ff(o,i,r,s,t[4],7,-176418897),s=this.ff(s,o,i,r,t[5],12,1200080426),r=this.ff(r,s,o,i,t[6],17,-1473231341),i=this.ff(i,r,s,o,t[7],22,-45705983),o=this.ff(o,i,r,s,t[8],7,1770035416),s=this.ff(s,o,i,r,t[9],12,-1958414417),r=this.ff(r,s,o,i,t[10],17,-42063),i=this.ff(i,r,s,o,t[11],22,-1990404162),o=this.ff(o,i,r,s,t[12],7,1804603682),s=this.ff(s,o,i,r,t[13],12,-40341101),r=this.ff(r,s,o,i,t[14],17,-1502002290),i=this.ff(i,r,s,o,t[15],22,1236535329),o=this.gg(o,i,r,s,t[1],5,-165796510),s=this.gg(s,o,i,r,t[6],9,-1069501632),r=this.gg(r,s,o,i,t[11],14,643717713),i=this.gg(i,r,s,o,t[0],20,-373897302),o=this.gg(o,i,r,s,t[5],5,-701558691),s=this.gg(s,o,i,r,t[10],9,38016083),r=this.gg(r,s,o,i,t[15],14,-660478335),i=this.gg(i,r,s,o,t[4],20,-405537848),o=this.gg(o,i,r,s,t[9],5,568446438),s=this.gg(s,o,i,r,t[14],9,-1019803690),r=this.gg(r,s,o,i,t[3],14,-187363961),i=this.gg(i,r,s,o,t[8],20,1163531501),o=this.gg(o,i,r,s,t[13],5,-1444681467),s=this.gg(s,o,i,r,t[2],9,-51403784),r=this.gg(r,s,o,i,t[7],14,1735328473),i=this.gg(i,r,s,o,t[12],20,-1926607734),o=this.hh(o,i,r,s,t[5],4,-378558),s=this.hh(s,o,i,r,t[8],11,-2022574463),r=this.hh(r,s,o,i,t[11],16,1839030562),i=this.hh(i,r,s,o,t[14],23,-35309556),o=this.hh(o,i,r,s,t[1],4,-1530992060),s=this.hh(s,o,i,r,t[4],11,1272893353),r=this.hh(r,s,o,i,t[7],16,-155497632),i=this.hh(i,r,s,o,t[10],23,-1094730640),o=this.hh(o,i,r,s,t[13],4,681279174),s=this.hh(s,o,i,r,t[0],11,-358537222),r=this.hh(r,s,o,i,t[3],16,-722521979),i=this.hh(i,r,s,o,t[6],23,76029189),o=this.hh(o,i,r,s,t[9],4,-640364487),s=this.hh(s,o,i,r,t[12],11,-421815835),r=this.hh(r,s,o,i,t[15],16,530742520),i=this.hh(i,r,s,o,t[2],23,-995338651),o=this.ii(o,i,r,s,t[0],6,-198630844),s=this.ii(s,o,i,r,t[7],10,1126891415),r=this.ii(r,s,o,i,t[14],15,-1416354905),i=this.ii(i,r,s,o,t[5],21,-57434055),o=this.ii(o,i,r,s,t[12],6,1700485571),s=this.ii(s,o,i,r,t[3],10,-1894986606),r=this.ii(r,s,o,i,t[10],15,-1051523),i=this.ii(i,r,s,o,t[1],21,-2054922799),o=this.ii(o,i,r,s,t[8],6,1873313359),s=this.ii(s,o,i,r,t[15],10,-30611744),r=this.ii(r,s,o,i,t[6],15,-1560198380),i=this.ii(i,r,s,o,t[13],21,1309151649),o=this.ii(o,i,r,s,t[4],6,-145523070),s=this.ii(s,o,i,r,t[11],10,-1120210379),r=this.ii(r,s,o,i,t[2],15,718787259),i=this.ii(i,r,s,o,t[9],21,-343485551),e[0]=this.add32(o,e[0]),e[1]=this.add32(i,e[1]),e[2]=this.add32(r,e[2]),e[3]=this.add32(s,e[3])}cmn(e,t,o,i,r,s){return t=this.add32(this.add32(t,e),this.add32(i,s)),this.add32(t<<r|t>>>32-r,o)}ff(e,t,o,i,r,s,n){return this.cmn(t&o|~t&i,e,t,r,s,n)}gg(e,t,o,i,r,s,n){return this.cmn(t&i|o&~i,e,t,r,s,n)}hh(e,t,o,i,r,s,n){return this.cmn(t^o^i,e,t,r,s,n)}ii(e,t,o,i,r,s,n){return this.cmn(o^(t|~i),e,t,r,s,n)}md51(e){const t=e.length,o=[1732584193,-271733879,-1732584194,271733878];let i;for(i=64;i<=e.length;i+=64)this.md5cycle(o,this.md5blk(e.substring(i-64,i)));e=e.substring(i-64);const r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(i=0;i<e.length;i++)r[i>>2]|=e.charCodeAt(i)<<(i%4<<3);if(r[i>>2]|=128<<(i%4<<3),i>55)for(this.md5cycle(o,r),i=0;i<16;i++)r[i]=0;return r[14]=t*8,this.md5cycle(o,r),o}md5blk(e){const t=[];for(let o=0;o<64;o+=4)t[o>>2]=e.charCodeAt(o)+(e.charCodeAt(o+1)<<8)+(e.charCodeAt(o+2)<<16)+(e.charCodeAt(o+3)<<24);return t}rhex(e){const t="0123456789abcdef".split("");let o="",i=0;for(;i<4;i++)o+=t[e>>i*8+4&15]+t[e>>i*8&15];return o}hex(e){for(let t=0;t<e.length;t++)e[t]=this.rhex(e[t]);return e.join("")}md5(e){return this.hex(this.md51(e))}add32(e,t){return this.ieCompatibility?this.add32Compat(e,t):this.add32Std(e,t)}add32Std(e,t){return e+t&4294967295}add32Compat(e,t){const o=(e&65535)+(t&65535);return(e>>16)+(t>>16)+(o>>16)<<16|o&65535}},Rs={"01":"GRID","02":"CHARTS","0102":"BOTH"},Uu="https://www.ag-grid.com/licensing/",ju=class lt{constructor(t){this.watermarkMessage=void 0,this.totalMessageLength=124,this.document=t,this.md5=new eF,this.md5.init()}validateLicense(){const t=this.getLicenseDetails(lt.licenseKey),o=`AG Grid ${t.currentLicenseType==="BOTH"?"and AG Charts ":""}Enterprise`,i=t.suppliedLicenseType===void 0?"":`AG ${t.suppliedLicenseType==="BOTH"?"Grid and AG Charts":t.suppliedLicenseType==="GRID"?"Grid":"Charts"} Enterprise`;if(t.missing)(!this.isWebsiteUrl()||this.isForceWatermark())&&this.outputMissingLicenseKey(o);else if(t.expired){const r=lt.getGridReleaseDate(),s=lt.formatDate(r);this.outputExpiredKey(t.expiry,s,o,i)}else t.valid?t.isTrial&&t.trialExpired&&this.outputExpiredTrialKey(t.expiry,o,i):this.outputInvalidLicenseKey(!!t.incorrectLicenseType,o,i)}static extractExpiry(t){const o=t.substring(t.lastIndexOf("_")+1,t.length);return new Date(parseInt(lt.decode(o),10))}static extractLicenseComponents(t){let o=t.replace(/[\u200B-\u200D\uFEFF]/g,"");if(o=o.replace(/\r?\n|\r/g,""),t.length<=32)return{md5:null,license:t,version:null,isTrial:null};const i=o.length-32,r=o.substring(i),s=o.substring(0,i),[n,a,l]=lt.extractBracketedInformation(o);return{md5:r,license:s,version:n,isTrial:a,type:l}}getLicenseDetails(t){const o=lt.chartsLicenseManager?"BOTH":"GRID";if(!t?.length)return{licenseKey:t,valid:!1,missing:!0,currentLicenseType:o};const i=lt.getGridReleaseDate(),{md5:r,license:s,version:n,isTrial:a,type:l}=lt.extractLicenseComponents(t);let d=r===this.md5.md5(s)&&t.indexOf("For_Trialing_ag-Grid_Only")===-1,c,u,g=null,p=!1,f;function m(){c=g<new Date,u=void 0}if(d&&(g=lt.extractExpiry(s),d=!isNaN(g.getTime()),d))switch(u=i>g,n){case"legacy":case"2":{a&&m();break}case"3":l?.length?(f=l,l!==Rs["01"]&&l!==Rs["0102"]||o==="BOTH"&&f!=="BOTH"?(d=!1,p=!0):a&&m()):d=!1}return d?{licenseKey:t,valid:d,expiry:lt.formatDate(g),expired:u,version:n,isTrial:a,trialExpired:c,incorrectLicenseType:p,currentLicenseType:o,suppliedLicenseType:f}:{licenseKey:t,valid:d,incorrectLicenseType:p,currentLicenseType:o,suppliedLicenseType:f}}isDisplayWatermark(){return this.isForceWatermark()||!this.isLocalhost()&&!this.isWebsiteUrl()&&!!this.watermarkMessage?.length}getWatermarkMessage(){return this.watermarkMessage||""}getHostname(){const o=(this.document.defaultView||window).location,{hostname:i=""}=o;return i}isForceWatermark(){const o=(this.document.defaultView||window).location,{pathname:i}=o;return i?i.indexOf("forceWatermark")!==-1:!1}isWebsiteUrl(){return this.getHostname().match(/^((?:[\w-]+\.)?ag-grid\.com)$/)!==null}isLocalhost(){return this.getHostname().match(/^(?:127\.0\.0\.1|localhost)$/)!==null}static formatDate(t){const o=["January","February","March","April","May","June","July","August","September","October","November","December"],i=t.getDate(),r=t.getMonth(),s=t.getFullYear();return i+" "+o[r]+" "+s}static getGridReleaseDate(){return new Date(parseInt(lt.decode(lt.RELEASE_INFORMATION),10))}static decode(t){const o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";let i="",r,s,n,a,l,d,c,u=0;const g=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u<g.length;)a=o.indexOf(g.charAt(u++)),l=o.indexOf(g.charAt(u++)),d=o.indexOf(g.charAt(u++)),c=o.indexOf(g.charAt(u++)),r=a<<2|l>>4,s=(l&15)<<4|d>>2,n=(d&3)<<6|c,i=i+String.fromCharCode(r),d!=64&&(i=i+String.fromCharCode(s)),c!=64&&(i=i+String.fromCharCode(n));return i=lt.utf8_decode(i),i}static utf8_decode(t){t=t.replace(/rn/g,"n");let o="";for(let i=0;i<t.length;i++){const r=t.charCodeAt(i);r<128?o+=String.fromCharCode(r):r>127&&r<2048?(o+=String.fromCharCode(r>>6|192),o+=String.fromCharCode(r&63|128)):(o+=String.fromCharCode(r>>12|224),o+=String.fromCharCode(r>>6&63|128),o+=String.fromCharCode(r&63|128))}return o}static setChartsLicenseManager(t){this.chartsLicenseManager=t}static setLicenseKey(t){this.licenseKey=t,this.chartsLicenseManager?.setLicenseKey(t,!0)}static extractBracketedInformation(t){if(!t.includes("["))return["legacy",!1,void 0];const o=t.match(/\[(.*?)\]/g).map(a=>a.replace("[","").replace("]",""));if(!o||o.length===0)return["legacy",!1,void 0];const i=o.filter(a=>a==="TRIAL").length===1,r=o.filter(a=>a.indexOf("v")===0)[0],s=r?r.replace("v",""):"legacy",n=Rs[o.filter(a=>Rs[a])[0]];return[s,i,n]}centerPadAndOutput(t){const o=this.totalMessageLength-t.length;console.error(t.padStart(o/2+t.length,"*").padEnd(this.totalMessageLength,"*"))}padAndOutput(t,o="*",i=""){console.error(t.padEnd(this.totalMessageLength-i.length,o)+i)}outputInvalidLicenseKey(t,o,i){t?(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Incompatible License Key "),this.padAndOutput(`* Your license key is for ${i} only and does not cover you for ${o}.`," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Uu}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")):(this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Invalid License Key "),this.padAndOutput("* Your license key is not valid."," ","*"),this.padAndOutput(`* To troubleshoot your license key visit ${Uu}.`," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput("")),this.watermarkMessage="Invalid License"}outputExpiredTrialKey(t,o,i){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${o} License `),this.centerPadAndOutput(" Trial Period Expired. "),this.padAndOutput(`* Your trial only license for ${i} expired on ${t}.`," ","*"),this.padAndOutput("* Please email info@ag-grid.com to purchase a license."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="Trial Period Expired"}outputMissingLicenseKey(t){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${t} License `),this.centerPadAndOutput(" License Key Not Found "),this.padAndOutput(`* All ${t} features are unlocked for trial.`," ","*"),this.padAndOutput("* If you want to hide the watermark please email info@ag-grid.com for a trial license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="For Trial Use Only"}outputExpiredKey(t,o,i,r){this.centerPadAndOutput(""),this.centerPadAndOutput(` ${i} License `),this.centerPadAndOutput(" Incompatible Software Version "),this.padAndOutput(`* Your license key works with versions of ${r} released before ${t}.`," ","*"),this.padAndOutput(`* The version you are trying to use was released on ${o}.`," ","*"),this.padAndOutput("* Please contact info@ag-grid.com to renew your license key."," ","*"),this.centerPadAndOutput(""),this.centerPadAndOutput(""),this.watermarkMessage="License Expired"}};ju.RELEASE_INFORMATION="MTc0NDc4ODcwODE2Nw==";var xs=ju,tF='.ag-watermark{bottom:20px;color:#9b9b9b;opacity:.7;position:absolute;transition:opacity 1s ease-out 3s;&:before{background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMDkiIGhlaWdodD0iMzYiIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAyMDkgMzYiPjxwYXRoIGZpbGw9IiM5QjlCOUIiIGQ9Ik0xOTIuOTkzIDIzLjY1OHYtNy45NDZoLTEzLjU0MWwtNy45NDcgNy45NDZ6TTIwOC4yNSAzLjk1aC0xNi45NzRsLTguMDEgNy45NDdoMjQuOTg0ek0xNjMuNjIyIDMxLjYwNWw0LjA2OS00LjA2OWgxMy43MzJ2Ny45NDdoLTE3LjgwMXoiLz48cGF0aCBmaWxsPSIjOUI5QjlCIiBkPSJNMTY2LjYxIDE5Ljc4aDguNzczbDguMDEtNy45NDZIMTY2LjYxek0xNTcuMDExIDMxLjYwNWg2LjYxMWw3Ljg4My03Ljk0N2gtMTQuNDk0ek0xOTEuMjc2IDMuOTVsLTQuMDY4IDQuMDdIMTYxLjI3Vi4wNzJoMzAuMDA2ek0yMC44NCAzMC4yMDZIOC4zNzhsLTIuMTYyIDUuMzRILjc1TDEyLjI1NyA4LjU5Mmg0Ljc2OEwyOC41MyAzNS41NDZoLTUuNTN6bS0xLjcxNy00LjI2TDE0LjYwOSAxNC45NWwtNC41MTQgMTAuOTk4ek0xMDQuNDM3IDE4LjUwOWMxLjU4OS0yLjM1MiA1LjU5NC0yLjYwNyA3LjI0Ny0yLjYwN3Y0LjU3OGMtMi4wMzQgMC00LjA2OS4wNjMtNS4yNzcuOTUzLTEuMjA3Ljg5LTEuODQzIDIuMDk4LTEuODQzIDMuNTZ2MTAuNTUzaC00Ljk1OVYxNS45MDJoNC43Njh6TTExOS4zNzYgMTUuOTAyaC00Ljk1OHYxOS42NDRoNC45NTh6TTExOS4zNzYgNy4xM2gtNC45NTh2NS44NDhoNC45NTh6TTE0My45NzkgNy4xM3YyOC40MTZoLTQuNzY4bC0uMTI3LTIuOTg4YTguMyA4LjMgMCAwIDEtMi42NyAyLjQ4Yy0xLjA4MS41NzItMi40MTYuODktMy45NDIuODktMS4zMzUgMC0yLjYwNi0uMjU1LTMuNjg3LS43LTEuMTQ0LS41MDgtMi4xNjItMS4xNDQtMi45ODgtMi4wMzRhOS42IDkuNiAwIDAgMS0xLjk3MS0zLjE3OWMtLjUwOC0xLjIwNy0uNjk5LTIuNjA2LS42OTktNC4xMzJzLjI1NC0yLjkyNC42OTktNC4xOTZjLjUwOS0xLjI3MSAxLjE0NS0yLjM1MiAxLjk3MS0zLjI0MnMxLjg0NC0xLjU4OSAyLjk4OC0yLjA5OCAyLjM1Mi0uNzYzIDMuNjg3LS43NjNjMS41MjYgMCAyLjc5Ny4yNTUgMy44NzguODI3czEuOTcxIDEuMzM1IDIuNjcgMi40MTZWNy4xOTNoNC45NTl6bS0xMC40MjYgMjQuNTM4YzEuNjUzIDAgMi45MjQtLjU3MiAzLjk0MS0xLjY1M3MxLjUyNi0yLjU0MyAxLjUyNi00LjMyMy0uNTA5LTMuMTc4LTEuNTI2LTQuMzIyYy0xLjAxNy0xLjA4MS0yLjI4OC0xLjY1My0zLjk0MS0xLjY1My0xLjU5IDAtMi45MjUuNTcyLTMuODc4IDEuNjUzLTEuMDE3IDEuMDgtMS41MjYgMi41NDMtMS41MjYgNC4zMjIgMCAxLjc4LjUwOSAzLjE4IDEuNTI2IDQuMjYgMS4wMTcgMS4xNDQgMi4yODggMS43MTYgMy44NzggMS43MTZNNTcuMjAyIDIwLjM1M0g0NC45MzN2NC4yNTloNi45OTNjLS4xOSAyLjE2MS0xLjAxNyAzLjgxNC0yLjQxNiA1LjE1LTEuMzk4IDEuMjctMy4xNzggMS45MDYtNS40NjcgMS45MDYtMS4yNzEgMC0yLjQ4LS4yNTQtMy40OTYtLjY5OWE3IDcgMCAwIDEtMi43MzQtMS45N2MtLjc2My0uODI3LTEuMzM1LTEuODQ0LTEuNzgtMy4wNTJzLS42MzYtMi40OC0uNjM2LTMuOTQyLjE5LTIuNzMzLjYzNi0zLjk0MWMuMzgxLTEuMjA4IDEuMDE3LTIuMTYyIDEuNzgtMy4wNTIuNzYzLS44MjYgMS42NTMtMS40NjIgMi43MzMtMS45N2E5LjEgOS4xIDAgMCAxIDMuNTYtLjdxNC4wMDUgMCA2LjEwMyAxLjkwN2wzLjMwNi0zLjMwNWMtMi40OC0xLjkwNy01LjY1OC0yLjkyNS05LjQwOS0yLjkyNS0yLjA5NyAwLTQuMDA0LjMxOC01LjcyMSAxLjAxOC0xLjcxNi42OTktMy4xNzkgMS41ODktNC4zODYgMi43OTdBMTIuMSAxMi4xIDAgMCAwIDMxLjIgMTYuMjJjLS42MzUgMS43MTctLjk1MyAzLjYyNC0uOTUzIDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1NyAxLjAxNyAyLjAzNSAwIDMuODc4LS4zMTggNS41MzEtMS4wMTcgMS42NTMtLjcgMy4wNTItMS41OSA0LjE5Ni0yLjc5N3ExLjcxNi0xLjgxMiAyLjY3LTQuMzg3Yy42MzYtMS43MTYuOTU0LTMuNjIzLjk1NC01LjY1OHYtLjgyNmMtLjE5MS0uMTI3LS4yNTUtLjQ0NS0uMjU1LS43TTk1Ljk4MiAyMC4zNTNoLTEyLjI3djQuMjU5aDYuOTkzYy0uMTkgMi4xNjEtMS4wMTcgMy44MTQtMi40MTYgNS4xNS0xLjM5OCAxLjI3LTMuMTc4IDEuOTA2LTUuNDY3IDEuOTA2LTEuMjcxIDAtMi40OC0uMjU0LTMuNDk2LS42OTlhNyA3IDAgMCAxLTIuNzM0LTEuOTdjLS43NjMtLjgyNy0xLjMzNS0xLjg0NC0xLjc4LTMuMDUycy0uNjM2LTIuNDgtLjYzNi0zLjk0Mi4xOS0yLjczMy42MzYtMy45NDFjLjM4MS0xLjIwOCAxLjAxNy0yLjE2MiAxLjc4LTMuMDUyLjc2My0uODI2IDEuNjUzLTEuNDYyIDIuNzM0LTEuOTdhOS4xIDkuMSAwIDAgMSAzLjU2LS43cTQuMDA1IDAgNi4xMDMgMS45MDdsMy4zMDUtMy4zMDVjLTIuNDc5LTEuOTA3LTUuNjU4LTIuOTI1LTkuNDA4LTIuOTI1LTIuMDk4IDAtNC4wMDUuMzE4LTUuNzIyIDEuMDE4LTEuNzE2LjY5OS0zLjE3OCAxLjU4OS00LjM4NiAyLjc5N2ExMi4xIDEyLjEgMCAwIDAtMi43OTcgNC4zODZjLS42MzYgMS43MTctLjk1NCAzLjYyNC0uOTU0IDUuNjU4cy4zMTggMy45NDIgMS4wMTcgNS42NThjLjcgMS43MTcgMS41OSAzLjE3OSAyLjc5NyA0LjM4N2ExMi4xIDEyLjEgMCAwIDAgNC4zODcgMi43OTdjMS43MTYuNyAzLjYyMyAxLjAxNyA1LjY1OCAxLjAxNyAyLjAzNCAwIDMuODc4LS4zMTggNS41My0xLjAxNyAxLjY1My0uNyAzLjA1Mi0xLjU5IDQuMTk2LTIuNzk3cTEuNzE4LTEuODEyIDIuNjctNC4zODdjLjYzNi0xLjcxNi45NTQtMy42MjMuOTU0LTUuNjU4di0uODI2Yy0uMTktLjEyNy0uMjU1LS40NDUtLjI1NS0uNyIvPjwvc3ZnPg==");background-repeat:no-repeat;background-size:170px 40px;content:"";display:block;height:40px;width:170px}}:where(.ag-ltr) .ag-watermark{right:25px}:where(.ag-rtl) .ag-watermark{left:25px}.ag-watermark-text{font-family:Impact,sans-serif;font-size:19px;font-weight:700;opacity:.5}:where(.ag-ltr) .ag-watermark-text{padding-left:.7rem}:where(.ag-rtl) .ag-watermark-text{padding-right:.7rem}',oF={tag:"div",cls:"ag-watermark",children:[{tag:"div",ref:"eLicenseTextRef",cls:"ag-watermark-text"}]},iF=class extends pe{constructor(){super(oF),this.eLicenseTextRef=V,this.registerCSS(tF)}wireBeans(e){this.licenseManager=e.licenseManager}postConstruct(){const e=this.shouldDisplayWatermark();this.setDisplayed(e),e&&(this.eLicenseTextRef.textContent=this.licenseManager.getWatermarkMessage(),window.setTimeout(()=>this.addCssClass("ag-opacity-zero"),0),window.setTimeout(()=>this.setDisplayed(!1),5e3))}shouldDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}},rF={selector:"AG-WATERMARK",component:iF},Ku=class extends E{constructor(){super(...arguments),this.beanName="licenseManager"}postConstruct(){this.validateLicense()}validateLicense(){this.licenseManager=new xs(Te(this.beans)),this.licenseManager.validateLicense()}static getLicenseDetails(e){return new xs(null).getLicenseDetails(e)}getWatermarkSelector(){return rF}isDisplayWatermark(){return this.licenseManager.isDisplayWatermark()}getWatermarkMessage(){return this.licenseManager.getWatermarkMessage()}static setLicenseKey(e){xs.setLicenseKey(e)}static setChartsLicenseManager(e){xs.setChartsLicenseManager(e)}},ze="33.2.4",Ft={moduleName:"EnterpriseCore",version:ze,beans:[Ku],icons:{accordionOpen:"tree-open",accordionClosed:"tree-closed",accordionIndeterminate:"tree-indeterminate",close:"cross",cancel:"cancel",maximize:"maximize",minimize:"minimize",columnDrag:"grip"},dependsOn:[]},sF=".ag-panel{background-color:var(--ag-panel-background-color);display:flex;flex-direction:column;overflow:hidden;position:relative}.ag-dialog{border:var(--ag-dialog-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-dialog-shadow);position:absolute}.ag-panel-title-bar{align-items:center;background-color:var(--ag-panel-title-bar-background-color);border-bottom:var(--ag-panel-title-bar-border);color:var(--ag-panel-title-bar-text-color);cursor:default;display:flex;flex:none;font-weight:var(--ag-panel-title-bar-font-weight);height:var(--ag-header-height);padding:var(--ag-spacing) var(--ag-cell-horizontal-padding)}.ag-panel-title-bar-button{color:var(--ag-panel-title-bar-icon-color);cursor:pointer}:where(.ag-ltr) .ag-panel-title-bar-button{margin-left:calc(var(--ag-spacing)*2);margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-panel-title-bar-button{margin-left:var(--ag-spacing);margin-right:calc(var(--ag-spacing)*2)}.ag-panel-title-bar-title{flex:1 1 auto}.ag-panel-title-bar-buttons{display:flex}.ag-panel-content-wrapper{display:flex;flex:1 1 auto;overflow:hidden;position:relative}:where(.ag-dragging-fill-handle) .ag-dialog,:where(.ag-dragging-range-handle) .ag-dialog{opacity:.7;pointer-events:none}";function nF(e){const t=e.cssIdentifier||"default";return{tag:"div",cls:`ag-panel ag-${t}-panel`,attrs:{tabindex:"-1"},children:[{tag:"div",ref:"eTitleBar",cls:`ag-panel-title-bar ag-${t}-panel-title-bar ag-unselectable`,children:[{tag:"span",ref:"eTitle",cls:`ag-panel-title-bar-title ag-${t}-panel-title-bar-title`},{tag:"div",ref:"eTitleBarButtons",cls:`ag-panel-title-bar-buttons ag-${t}-panel-title-bar-buttons`}]},{tag:"div",ref:"eContentWrapper",cls:`ag-panel-content-wrapper ag-${t}-panel-content-wrapper`}]}}var aF=class extends pe{constructor(e){super(nF(e)),this.config=e,this.closable=!0,this.eContentWrapper=V,this.eTitleBar=V,this.eTitleBarButtons=V,this.eTitle=V,this.registerCSS(sF)}postConstruct(){const{component:e,closable:t,hideTitleBar:o,title:i,minWidth:r=250,width:s,minHeight:n=250,height:a,centered:l,popup:d,x:c,y:u}=this.config;this.positionableFeature=new Xn(this.getGui(),{minWidth:r,width:s,minHeight:n,height:a,centered:l,x:c,y:u,popup:d,calculateTopBuffer:()=>this.positionableFeature.getHeight()-this.getBodyHeight()}),this.createManagedBean(this.positionableFeature);const g=this.getGui();e&&this.setBodyComponent(e),o?ge(this.eTitleBar,!1):(i&&this.setTitle(i),this.setClosable(t??this.closable)),this.addManagedElementListeners(this.eTitleBar,{mousedown:p=>{if(g.contains(p.relatedTarget)||g.contains(Ee(this.beans))||this.eTitleBarButtons.contains(p.target)){p.preventDefault();return}const f=this.eContentWrapper.querySelector("button, [href], input, select, textarea, [tabindex]");f&&f.focus()}}),!(d&&this.positionableFeature.isPositioned())&&(this.renderComponent&&this.renderComponent(),this.positionableFeature.initialisePosition(),this.eContentWrapper.style.height="0")}renderComponent(){const e=this.getGui();e.focus(),this.close=()=>{e.parentElement.removeChild(e),this.destroy()}}getHeight(){return this.positionableFeature.getHeight()}setHeight(e){this.positionableFeature.setHeight(e)}getWidth(){return this.positionableFeature.getWidth()}setWidth(e){this.positionableFeature.setWidth(e)}setClosable(e){if(e!==this.closable&&(this.closable=e),e){const t=this.closeButtonComp=new pe({tag:"div",cls:"ag-button"});this.createBean(t);const o=t.getGui(),i=te("close",this.beans);i.classList.add("ag-panel-title-bar-button-icon"),o.appendChild(i),this.addTitleBarButton(t),t.addManagedElementListeners(o,{click:this.onBtClose.bind(this)})}else if(this.closeButtonComp){const t=this.closeButtonComp.getGui();t.parentElement.removeChild(t),this.closeButtonComp=this.destroyBean(this.closeButtonComp)}}setBodyComponent(e){e.setParentComponent(this),this.eContentWrapper.appendChild(e.getGui())}addTitleBarButton(e,t){const o=this.eTitleBarButtons,i=o.children,r=i.length;t==null&&(t=r),t=Math.max(0,Math.min(t,r)),e.addCssClass("ag-panel-title-bar-button");const s=e.getGui();t===0?o.insertAdjacentElement("afterbegin",s):t===r?o.insertAdjacentElement("beforeend",s):i[t-1].insertAdjacentElement("afterend",s),e.setParentComponent(this)}getBodyHeight(){return Er(this.eContentWrapper)}getBodyWidth(){return Li(this.eContentWrapper)}setTitle(e){this.eTitle.innerText=e}onBtClose(){this.close()}destroy(){this.closeButtonComp&&(this.closeButtonComp=this.destroyBean(this.closeButtonComp));const e=this.getGui();e&&ut(e)&&this.close(),super.destroy()}},lF=class extends aF{constructor(e){super({...e,popup:!0}),this.isMaximizable=!1,this.isMaximized=!1,this.maximizeListeners=[],this.resizeListenerDestroy=null,this.lastPosition={x:0,y:0,width:0,height:0}}wireBeans(e){this.popupSvc=e.popupSvc}postConstruct(){const e=this.getGui(),{movable:t,resizable:o,maximizable:i,modal:r,postProcessPopupParams:s}=this.config;if(this.addCssClass("ag-dialog"),super.postConstruct(),s){const{type:n,eventSource:a,column:l,mouseEvent:d,rowNode:c}=s;this.popupSvc?.callPostProcessPopup(n,e,a,d,l,c)}if(this.tabGuardFeature=this.createManagedBean(new Hc(this)),this.tabGuardFeature.initialiseTabGuard({isFocusableContainer:!0,onFocusIn:()=>{this.popupSvc?.bringPopupToFront(e)},onTabKeyDown:n=>{if(r)return;const a=n.shiftKey,l=Ut(this.beans,e,!1,a);(!l||this.tabGuardFeature.getTabGuardCtrl().isTabGuard(l))&&zo(this.beans,a)&&n.preventDefault()}}),t&&this.setMovable(t),i&&this.setMaximizable(i),o&&this.setResizable(o),!this.config.modal){const n=this.beans.ctrlsSvc.get("gridCtrl");n.addFocusableContainer(this),this.addDestroyFunc(()=>n.removeFocusableContainer(this))}}setAllowFocus(e){this.tabGuardFeature.getTabGuardCtrl().setAllowFocus(e)}renderComponent(){const e=this.getGui(),{alwaysOnTop:t,modal:o,title:i,afterGuiAttached:r}=this.config,s=this.getLocaleTextFunc(),n=this.popupSvc?.addPopup({modal:o,eChild:e,closeOnEsc:!0,closedCallback:this.onClosed.bind(this),alwaysOnTop:t,ariaLabel:i||s("ariaLabelDialog","Dialog"),afterGuiAttached:r});n&&(this.close=n.hideFunc)}onClosed(e){this.destroy(),this.config.closedCallback?.(e)}toggleMaximize(){const e=this.positionableFeature.getPosition();if(this.isMaximized){const{x:t,y:o,width:i,height:r}=this.lastPosition;this.setWidth(i),this.setHeight(r),this.positionableFeature.offsetElement(t,o)}else this.lastPosition.width=this.getWidth(),this.lastPosition.height=this.getHeight(),this.lastPosition.x=e.x,this.lastPosition.y=e.y,this.positionableFeature.offsetElement(0,0),this.setHeight("100%"),this.setWidth("100%");this.isMaximized=!this.isMaximized,this.refreshMaximizeIcon()}refreshMaximizeIcon(){ge(this.maximizeIcon,!this.isMaximized),ge(this.minimizeIcon,this.isMaximized)}clearMaximizebleListeners(){this.maximizeListeners.length&&(this.maximizeListeners.forEach(e=>e()),this.maximizeListeners.length=0),this.resizeListenerDestroy&&(this.resizeListenerDestroy(),this.resizeListenerDestroy=null)}destroy(){this.maximizeButtonComp=this.destroyBean(this.maximizeButtonComp),this.clearMaximizebleListeners(),super.destroy()}setResizable(e){this.positionableFeature.setResizable(e)}setMovable(e){this.positionableFeature.setMovable(e,this.eTitleBar)}setMaximizable(e){if(!e){this.clearMaximizebleListeners(),this.maximizeButtonComp&&(this.destroyBean(this.maximizeButtonComp),this.maximizeButtonComp=this.maximizeIcon=this.minimizeIcon=void 0);return}const t=this.eTitleBar;if(!t||e===this.isMaximizable)return;const o=this.buildMaximizeAndMinimizeElements();this.refreshMaximizeIcon(),o.addManagedElementListeners(o.getGui(),{click:this.toggleMaximize.bind(this)}),this.addTitleBarButton(o,0),this.maximizeListeners.push(...this.addManagedElementListeners(t,{dblclick:this.toggleMaximize.bind(this)})),[this.resizeListenerDestroy]=this.addManagedListeners(this.positionableFeature,{resize:()=>{this.isMaximized=!1,this.refreshMaximizeIcon()}})}buildMaximizeAndMinimizeElements(){const e=this.maximizeButtonComp=this.createBean(new pe({tag:"div",cls:"ag-dialog-button"})),t=e.getGui();return this.maximizeIcon=te("maximize",this.beans),t.appendChild(this.maximizeIcon),this.maximizeIcon.classList.add("ag-panel-title-bar-button-icon"),this.minimizeIcon=te("minimize",this.beans),t.appendChild(this.minimizeIcon),this.minimizeIcon.classList.add("ag-panel-title-bar-button-icon"),e}};function dF(e){return{tag:"div",cls:`ag-virtual-list-viewport ag-${e}-virtual-list-viewport`,role:"presentation",children:[{tag:"div",ref:"eContainer",cls:`ag-virtual-list-container ag-${e}-virtual-list-container`}]}}var Yu=class extends mi{constructor(e){super(dF(e?.cssIdentifier||"default")),this.renderedRows=new Map,this.rowHeight=20,this.pageSize=-1,this.isScrolling=!1,this.isHeightFromTheme=!0,this.eContainer=V,this.awaitStableCallbacks=[];const{cssIdentifier:t="default",ariaRole:o="listbox",listName:i,moveItemCallback:r}=e||{};this.cssIdentifier=t,this.ariaRole=o,this.listName=i,this.moveItemCallback=r}wireBeans(e){this.environment=e.environment}postConstruct(){this.addScrollListener(),this.rowHeight=this.getItemHeight(),this.addResizeObserver(),this.initialiseTabGuard({onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e),focusInnerElement:e=>this.focusInnerElement(e),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)}),this.refreshAriaProperties(),this.addManagedEventListeners({gridStylesChanged:this.onGridStylesChanged.bind(this)})}onGridStylesChanged(e){e.listItemHeightChanged&&(this.rowHeight=this.getItemHeight(),this.refresh())}refreshAriaProperties(){const t=this.getLocaleTextFunc()("ariaDefaultListName",this.listName||"List"),o=this.eContainer;Xe(o,this.model?.getRowCount()>0?this.ariaRole:"presentation"),dt(o,t)}addResizeObserver(){const e=()=>Pt(this.beans,()=>this.drawVirtualRows()),t=mo(this.beans,this.getGui(),e);this.addDestroyFunc(t)}focusInnerElement(e){return this.focusRow(e?this.model.getRowCount()-1:0),!0}onFocusIn(e){const t=e.target;t.classList.contains("ag-virtual-list-item")&&(this.lastFocusedRowIndex=tp(t)-1)}onFocusOut(e){this.getFocusableElement().contains(e.relatedTarget)||(this.lastFocusedRowIndex=null)}handleKeyDown(e){const{key:t,shiftKey:o}=e;switch(t){case D.UP:case D.DOWN:{const i=t===D.UP;e.preventDefault(),o?this.moveItem(i):this.navigate(i)}break;case D.PAGE_HOME:case D.PAGE_END:case D.PAGE_UP:case D.PAGE_DOWN:this.navigateToPage(t)!==null&&e.preventDefault();break}}onTabKeyDown(e){io(e),this.forceFocusOutOfContainer(e.shiftKey)}getNextRow(e){if(this.lastFocusedRowIndex==null)return;const t=this.lastFocusedRowIndex+(e?-1:1);if(!(t<0||t>=this.model.getRowCount()))return t}moveItem(e){if(!this.moveItemCallback)return;const t=this.getComponentAt(this.lastFocusedRowIndex);t&&this.moveItemCallback(t,e)}navigate(e){const t=this.getNextRow(e);t!==void 0&&this.focusRow(t)}navigateToPage(e,t="focused"){let o=!1;t==="focused"&&(t=this.getLastFocusedRow(),o=!0);const i=this.model.getRowCount()-1;let r=-1;return e===D.PAGE_HOME?r=0:e===D.PAGE_END?r=i:e===D.PAGE_DOWN?r=Math.min(t+this.pageSize,i):e===D.PAGE_UP&&(r=Math.max(t-this.pageSize,0)),r===-1?null:(o?this.focusRow(r):this.ensureIndexVisible(r),r)}getLastFocusedRow(){return this.lastFocusedRowIndex}focusRow(e){this.isScrolling||(this.isScrolling=!0,this.ensureIndexVisible(e),Pt(this.beans,()=>{if(this.isScrolling=!1,!this.isAlive())return;const t=this.renderedRows.get(e);t&&t.eDiv.focus()}))}getComponentAt(e){const t=this.renderedRows.get(e);return t&&t.rowComponent}forEachRenderedRow(e){this.renderedRows.forEach((t,o)=>e(t.rowComponent,o))}getItemHeight(){return this.isHeightFromTheme?this.environment.getDefaultListItemHeight():this.rowHeight}ensureIndexVisible(e,t=!0){const o=this.model.getRowCount();if(typeof e!="number"||e<0||e>=o)return _(229,{index:e}),!1;const i=e*this.rowHeight,r=i+this.rowHeight,s=this.getGui(),n=s.scrollTop,a=s.offsetHeight,l=n+a,d=t?0:this.rowHeight,c=n>i+d,u=l<r-d;if(c)return s.scrollTop=i,!0;if(u){const g=r-a;return s.scrollTop=g,!0}return!1}setComponentCreator(e){this.componentCreator=e}setComponentUpdater(e){this.componentUpdater=e}getRowHeight(){return this.rowHeight}getScrollTop(){return this.getGui().scrollTop}setRowHeight(e){this.isHeightFromTheme=!1,this.rowHeight=e,this.refresh()}refresh(e){if(this.model==null||!this.isAlive())return;const t=this.model.getRowCount();this.eContainer.style.height=`${t*this.rowHeight}px`,this.refreshAriaProperties(),this.awaitStable(()=>{this.isAlive()&&(this.canSoftRefresh(e)?this.drawVirtualRows(!0):(this.clearVirtualRows(),this.drawVirtualRows()))})}awaitStable(e){if(this.awaitStableCallbacks.push(e),this.awaitStableCallbacks.length>1)return;const t=this.model.getRowCount();rd(()=>this.eContainer.clientHeight>=t*this.rowHeight,()=>{if(!this.isAlive())return;const o=this.awaitStableCallbacks;this.awaitStableCallbacks=[],o.forEach(i=>i())})}canSoftRefresh(e){return!!(e&&this.renderedRows.size&&typeof this.model.areRowsEqual=="function"&&this.componentUpdater)}clearVirtualRows(){this.renderedRows.forEach((e,t)=>this.removeRow(t))}drawVirtualRows(e){if(!this.isAlive()||!this.model)return;const t=this.getGui(),o=t.scrollTop,i=o+t.offsetHeight;if(o===i)this.clearVirtualRows();else{const r=Math.floor(o/this.rowHeight),s=Math.floor(i/this.rowHeight);this.pageSize=Math.floor((i-o)/this.rowHeight),this.ensureRowsRendered(r,s,e)}}ensureRowsRendered(e,t,o){this.renderedRows.forEach((i,r)=>{(r<e||r>t)&&r!==this.lastFocusedRowIndex&&this.removeRow(r)}),o&&this.refreshRows();for(let i=e;i<=t;i++)this.renderedRows.has(i)||i<this.model.getRowCount()&&this.insertRow(i)}insertRow(e){const t=this.model.getRow(e),o=this.ariaRole==="tree"?"treeitem":"option",i=Pe({tag:"div",cls:`ag-virtual-list-item ag-${this.cssIdentifier}-virtual-list-item`,role:o,attrs:{tabindex:"-1"}});Gl(i,this.model.getRowCount()),Bl(i,e+1),i.style.height=`${this.rowHeight}px`,i.style.top=`${this.rowHeight*e}px`;const r=this.componentCreator(t,i);r.addGuiEventListener("focusin",()=>this.lastFocusedRowIndex=e),i.appendChild(r.getGui()),this.renderedRows.has(e-1)?this.renderedRows.get(e-1).eDiv.insertAdjacentElement("afterend",i):this.renderedRows.has(e+1)?this.renderedRows.get(e+1).eDiv.insertAdjacentElement("beforebegin",i):this.eContainer.appendChild(i),this.renderedRows.set(e,{rowComponent:r,eDiv:i,value:t})}removeRow(e){const t=this.renderedRows.get(e);this.eContainer.removeChild(t.eDiv),this.destroyBean(t.rowComponent),this.renderedRows.delete(e)}refreshRows(){const e=this.model.getRowCount();this.renderedRows.forEach((t,o)=>{if(o>=e)this.removeRow(o);else{const i=this.model.getRow(o);this.model.areRowsEqual?.(t.value,i)?this.componentUpdater(i,t.rowComponent):this.removeRow(o)}})}addScrollListener(){this.addGuiEventListener("scroll",()=>this.drawVirtualRows(),{passive:!0})}setModel(e){this.model=e}getAriaElement(){return this.eContainer}destroy(){this.isAlive()&&(this.clearVirtualRows(),this.awaitStableCallbacks.length=0,super.destroy())}},Ba="ag-list-item-hovered",cF=class extends E{constructor(e,t,o){super(),this.comp=e,this.virtualList=t,this.params=o,this.currentDragValue=null,this.lastHoveredListItem=null}wireBeans(e){this.dragAndDrop=e.dragAndDrop}postConstruct(){this.addManagedListeners(this.params.eventSource,{[this.params.listItemDragStartEvent]:this.listItemDragStart.bind(this),[this.params.listItemDragEndEvent]:this.listItemDragEnd.bind(this)}),this.createDropTarget(),this.createAutoScrollService()}listItemDragStart(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)}listItemDragEnd(){window.setTimeout(()=>{this.currentDragValue=null,this.moveBlocked=!1},10)}createDropTarget(){const e={isInterestedIn:t=>t===this.params.dragSourceType,getIconName:()=>this.moveBlocked?"pinned":"move",getContainer:()=>this.comp.getGui(),onDragging:t=>this.onDragging(t),onDragStop:()=>this.onDragStop(),onDragLeave:()=>this.onDragLeave(),onDragCancel:()=>this.onDragCancel()};this.dragAndDrop?.addDropTarget(e)}createAutoScrollService(){const e=this.virtualList.getGui();this.autoScrollService=new Im({scrollContainer:e,scrollAxis:"y",getVerticalPosition:()=>e.scrollTop,setVerticalPosition:t=>e.scrollTop=t})}onDragging(e){if(!this.currentDragValue||this.moveBlocked)return;const t=this.getListDragItem(e),o=this.virtualList.getComponentAt(t.rowIndex);if(!o)return;const i=o.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,Ul(i,Ba),Ul(i,`ag-item-highlight-${t.position}`))}getListDragItem(e){const t=this.virtualList.getGui(),o=parseFloat(window.getComputedStyle(t).paddingTop),i=this.virtualList.getRowHeight(),r=this.virtualList.getScrollTop(),s=Math.max(0,(e.y-o+r)/i),n=this.params.getNumRows(this.comp)-1,a=Math.min(n,s)|0;return{rowIndex:a,position:Math.round(s)>s||s>n?"bottom":"top",component:this.virtualList.getComponentAt(a)}}onDragStop(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearDragProperties())}onDragCancel(){this.clearDragProperties()}onDragLeave(){this.clearDragProperties()}clearDragProperties(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()}clearHoveredItems(){this.virtualList.getGui().querySelectorAll(`.${Ba}`).forEach(t=>{[Ba,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach(o=>{t.classList.remove(o)})}),this.lastHoveredListItem=null}};function qu(e,t){if(!t)return null;const o=Vo(e),i=o.indexOf(t);if(i===-1)return null;let r=-1;for(let s=i-1;s>=0;s--)if(o[s].classList.contains(Cs.TAB_GUARD_TOP)){r=s;break}return r<=0?null:o[r-1]}function uF(e,t){if(!t)return!1;const o=e.querySelectorAll(`.${gc}`);if(!o.length)return!1;for(let i=0;i<o.length;i++)if(o[i].contains(t))return!0;return!1}var hF={tag:"div"},gF=class extends pe{constructor(){super(hF)}init(e){this.params=e,this.cssClassPrefix=this.params.cssClassPrefix??"ag-menu-option",this.addAriaAttributes(),this.addIcon(),this.addName(),this.addShortcut(),this.addSubMenu()}configureDefaults(){return!0}addAriaAttributes(){const{checked:e,subMenu:t}=this.params,o=this.getGui();e&&Hl(o,e),t&&to(o,!1)}addIcon(){if(this.params.isCompact)return;const e=Pe({tag:"span",ref:"eIcon",cls:`${this.getClassName("part")} ${this.getClassName("icon")}`,role:"presentation"}),{checked:t,icon:o}=this.params;t?e.appendChild(te("check",this.beans)):o&&(Br(o)?e.appendChild(o):typeof o=="string"?e.innerHTML=o:_(227)),this.getGui().appendChild(e)}addName(){const e=Pe({tag:"span",ref:"eName",cls:`${this.getClassName("part")} ${this.getClassName("text")}`,children:this.params.name||""});this.getGui().appendChild(e)}addShortcut(){if(this.params.isCompact)return;const e=Pe({tag:"span",ref:"eShortcut",cls:`${this.getClassName("part")} ${this.getClassName("shortcut")}`,children:this.params.shortcut||""});this.getGui().appendChild(e)}addSubMenu(){const e=Pe({tag:"span",ref:"ePopupPointer",cls:`${this.getClassName("part")} ${this.getClassName("popup-pointer")}`}),t=this.getGui();if(this.params.subMenu){const o=this.gos.get("enableRtl")?"subMenuOpenRtl":"subMenuOpen";e.appendChild(te(o,this.beans))}t.appendChild(e)}getClassName(e){return`${this.cssClassPrefix}-${e}`}},pF='.ag-menu-list{cursor:default;display:table;padding:var(--ag-spacing) 0;width:100%}.ag-menu-option,.ag-menu-separator{display:table-row}.ag-menu-option-part,.ag-menu-separator-part{display:table-cell;vertical-align:middle}.ag-menu-option{cursor:pointer;font-weight:500}:where(.ag-ltr) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:right}:where(.ag-rtl) :where(.ag-menu-option-popup-pointer) .ag-icon{text-align:left}.ag-menu-option-text{white-space:nowrap}.ag-menu-option-custom{display:contents}.ag-compact-menu-option{display:flex;flex-wrap:nowrap;width:100%}.ag-compact-menu-option-text{flex:1 1 auto;white-space:nowrap}.ag-menu-separator{height:calc(var(--ag-spacing)*2 + 1px)}.ag-menu-separator-part:after{border-top:1px solid var(--ag-menu-separator-color);content:"";display:block}.ag-compact-menu-option-active,.ag-menu-option-active{background-color:var(--ag-row-hover-color)}.ag-compact-menu-option-part,.ag-menu-option-part{line-height:var(--ag-icon-size);padding:calc(var(--ag-spacing) + 2px) 0}.ag-compact-menu-option-disabled,.ag-menu-option-disabled{cursor:not-allowed;opacity:.5}.ag-compact-menu-option-icon,.ag-menu-option-icon{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-compact-menu-option-icon,:where(.ag-ltr) .ag-menu-option-icon{padding-left:calc(var(--ag-spacing)*2)}:where(.ag-rtl) .ag-compact-menu-option-icon,:where(.ag-rtl) .ag-menu-option-icon{padding-right:calc(var(--ag-spacing)*2)}.ag-compact-menu-option-text,.ag-menu-option-text{padding-left:calc(var(--ag-spacing)*2);padding-right:calc(var(--ag-spacing)*2)}:where(.ag-ltr) .ag-compact-menu-option-shortcut,:where(.ag-ltr) .ag-menu-option-shortcut{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-shortcut,:where(.ag-rtl) .ag-menu-option-shortcut{padding-left:var(--ag-spacing)}:where(.ag-ltr) .ag-compact-menu-option-popup-pointer,:where(.ag-ltr) .ag-menu-option-popup-pointer{padding-right:var(--ag-spacing)}:where(.ag-rtl) .ag-compact-menu-option-popup-pointer,:where(.ag-rtl) .ag-menu-option-popup-pointer{padding-left:var(--ag-spacing)}.ag-menu-column-select-wrapper{height:265px;overflow:auto;:where(.ag-column-select){height:100%}}.ag-menu:where(.ag-tabs){min-width:290px}.ag-context-menu-loading-icon{pointer-events:none;position:absolute}',fF={moduleName:"MenuItem",version:ze,userComponents:{agMenuItem:gF},icons:{check:"tick",subMenuOpen:"small-right",subMenuOpenRtl:"small-left"},css:[pF]},mF=".ag-column-select{display:flex;flex:3 1 0px;flex-direction:column;overflow:hidden;position:relative}.ag-column-select-header{align-items:center;display:flex;flex:none;gap:var(--ag-widget-horizontal-spacing);height:var(--ag-header-height);padding-left:var(--ag-widget-container-horizontal-padding);padding-right:var(--ag-widget-container-horizontal-padding);position:relative}.ag-column-select-column,.ag-column-select-column-group{align-items:center;display:flex;gap:var(--ag-widget-horizontal-spacing);height:100%;position:relative;&:where(:not(:last-child)){margin-bottom:var(--ag-widget-vertical-spacing)}}:where(.ag-ltr) .ag-column-select-column,:where(.ag-ltr) .ag-column-select-column-group{padding-left:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}:where(.ag-rtl) .ag-column-select-column,:where(.ag-rtl) .ag-column-select-column-group{padding-right:calc(var(--ag-indentation-level)*var(--ag-column-select-indent-size))}.ag-column-select-header-icon{border-radius:var(--ag-border-radius);cursor:pointer;height:var(--ag-icon-size);position:relative;width:var(--ag-icon-size);&:focus-visible{box-shadow:var(--ag-focus-shadow)}}.ag-column-select-header-filter-wrapper{flex:1 1 auto}.ag-column-select-header-filter{width:100%}.ag-column-select-list{flex:1 1 0px;overflow:hidden}:where(.ag-ltr) .ag-column-select-add-group-indent{margin-left:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}:where(.ag-rtl) .ag-column-select-add-group-indent{margin-right:calc(var(--ag-icon-size) + var(--ag-spacing)*1.5)}.ag-column-select-column-group-readonly,.ag-column-select-column-readonly{opacity:.5;pointer-events:none}.ag-column-select-virtual-list-viewport{padding:calc(var(--ag-widget-container-vertical-padding)*.5) 0}.ag-column-select-virtual-list-item{padding:0 var(--ag-widget-container-horizontal-padding)}.ag-column-select-column-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-column-select-checkbox{display:flex}",CF=300,vF={tag:"div",cls:"ag-column-select-header",role:"presentation",children:[{tag:"div",ref:"eExpand",cls:"ag-column-select-header-icon"},{tag:"ag-checkbox",ref:"eSelect",cls:"ag-column-select-header-checkbox"},{tag:"ag-input-text-field",ref:"eFilterTextField",cls:"ag-column-select-header-filter-wrapper"}]},wF=class extends pe{constructor(){super(vF,[fi,ua]),this.eExpand=V,this.eSelect=V,this.eFilterTextField=V}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:t=>{t.key===D.SPACE&&(t.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const e=this.getLocaleTextFunc();this.eSelect.setInputAriaLabel(e("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(e("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e)}init(e){this.params=e;const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t),this.beans.colModel.ready&&this.showOrHideOptions()}createExpandIcons(){const e=this.beans;this.eExpand.appendChild(this.eExpandChecked=te("columnSelectOpen",e)),this.eExpand.appendChild(this.eExpandUnchecked=te("columnSelectClosed",e)),this.eExpand.appendChild(this.eExpandIndeterminate=te("columnSelectIndeterminate",e)),this.setExpandState(0)}showOrHideOptions(){const e=this.params,t=!e.suppressColumnFilter,o=!e.suppressColumnSelectAll,i=!e.suppressColumnExpandAll,r=!!this.beans.colModel.colDefCols?.treeDepth,s=this.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),ge(this.eFilterTextField.getGui(),t),ge(this.eSelect.getGui(),o),ge(this.eExpand,i&&r)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=tt(this,()=>{const e=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:e})},CF)),this.onFilterTextChangedDebounced()}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(e){this.expandState=e,ge(this.eExpandChecked,e===0),ge(this.eExpandUnchecked,e===1),ge(this.eExpandIndeterminate,e===2)}setSelectionState(e){this.selectState=e,this.eSelect.setValue(this.selectState)}},bF={selector:"AG-PRIMARY-COLS-HEADER",component:wF};function xi(e){return!!e&&typeof e.children<"u"}function xo(e){return xi(e)?e.groupId:e.colId}function Xu(e,t,o){const i=(n,a)=>{const d=n.children.map(xo).includes(xo(a)),c=Ce(n.children),u=c&&xo(c)!==xo(a);return d&&u};if(!xi(e))return!0;const r=e,s=o;if(i(r,s)||r.groupId===t&&!r.children.map(xo).includes(xo(s)))return r.children.push(s),!0;for(let n=r.children.length-1;n>=0&&!Xu(r.children[n],t,o);n--);return!1}function yF(e){const t=(r,s)=>xi(r)&&xi(s)&&xo(r)===xo(s),o=(r,s)=>{if(!xi(s))return r;const n=r,a=s;return a.children&&a.groupId&&Xu(n,a.groupId,a.children[0])||a.children.forEach(l=>o(n,l)),n},i=[];for(let r=1;r<=e.length;r++){const s=e[r-1],n=e[r];t(s,n)?e[r]=o(s,n):i.push(s)}return i}function SF(e,t){const o=[],i=(s,n)=>{if(xi(s)){const a=s,l=typeof a.groupId<"u"?a.groupId:a.headerName,d=new Ui(a,l,!1,n),c=[];return a.children.forEach(u=>{const g=i(u,n+1);g&&c.push(g)}),d.setChildren(c),d}else{const a=s,l=a.colId?a.colId:a.field,d=e.getColDefCol(l);return d||o.push(a),d}},r=[];return t.forEach(s=>{const n=i(s,0);n&&r.push(n)}),o.length>0&&_(217,{invalidColIds:o}),r}function RF(e,t){const o=xF(e),i=yF(o);t(i)}function xF(e){const t=(r,s)=>{let n;if(_e(r))if(r.isPadding())n=s;else{const l=Object.assign({},r.getColGroupDef());l.groupId=r.getGroupId(),l.children=[s],n=l}else{const l=Object.assign({},r.getColDef());l.colId=r.getColId(),n=l}const a=r.getOriginalParent();return a?t(a,n):n};return e.getCols().filter(r=>{const s=r.getColDef();return r.isPrimary()&&!s.showRowGroup}).map(r=>t(r,r.getColDef()))}var Qu=class{constructor(e,t,o,i=!1,r){this.displayName=e,this.depth=o,this.group=i,this.localEventService=new eo,i?(this.columnGroup=t,this._expanded=r,this.children=[]):this.column=t}get expanded(){return!!this._expanded}set expanded(e){e!==this._expanded&&(this._expanded=e,this.localEventService.dispatchEvent({type:"expandedChanged"}))}addEventListener(e,t){this.localEventService.addEventListener(e,t)}removeEventListener(e,t){this.localEventService.removeEventListener(e,t)}};function Zu(e,t,o,i){const r=FF(t);Ju(e,r,o,i)}function Ju(e,t,o,i){e.colModel.isPivotMode()?kF(e,t,o,i):DF(e,t,o,i)}function FF(e){const t=[],o=i=>{i.forEach(r=>{r.passesFilter&&(r.group?o(r.children):t.push(r.column))})};return o(e),t}function DF(e,t,o,i){const r=[];t.forEach(s=>{s.getColDef().lockVisible||s.isVisible()!=o&&r.push({colId:s.getId(),hide:!o})}),r.length>0&&it(e,{state:r},i),e.selectionColSvc?.refreshVisibility(i)}function kF(e,t,o,i){MF(e,t,o,i)}function MF(e,t,o,i){const r=[],a=o?l=>{if(!l.isAnyFunctionActive())if(l.isAllowValue()){const d=typeof l.getAggFunc()=="string"?l.getAggFunc():e.aggFuncSvc?.getDefaultAggFunc(l);r.push({colId:l.getId(),aggFunc:d})}else l.isAllowRowGroup()?r.push({colId:l.getId(),rowGroup:!0}):l.isAllowPivot()&&r.push({colId:l.getId(),pivot:!0})}:l=>{(l.isPivotActive()||l.isRowGroupActive()||l.isValueActive())&&r.push({colId:l.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(a),r.length>0&&it(e,{state:r},i)}function eh(e,t){const{columns:o,visibleState:i,pivotState:r,eventType:s}=t,n=o.map(a=>{const l=a.getColId();if(e.colModel.isPivotMode()){const d=r?.[l];return{colId:l,pivot:d?.pivot,rowGroup:d?.rowGroup,aggFunc:d?.aggFunc}}else return{colId:l,hide:!i?.[l]}});it(e,{state:n},s)}function th(e){return{pivot:e.isPivotActive(),rowGroup:e.isRowGroupActive(),aggFunc:e.isValueActive()?e.getAggFunc():void 0}}function oh(e,t,o,i){const r=t.getCol(o);e.groupData||(e.groupData={});const s=r.getColId(),n=e.groupData[s];n!==i&&(e.groupData[s]=i,e.dispatchCellChangedEvent(r,i,n))}function PF(e,t,o){e.group!==o&&(e.group,e.group=o,e.updateHasChildren(),t.selectionSvc?.updateRowSelectable(e),e.dispatchRowEvent("groupChanged"))}function Fs(e,t){const{gos:o,rowGroupColsSvc:i}=t;if(!i||!e)return!1;const r=o.get("groupLockGroupColumns");if(!e.isRowGroupActive()||r===0)return!1;if(r===-1)return!0;const s=i.columns.findIndex(n=>n.getColId()===e.getColId());return r>s}var EF=class extends mi{constructor(e){super(),this.setTemplateFromElement(e.getGui(),void 0,void 0,!0)}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e)})}handleKeyDown(e){e.key===D.ESCAPE&&this.closePanel()}onTabKeyDown(e){e.defaultPrevented||(this.closePanel(),e.preventDefault())}closePanel(){const e=this.parentComponent;e.closeSubMenu(),setTimeout(()=>e.getGui().focus(),0)}};function AF(e,t,o){return e.getCompDetails(t,TF,"agMenuItem",o,!0)}var TF={name:"menuItem",optionalMethods:["setActive","select","setExpanded","configureDefaults"]},IF={tag:"div",cls:"ag-menu",role:"presentation"},ih=class extends E{constructor(){super(...arguments),this.ACTIVATION_DELAY=80,this.isActive=!1,this.subMenuIsOpen=!1,this.subMenuIsOpening=!1,this.suppressRootStyles=!0,this.suppressAria=!0,this.suppressFocus=!0}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory,this.registry=e.registry}init(e){const{menuItemDef:t,isAnotherSubMenuOpen:o,level:i,childComponent:r,contextParams:s}=e;return this.params=e.menuItemDef,this.level=i,this.isAnotherSubMenuOpen=o,this.childComponent=r,this.contextParams=s,this.cssClassPrefix=this.params.menuItemParams?.cssClassPrefix??"ag-menu-option",AF(this.userCompFactory,this.params,Z(this.gos,{...t,level:i,isAnotherSubMenuOpen:o,openSubMenu:a=>this.openSubMenu(a),closeSubMenu:()=>this.closeSubMenu(),closeMenu:a=>this.closeMenu(a),updateTooltip:(a,l)=>this.refreshTooltip(a,l),onItemActivated:()=>this.onItemActivated()}))?.newAgStackInstance().then(a=>{this.menuItemComp=a;const l=a.configureDefaults?.();l&&this.configureDefaults(l===!0?void 0:l)})??ke.resolve()}addListeners(e,t){t?.suppressClick||this.addManagedElementListeners(e,{click:o=>this.onItemSelected(o)}),t?.suppressKeyboardSelect||this.addManagedElementListeners(e,{keydown:o=>{(o.key===D.ENTER||o.key===D.SPACE)&&(o.preventDefault(),this.onItemSelected(o))}}),t?.suppressMouseDown||this.addManagedElementListeners(e,{mousedown:o=>{o.stopPropagation(),o.preventDefault()}}),t?.suppressMouseOver||this.addManagedElementListeners(e,{mouseenter:()=>this.onMouseEnter(),mouseleave:()=>this.onMouseLeave()})}isDisabled(){return!!this.params.disabled}openSubMenu(e=!1,t){if(this.closeSubMenu(),!this.params.subMenu)return;this.subMenuIsOpening=!0;const o=Pe(IF);this.eSubMenuGui=o;let i,r=()=>{this.subMenuIsOpening=!1};if(this.childComponent){const d=this.createBean(new EF(this.childComponent));d.setParentComponent(this);const c=d.getGui(),u="mouseenter",g=()=>this.cancelDeactivate();c.addEventListener(u,g),i=()=>{c.removeEventListener(u,g),this.destroyBean(d)},o.appendChild(c),this.childComponent.afterGuiAttached&&(r=()=>{this.childComponent.afterGuiAttached(),this.subMenuIsOpening=!1})}else if(this.params.subMenu){const d=this.createBean(new Oa(this.level+1,this.contextParams));d.setParentComponent(this),d.addMenuItems(this.params.subMenu),o.appendChild(d.getGui()),this.addManagedListeners(d,{closeMenu:c=>this.dispatchLocalEvent(c)}),d.addGuiEventListener("mouseenter",()=>this.cancelDeactivate()),i=()=>this.destroyBean(d),e&&(r=()=>{d.activateFirstItem(),this.subMenuIsOpening=!1})}const{popupSvc:s}=this,n=()=>{const d=this.eGui,{column:c,node:u}=this.contextParams;s?.positionPopupForMenu({eventSource:d,ePopup:o,event:t instanceof MouseEvent?t:void 0,column:c,node:u})},a=this.getLocaleTextFunc(),l=s?.addPopup({modal:!0,eChild:o,positionCallback:n,anchorToElement:this.eGui,ariaLabel:a("ariaLabelSubMenu","SubMenu"),afterGuiAttached:r});this.subMenuIsOpen=!0,this.setAriaExpanded(!0),this.hideSubMenu=()=>{l&&l.hideFunc(),this.subMenuIsOpen=!1,this.setAriaExpanded(!1),i(),this.menuItemComp.setExpanded?.(!1),this.eSubMenuGui=void 0},this.menuItemComp.setExpanded?.(!0)}setAriaExpanded(e){this.suppressAria||to(this.eGui,e)}closeSubMenu(){this.hideSubMenu&&(this.hideSubMenu(),this.hideSubMenu=null,this.setAriaExpanded(!1))}isSubMenuOpen(){return this.subMenuIsOpen}isSubMenuOpening(){return this.subMenuIsOpening}activate(e,t){this.cancelActivate(),!(this.params.disabled&&!t)&&(this.isActive=!0,this.suppressRootStyles||this.eGui.classList.add(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!0),this.suppressFocus||Zl(this.beans,()=>this.eGui.focus({preventScroll:!t})),e&&this.params.subMenu&&window.setTimeout(()=>{this.isAlive()&&this.isActive&&this.openSubMenu()},300),this.onItemActivated())}deactivate(){this.cancelDeactivate(),this.suppressRootStyles||this.eGui.classList.remove(`${this.cssClassPrefix}-active`),this.menuItemComp.setActive?.(!1),this.isActive=!1,this.subMenuIsOpen&&this.closeSubMenu()}getGui(){return this.menuItemComp.getGui()}getParentComponent(){return this.parentComponent}setParentComponent(e){this.parentComponent=e}getSubMenuGui(){return this.eSubMenuGui}onItemSelected(e){this.menuItemComp.select?.(),this.params.action?this.beans.frameworkOverrides.wrapOutgoing(()=>this.params.action(Z(this.gos,{...this.contextParams}))):this.openSubMenu(e&&e.type==="keydown",e),!(this.params.subMenu&&!this.params.action||this.params.suppressCloseOnSelect)&&this.closeMenu(e)}closeMenu(e){const t={type:"closeMenu"};e&&(e instanceof MouseEvent?t.mouseEvent=e:t.keyboardEvent=e),this.dispatchLocalEvent(t)}onItemActivated(){const e={type:"menuItemActivated",menuItem:this};this.dispatchLocalEvent(e)}cancelActivate(){this.activateTimeoutId&&(window.clearTimeout(this.activateTimeoutId),this.activateTimeoutId=0)}cancelDeactivate(){this.deactivateTimeoutId&&(window.clearTimeout(this.deactivateTimeoutId),this.deactivateTimeoutId=0)}onMouseEnter(){this.cancelDeactivate(),this.isAnotherSubMenuOpen()?this.activateTimeoutId=window.setTimeout(()=>this.activate(!0),this.ACTIVATION_DELAY):this.activate(!0)}onMouseLeave(){this.cancelActivate(),this.isSubMenuOpen()?this.deactivateTimeoutId=window.setTimeout(()=>this.deactivate(),this.ACTIVATION_DELAY):this.deactivate()}configureDefaults(e){if(!this.menuItemComp){setTimeout(()=>this.configureDefaults(e));return}let t=this.menuItemComp.getGui();const{suppressRootStyles:o,suppressTooltip:i,suppressAria:r,suppressTabIndex:s,suppressFocus:n}=e||{},a=this.menuItemComp.getRootElement?.();a&&(o||t.classList.add("ag-menu-option-custom"),t=a),this.eGui=t,this.suppressRootStyles=!!o,this.suppressRootStyles||(t.classList.add(this.cssClassPrefix),this.params.cssClasses?.forEach(l=>t.classList.add(l)),this.params.disabled&&t.classList.add(`${this.cssClassPrefix}-disabled`)),i||this.refreshTooltip(this.params.tooltip),this.suppressAria=!!r,this.suppressAria||(Xe(t,"menuitem"),this.params.subMenu&&gp(t,this.params.subMenuRole??"menu"),this.params.disabled&&Il(t,!0)),s||t.setAttribute("tabindex","-1"),this.params.disabled||this.addListeners(t,e),this.suppressFocus=!!n}refreshTooltip(e,t){if(this.tooltip=e,this.tooltipFeature=this.destroyBean(this.tooltipFeature),!e||!this.menuItemComp)return;const o=this.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getTooltipValue:()=>this.tooltip,getLocation:()=>"menu",shouldDisplayTooltip:t});o&&(this.tooltipFeature=this.createBean(o))}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),this.menuItemComp?.destroy?.(),super.destroy()}},Oa=class extends mi{constructor(e=0,t){super({tag:"div",cls:"ag-menu-list",role:"menu"}),this.level=e,this.menuItems=[],this.params=t??{column:null,node:null,value:null}}postConstruct(){this.initialiseTabGuard({onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>Zl(this.beans,()=>this.handleKeyDown(e)),onFocusIn:e=>this.handleFocusIn(e),onFocusOut:e=>this.handleFocusOut(e)})}onTabKeyDown(e){this.getParentComponent()?.getGui()?.classList.contains("ag-focus-managed")||e.preventDefault(),e.shiftKey&&this.closeIfIsChild(e)}handleKeyDown(e){switch(e.key){case D.UP:case D.RIGHT:case D.DOWN:case D.LEFT:e.preventDefault(),this.handleNavKey(e.key);break;case D.ESCAPE:this.closeIfIsChild()&&io(e);break}}handleFocusIn(e){const t=e.relatedTarget;!this.tabGuardFeature.getTabGuardCtrl().isTabGuard(t)&&(this.getGui().contains(t)||this.activeMenuItem?.getSubMenuGui()?.contains(t))||(this.activeMenuItem?this.activeMenuItem.activate():this.activateFirstItem())}handleFocusOut(e){const t=e.relatedTarget;!this.activeMenuItem||this.getGui().contains(t)||this.activeMenuItem.getSubMenuGui()?.contains(t)||this.activeMenuItem.isSubMenuOpening()||this.activeMenuItem.deactivate()}clearActiveItem(){this.activeMenuItem&&(this.activeMenuItem.deactivate(),this.activeMenuItem=null)}addMenuItems(e){e!=null&&ke.all(e.map(t=>t==="separator"?ke.resolve({eGui:this.createSeparator()}):typeof t=="string"?(_(228,{menuItemOrString:t}),ke.resolve({eGui:null})):this.addItem(t))).then(t=>{(t??[]).forEach(o=>{o?.eGui&&(this.appendChild(o.eGui),o.comp&&this.menuItems.push(o.comp))})})}addItem(e){const t=this.createManagedBean(new ih);return t.init({menuItemDef:e,isAnotherSubMenuOpen:()=>this.menuItems.some(o=>o.isSubMenuOpen()),level:this.level,contextParams:this.params}).then(()=>(t.setParentComponent(this),this.addManagedListeners(t,{closeMenu:o=>{this.dispatchLocalEvent(o)},menuItemActivated:o=>{this.activeMenuItem&&this.activeMenuItem!==o.menuItem&&this.activeMenuItem.deactivate(),this.activeMenuItem=o.menuItem}}),{comp:t,eGui:t.getGui()}))}activateFirstItem(){const e=this.menuItems.filter(t=>!t.isDisabled())[0];e&&e.activate()}createSeparator(){const e={tag:"div",cls:"ag-menu-separator-part"};return Pe({tag:"div",cls:"ag-menu-separator",attrs:{"aria-hidden":"true"},children:[e,e,e,e]})}handleNavKey(e){switch(e){case D.UP:case D.DOWN:{const o=this.findNextItem(e===D.UP);o&&o!==this.activeMenuItem&&o.activate(!1,!0);return}}const t=this.gos.get("enableRtl")?D.RIGHT:D.LEFT;e===t?this.closeIfIsChild():this.openChild()}closeIfIsChild(e){const t=this.getParentComponent();return t&&t instanceof ih?(e&&e.preventDefault(),t.closeSubMenu(),t.getGui().focus(),!0):!1}openChild(){this.activeMenuItem&&this.activeMenuItem.openSubMenu(!0)}findNextItem(e){const t=[...this.menuItems];if(!t.length)return;if(!this.activeMenuItem)return e?Ce(t):t[0];e&&t.reverse();let o,i=!1;for(const r of t){if(!i){r===this.activeMenuItem&&(i=!0);continue}o=r;break}return i&&!o?t[0]:o||this.activeMenuItem}destroy(){this.clearActiveItem(),super.destroy()}},rh=class extends pe{constructor(e,t,o){super({tag:"div",cls:"ag-menu"}),this.column=e,this.mouseEvent=t,this.parentEl=o,this.displayName=null}postConstruct(){const{column:e,beans:{colNames:t}}=this;this.initializeProperties(e);let o;if($t(e)?o=t.getDisplayNameForColumn(e,"columnToolPanel"):o=t.getDisplayNameForProvidedColumnGroup(null,e,"columnToolPanel"),this.displayName=o,this.buildMenuItemMap(),this.isActive()){this.mouseEvent.preventDefault();const i=this.getMappedMenuItems();if(i.length===0)return;this.displayContextMenu(i)}}initializeProperties(e){let t;_e(e)?t=e.getLeafColumns():t=[e],this.columns=t,this.allowGrouping=t.some(o=>o.isPrimary()&&o.isAllowRowGroup()),this.allowValues=t.some(o=>o.isPrimary()&&o.isAllowValue()),this.allowPivoting=this.beans.colModel.isPivotMode()&&t.some(o=>o.isPrimary()&&o.isAllowPivot())}buildMenuItemMap(){const e=this.getLocaleTextFunc(),{beans:t,displayName:o}=this,{rowGroupColsSvc:i,valueColsSvc:r,pivotColsSvc:s,colModel:n}=t,a=new Map;this.menuItemMap=a,a.set("rowGroup",{allowedFunction:l=>l.isPrimary()&&l.isAllowRowGroup()&&!Fs(l,t),activeFunction:l=>l.isRowGroupActive(),activateLabel:()=>`${e("groupBy","Group by")} ${o}`,deactivateLabel:()=>`${e("ungroupBy","Un-Group by")} ${o}`,activateFunction:()=>i?.setColumns(this.addColumnsToList(i.columns),"toolPanelUi"),deActivateFunction:()=>i?.setColumns(this.removeColumnsFromList(i.columns),"toolPanelUi"),addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),a.set("value",{allowedFunction:l=>l.isPrimary()&&l.isAllowValue(),activeFunction:l=>l.isValueActive(),activateLabel:()=>e("addToValues",`Add ${o} to values`,[o]),deactivateLabel:()=>e("removeFromValues",`Remove ${o} from values`,[o]),activateFunction:()=>r?.setColumns(this.addColumnsToList(r.columns),"toolPanelUi"),deActivateFunction:()=>r?.setColumns(this.removeColumnsFromList(r.columns),"toolPanelUi"),addIcon:"valuePanel",removeIcon:"valuePanel"}),a.set("pivot",{allowedFunction:l=>n.isPivotMode()&&l.isPrimary()&&l.isAllowPivot(),activeFunction:l=>l.isPivotActive(),activateLabel:()=>e("addToLabels",`Add ${o} to labels`,[o]),deactivateLabel:()=>e("removeFromLabels",`Remove ${o} from labels`,[o]),activateFunction:()=>s?.setColumns(this.addColumnsToList(s.columns),"toolPanelUi"),deActivateFunction:()=>s?.setColumns(this.removeColumnsFromList(s.columns),"toolPanelUi"),addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(e){return[...e].concat(this.columns.filter(t=>e.indexOf(t)===-1))}removeColumnsFromList(e){return e.filter(t=>this.columns.indexOf(t)===-1)}displayContextMenu(e){const t=this.getGui(),o=this.createBean(new Oa),i=this.getLocaleTextFunc();let r=()=>{};t.appendChild(o.getGui()),o.addMenuItems(e),o.addManagedListeners(o,{closeMenu:()=>{this.parentEl.focus(),r()}});const s=this.beans.popupSvc,n=s.addPopup({modal:!0,eChild:t,closeOnEsc:!0,afterGuiAttached:()=>Lt(o.getGui()),ariaLabel:i("ariaLabelContextMenu","Context Menu"),closedCallback:a=>{a instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(o)}});n&&(r=n.hideFunc),s.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:t})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const e=[],{menuItemMap:t,columns:o,displayName:i,beans:r}=this;for(const s of t.values()){const n=o.some(l=>s.allowedFunction(l)&&!s.activeFunction(l)),a=o.some(l=>s.allowedFunction(l)&&s.activeFunction(l));n&&e.push({name:s.activateLabel(i),icon:te(s.addIcon,r,null),action:()=>s.activateFunction()}),a&&e.push({name:s.deactivateLabel(i),icon:te(s.removeIcon,r,null),action:()=>s.deActivateFunction()})}return e}},LF={tag:"div",cls:"ag-column-select-column-group",children:[{tag:"span",ref:"eColumnGroupIcons",cls:"ag-column-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-column-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-column-group-opened-icon"}]},{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},sh=class extends pe{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.eventType=o,this.focusWrapper=i,this.cbSelect=V,this.eLabel=V,this.eGroupOpenedIcon=V,this.eGroupClosedIcon=V,this.eColumnGroupIcons=V,this.processingColumnStateChange=!1;const{columnGroup:r,depth:s,displayName:n}=e;this.columnGroup=r,this.columnDepth=s,this.displayName=n}postConstruct(){this.setTemplate(LF,[fi]);const{beans:e,cbSelect:t,eLabel:o,displayName:i,columnDepth:r,modelItem:s,focusWrapper:n,columnGroup:a}=this,{registry:l,gos:d}=e,c=te("columnDrag",e);this.eDragHandle=c,c.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const u=t.getGui(),g=t.getInputElement();u.insertAdjacentElement("afterend",c),g.setAttribute("tabindex","-1"),o.innerHTML=i??"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+r),this.getGui().style.setProperty("--ag-indentation-level",String(r)),this.tooltipFeature=this.createOptionalManagedBean(l.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumnGroup",shouldDisplayTooltip:ha(d,()=>o)})),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(o,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(s,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(n,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),Zd(a.getColGroupDef(),d,null,a).forEach(f=>this.addOrRemoveCssClass(f,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const e=this.columnGroup.getColGroupDef();if(!e)return;const t=()=>this.tooltipFeature?.setTooltipAndRefresh(e.headerTooltip);t(),this.addManagedEventListeners({newColumnsLoaded:t})}handleKeyDown(e){switch(e.key){case D.LEFT:e.preventDefault(),this.modelItem.expanded=!1;break;case D.RIGHT:e.preventDefault(),this.modelItem.expanded=!0;break;case D.SPACE:e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(e){const{columnGroup:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new rh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}addVisibilityListenersToAllChildren(){const e=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(t=>{this.addManagedListeners(t,{visibleChanged:e,columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e})})}setupDragging(){if(!this.allowDragging){ge(this.eDragHandle,!1);return}const e=this.beans,{gos:t,eventSvc:o,dragAndDrop:i}=e;let r=!t.get("suppressDragLeaveHidesColumns");const s={type:is.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>r?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{r=!t.get("suppressDragLeaveHidesColumns"),o.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{o.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{r&&eh(e,{columns:this.columnGroup.getLeafColumns(),visibleState:n?.visibleState,pivotState:n?.pivotState,eventType:this.eventType})},onGridExit:()=>{r&&this.onChangeCommon(!1)}};i.addDragSource(s,!0),this.addDestroyFunc(()=>i.removeDragSource(s))}createDragItem(){const e=this.columnGroup.getLeafColumns(),t={},o={};return e.forEach(i=>{const r=i.getId();t[r]=i.isVisible(),o[r]=th(i)}),{columns:e,visibleState:t,pivotState:o}}setupExpandContract(){const{beans:e,eGroupClosedIcon:t,eGroupOpenedIcon:o,eColumnGroupIcons:i}=this;t.appendChild(pi("columnSelectClosed",e,null)),o.appendChild(pi("columnSelectOpen",e,null));const r=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(t,{click:r}),this.addManagedElementListeners(o,{click:r});const s=new Ci(i,!0);this.addManagedListeners(s,{tap:r}),this.addDestroyFunc(s.destroy.bind(s))}onLabelClicked(){const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}getVisibleLeafColumns(){const e=[],t=o=>{o.forEach(i=>{i.passesFilter&&(i.group?t(i.children):e.push(i.column))})};return t(this.modelItem.children),e}onChangeCommon(e){this.refreshAriaLabel(),!this.processingColumnStateChange&&Zu(this.beans,this.modelItem.children,e,this.eventType)}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),r=i("ariaColumnGroup","Column Group"),s=e.getValue(),n=s===void 0?i("ariaIndeterminate","indeterminate"):s?i("ariaVisible","visible"):i("ariaHidden","hidden"),a=i("ariaToggleVisibility","Press SPACE to toggle visibility");dt(t,`${o} ${r}`),e.setInputAriaLabel(`${a} (${n})`),cn(t,e.getInputElement().id)}onColumnStateChanged(){const e=this.workOutSelectedValue(),t=this.workOutReadOnlyValue();this.processingColumnStateChange=!0;const o=this.cbSelect;o.setValue(e),o.setReadOnly(t),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",t),this.processingColumnStateChange=!1}workOutSelectedValue(){const e=this.beans.colModel.isPivotMode(),t=this.getVisibleLeafColumns();let o=0,i=0;if(t.forEach(r=>{!e&&r.getColDef().lockVisible||(this.isColumnChecked(r,e)?o++:i++)}),!(o>0&&i>0))return o>0}workOutReadOnlyValue(){const e=this.beans.colModel.isPivotMode();let t=0;return this.columnGroup.getLeafColumns().forEach(o=>{e?o.isAnyFunctionAllowed()&&t++:o.getColDef().lockVisible||t++}),t===0}isColumnChecked(e,t){if(t){const o=e.isPivotActive(),i=e.isRowGroupActive(),r=e.isValueActive();return o||i||r}return e.isVisible()}onExpandOrContractClicked(){const e=this.modelItem,t=e.expanded;e.expanded=!t}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const e=this.modelItem.expanded;ge(this.eGroupClosedIcon,!e),ge(this.eGroupOpenedIcon,e)}refreshAriaExpanded(){to(this.focusWrapper,this.modelItem.expanded)}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect,o=t.getValue();!t.isReadOnly()&&(e&&!o||!e&&o)&&t.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(e){this.cbSelect.setValue(e,!0)}},Na=e=>_e(e)?e.getLeafColumns():e?[e]:[],GF=(e,t,o,i)=>{if(!o||!t)return null;const r=e.colModel.getCols(),s=r.indexOf(o),n=i?s:s+1,a=BF(r,t,n);return n-a},BF=(e,t,o)=>{if(!t)return 0;const i=t[0],r=t.length;return e.indexOf(i)<o?r:0},nh=(e,t,o)=>e.get("suppressMovableColumns")||t.colModel.isPivotMode()?!0:!!o.find(({colDef:s})=>!!s.suppressMovable||!!s.lockPosition),ah=(e,t,o)=>{if(!o)return;const{component:i}=o;let r=null,s=o.position==="top";if(i instanceof sh?(r=i.getColumns()[0],s=!0):i&&(r=i.column),!r)return;const n=GF(e,t,r,s);n!=null&&e.colMoves?.moveColumns(t,n,"toolPanelUi")},OF=e=>e.column,NF={tag:"div",cls:"ag-column-select-column",children:[{tag:"ag-checkbox",ref:"cbSelect",cls:"ag-column-select-checkbox"},{tag:"span",ref:"eLabel",cls:"ag-column-select-column-label"}]},HF=class extends pe{constructor(e,t,o,i){super(),this.modelItem=e,this.allowDragging=t,this.groupsExist=o,this.focusWrapper=i,this.eLabel=V,this.cbSelect=V,this.processingColumnStateChange=!1;const{column:r,depth:s,displayName:n}=e;this.column=r,this.columnDepth=s,this.displayName=n}postConstruct(){this.setTemplate(NF,[fi]);const{beans:e,cbSelect:t,displayName:o,eLabel:i,columnDepth:r,groupsExist:s,column:n,gos:a,focusWrapper:l}=this,d=te("columnDrag",e);this.eDragHandle=d,d.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const c=t.getGui(),u=t.getInputElement();c.insertAdjacentElement("afterend",d),u.setAttribute("tabindex","-1");const g=Rt(o);i.innerHTML=g,s&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${r}`),this.getGui().style.setProperty("--ag-indentation-level",String(r)),this.tooltipFeature=this.createOptionalManagedBean(e.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getLocation:()=>"columnToolPanelColumn",getColDef:()=>n.getColDef(),shouldDisplayTooltip:ha(a,()=>i)})),this.setupDragging();const p=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:p}),this.addManagedListeners(n,{columnValueChanged:p,columnPivotChanged:p,columnRowGroupChanged:p,visibleChanged:p}),this.addManagedListeners(l,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(t,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(i,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),Zd(n.getColDef(),a,n,null).forEach(m=>this.addOrRemoveCssClass(m,!0))}getColumn(){return this.column}setupTooltip(){const e=()=>this.tooltipFeature?.setTooltipAndRefresh(this.column.getColDef().headerTooltip);e(),this.addManagedEventListeners({newColumnsLoaded:e})}onContextMenu(e){const{column:t,gos:o}=this;if(o.get("functionsReadOnly"))return;const i=this.createBean(new rh(t,e,this.focusWrapper));this.addDestroyFunc(()=>{i.isAlive()&&this.destroyBean(i)})}handleKeyDown(e){e.key===D.SPACE&&(e.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const e=!this.cbSelect.getValue();this.onChangeCommon(e)}onCheckboxChanged(e){this.onChangeCommon(e.selected)}onChangeCommon(e){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&Ju(this.beans,[this.column],e,"toolPanelUi"))}refreshAriaLabel(){const{cbSelect:e,focusWrapper:t,displayName:o}=this,i=this.getLocaleTextFunc(),r=i("ariaColumn","Column"),s=e.getValue()?i("ariaVisible","visible"):i("ariaHidden","hidden"),n=i("ariaToggleVisibility","Press SPACE to toggle visibility");dt(t,`${o} ${r}`),this.cbSelect.setInputAriaLabel(`${n} (${s})`),cn(t,e.getInputElement().id)}setupDragging(){const e=this.eDragHandle;if(!this.allowDragging){ge(e,!1);return}const t=this.beans,{gos:o,eventSvc:i,dragAndDrop:r}=t;let s=!o.get("suppressDragLeaveHidesColumns");const n={type:is.ToolPanel,eElement:e,dragItemName:this.displayName,getDefaultIconName:()=>s?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{s=!o.get("suppressDragLeaveHidesColumns"),i.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{i.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:a=>{s&&eh(t,{columns:[this.column],visibleState:a?.visibleState,pivotState:a?.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{s&&this.onChangeCommon(!1)}};r.addDragSource(n,!0),this.addDestroyFunc(()=>r.removeDragSource(n))}createDragItem(){const e=this.column.getColId(),t={[e]:this.column.isVisible()},o={[e]:th(this.column)};return{columns:[this.column],visibleState:t,pivotState:o}}onColumnStateChanged(){this.processingColumnStateChange=!0;const e=this.beans.colModel.isPivotMode();if(e){const i=this.column.isAnyFunctionActive();this.cbSelect.setValue(i)}else this.cbSelect.setValue(this.column.isVisible());let t=!0,o=!0;if(e){const i=this.gos.get("functionsReadOnly"),r=!this.column.isAnyFunctionAllowed();t=!i&&!r,o=t}else{const{enableRowGroup:i,enableValue:r,lockPosition:s,suppressMovable:n,lockVisible:a}=this.column.getColDef(),l=!!i||!!r,d=!!s||!!n;t=!a,o=l||!d}this.cbSelect.setReadOnly(!t),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!o),this.addOrRemoveCssClass("ag-column-select-column-readonly",!o&&!t),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(e){const t=this.cbSelect;e!==t.getValue()&&(t.isReadOnly()||t.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(e){_(158)}},VF=class{constructor(e){this.items=e}getRowCount(){return this.items.length}getRow(e){return this.items[e]}},_F="ag-column-select-list",zF=class extends pe{constructor(){super({tag:"div",cls:_F,role:"presentation"}),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1,this.skipRefocus=!1}wireBeans(e){this.colModel=e.colModel}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(e=>e()),this.destroyColumnItemFuncs=[]}init(e,t,o){this.params=e;const{suppressSyncLayoutWithGrid:i,contractColumnSelection:r,suppressColumnMove:s}=e;this.allowDragging=t,this.eventType=o,i||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const n=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:n,columnPivotModeChanged:n,columnRowGroupChanged:n,columnValueChanged:n,columnVisible:n,newColumnsLoaded:n}),this.expandGroupsByDefault=!r;const a=s||i,l=this.createManagedBean(new Yu({cssIdentifier:"column-select",ariaRole:"tree",moveItemCallback:(d,c)=>{a||this.moveItems(d,c)}}));this.virtualList=l,this.appendChild(l.getGui()),l.setComponentCreator((d,c)=>(Tl(c,d.depth+1),this.createComponentFromItem(d,c))),this.colModel.ready&&this.onColumnsChanged(),!a&&this.createItemDragFeature()}createItemDragFeature(){const{gos:e,beans:t,eventSvc:o,virtualList:i}=this;this.createManagedBean(new cF(this,i,{dragSourceType:is.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:o,getCurrentDragValue:r=>OF(r),isMoveBlocked:r=>nh(e,t,Na(r)),getNumRows:r=>r.getDisplayedColsList().length,moveItem:(r,s)=>ah(t,Na(r),s)}))}moveItems(e,t){const{gos:o,beans:i}=this,{modelItem:r}=e,{group:s,columnGroup:n,column:a,expanded:l}=r,d=Na(s?n:a);if(nh(o,i,d))return;const c=this.displayedColsList.indexOf(r),u=t?-1:1;let g=0;if(t){const f=e.columnDepth>0&&a.getParent()?.getChildren();f&&f.length&&a===f[0]&&(g=-1)}else s&&(g=l?r.children.length:0);const p=Math.min(Math.max(c+g+u,0),this.displayedColsList.length-1);this.skipRefocus=!0,ah(i,d,{position:t?"top":"bottom",component:this.virtualList.getComponentAt(p)}),this.focusRowIfAlive(p-g).then(()=>{this.skipRefocus=!1})}createComponentFromItem(e,t){const o=this.allowDragging;if(e.group){const r=new sh(e,o,this.eventType,t);return this.createBean(r),r}const i=new HF(e,o,this.groupsExist,t);return this.createBean(i),i}onColumnsChanged(){const e=this.params;this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!e.initialState);const t=this.getExpandedStates(),o=this.colModel.isPivotMode();!e.suppressSyncLayoutWithGrid&&!o?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const e={};if(this.isInitialState){const{expandedGroupIds:t}=this.params.initialState;return t.forEach(o=>{e[o]=!0}),e}return this.allColsTree?(this.forEachItem(t=>{if(!t.group)return;const o=t.columnGroup;o&&(e[o.getId()]=t.expanded)}),e):{}}setExpandedStates(e){if(!this.allColsTree)return;const{isInitialState:t}=this;this.forEachItem(o=>{if(!o.group)return;const i=o.columnGroup;if(i){const r=e[i.getId()];(r!=null||t)&&(o.expanded=!!r)}})}buildTreeFromWhatGridIsDisplaying(){RF(this.colModel,this.setColumnLayout.bind(this))}setColumnLayout(e){const t=SF(this.colModel,e);this.buildListModel(t),this.groupsExist=e.some(o=>o&&typeof o.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){const e=this.colModel;this.buildListModel(e.getColDefColTree()),this.groupsExist=!!e.colDefCols?.treeDepth}buildListModel(e){const t=this.onColumnExpanded.bind(this),o=a=>{a.addEventListener("expandedChanged",t);const l=a.removeEventListener.bind(a,"expandedChanged",t);this.destroyColumnItemFuncs.push(l)},i=this.beans.colNames,r=(a,l,d)=>{a.forEach(c=>{_e(c)?s(c,l,d):n(c,l,d)})},s=(a,l,d)=>{const c=a.getColGroupDef();if(c&&c.suppressColumnsToolPanel)return;if(a.isPadding()){r(a.getChildren(),l,d);return}const g=i.getDisplayNameForProvidedColumnGroup(null,a,"columnToolPanel"),p=new Qu(g,a,l,!0,this.expandGroupsByDefault);d.push(p),o(p),r(a.getChildren(),l+1,p.children)},n=(a,l,d)=>{if(a.getColDef()&&a.getColDef().suppressColumnsToolPanel)return;const u=i.getDisplayNameForColumn(a,"columnToolPanel");d.push(new Qu(u,a,l))};this.destroyColumnTree(),r(e,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const e=i=>{i.passesFilter&&(this.displayedColsList.push(i),i.group&&i.expanded&&i.children.forEach(e))},t=this.virtualList;this.allColsTree.forEach(e),t.setModel(new VF(this.displayedColsList));let o=null;this.skipRefocus||(o=t.getLastFocusedRow()),t.refresh(),o!=null&&this.focusRowIfAlive(o),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const e=this.getLocaleTextFunc(),t=e("ariaColumnPanelList","Column List"),o=e("columns","Columns"),i=this.displayedColsList.length;dt(this.virtualList.getAriaElement(),`${t} ${i} ${o}`)}focusRowIfAlive(e){return e===-1?Promise.resolve():new Promise(t=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(e),t()},0)})}forEachItem(e){const t=i=>{i.forEach(r=>{e(r),r.group&&t(r.children)})},o=this.allColsTree;o&&t(o)}doSetExpandedAll(e){this.forEachItem(t=>{t.group&&(t.expanded=e)})}setGroupsExpanded(e,t){if(!t){this.doSetExpandedAll(e);return}const o=[];this.forEachItem(r=>{if(!r.group)return;const s=r.columnGroup.getId();t.indexOf(s)>=0&&(r.expanded=e,o.push(s))});const i=t.filter(r=>!o.includes(r));i.length>0&&_(157,{unrecognisedGroupIds:i})}getExpandState(){let e=0,t=0;return this.forEachItem(o=>{o.group&&(o.expanded?e++:t++)}),e>0&&t>0?2:t>0?1:0}doSetSelectedAll(e){Zu(this.beans,this.allColsTree,e,this.eventType)}getSelectionState(){let e=0,t=0;const o=this.colModel.isPivotMode();if(this.forEachItem(i=>{if(i.group||!i.passesFilter)return;const r=i.column,s=r.getColDef();let n;if(o){if(!r.isAllowPivot()&&!r.isAllowRowGroup()&&!r.isAllowValue())return;n=r.isValueActive()||r.isPivotActive()||r.isRowGroupActive()}else{if(s.lockVisible)return;n=r.isVisible()}n?e++:t++}),!(e>0&&t>0))return!(e===0||t>0)}setFilterText(e){this.filterText=q(e)?e.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const e=o=>{if(!q(this.filterText))return!0;const i=o.displayName;return i==null||i.toLowerCase().indexOf(this.filterText)!==-1},t=(o,i)=>{let r=!1;if(o.group){const n=e(o);o.children.forEach(a=>{const l=t(a,n||i);l&&(r=l)})}const s=i||r?!0:e(o);return o.passesFilter=s,s};this.allColsTree.forEach(o=>t(o,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const e=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:e})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const e=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:e})}getExpandedGroups(){const e=[];return this.allColsTree&&this.forEachItem(t=>{t.group&&t.expanded&&e.push(t.columnGroup.getId())}),e}},WF={selector:"AG-PRIMARY-COLS-LIST",component:zF},$F={tag:"div",cls:"ag-column-select",children:[{tag:"ag-primary-cols-header",ref:"primaryColsHeaderPanel"},{tag:"ag-primary-cols-list",ref:"primaryColsListPanel"}]},UF=class extends pe{constructor(){super($F,[bF,WF]),this.primaryColsHeaderPanel=V,this.primaryColsListPanel=V,this.registerCSS(mF)}init(e,t,o){const{primaryColsHeaderPanel:i,primaryColsListPanel:r}=this;i.init(t);const s=t.suppressColumnFilter,n=t.suppressColumnSelectAll;t.suppressColumnExpandAll&&s&&n&&i.setDisplayed(!1),this.addManagedListeners(r,{groupExpanded:l=>{i.setExpandState(l.state),t.onStateUpdated()},selectionChanged:l=>i.setSelectionState(l.state)}),r.init(t,e,o),this.addManagedListeners(i,{expandAll:r.doSetExpandedAll.bind(r,!0),collapseAll:r.doSetExpandedAll.bind(r,!1),selectAll:r.doSetSelectedAll.bind(r,!0),unselectAll:r.doSetSelectedAll.bind(r,!1),filterChanged:l=>r.setFilterText(l.filterText)}),this.positionableFeature=this.createManagedBean(new Xn(this.getGui(),{minHeight:100}))}toggleResizable(e){this.positionableFeature.setResizable(e?{bottom:!0}:!1)}expandGroups(e){this.primaryColsListPanel.setGroupsExpanded(!0,e)}collapseGroups(e){this.primaryColsListPanel.setGroupsExpanded(!1,e)}setColumnLayout(e){this.primaryColsListPanel.setColumnLayout(e)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},jF=class extends E{constructor(){super(...arguments),this.beanName="chartMenuItemMapper"}getChartItems(e){const t=this.beans,o=t.chartSvc,i=e==="pivotChart";if(!o)return null;const r=this.getLocaleTextFunc.bind(this),s=i?new KF(t,o,r):new YF(t,o,r),n=o.isEnterprise();let a=s.getMenuItem();if(a&&a.subMenu&&!n){const d=c=>({...c,subMenu:c.subMenu?.filter(u=>!u._enterprise).map(u=>d(u))});a=d(a)}const l=this.gos.get("chartToolPanelsDef")?.settingsPanel?.chartGroupsDef;return l&&(a=this.filterAndOrderChartMenu(a,l,s.getConfigLookup())),this.cleanInternals(a)}cleanInternals(e){if(!e)return e;const t=o=>(delete o?._key,delete o?._enterprise,o?.subMenu?.forEach(i=>t(i)),o);return t(e)}buildLookup(e){const t={},o=i=>{t[i._key]=i,i.subMenu&&i.subMenu.forEach(r=>o(r))};return o(e),t}filterAndOrderChartMenu(e,t,o){const i=this.buildLookup(e),r={...e,subMenu:[]};for(const s of Object.keys(t)){const n=t[s],a=o[s];if(a===null)continue;if(a==null){_(173,{group:s});continue}const l=i[a._key];if(l)if(l.subMenu){const d=n.map(c=>{const u=a[c];if(u==null){_(174,{group:s,chartType:c});return}return i[u]}).filter(c=>c!==void 0);d.length>0&&(l.subMenu=d,r.subMenu?.push(l))}else r.subMenu?.push(l)}return r.subMenu?.length==0?null:r}},KF=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,r,s,n=!1)=>({name:e(o,i+"‎"),action:()=>this.chartSvc.createPivotChart({chartType:r}),_key:s,_enterprise:n});return{name:e("pivotChart","Pivot Chart"),_key:"pivotChart",subMenu:[{_key:"pivotColumnChart",name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","pivotGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","pivotStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","pivotNormalizedColumn")]},{_key:"pivotBarChart",name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","pivotGroupedBar"),t("stackedBar","Stacked","stackedBar","pivotStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","pivotNormalizedBar")]},{_key:"pivotPieChart",name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","pivotPie"),t("donut","Donut","donut","pivotDonut")]},{_key:"pivotLineChart",name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","pivotLineChart"),t("stackedLine","Stacked","stackedLine","pivotStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","pivotNormalizedLine")]},{_key:"pivotAreaChart",name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","pivotArea"),t("stackedArea","Stacked","stackedArea","pivotStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","pivotNormalizedArea")]},{_key:"pivotXYChart",name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","pivotScatter"),t("bubble","Bubble","bubble","pivotBubble")]},{_key:"pivotStatisticalChart",_enterprise:!1,name:e("statisticalChart","Statistical"),subMenu:[t("histogramChart","Histogram","histogram","pivotHistogram",!1)]},{_key:"pivotHierarchicalChart",_enterprise:!0,name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemapChart","Treemap","treemap","pivotTreemap",!0),t("sunburstChart","Sunburst","sunburst","pivotSunburst",!0)]},{_key:"pivotFunnel",name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","pivotFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","pivotConeFunnel"),t("pyramid","Pyramid","pyramid","pivotPyramid")]},{_key:"pivotCombinationChart",name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","pivotColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","pivotAreaColumnCombo")]}],icon:te("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"pivotColumnChart",column:"pivotGroupedColumn",stackedColumn:"pivotStackedColumn",normalizedColumn:"pivotNormalizedColumn"},barGroup:{_key:"pivotBarChart",bar:"pivotGroupedBar",stackedBar:"pivotStackedBar",normalizedBar:"pivotNormalizedBar"},pieGroup:{_key:"pivotPieChart",pie:"pivotPie",donut:"pivotDonut",doughnut:"pivotDonut"},lineGroup:{_key:"pivotLineChart",line:"pivotLineChart",stackedLine:"pivotStackedLine",normalizedLine:"pivotNormalizedLine"},areaGroup:{_key:"pivotAreaChart",area:"pivotArea",stackedArea:"pivotStackedArea",normalizedArea:"pivotNormalizedArea"},scatterGroup:{_key:"pivotXYChart",bubble:"pivotBubble",scatter:"pivotScatter"},combinationGroup:{_key:"pivotCombinationChart",columnLineCombo:"pivotColumnLineCombo",areaColumnCombo:"pivotAreaColumnCombo",customCombo:null},hierarchicalGroup:{_key:"pivotHierarchicalChart",treemap:"pivotTreemap",sunburst:"pivotSunburst"},statisticalGroup:{_key:"pivotStatisticalChart",histogram:"pivotHistogram",rangeBar:null,rangeArea:null,boxPlot:null},funnelGroup:{_key:"pivotFunnel",funnel:"pivotFunnel",coneFunnel:"pivotConeFunnel",pyramid:"pivotPyramid"},polarGroup:null,specializedGroup:null}}},YF=class{constructor(e,t,o){this.beans=e,this.chartSvc=t,this.getLocaleTextFunc=o}getMenuItem(){const e=this.getLocaleTextFunc(),t=(o,i,r,s,n=!1)=>({name:e(o,i),action:()=>this.chartSvc.createChartFromCurrentRange(r),_key:s,_enterprise:n});return{name:e("chartRange","Chart Range"),_key:"chartRange",subMenu:[{name:e("columnChart","Column"),subMenu:[t("groupedColumn","Grouped","groupedColumn","rangeGroupedColumn"),t("stackedColumn","Stacked","stackedColumn","rangeStackedColumn"),t("normalizedColumn","100% Stacked","normalizedColumn","rangeNormalizedColumn")],_key:"rangeColumnChart"},{name:e("barChart","Bar"),subMenu:[t("groupedBar","Grouped","groupedBar","rangeGroupedBar"),t("stackedBar","Stacked","stackedBar","rangeStackedBar"),t("normalizedBar","100% Stacked","normalizedBar","rangeNormalizedBar")],_key:"rangeBarChart"},{name:e("pieChart","Pie"),subMenu:[t("pie","Pie","pie","rangePie"),t("donut","Donut","donut","rangeDonut")],_key:"rangePieChart"},{name:e("lineChart","Line"),subMenu:[t("lineChart","Line","line","rangeLineChart"),t("stackedLine","Stacked","stackedLine","rangeStackedLine"),t("normalizedLine","100% Stacked","normalizedLine","rangeNormalizedLine")],_key:"rangeLineChart"},{name:e("areaChart","Area"),subMenu:[t("areaChart","Area","area","rangeArea"),t("stackedArea","Stacked","stackedArea","rangeStackedArea"),t("normalizedArea","100% Stacked","normalizedArea","rangeNormalizedArea")],_key:"rangeAreaChart"},{name:e("xyChart","X Y (Scatter)"),subMenu:[t("scatter","Scatter","scatter","rangeScatter"),t("bubble","Bubble","bubble","rangeBubble")],_key:"rangeXYChart"},{name:e("polarChart","Polar"),subMenu:[t("radarLine","Radar Line","radarLine","rangeRadarLine"),t("radarArea","Radar Area","radarArea","rangeRadarArea"),t("nightingale","Nightingale","nightingale","rangeNightingale"),t("radialColumn","Radial Column","radialColumn","rangeRadialColumn"),t("radialBar","Radial Bar","radialBar","rangeRadialBar")],_key:"rangePolarChart",_enterprise:!0},{name:e("statisticalChart","Statistical"),subMenu:[t("boxPlot","Box Plot","boxPlot","rangeBoxPlot",!0),t("histogramChart","Histogram","histogram","rangeHistogram",!1),t("rangeBar","Range Bar","rangeBar","rangeRangeBar",!0),t("rangeArea","Range Area","rangeArea","rangeRangeArea",!0)],_key:"rangeStatisticalChart",_enterprise:!1},{name:e("hierarchicalChart","Hierarchical"),subMenu:[t("treemap","Treemap","treemap","rangeTreemap"),t("sunburst","Sunburst","sunburst","rangeSunburst")],_key:"rangeHierarchicalChart",_enterprise:!0},{name:e("specializedChart","Specialized"),subMenu:[t("heatmap","Heatmap","heatmap","rangeHeatmap"),t("waterfall","Waterfall","waterfall","rangeWaterfall")],_key:"rangeSpecializedChart",_enterprise:!0},{name:e("funnel","Funnel"),subMenu:[t("funnel","Funnel","funnel","rangeFunnel"),t("coneFunnel","Cone Funnel","coneFunnel","rangeConeFunnel"),t("pyramid","Pyramid","pyramid","rangePyramid")],_key:"rangeFunnel",_enterprise:!0},{name:e("combinationChart","Combination"),subMenu:[t("columnLineCombo","Column & Line","columnLineCombo","rangeColumnLineCombo"),t("AreaColumnCombo","Area & Column","areaColumnCombo","rangeAreaColumnCombo")],_key:"rangeCombinationChart"}],icon:te("chart",this.beans,void 0)}}getConfigLookup(){return{columnGroup:{_key:"rangeColumnChart",column:"rangeGroupedColumn",stackedColumn:"rangeStackedColumn",normalizedColumn:"rangeNormalizedColumn"},barGroup:{_key:"rangeBarChart",bar:"rangeGroupedBar",stackedBar:"rangeStackedBar",normalizedBar:"rangeNormalizedBar"},pieGroup:{_key:"rangePieChart",pie:"rangePie",donut:"rangeDonut",doughnut:"rangeDonut"},lineGroup:{_key:"rangeLineChart",line:"rangeLineChart",stackedLine:"rangeStackedLine",normalizedLine:"rangeNormalizedLine"},areaGroup:{_key:"rangeAreaChart",area:"rangeArea",stackedArea:"rangeStackedArea",normalizedArea:"rangeNormalizedArea"},scatterGroup:{_key:"rangeXYChart",bubble:"rangeBubble",scatter:"rangeScatter"},polarGroup:{_key:"rangePolarChart",radarLine:"rangeRadarLine",radarArea:"rangeRadarArea",nightingale:"rangeNightingale",radialColumn:"rangeRadialColumn",radialBar:"rangeRadialBar"},statisticalGroup:{_key:"rangeStatisticalChart",boxPlot:"rangeBoxPlot",histogram:"rangeHistogram",rangeBar:"rangeRangeBar",rangeArea:"rangeRangeArea"},hierarchicalGroup:{_key:"rangeHierarchicalChart",treemap:"rangeTreemap",sunburst:"rangeSunburst"},specializedGroup:{_key:"rangeSpecializedChart",heatmap:"rangeHeatmap",waterfall:"rangeWaterfall"},funnelGroup:{_key:"rangeFunnel",funnel:"rangeFunnel",coneFunnel:"rangeConeFunnel",pyramid:"rangePyramid"},combinationGroup:{_key:"rangeCombinationChart",columnLineCombo:"rangeColumnLineCombo",areaColumnCombo:"rangeAreaColumnCombo",customCombo:null}}}},qF=class extends E{constructor(){super(...arguments),this.beanName="colChooserFactory"}createColumnSelectPanel(e,t,o,i){const r=e.createManagedBean(new UF),s=i??t?.getColDef().columnChooserParams??{},{contractColumnSelection:n,suppressColumnExpandAll:a,suppressColumnFilter:l,suppressColumnSelectAll:d,suppressSyncLayoutWithGrid:c,columnLayout:u}=s;return r.init(!!o,Z(this.gos,{suppressColumnMove:!1,suppressValues:!1,suppressPivots:!1,suppressRowGroups:!1,suppressPivotMode:!1,contractColumnSelection:!!n,suppressColumnExpandAll:!!a,suppressColumnFilter:!!l,suppressColumnSelectAll:!!d,suppressSyncLayoutWithGrid:!!u||!!c,onStateUpdated:()=>{}}),"columnMenu"),u&&r.setColumnLayout(u),r}showColumnChooser({column:e,chooserParams:t,eventSource:o,headerPosition:i}){this.hideActiveColumnChooser();const r=this.createColumnSelectPanel(this,e,!0,t),s=this.getLocaleTextFunc(),n=this.beans,{visibleCols:a,focusSvc:l,menuUtils:d}=n,c=a.allCols.indexOf(e),u=e?l.focusedHeader??i??null:null;this.activeColumnChooserDialog=this.createBean(new lF({title:s("chooseColumns","Choose Columns"),component:r,width:300,height:300,resizable:!0,movable:!0,centered:!0,closable:!0,afterGuiAttached:()=>{Ut(n,r.getGui())?.focus({preventScroll:!0}),this.dispatchVisibleChangedEvent(!0,e)},closedCallback:g=>{const p=this.activeColumnChooser.getGui();this.destroyBean(this.activeColumnChooser),this.activeColumnChooser=void 0,this.activeColumnChooserDialog=void 0,this.dispatchVisibleChangedEvent(!1,e),e&&d.restoreFocusOnClose({column:e,headerPosition:u,columnIndex:c,eventSource:o},p,g,!0)},postProcessPopupParams:{type:"columnChooser",column:e,eventSource:o}})),this.activeColumnChooser=r}hideActiveColumnChooser(){this.destroyBean(this.activeColumnChooserDialog)}dispatchVisibleChangedEvent(e,t){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:!1,key:"columnChooser",column:t??null})}},Uo="separator";function lh(e,t){if(e)for(let o=e.length-2;o>=0;o--){const i=e[o]===t,r=e[o+1]===t;i&&r&&e.splice(o+1,1)}}var XF=class extends E{constructor(){super(...arguments),this.beanName="menuItemMapper"}mapWithStockItems(e,t,o,i){if(!e)return[];const r=[],s=this.getLocaleTextFunc(),{beans:n,gos:a}=this,{validation:l,pinnedCols:d,colAutosize:c,aggFuncSvc:u,rowGroupColsSvc:g,colNames:p,colModel:f,clipboardSvc:m,expansionSvc:C,focusSvc:w,csvCreator:y,excelCreator:b,menuSvc:x,colChooserFactory:M,sortSvc:P,chartMenuItemMapper:k,valueColsSvc:S}=n,v=(R,F,G,z)=>{switch(l?.validateMenuItem(R),R){case"pinSubMenu":return d&&F?{name:s("pinColumn","Pin Column"),icon:te("menuPin",n,null),subMenu:["clearPinned","pinLeft","pinRight"]}:null;case"pinLeft":return d&&F?{name:s("pinLeft","Pin Left"),action:()=>d.setColsPinned([F],"left",z),checked:!!F&&F.isPinnedLeft()}:null;case"pinRight":return d&&F?{name:s("pinRight","Pin Right"),action:()=>d.setColsPinned([F],"right",z),checked:!!F&&F.isPinnedRight()}:null;case"clearPinned":return d&&F?{name:s("noPin","No Pin"),action:()=>d.setColsPinned([F],null,z),checked:!!F&&!F.isPinned()}:null;case"valueAggSubMenu":return u&&S&&(F?.isPrimary()||F?.getColDef().pivotValueColumn)?{name:s("valueAggregation","Value Aggregation"),icon:te("menuValue",n,null),subMenu:QF(F,u,S,s),disabled:a.get("functionsReadOnly")}:null;case"autoSizeThis":return c?{name:s("autosizeThisColumn","Autosize This Column"),action:()=>c.autoSizeColumn(F,z,a.get("skipHeaderOnAutoSize"))}:null;case"autoSizeAll":return c?{name:s("autosizeAllColumns","Autosize All Columns"),action:()=>c.autoSizeAllColumns(z,a.get("skipHeaderOnAutoSize"))}:null;case"rowGroup":return g?{name:s("groupBy","Group by")+" "+Rt(p.getDisplayNameForColumn(F,"header")),disabled:a.get("functionsReadOnly")||F?.isRowGroupActive()||!F?.getColDef().enableRowGroup,action:()=>g.addColumns([F],z),icon:te("menuAddRowGroup",n,null)}:null;case"rowUnGroup":if(g&&a.isModuleRegistered("SharedRowGrouping")){const B=F?.getColDef().showRowGroup,H=a.get("groupLockGroupColumns");let O,L,N;if(B===!0)O=s("ungroupAll","Un-Group All"),L=a.get("functionsReadOnly")||H===-1||H>=(g.columns.length??0),N=()=>g.setColumns(g.columns.slice(0,H),z);else if(typeof B=="string"){const I=f.getColDefCol(B),K=I!=null?Rt(p.getDisplayNameForColumn(I,"header")):B;O=s("ungroupBy","Un-Group by")+" "+K,L=a.get("functionsReadOnly")||Fs(I,n),N=()=>{g.removeColumns([B],z)}}else O=s("ungroupBy","Un-Group by")+" "+Rt(p.getDisplayNameForColumn(F,"header")),L=a.get("functionsReadOnly")||!F?.isRowGroupActive()||!F?.getColDef().enableRowGroup||Fs(F,n),N=()=>g.removeColumns([F],z);return{name:O,disabled:L,action:N,icon:te("menuRemoveRowGroup",n,null)}}else return null;case"resetColumns":return{name:s("resetColumns","Reset Columns"),action:()=>Hd(n,z)};case"expandAll":return C?{name:s("expandAll","Expand All Row Groups"),action:()=>C.expandAll(!0)}:null;case"contractAll":return C?{name:s("collapseAll","Collapse All Row Groups"),action:()=>C.expandAll(!1)}:null;case"copy":return m?{name:s("copy","Copy"),shortcut:s("ctrlC","Ctrl+C"),icon:te("clipboardCopy",n,null),action:()=>m.copyToClipboard()}:null;case"copyWithHeaders":return m?{name:s("copyWithHeaders","Copy with Headers"),icon:te("clipboardCopy",n,null),action:()=>m.copyToClipboard({includeHeaders:!0})}:null;case"copyWithGroupHeaders":return m?{name:s("copyWithGroupHeaders","Copy with Group Headers"),icon:te("clipboardCopy",n,null),action:()=>m.copyToClipboard({includeHeaders:!0,includeGroupHeaders:!0})}:null;case"cut":if(m){const B=w.getFocusedCell(),H=B?qn(n,B):null,O=H?B?.column.isCellEditable(H):!1;return{name:s("cut","Cut"),shortcut:s("ctrlX","Ctrl+X"),icon:te("clipboardCut",n,null),disabled:!O||a.get("suppressCutToClipboard"),action:()=>m.cutToClipboard(void 0,"contextMenu")}}else return null;case"paste":return m?{name:s("paste","Paste"),shortcut:s("ctrlV","Ctrl+V"),disabled:!0,icon:te("clipboardPaste",n,null),action:()=>m.pasteFromClipboard()}:null;case"export":{const B=[];return!a.get("suppressCsvExport")&&y&&B.push("csvExport"),!a.get("suppressExcelExport")&&b&&B.push("excelExport"),B.length?{name:s("export","Export"),subMenu:B,icon:te("save",n,null)}:null}case"csvExport":return y?{name:s("csvExport","CSV Export"),icon:te("csvExport",n,null),action:()=>y.exportDataAsCsv()}:null;case"excelExport":return b?{name:s("excelExport","Excel Export"),icon:te("excelExport",n,null),action:()=>b.exportDataAsExcel()}:null;case"separator":return"separator";case"pivotChart":case"chartRange":return k.getChartItems(R);case"columnFilter":return x&&F?{name:s("columnFilter","Column Filter"),icon:te("filter",n,null),action:()=>x.showFilterMenu({column:F,buttonElement:G(),containerType:"columnFilter",positionBy:"button"})}:null;case"columnChooser":{const B=w.focusedHeader;return M?{name:s("columnChooser","Choose Columns"),icon:te("columns",n,null),action:()=>M.showColumnChooser({column:F,eventSource:G(),headerPosition:B})}:null}case"sortAscending":return P?{name:s("sortAscending","Sort Ascending"),icon:te("sortAscending",n,null),action:()=>P.setSortForColumn(F,"asc",!1,z)}:null;case"sortDescending":return P?{name:s("sortDescending","Sort Descending"),icon:te("sortDescending",n,null),action:()=>P.setSortForColumn(F,"desc",!1,z)}:null;case"sortUnSort":return P?{name:s("sortUnSort","Clear Sort"),icon:te("sortUnSort",n,null),action:()=>P.setSortForColumn(F,null,!1,z)}:null;default:return _(176,{key:R}),null}};return e.forEach(R=>{let F;if(typeof R=="string"?F=v(R,t,o,i):F={...R},!F)return;const G=F,{subMenu:z}=G;z&&z instanceof Array&&(G.subMenu=this.mapWithStockItems(z,t,o,i)),F!=null&&r.push(F)}),lh(r,Uo),r}};function QF(e,t,o,i){let r;if(e.isPrimary())r=e;else{const n=e.getColDef().pivotValueColumn;r=q(n)?n:void 0}const s=[];if(r){const n=r.isValueActive(),a=t.getFuncNames(r);s.push({name:i("noAggregation","None"),action:()=>{o.removeColumns([r],"contextMenu"),o.setColumnAggFunc(r,void 0,"contextMenu")},checked:!n}),a.forEach(l=>{s.push({name:i(l,t.getDefaultFuncLabel(l)),action:()=>{o.setColumnAggFunc(r,l,"contextMenu"),o.addColumns([r],"contextMenu")},checked:n&&r.getAggFunc()===l})})}return s}var ZF=class extends E{constructor(){super(...arguments),this.beanName="colMenuFactory"}createMenu(e,t,o,i){const r=e.createManagedBean(new Oa(0,{column:o??null,node:null,value:null})),s=this.beans.menuItemMapper.mapWithStockItems(t,o??null,i,"columnMenu");return r.addMenuItems(s),r}getMenuItems(e=null,t=null){const o=this.getDefaultMenuOptions(e);let i;const r=(e?.getColDef()??t?.getColGroupDef())?.mainMenuItems;if(Array.isArray(r))i=r;else if(typeof r=="function")i=r(Z(this.gos,{column:e,columnGroup:t,defaultItems:o}));else{const s=this.gos.getCallback("getMainMenuItems");s?i=s({column:e,columnGroup:t,defaultItems:o}):i=o}return lh(i,Uo),i}getDefaultMenuOptions(e){const t=[],{beans:o,gos:i}=this,{colChooserFactory:r,rowGroupColsSvc:s,colModel:n,expansionSvc:a,sortSvc:l,menuSvc:d,pinnedCols:c,aggFuncSvc:u,colAutosize:g}=o,p=We(i),f=()=>{!p&&r&&t.push("columnChooser"),t.push("resetColumns")};if(!e)return f(),t;const{colDef:m}=e,C=c&&!m.lockPinned,w=s?.columns.length??0,y=w>0,b=e.isPrimary(),x=u&&b&&y&&e.isAllowValue()||!b;if(l&&!p&&e.isSortable()){const M=e.getSort();M!=="asc"&&t.push("sortAscending"),M!=="desc"&&t.push("sortDescending"),M&&t.push("sortUnSort"),t.push(Uo)}if(d?.isFilterMenuItemEnabled(e)&&(t.push("columnFilter"),t.push(Uo)),C&&t.push("pinSubMenu"),x&&t.push("valueAggSubMenu"),(C||x)&&t.push(Uo),g&&(t.push("autoSizeThis"),t.push("autoSizeAll"),t.push(Uo)),s&&i.isModuleRegistered("SharedRowGrouping")){const M=t.length;m.showRowGroup?t.push("rowUnGroup"):e.isAllowRowGroup()&&b&&(e.isRowGroupActive()?Fs(e,o)||t.push("rowUnGroup"):t.push("rowGroup")),t.length>M&&t.push(Uo)}return f(),a&&Et(i)&&(i.get("treeData")||w>(n.isPivotMode()?1:0))&&(t.push("expandAll"),t.push("contractAll")),t}};function JF(e){return{tag:"div",cls:`ag-tabs ${e}`,children:[{tag:"div",ref:"eHeader"},{tag:"div",ref:"eBody",role:"presentation",cls:`ag-tabs-body ${e?`${e}-body`:""}`}]}}var eD=class extends mi{constructor(e){super(JF(e.cssClass)),this.eHeader=V,this.eBody=V,this.items=[],this.tabbedItemScrollMap=new Map,this.params=e}postConstruct(){this.setupHeader(),this.params.items&&this.params.items.forEach(e=>this.addItem(e)),this.initialiseTabGuard({onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),focusInnerElement:this.focusInnerElement.bind(this),focusTrapActive:!0}),this.addDestroyFunc(()=>this.activeItem?.tabbedItem?.afterDetachedCallback?.())}setupHeader(){const{enableCloseButton:e,cssClass:t}=this.params,o=(i,r)=>{i.classList.add(`ag-tabs-${r}`),t&&i.classList.add(`${t}-${r}`)};e?(this.setupCloseButton(o),this.eTabHeader=Te(this.beans).createElement("div"),o(this.eHeader,"header-wrapper"),Xe(this.eHeader,"presentation"),this.eHeader.appendChild(this.eTabHeader)):this.eTabHeader=this.eHeader,Xe(this.eTabHeader,"tablist"),o(this.eTabHeader,"header")}setupCloseButton(e){const t=Te(this.beans),o=t.createElement("button");e(o,"close-button");const i=te("close",this.beans);dt(o,this.params.closeButtonAriaLabel),o.appendChild(i),this.addManagedElementListeners(o,{click:()=>this.params.onCloseClicked?.()});const r=t.createElement("div");e(r,"close-button-wrapper"),Xe(r,"presentation"),r.appendChild(o),this.eHeader.appendChild(r),this.eCloseButton=o}handleKeyDown(e){switch(e.key){case D.RIGHT:case D.LEFT:{if(!this.eTabHeader.contains(Ee(this.beans)))return;const t=e.key===D.RIGHT,o=this.gos.get("enableRtl"),i=this.items.indexOf(this.activeItem),r=t!==o?Math.min(i+1,this.items.length-1):Math.max(i-1,0);if(i===r)return;e.preventDefault();const s=this.items[r];this.showItemWrapper(s),s.eHeaderButton.focus();break}case D.UP:case D.DOWN:e.stopPropagation();break}}onTabKeyDown(e){if(e.defaultPrevented)return;const{beans:t,eHeader:o,eBody:i,activeItem:r,params:s}=this,{suppressTrapFocus:n,enableCloseButton:a}=s,l=Ee(t),d=e.target,c=e.shiftKey;if(o.contains(l)){e.preventDefault(),a&&c&&!this.eCloseButton?.contains(l)?this.eCloseButton?.focus():n&&c?qu(Te(t).body,d)?.focus():this.focusBody(e.shiftKey);return}let u=null;if(uF(i,d)&&(c&&(u=qu(i,d)),!u&&!n&&(u=r.eHeaderButton)),!u&&i.contains(l)&&(u=Ut(t,i,!1,c),!u)){n&&!c?this.forceFocusOutOfContainer(c):a&&!c?(e.preventDefault(),this.eCloseButton?.focus()):(e.preventDefault(),this.focusHeader());return}u&&(e.preventDefault(),u.focus())}focusInnerElement(e){return e?this.focusBody(!0):(this.focusHeader(),!0)}focusHeader(e){this.activeItem.eHeaderButton.focus({preventScroll:e})}focusBody(e){return Lt(this.eBody,e)}setAfterAttachedParams(e){this.afterAttachedParams=e}showFirstItem(){this.items.length>0&&this.showItemWrapper(this.items[0])}addItem(e){const t=Pe({tag:"span",cls:"ag-tab",role:"tab",attrs:{tabindex:"-1"}});t.appendChild(e.title),this.eTabHeader.appendChild(t),dt(t,e.titleLabel);const o={tabbedItem:e,eHeaderButton:t};this.items.push(o),t.addEventListener("click",this.showItemWrapper.bind(this,o))}showItem(e){const t=this.items.find(o=>o.tabbedItem===e);t&&this.showItemWrapper(t)}showItemWrapper(e){const{tabbedItem:t,eHeaderButton:o}=e;if(this.params.onItemClicked?.({item:t}),this.activeItem===e){this.params.onActiveItemClicked?.();return}this.lastScrollListener&&(this.lastScrollListener=this.lastScrollListener()),ct(this.eBody),t.bodyPromise.then(i=>{this.eBody.appendChild(i);const r=!tc();if(this.params.suppressFocusBodyOnOpen||Lt(this.eBody,!1,r),t.afterAttachedCallback&&t.afterAttachedCallback(this.afterAttachedParams),this.params.keepScrollPosition){const s=t.getScrollableContainer&&t.getScrollableContainer()||i;[this.lastScrollListener]=this.addManagedElementListeners(s,{scroll:()=>{this.tabbedItemScrollMap.set(t.name,s.scrollTop)}});const n=this.tabbedItemScrollMap.get(t.name);n!==void 0&&setTimeout(()=>{s.scrollTop=n},0)}}),this.activeItem&&(this.activeItem.eHeaderButton.classList.remove("ag-tab-selected"),this.activeItem.tabbedItem.afterDetachedCallback?.()),o.classList.add("ag-tab-selected"),this.activeItem=e}},Fo="filterMenuTab",Do="generalMenuTab",jo="columnsMenuTab",Ds=[Do,Fo,jo],tD=class extends E{constructor(){super(...arguments),this.beanName="enterpriseMenuFactory"}hideActiveMenu(){this.destroyBean(this.activeMenu)}showMenuAfterMouseEvent(e,t,o,i,r){const{column:s,columnGroup:n}=this.splitColumnOrGroup(e),a=r?"filterMenuTab":void 0;this.showMenu(s,n,l=>{const d=l.getGui();this.beans.popupSvc.positionPopupUnderMouseEvent({type:o,column:s,mouseEvent:t,ePopup:d}),a&&l.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,s,n,a)},o,a,void 0,t.target,i)}splitColumnOrGroup(e){const t=e&&$t(e);return{column:t?e:void 0,columnGroup:t?void 0:e}}showMenuAfterButtonClick(e,t,o,i,r){let s=-1,n="left";this.gos.get("enableRtl")&&(s=1,n="right");const a=r?"filterMenuTab":void 0,l=a?[a]:void 0,d=We(this.gos),c=(d?9:4)*s,u=d?-23:4,{column:g,columnGroup:p}=this.splitColumnOrGroup(e);this.showMenu(g,p,f=>{const m=f.getGui();this.beans.popupSvc.positionPopupByComponent({type:o,column:g,eventSource:t,ePopup:m,alignSide:n,nudgeX:c,nudgeY:u,position:"under",keepWithinBounds:!0}),a&&f.showTab?.(a),this.dispatchVisibleChangedEvent(!0,!1,g,p,a)},o,a,l,t,i)}showMenu(e,t,o,i,r,s,n,a){const l=this.getMenuParams(e,t,s,n);if(!l)return;const{menu:d,eMenuGui:c,anchorToElement:u,restoreFocusParams:g}=l,p=[],{menuUtils:f,popupSvc:m}=this.beans;p.push(w=>{const y=d.getGui();this.destroyBean(d),e&&(fs(e,!1,"contextMenu"),f.restoreFocusOnClose(g,y,w)),a?.()});const C=this.getLocaleTextFunc();if(m.addPopup({modal:!0,eChild:c,closeOnEsc:!0,closedCallback:w=>{p.forEach(y=>y(w)),this.dispatchVisibleChangedEvent(!1,!1,e,t,r)},afterGuiAttached:w=>d.afterGuiAttached(Object.assign({},{container:i},w)),positionCallback:r?()=>o(d):void 0,ariaLabel:C("ariaLabelColumnMenu","Column Menu")}),r||(d.showTabBasedOnPreviousSelection?.(),o(d)),vd(this.gos)){const w=m.setPopupPositionRelatedToElement(c,u);w&&e&&this.addStopAnchoring(w,e,p)}d.addEventListener("tabSelected",w=>{this.dispatchVisibleChangedEvent(!1,!0,e),this.lastSelectedTab=w.key,this.dispatchVisibleChangedEvent(!0,!0,e)}),e&&fs(e,!0,"contextMenu"),this.activeMenu=d,d.addEventListener("destroyed",()=>{this.activeMenu===d&&(this.activeMenu=null)})}addStopAnchoring(e,t,o){e.then(i=>{t.__addEventListener("leftChanged",i),t.__addEventListener("visibleChanged",i),o.push(()=>{t.__removeEventListener("leftChanged",i),t.__removeEventListener("visibleChanged",i)})})}getMenuParams(e,t,o,i){const{focusSvc:r,visibleCols:s,ctrlsSvc:n}=this.beans,a={column:e,headerPosition:r.focusedHeader,columnIndex:s.allCols.indexOf(e),eventSource:i},l=this.createMenu(e,t,a,o,i);return l?{menu:l,eMenuGui:l.getGui(),anchorToElement:i||n.getGridBodyCtrl().eGridBody,restoreFocusParams:a}:void 0}createMenu(e,t,o,i,r){if(We(this.gos))return this.createBean(new oD(e,o,this.lastSelectedTab,i,r));{const s=this.beans.colMenuFactory.getMenuItems(e,t);return s.length?this.createBean(new iD(s,e,o,r)):void 0}}dispatchVisibleChangedEvent(e,t,o,i,r){this.eventSvc.dispatchEvent({type:"columnMenuVisibleChanged",visible:e,switchingTab:t,key:this.lastSelectedTab??r??(We(this.gos)?Do:"columnMenu"),column:o??null,columnGroup:i??null})}isMenuEnabled(e){if(!We(this.gos))return!0;const t=!this.beans.filterManager?.isFilterAllowed(e),o=e.getColDef().menuTabs??Ds;return(t&&o.includes(Fo)?o.length-1:o.length)>0}showMenuAfterContextMenuEvent(e,t,o){this.beans.menuUtils.onContextMenu({mouseEvent:t,touchEvent:o,source:"ui",showMenuCallback:i=>(this.showMenuAfterMouseEvent(e,i,"columnMenu"),!0)})}},oD=class extends E{constructor(e,t,o,i,r){super(),this.column=e,this.restoreFocusParams=t,this.initialSelection=o,this.restrictTo=i,this.sourceElement=r,this.tabFactories={},this.includeChecks={};const{tabFactories:s,includeChecks:n}=this;s[Do]=this.createMainPanel.bind(this),s[Fo]=this.createFilterPanel.bind(this),s[jo]=this.createColumnsPanel.bind(this),n[Do]=()=>!0,n[Fo]=()=>e?!!this.beans.filterManager?.isFilterAllowed(e):!1,n[jo]=()=>!0}postConstruct(){const e=this.getTabsToCreate().map(o=>this.createTab(o)),t=new eD({items:e,cssClass:"ag-menu",onActiveItemClicked:this.onHidePopup.bind(this),onItemClicked:this.onTabItemClicked.bind(this)});this.tabbedLayout=this.createBean(t),this.mainMenuList?.setParentComponent(t),this.addDestroyFunc(()=>this.destroyBean(t))}getTabsToCreate(){return this.restrictTo?this.restrictTo:(this.column?.getColDef().menuTabs??Ds).filter(e=>this.isValidMenuTabItem(e)&&this.isNotSuppressed(e))}isValidMenuTabItem(e){let t=!0,o=Ds;return this.restrictTo!=null&&(t=this.restrictTo.indexOf(e)>-1,o=this.restrictTo),t=t&&Ds.indexOf(e)>-1,t||_(175,{menuTabName:e,itemsToConsider:o}),t}isNotSuppressed(e){return this.includeChecks[e]()}createTab(e){return this.tabFactories[e]()}showTabBasedOnPreviousSelection(){this.showTab(this.initialSelection)}showTab(e){const{tabItemColumns:t,tabbedLayout:o,tabItemFilter:i,tabItemGeneral:r}=this;t&&e===jo?o.showItem(t):i&&e===Fo?o.showItem(i):r&&e===Do?o.showItem(r):o.showFirstItem()}onTabItemClicked(e){let t=null;switch(e.item){case this.tabItemColumns:t=jo;break;case this.tabItemFilter:t=Fo;break;case this.tabItemGeneral:t=Do;break}t&&this.activateTab(t)}activateTab(e){const t={type:"tabSelected",key:e};this.dispatchLocalEvent(t)}createMainPanel(){const{beans:e,column:t}=this,o=e.colMenuFactory,i=o.createMenu(this,o.getMenuItems(t),this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=i,i.addEventListener("closeMenu",this.onHidePopup.bind(this));const r={title:te("legacyMenu",e,t),titleLabel:Do.replace("MenuTab",""),bodyPromise:ke.resolve(i.getGui()),name:Do};return this.tabItemGeneral=r,r}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}createFilterPanel(){const e=this.column?this.createBean(new uc(this.column,"COLUMN_MENU")):null;this.filterComp=e,e?.hasFilter()||ce(119);const t=i=>e?.afterGuiAttached(i),o=()=>e?.afterGuiDetached();return this.tabItemFilter={title:te("filterTab",this.beans,this.column),titleLabel:Fo.replace("MenuTab",""),bodyPromise:ke.resolve(e?.getGui()),afterAttachedCallback:t,afterDetachedCallback:o,name:Fo},this.tabItemFilter}createColumnsPanel(){const e=Pe({tag:"div",cls:"ag-menu-column-select-wrapper"}),{beans:t,column:o}=this,r=t.colChooserFactory.createColumnSelectPanel(this,o).getGui();r.classList.add("ag-menu-column-select"),e.appendChild(r);const s={title:te("columns",t,o),titleLabel:jo.replace("MenuTab",""),bodyPromise:ke.resolve(e),name:jo};return this.tabItemColumns=s,s}afterGuiAttached(e){const{container:t,hidePopup:o}=e;this.tabbedLayout.setAfterAttachedParams({container:t,hidePopup:o}),o&&(this.hidePopupFunc=o,this.addDestroyFunc(o))}getGui(){return this.tabbedLayout.getGui()}destroy(){super.destroy(),this.destroyBean(this.filterComp)}},iD=class extends pe{constructor(e,t,o,i){super({tag:"div",ref:"eColumnMenu",cls:"ag-menu ag-column-menu",role:"presentation"}),this.menuItems=e,this.column=t,this.restoreFocusParams=o,this.sourceElement=i,this.eColumnMenu=V}postConstruct(){const e=this.beans.colMenuFactory.createMenu(this,this.menuItems,this.column,()=>this.sourceElement??this.getGui());this.mainMenuList=e,e.addEventListener("closeMenu",this.onHidePopup.bind(this)),this.eColumnMenu.appendChild(e.getGui())}onHidePopup(e){this.beans.menuUtils.closePopupAndRestoreFocusOnSelect(this.hidePopupFunc,this.restoreFocusParams,e)}afterGuiAttached({hidePopup:e}){e&&(this.hidePopupFunc=e,this.addDestroyFunc(e)),Lt(this.mainMenuList.getGui())}};function rD(e,t){e.colChooserFactory?.showColumnChooser({chooserParams:t})}function sD(e){e.colChooserFactory?.hideActiveColumnChooser()}var nD=class extends E{constructor(){super(...arguments),this.beanName="menuUtils"}restoreFocusOnClose(e,t,o,i){const{eventSource:r}=e,s=o instanceof KeyboardEvent;if(!i&&!s||!r)return;const n=Ee(this.beans);!t.contains(n)&&!Hr(this.beans)||this.focusHeaderCell(e)}closePopupAndRestoreFocusOnSelect(e,t,o){let i;o&&o.keyboardEvent&&(i=o.keyboardEvent),e(i&&{keyboardEvent:i});const r=this.beans,s=r.focusSvc,n=s.getFocusedCell();if(Hr(r))if(n){const{rowIndex:a,rowPinned:l,column:d}=n;s.setFocusedCell({rowIndex:a,column:d,rowPinned:l,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}else this.focusHeaderCell(t)}onContextMenu(e){const{mouseEvent:t,touchEvent:o,showMenuCallback:i,source:r}=e;if(!this.gos.get("allowContextMenuWithControlKey")&&t&&(t.ctrlKey||t.metaKey)||(t&&this.blockMiddleClickScrollsIfNeeded(t),r==="ui"&&this.gos.get("suppressContextMenu")))return;const s=t??o.touches[0];if(i(s)){const n=t??o;n&&n.cancelable&&n.preventDefault()}}async focusHeaderCell(e){const{column:t,columnIndex:o,headerPosition:i,eventSource:r}=e,{visibleCols:s,headerNavigation:n,focusSvc:a}=this.beans,l=await s.allCols.some(d=>d===t);if(this.isAlive()){if(t?.isAlive()&&l&&r&&ut(r)){const d=Kn(r);d&&(n?.scrollToColumn(t),d.focus())}else if(i&&o!==-1){const d=s.allCols,c=d[o]||Ce(d);c&&a.focusHeaderPosition({headerPosition:{headerRowIndex:i.headerRowIndex,column:c}})}}}blockMiddleClickScrollsIfNeeded(e){this.gos.get("suppressMiddleClickScrolls")&&e.which===2&&e.preventDefault()}},aD={moduleName:"MenuCore",version:ze,beans:[XF,jF,nD],icons:{chart:"chart",columns:"columns",loadingMenuItems:"loading",menuPin:"pin",menuValue:"aggregation",menuAddRowGroup:"group",menuRemoveRowGroup:"group",clipboardCopy:"copy",clipboardCut:"cut",clipboardPaste:"paste",save:"save",csvExport:"csv",excelExport:"excel",sortAscending:"asc",sortDescending:"desc",sortUnSort:"none"},dependsOn:[Ft,ys,Lu,fF]},lD={moduleName:"ColumnMenu",version:ze,beans:[tD,ZF,qF],icons:{legacyMenu:"menu",filterTab:"filter",columnSelectClosed:"tree-closed",columnSelectOpen:"tree-open",columnSelectIndeterminate:"tree-indeterminate"},apiFunctions:{showColumnChooser:rD,hideColumnChooser:sD},dependsOn:[aD,jc,Qc]},Ko="__AG_SELECT_ALL__",Yo="__AG_ADD_SELECTION_TO_FILTER__",dD={loadingOoo:"Loading...",blanks:"(Blanks)",searchOoo:"Search...",selectAll:"(Select All)",selectAllSearchResults:"(Select All Search Results)",addCurrentSelectionToFilter:"Add current selection to filter",noMatches:"No matches."},cD={tag:"div",cls:"ag-set-filter-item",attrs:{"aria-hidden":"true"},children:[{tag:"span",cls:"ag-set-filter-group-icons",children:[{tag:"span",ref:"eGroupClosedIcon",cls:"ag-set-filter-group-closed-icon"},{tag:"span",ref:"eGroupOpenedIcon",cls:"ag-set-filter-group-opened-icon"},{tag:"span",ref:"eGroupIndeterminateIcon",cls:"ag-set-filter-group-indeterminate-icon"}]},{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},uD={tag:"div",cls:"ag-set-filter-item",children:[{tag:"ag-checkbox",ref:"eCheckbox",cls:"ag-set-filter-item-checkbox"}]},hD=class extends pe{constructor(e){super(e.isGroup?cD:uD,[fi]),this.eCheckbox=V,this.eGroupOpenedIcon=V,this.eGroupClosedIcon=V,this.eGroupIndeterminateIcon=V,this.formattedValue=null,this.focusWrapper=e.focusWrapper,this.value=e.value,this.params=e.params,this.translate=e.translate,this.valueFormatter=e.valueFormatter,this.item=e.item,this.isSelected=e.isSelected,this.isTree=e.isTree,this.depth=e.depth??0,this.isGroup=e.isGroup,this.groupsExist=e.groupsExist,this.isExpanded=e.isExpanded,this.hasIndeterminateExpandState=e.hasIndeterminateExpandState}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getGui:()=>this.getGui(),getColDef:()=>this.params.colDef,getColumn:()=>this.params.column,getLocation:()=>"setFilterValue",shouldDisplayTooltip:()=>this.shouldDisplayTooltip?.()??!0,getValueFormatted:()=>this.formattedValue,getAdditionalParams:()=>this.isTree?{level:this.depth}:{}})),this.addDestroyFunc(()=>this.destroyCellRendererComponent?.()),this.render(),this.eCheckbox.setLabelEllipsis(!0).setValue(this.isSelected,!0).setDisabled(!!this.params.readOnly).getInputElement().setAttribute("tabindex","-1"),this.refreshVariableAriaLabels(),this.isTree&&(this.depth>0&&(this.addCssClass("ag-set-filter-indent-"+this.depth),this.getGui().style.setProperty("--ag-indentation-level",String(this.depth))),this.isGroup?this.setupExpansion():this.groupsExist&&this.addCssClass("ag-set-filter-add-group-indent"),Tl(this.getAriaElement(),this.depth+1)),this.refreshAriaChecked(),!this.params.readOnly&&this.eCheckbox.onValueChange(e=>this.onCheckboxChanged(!!e))}getFocusableElement(){return this.focusWrapper}setupExpansion(){const{eGroupClosedIcon:e,eGroupOpenedIcon:t,eGroupIndeterminateIcon:o,hasIndeterminateExpandState:i,beans:r}=this;e.appendChild(pi("setFilterGroupClosed",r,null)),t.appendChild(pi("setFilterGroupOpen",r,null));const s=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(e,{click:s}),this.addManagedElementListeners(t,{click:s}),i&&(o.appendChild(pi("setFilterGroupIndeterminate",r,null)),this.addManagedElementListeners(o,{click:s})),this.setExpandedIcons(),this.refreshAriaExpanded()}onExpandOrContractClicked(){this.setExpanded(!this.isExpanded)}setExpanded(e,t){if(this.isGroup&&e!==this.isExpanded){this.isExpanded=e;const o={type:"expandedChanged",isExpanded:!!e,item:this.item};t||this.dispatchLocalEvent(o),this.setExpandedIcons(),this.refreshAriaExpanded()}}setExpandedIcons(){const{isExpanded:e,hasIndeterminateExpandState:t,eGroupClosedIcon:o,eGroupOpenedIcon:i,eGroupIndeterminateIcon:r}=this;ge(o,t?e===!1:!e),ge(i,e===!0),t&&ge(r,e===void 0)}onCheckboxChanged(e){this.isSelected=e;const t={type:"selectionChanged",isSelected:e,item:this.item};this.dispatchLocalEvent(t),this.refreshVariableAriaLabels(),this.refreshAriaChecked()}toggleSelected(){this.params.readOnly||this.setSelected(!this.isSelected)}setSelected(e,t){this.isSelected=e,this.eCheckbox.setValue(e,t),this.refreshAriaChecked()}refreshVariableAriaLabels(){if(!this.isTree)return;const e=this.getLocaleTextFunc(),t=this.eCheckbox.getValue(),o=t===void 0?e("ariaIndeterminate","indeterminate"):t?e("ariaVisible","visible"):e("ariaHidden","hidden"),i=e("ariaToggleVisibility","Press SPACE to toggle visibility");oi(this.eCheckbox.getInputElement(),void 0),this.eCheckbox.setInputAriaLabel(`${i} (${o})`)}setupFixedAriaLabels(e){if(!this.isTree)return;const o=this.getLocaleTextFunc()("ariaFilterValue","Filter Value"),i=this.getAriaElement();dt(i,`${e} ${o}`),cn(i,this.eCheckbox.getInputElement().id)}refreshAriaChecked(){const e=this.getAriaElement();Hl(e,this.eCheckbox.getValue())}refreshAriaExpanded(){to(this.getAriaElement(),!!this.isExpanded)}refresh(e,t,o){this.item=e,t!==this.isSelected&&this.setSelected(t,!0),this.setExpanded(o,!0);const{cellRendererComponent:i,cellRendererParams:r,beans:s,params:n}=this;if(this.valueFunction){const a=this.valueFunction();this.setTooltipAndCellRendererParams(a,a),i||this.renderCellWithoutCellRenderer()}if(i){const a=ui(s.userCompFactory,n,r);if(!i.refresh?.(a?.params??r)){const d=i;this.renderCell(),this.destroyBean(d)}}}render(){const{params:{column:e}}=this;let{value:t}=this,o=null;typeof t=="function"?(this.valueFunction=t,o=this.valueFunction(),t=o):this.isTree?o=oo(t):o=this.getFormattedValue(e,t),this.formattedValue=o,this.setTooltipAndCellRendererParams(t,o),this.renderCell()}setTooltipAndCellRendererParams(e,t){const o=this.gos;if(this.params.showTooltips&&(!Zi(o)||!this.params.cellRenderer)){const i=t??oo(e);this.shouldDisplayTooltip=ha(o,()=>this.eCheckbox.getGui().querySelector(".ag-label")),this.tooltipFeature?.setTooltipAndRefresh(i)}this.cellRendererParams=Z(o,{value:e,valueFormatted:t,colDef:this.params.colDef,column:this.params.column,setTooltip:(i,r)=>{o.assertModuleRegistered("Tooltip",3),this.shouldDisplayTooltip=r,this.tooltipFeature?.setTooltipAndRefresh(i)}})}getFormattedValue(e,t){return this.beans.valueSvc.formatValue(e,null,t,this.valueFormatter,!1)}renderCell(){const t=ui(this.beans.userCompFactory,this.params,this.cellRendererParams)?.newAgStackInstance();if(t==null){this.renderCellWithoutCellRenderer();return}t.then(o=>{o&&(this.cellRendererComponent=o,this.eCheckbox.setLabel(o.getGui()),this.destroyCellRendererComponent=()=>this.destroyBean(o))})}renderCellWithoutCellRenderer(){const{valueFormatted:e,value:t}=this.cellRendererParams;let o=e??t??this.translate("blanks");typeof o!="string"&&(_(208),o=""),this.eCheckbox.setLabel(o),this.setupFixedAriaLabels(o)}getComponentHolder(){return this.params.column.getColDef()}},dh=class{getModelAsString(e,t){const{values:o}=e||t.getModel()||{},i=t.getValueModel();if(o==null||i==null)return"";const r=o.filter(a=>i.isKeyAvailable(a)),s=r.length,n=r.slice(0,10).map(a=>t.getFormattedValue(a));return`(${s}) ${n.join(",")}${s>10?",...":""}`}};function Ha(e,t,o){let i=e;return i?(i=i.map(r=>oo(et(r))),!t&&o&&i.some(r=>r==null)?Ce(i)==null?null:i.filter(r=>r!=null):i):null}var gD=class{constructor(e,t,o,i,r,s,n,a,l,d){this.rowModel=e,this.filterParams=t,this.createKey=o,this.caseFormat=i,this.valueSvc=r,this.treeDataOrGrouping=s,this.treeData=n,this.groupAllowUnbalanced=a,this.addManagedEventListeners=l,this.rowGroupColsSvc=d}extractUniqueValuesAsync(e,t){return new ke(o=>{if(this.rowModel.isRowDataLoaded())o(this.extractUniqueValues(e,t));else{const[i]=this.addManagedEventListeners({rowCountReady:()=>{i?.(),o(this.extractUniqueValues(e,t))}})}})}extractUniqueValues(e,t){const o=new Map,i=this.extractExistingFormattedKeys(t),r=new Set,s=this.treeData,n=this.rowGroupColsSvc?.columns,a=(l,d)=>{const c=this.caseFormat(l);if(!r.has(c)){r.add(c);let u=l,g=et(d);const p=i?.get(c);p!=null&&(u=p,g=t.get(p)),o.set(u,g)}};return this.rowModel.forEachLeafNode(l=>{if(!l.data||!e(l))return;if(this.treeDataOrGrouping){this.addValueForTreeDataOrGrouping(l,s,n,a);return}const d=this.getValue(l);d!=null&&Array.isArray(d)?(d.forEach(c=>{a(this.createKey(c,l),c)}),d.length===0&&a(null,null)):a(this.createKey(d,l),d)}),o}addValueForTreeDataOrGrouping(e,t,o=[],i){let r;if(t){if(e.childrenAfterGroup?.length)return;r=e.getRoute()??[e.key??e.id]}else r=o.map(n=>this.valueSvc.getKeyForNode(n,e)),r.push(this.getValue(e));const s=Ha(r,t,this.groupAllowUnbalanced);i(this.createKey(s),s)}getValue(e){return this.filterParams.getValue(e)}extractExistingFormattedKeys(e){if(!e)return null;const t=new Map;return e.forEach((o,i)=>{t.set(this.caseFormat(i),i)}),t}},pD=class{constructor({caseFormat:e}){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1,this.caseFormat=e}allFilteringKeys(){return this.filteringKeys}allFilteringKeysCaseFormatted(){return this.filteringKeysCaseFormatted}setFilteringKeys(e){this.filteringKeys=new Set(e),this.hasNoAppliedFilteringKeys=!this.filteringKeys||this.filteringKeys.size===0,this.filteringKeysCaseFormatted=new Set,this.filteringKeys.forEach(t=>this.filteringKeysCaseFormatted.add(this.caseFormat(t)))}addFilteringKey(e){this.filteringKeys==null&&(this.filteringKeys=new Set,this.filteringKeysCaseFormatted=new Set),this.filteringKeys.add(e),this.filteringKeysCaseFormatted.add(this.caseFormat(e)),this.hasNoAppliedFilteringKeys&&(this.hasNoAppliedFilteringKeys=!1)}hasCaseFormattedFilteringKey(e){return this.filteringKeysCaseFormatted.has(this.caseFormat(e))}hasFilteringKey(e){return this.filteringKeys.has(e)}reset(){this.filteringKeys=null,this.filteringKeysCaseFormatted=null,this.hasNoAppliedFilteringKeys=!1}},fD=class{constructor(e,t,o,i){this.valueSvc=e,this.valueFormatter=t,this.formatter=o,this.column=i,this.displayedKeys=[]}updateDisplayedValuesToAllAvailable(e,t,o){this.displayedKeys=Array.from(o)}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,r){this.displayedKeys=[];for(const s of o)if(s==null)r&&this.displayedKeys.push(s);else{const n=e(s),a=this.valueSvc.formatValue(this.column,null,n,this.valueFormatter,!1),l=this.formatter(a);i(l)&&this.displayedKeys.push(s)}}getDisplayedValueCount(){return this.displayedKeys.length}getDisplayedItem(e){return this.displayedKeys[e]}getSelectAllItem(){return Ko}getAddSelectionToFilterItem(){return Yo}getDisplayedKeys(){return this.displayedKeys}forEachDisplayedKey(e){this.displayedKeys.forEach(e)}someDisplayedKey(e){return this.displayedKeys.some(e)}hasGroups(){return!1}refresh(){}},mD=e=>De(e)?null:!(e instanceof Date)||isNaN(e.getTime())?["NaN"]:[String(e.getFullYear()),String(e.getMonth()+1),String(e.getDate())],ch=class{constructor(e,t,o,i){this.formatter=e,this.treeListPathGetter=t,this.treeListFormatter=o,this.treeDataOrGrouping=i,this.allDisplayedItemsTree=[],this.activeDisplayedItemsFlat=[],this.selectAllItem={depth:0,filterPasses:!0,available:!0,treeKey:Ko,children:this.allDisplayedItemsTree,expanded:!0,key:Ko,parentTreeKeys:[]},this.addSelectionToFilterItem={depth:0,filterPasses:!0,available:!0,treeKey:Yo,expanded:!0,key:Yo,parentTreeKeys:[]}}updateOnParamsChange(e){this.treeListFormatter=e}updateDisplayedValuesToAllAvailable(e,t,o,i){i==="reload"?this.generateItemTree(e,t,o):i==="otherFilter"?(this.updateAvailable(o),this.updateExpandAll()):i==="miniFilter"&&(this.resetFilter(),this.updateExpandAll()),this.flattenItems()}updateDisplayedValuesToMatchMiniFilter(e,t,o,i,r,s){s==="reload"?this.generateItemTree(e,t,o):s==="otherFilter"&&this.updateAvailable(o),this.updateFilter(i,r),this.updateExpandAll(),this.flattenItems()}generateItemTree(e,t,o){this.allDisplayedItemsTree=[],this.groupsExist=!1;const i=this.getTreeListPathGetter(e,o);for(const r of t){const s=e(r),n=i(s)??[null];n.length>1&&(this.groupsExist=!0);const a=o.has(r);let l=this.allDisplayedItemsTree,d,c=[];n.forEach((u,g)=>{l||(l=[],d.children=l),d=l.find(p=>p.treeKey?.toUpperCase()===u?.toUpperCase()),d||(d={treeKey:u,depth:g,filterPasses:!0,expanded:!1,available:a,parentTreeKeys:c},g===n.length-1&&(d.key=r),l.push(d)),l=d.children,c=[...c,u]})}this.updateAvailable(o),this.selectAllItem.children=this.allDisplayedItemsTree,this.selectAllItem.expanded=!1}getTreeListPathGetter(e,t){if(this.treeListPathGetter)return this.treeListPathGetter;if(this.treeDataOrGrouping)return i=>i;let o=!1;for(const i of t){const r=e(i);if(r instanceof Date){o=!0;break}else if(r!=null)break}return o?mD:(_(211),i=>[String(i)])}flattenItems(){this.activeDisplayedItemsFlat=[];const e=t=>{t.forEach(o=>{!o.filterPasses||!o.available||(this.activeDisplayedItemsFlat.push(o),o.children&&o.expanded&&e(o.children))})};e(this.allDisplayedItemsTree)}resetFilter(){const e=t=>{t.children&&t.children.forEach(o=>{e(o)}),t.filterPasses=!0};this.allDisplayedItemsTree.forEach(t=>e(t))}updateFilter(e,t){const o=i=>i.available?i.treeKey==null?t:e(this.formatter(this.treeListFormatter?this.treeListFormatter(i.treeKey,i.depth,i.parentTreeKeys):i.treeKey)):!1;this.allDisplayedItemsTree.forEach(i=>this.recursiveItemCheck(i,!1,o,"filterPasses"))}getDisplayedValueCount(){return this.activeDisplayedItemsFlat.length}getDisplayedItem(e){return this.activeDisplayedItemsFlat[e]}getSelectAllItem(){return this.selectAllItem}getAddSelectionToFilterItem(){return this.addSelectionToFilterItem}getDisplayedKeys(){const e=[];return this.forEachDisplayedKey(t=>e.push(t)),e}forEachDisplayedKey(e){const t=(o,i)=>{o.children?(!o.expanded||!i)&&o.children.forEach(r=>{r.filterPasses&&t(r,!1)}):e(o.key)};this.activeDisplayedItemsFlat.forEach(o=>t(o,!0))}someDisplayedKey(e){const t=(o,i)=>{if(o.children){if(!o.expanded||!i)return o.children.some(r=>r.filterPasses?t(r,!1):!1)}else return e(o.key);return!1};return this.activeDisplayedItemsFlat.some(o=>t(o,!0))}hasGroups(){return this.groupsExist}refresh(){this.updateExpandAll(),this.flattenItems()}updateExpandAll(){const e=(o,i,r)=>{for(const s of o){if(!s.filterPasses||!s.available||!s.children)continue;if(i=i||!!s.expanded,r=r||!s.expanded,i&&r)return;const n=e(s.children,i,r);if(n===void 0)return;n?i=!0:r=!0}return i&&r?void 0:i},t=this.getSelectAllItem();t.expanded=e(t.children,!1,!1)}recursiveItemCheck(e,t,o,i){let r=!1;e.children&&e.children.forEach(n=>{const a=this.recursiveItemCheck(n,t||o(e),o,i);r=r||a});const s=t||r||o(e);return e[i]=s,s}updateAvailable(e){const t=o=>e.has(o.key);this.allDisplayedItemsTree.forEach(o=>this.recursiveItemCheck(o,!1,t,"available"))}},CD=class{constructor(e){this.localEventService=new eo,this.miniFilterText=null,this.addCurrentSelectionToFilter=!1,this.providedValues=null,this.allValues=new Map,this.availableKeys=new Set,this.selectedKeys=new Set,this.initialised=!1;const{usingComplexObjects:t,rowGroupColsSvc:o,valueSvc:i,treeDataTreeList:r,groupingTreeList:s,filterParams:n,gos:a,valueFormatter:l,addManagedEventListeners:d}=e,{column:c,colDef:u,textFormatter:g,doesRowPassOtherFilter:p,suppressSorting:f,comparator:m,rowModel:C,values:w,caseSensitive:y,treeList:b,treeListPathGetter:x,treeListFormatter:M}=n;this.filterParams=n,this.gos=a,this.setIsLoading=e.setIsLoading,this.translate=e.translate,this.caseFormat=e.caseFormat,this.createKey=e.createKey,this.usingComplexObjects=!!e.usingComplexObjects,this.formatter=g??(v=>v??null),this.doesRowPassOtherFilters=p,this.suppressSorting=f||!1,this.filteringKeys=new pD({caseFormat:this.caseFormat});const P=m??u.comparator,k=!!r||!!s;this.compareByValue=!!(t&&P||k||b&&!x),k&&!P?this.entryComparator=this.createTreeDataOrGroupingComparator():b&&!x&&!P?this.entryComparator=([v,R],[F,G])=>Or(R,G):this.entryComparator=([v,R],[F,G])=>P(R,G),this.keyComparator=P??Or,this.caseSensitive=!!y;const S=a.get("groupAllowUnbalanced");Et(a)&&(this.clientSideValuesExtractor=new gD(C,this.filterParams,this.createKey,this.caseFormat,i,k,!!r,S,d,o)),w==null?this.valuesType=2:(this.valuesType=Array.isArray(w)?0:1,this.providedValues=w),this.displayValueModel=b?new ch(this.formatter,x,M,r||s):new fD(i,l,this.formatter,c),this.updateAllValues().then(v=>this.resetSelectionState(v||[]))}addEventListener(e,t,o){this.localEventService.addEventListener(e,t,o)}removeEventListener(e,t,o){this.localEventService.removeEventListener(e,t,o)}updateOnParamsChange(e){return new ke(t=>{const{values:o,textFormatter:i,suppressSorting:r,treeListFormatter:s}=e,n=this.providedValues,a=this.suppressSorting;if(this.filterParams=e,this.formatter=i??(l=>l??null),this.suppressSorting=r||!1,this.providedValues=o??null,this.displayValueModel instanceof ch&&this.displayValueModel.updateOnParamsChange(s),this.providedValues!==n||this.suppressSorting!==a){!o||o.length===0?(this.valuesType=2,this.providedValues=null):this.valuesType=Array.isArray(o)?0:1;const l=this.getModel();this.updateAllValues().then(()=>{this.setModel(l).then(()=>t())})}else t()})}refreshValues(){return new ke(e=>{this.allValuesPromise.then(()=>{const t=this.getModel();this.updateAllValues(),this.setModel(t).then(()=>e())})})}overrideValues(e){return new ke(t=>{this.allValuesPromise.then(()=>{this.valuesType=0,this.providedValues=e,this.refreshValues().then(()=>t())})})}refreshAfterAnyFilterChanged(){return this.showAvailableOnly()?this.allValuesPromise.then(e=>(this.updateAvailableKeys(e??[],"otherFilter"),!0)):ke.resolve(!1)}isInitialised(){return this.initialised}updateAllValues(){return this.allValuesPromise=new ke(e=>{switch(this.valuesType){case 2:this.getValuesFromRowsAsync(!1).then(t=>e(this.processAllValues(t)));break;case 0:{e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(this.providedValues))));break}case 1:{this.setIsLoading(!0);const t=this.providedValues,{column:o,colDef:i}=this.filterParams,r=Z(this.gos,{success:s=>{this.setIsLoading(!1),e(this.processAllValues(this.uniqueValues(this.validateProvidedValues(s))))},colDef:i,column:o});window.setTimeout(()=>t(r),0);break}}}),this.allValuesPromise.then(e=>this.updateAvailableKeys(e||[],"reload")).then(()=>this.initialised=!0),this.allValuesPromise}processAllValues(e){const t=this.sortKeys(e);return this.allValues=e??new Map,t}validateProvidedValues(e){if(this.usingComplexObjects&&e?.length){const t=e[0];t&&typeof t!="object"&&typeof t!="function"&&(this.createKey(t)==null?_(209):_(210))}return e}setValuesType(e){this.valuesType=e}getValuesType(){return this.valuesType}isKeyAvailable(e){return this.availableKeys.has(e)}showAvailableOnly(){return this.valuesType===2}updateAvailableKeys(e,t){const o=this.showAvailableOnly()?this.sortKeys(this.getValuesFromRows(!0)):e;this.availableKeys=new Set(o),this.localEventService.dispatchEvent({type:"availableValuesChanged"}),this.updateDisplayedValues(t,e)}sortKeys(e){const t=e??new Map;if(this.suppressSorting)return Array.from(t.keys());let o;return this.compareByValue?o=Array.from(t.entries()).sort(this.entryComparator).map(([i])=>i):o=Array.from(t.keys()).sort(this.keyComparator),this.filterParams.excelMode&&t.has(null)&&(o=o.filter(i=>i!=null),o.push(null)),o}getParamsForValuesFromRows(e=!1){if(!this.clientSideValuesExtractor)return ce(113),null;const t=i=>!e||this.doesRowPassOtherFilters(i),o=e&&!this.caseSensitive?this.allValues:void 0;return{predicate:t,existingValues:o}}getValuesFromRows(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValues(t.predicate,t.existingValues):null}getValuesFromRowsAsync(e=!1){const t=this.getParamsForValuesFromRows(e);return t?this.clientSideValuesExtractor.extractUniqueValuesAsync(t.predicate,t.existingValues):ke.resolve(null)}setMiniFilter(e){return e=et(e),this.miniFilterText===e?!1:(e===null&&this.setAddCurrentSelectionToFilter(!1),this.miniFilterText=e,this.updateDisplayedValues("miniFilter"),!0)}getMiniFilter(){return this.miniFilterText}updateDisplayedValues(e,t){if(e==="expansion"){this.displayValueModel.refresh();return}if(this.miniFilterText==null){this.displayValueModel.updateDisplayedValuesToAllAvailable(s=>this.getValue(s),t,this.availableKeys,e);return}const o=this.caseFormat(this.formatter(this.miniFilterText)||""),i=s=>s!=null&&this.caseFormat(s).indexOf(o)>=0,r=!!this.filterParams.excelMode&&i(this.translate("blanks"));this.displayValueModel.updateDisplayedValuesToMatchMiniFilter(s=>this.getValue(s),t,this.availableKeys,i,r,e)}getDisplayedValueCount(){return this.displayValueModel.getDisplayedValueCount()}getDisplayedItem(e){return this.displayValueModel.getDisplayedItem(e)}getSelectAllItem(){return this.displayValueModel.getSelectAllItem()}getAddSelectionToFilterItem(){return this.displayValueModel.getAddSelectionToFilterItem()}hasSelections(){return this.filterParams.defaultToNothingSelected?this.selectedKeys.size>0:this.allValues.size!==this.selectedKeys.size}getKeys(){return Array.from(this.allValues.keys())}getValues(){return Array.from(this.allValues.values())}getValue(e){return this.allValues.get(e)}setAddCurrentSelectionToFilter(e){this.addCurrentSelectionToFilter=e}isInWindowsExcelMode(){return this.filterParams.excelMode==="windows"}isAddCurrentSelectionToFilterChecked(){return this.isInWindowsExcelMode()&&this.addCurrentSelectionToFilter}showAddCurrentSelectionToFilter(){return this.isInWindowsExcelMode()&&q(this.miniFilterText)&&this.miniFilterText.length>0}selectAllMatchingMiniFilter(e=!1){this.miniFilterText==null?this.selectedKeys=new Set(this.allValues.keys()):(e&&this.selectedKeys.clear(),this.displayValueModel.forEachDisplayedKey(t=>this.selectedKeys.add(t)))}deselectAllMatchingMiniFilter(){this.miniFilterText==null?this.selectedKeys.clear():this.displayValueModel.forEachDisplayedKey(e=>this.selectedKeys.delete(e))}selectKey(e){this.selectedKeys.add(e)}deselectKey(e){this.filterParams.excelMode&&this.isEverythingVisibleSelected()&&this.resetSelectionState(this.displayValueModel.getDisplayedKeys()),this.selectedKeys.delete(e)}isKeySelected(e){return this.selectedKeys.has(e)}isEverythingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>!this.isKeySelected(e))}isNothingVisibleSelected(){return!this.displayValueModel.someDisplayedKey(e=>this.isKeySelected(e))}getModel(){if(!this.hasSelections())return null;const e=this.isAddCurrentSelectionToFilterChecked()?this.filteringKeys.allFilteringKeys():null;if(e&&e.size>0){if(this.selectedKeys){const t=new Set([...Array.from(e),...Array.from(this.selectedKeys).filter(o=>!e.has(o))]);return Array.from(t)}return Array.from(e)}return Array.from(this.selectedKeys)}setModel(e){return this.allValuesPromise.then(t=>{if(e==null)this.resetSelectionState(t??[]);else{this.selectedKeys.clear();const o=new Map;this.allValues.forEach((i,r)=>{o.set(this.caseFormat(r),r)}),e.forEach(i=>{const r=this.caseFormat(et(i)),s=o.get(r);s!==void 0&&this.selectKey(s)})}})}uniqueValues(e){const t=new Map,o=new Set;return(e??[]).forEach(i=>{const r=et(i),s=this.createKey(r),n=this.caseFormat(s);o.has(n)||(o.add(n),t.set(s,r))}),t}resetSelectionState(e){this.filterParams.defaultToNothingSelected?this.selectedKeys.clear():this.selectedKeys=new Set(e)}hasGroups(){return this.displayValueModel.hasGroups()}createTreeDataOrGroupingComparator(){return([e,t],[o,i])=>{if(t==null)return i==null?0:-1;if(i==null)return 1;for(let r=0;r<t.length;r++){if(r>=i.length)return 1;const s=Or(t[r],i[r]);if(s!==0)return s}return 0}}setAppliedModelKeys(e){this.filteringKeys.setFilteringKeys(e)}addToAppliedModelKeys(e){this.filteringKeys.addFilteringKey(e)}getAppliedModelKeys(){return this.filteringKeys.allFilteringKeys()}getCaseFormattedAppliedModelKeys(){return this.filteringKeys.allFilteringKeysCaseFormatted()}hasAppliedModelKey(e){return this.filteringKeys.hasCaseFormattedFilteringKey(e)}hasAnyAppliedModelKey(){return!this.filteringKeys.hasNoAppliedFilteringKeys}},uh=class extends Km{constructor(){super("setFilter"),this.filterType="set",this.eMiniFilter=V,this.eFilterLoading=V,this.eFilterLoadingIcon=V,this.eSetFilterList=V,this.eFilterNoMatches=V,this.caseSensitive=!1,this.treeDataTreeList=!1,this.groupingTreeList=!1,this.hardRefreshVirtualList=!1,this.noValueFormatterSupplied=!1,this.filterModelFormatter=new dh,this.updateSetFilterOnParamsChange=t=>{this.setFilterParams=t,this.caseSensitive=!!t.caseSensitive;const o=t.keyCreator??t.colDef.keyCreator;this.setValueFormatter(t.valueFormatter,o,!!t.treeList,!!t.colDef.refData);const i=t.column.getId().startsWith(No);this.treeDataTreeList=this.gos.get("treeData")&&!!t.treeList&&i,this.groupingTreeList=!!this.rowGroupColsSvc?.columns.length&&!!t.treeList&&i,this.createKey=this.generateCreateKey(o,this.treeDataTreeList||this.groupingTreeList)}}wireBeans(t){this.rowGroupColsSvc=t.rowGroupColsSvc,this.valueSvc=t.valueSvc,this.dataTypeSvc=t.dataTypeSvc}postConstruct(){super.postConstruct()}updateUiVisibility(){}createBodyTemplate(){return{tag:"div",cls:"ag-set-filter",children:[{tag:"div",ref:"eFilterLoading",cls:"ag-filter-loading ag-loading ag-hidden",children:[{tag:"span",ref:"eFilterLoadingIcon",cls:"ag-loading-icon"},{tag:"span",cls:"ag-loading-text",children:this.translateForSetFilter("loadingOoo")}]},{tag:"ag-input-text-field",ref:"eMiniFilter",cls:"ag-mini-filter"},{tag:"div",ref:"eFilterNoMatches",cls:"ag-filter-no-matches ag-hidden",children:this.translateForSetFilter("noMatches")},{tag:"div",ref:"eSetFilterList",cls:"ag-set-filter-list",role:"presentation"}]}}getAgComponents(){return[ua]}handleKeyDown(t){if(super.handleKeyDown(t),!t.defaultPrevented)switch(t.key){case D.SPACE:this.handleKeySpace(t);break;case D.ENTER:this.handleKeyEnter(t);break;case D.LEFT:this.handleKeyLeft(t);break;case D.RIGHT:this.handleKeyRight(t);break}}handleKeySpace(t){this.getComponentForKeyEvent(t)?.toggleSelected()}handleKeyEnter(t){const{excelMode:o,readOnly:i}=this.setFilterParams;!o||i||(t.preventDefault(),this.onBtApply(!1,!1,t),this.setFilterParams.excelMode==="mac"&&this.eMiniFilter.getInputElement().select())}handleKeyLeft(t){this.getComponentForKeyEvent(t)?.setExpanded(!1)}handleKeyRight(t){this.getComponentForKeyEvent(t)?.setExpanded(!0)}getComponentForKeyEvent(t){if(!this.eSetFilterList.contains(Ee(this.beans)))return;const o=this.virtualList.getLastFocusedRow();if(o==null)return;const i=this.virtualList.getComponentAt(o);if(i==null)return;t.preventDefault();const{readOnly:r}=this.setFilterParams;if(!r)return i}getCssIdentifier(){return"set-filter"}setModel(t){return t==null&&this.valueModel.getModel()==null?(this.setMiniFilter(null),ke.resolve()):super.setModel(t)}refresh(t){if(this.applyExcelModeOptions(t),!super.refresh(t))return!1;const o=this.setFilterParams;return["treeList","treeListPathGetter","caseSensitive","comparator","excelMode"].some(r=>t[r]!==o?.[r])||this.haveColDefParamsChanged(t)?!1:(super.updateParams(t),this.updateSetFilterOnParamsChange(t),this.updateMiniFilter(),t.suppressSelectAll!==o?.suppressSelectAll&&this.createVirtualListModel(t),this.valueModel.updateOnParamsChange(t).then(()=>{this.isAlive()&&this.refreshFilterValues()}),!0)}haveColDefParamsChanged(t){const{colDef:o,keyCreator:i}=t,{colDef:r,keyCreator:s}=this.setFilterParams,n=i??o.keyCreator,a=s??r?.keyCreator,l=o.filterValueGetter!==r?.filterValueGetter,d=n!==a,c=!!this.dataTypeSvc&&!!n&&this.dataTypeSvc.getFormatValue(o.cellDataType)===n&&o.valueFormatter!==r?.valueFormatter;return l||d||c}setModelAndRefresh(t){return this.valueModel.setModel(t).then(()=>{this.isAlive()&&this.checkAndRefreshVirtualList()})}resetUiToDefaults(){return this.setMiniFilter(null),this.setModelAndRefresh(null)}setModelIntoUi(t){this.setMiniFilter(null);const o=t==null?null:t.values;return this.setModelAndRefresh(o)}getModelFromUi(){const t=this.valueModel.getModel();return t?{values:t,filterType:this.filterType}:null}getValueModel(){return this.valueModel}areModelsEqual(t,o){return t==null&&o==null?!0:t!=null&&o!=null&&It(t.values,o.values)}setParams(t){this.applyExcelModeOptions(t),super.setParams(t),this.updateSetFilterOnParamsChange(t);const o=t.keyCreator??t.colDef.keyCreator;this.valueModel=new CD({filterParams:t,setIsLoading:i=>this.setIsLoading(i),translate:i=>this.translateForSetFilter(i),caseFormat:i=>this.caseFormat(i),createKey:this.createKey,valueFormatter:this.valueFormatter,usingComplexObjects:!!o,gos:this.gos,rowGroupColsSvc:this.rowGroupColsSvc,valueSvc:this.valueSvc,treeDataTreeList:this.treeDataTreeList,groupingTreeList:this.groupingTreeList,addManagedEventListeners:i=>this.addManagedEventListeners(i)}),this.initialiseFilterBodyUi(),this.addEventListenersForDataChanges()}onAddCurrentSelectionToFilterChange(t){this.valueModel.setAddCurrentSelectionToFilter(t)}setValueFormatter(t,o,i,r){let s=t;if(!s){if(o&&!i){ce(249);return}this.noValueFormatterSupplied=!0,r||(s=n=>oo(n.value))}this.valueFormatter=s}generateCreateKey(t,o){return o&&!t?(ce(250),()=>null):t?(i,r=null)=>{const s=this.getKeyCreatorParams(i,r);return et(t(s))}:i=>et(oo(i))}getFormattedValue(t){let o=this.valueModel.getValue(t);this.noValueFormatterSupplied&&(this.treeDataTreeList||this.groupingTreeList)&&Array.isArray(o)&&(o=Ce(o));const i=this.valueSvc.formatValue(this.setFilterParams.column,null,o,this.valueFormatter,!1);return i??oo(o)??this.translateForSetFilter("blanks")}applyExcelModeOptions(t){t.excelMode==="windows"?(t.buttons||(t.buttons=["apply","cancel"]),t.closeOnApply==null&&(t.closeOnApply=!0)):t.excelMode==="mac"&&(t.buttons||(t.buttons=["reset"]),t.applyMiniFilterWhileTyping==null&&(t.applyMiniFilterWhileTyping=!0),t.debounceMs==null&&(t.debounceMs=500)),t.excelMode&&t.defaultToNothingSelected&&(t.defaultToNothingSelected=!1,_(207))}addEventListenersForDataChanges(){if(!this.isValuesTakenFromGrid())return;this.addManagedPropertyListeners(["groupAllowUnbalanced"],()=>{this.syncAfterDataChange()});const t=tt(this,this.syncAfterDataChange.bind(this),0);this.addManagedEventListeners({cellValueChanged:o=>{o.column===this.setFilterParams.column&&t()}})}syncAfterDataChange(){const t=!this.applyActive||this.areModelsEqual(this.getModel(),this.getModelFromUi());return this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),t&&this.onBtApply(!1,!0))})}setIsLoading(t){ge(this.eFilterLoading,t),t||(this.hardRefreshVirtualList=!0)}initialiseFilterBodyUi(){this.initVirtualList(),this.initMiniFilter(),this.initLoading()}initLoading(){const t=te("setFilterLoading",this.beans,this.setFilterParams.column);t&&this.eFilterLoadingIcon.appendChild(t)}initVirtualList(){const o=this.getLocaleTextFunc()("ariaFilterList","Filter List"),i=!!this.setFilterParams.treeList,r=this.virtualList=this.createBean(new Yu({cssIdentifier:"filter",ariaRole:i?"tree":"listbox",listName:o})),s=this.eSetFilterList;i&&s.classList.add("ag-set-filter-tree-list"),s&&s.appendChild(r.getGui());const{cellHeight:n}=this.setFilterParams;n!=null&&r.setRowHeight(n);const a=(d,c)=>this.createSetListItem(d,i,c);r.setComponentCreator(a);const l=(d,c)=>this.updateSetListItem(d,c);r.setComponentUpdater(l),this.createVirtualListModel(this.setFilterParams)}createVirtualListModel(t){let o;t.suppressSelectAll?o=new vD(this.valueModel):o=new wD(this.valueModel,()=>this.isSelectAllSelected()),t.treeList&&(o=new bD(o)),this.virtualList.setModel(o)}getSelectAllLabel(){const t=this.valueModel.getMiniFilter()==null||!this.setFilterParams.excelMode?"selectAll":"selectAllSearchResults";return this.translateForSetFilter(t)}getAddSelectionToFilterLabel(){return this.translateForSetFilter("addCurrentSelectionToFilter")}createSetListItem(t,o,i){const r=this.valueModel.hasGroups(),{isSelected:s,isExpanded:n}=this.isSelectedExpanded(t),{value:a,depth:l,isGroup:d,hasIndeterminateExpandState:c,selectedListener:u,expandedListener:g}=this.newSetListItemAttributes(t),p={focusWrapper:i,value:a,params:this.setFilterParams,translate:m=>this.translateForSetFilter(m),valueFormatter:this.valueFormatter,item:t,isSelected:s,isTree:o,depth:l,groupsExist:r,isGroup:d,isExpanded:n,hasIndeterminateExpandState:c},f=this.createBean(new hD(p));return f.addEventListener("selectionChanged",u),g&&f.addEventListener("expandedChanged",g),f}newSetTreeItemAttributes(t){const o=this.valueModel.hasGroups();return t.key===Ko?{value:()=>this.getSelectAllLabel(),isGroup:o,depth:t.depth,hasIndeterminateExpandState:!0,selectedListener:i=>this.onSelectAll(i.isSelected),expandedListener:i=>this.onExpandAll(i.item,i.isExpanded)}:t.key===Yo?{value:()=>this.getAddSelectionToFilterLabel(),depth:t.depth,isGroup:!1,hasIndeterminateExpandState:!1,selectedListener:i=>{this.onAddCurrentSelectionToFilterChange(i.isSelected)}}:t.children?{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,isGroup:!0,selectedListener:i=>this.onGroupItemSelected(i.item,i.isSelected),expandedListener:i=>this.onExpandedChanged(i.item,i.isExpanded)}:{value:this.setFilterParams.treeListFormatter?.(t.treeKey,t.depth,t.parentTreeKeys)??t.treeKey,depth:t.depth,selectedListener:i=>this.onItemSelected(i.item.key,i.isSelected)}}newSetListItemAttributes(t){return this.isSetFilterModelTreeItem(t)?this.newSetTreeItemAttributes(t):t===Ko?{value:()=>this.getSelectAllLabel(),selectedListener:o=>this.onSelectAll(o.isSelected)}:t===Yo?{value:()=>this.getAddSelectionToFilterLabel(),selectedListener:o=>{this.onAddCurrentSelectionToFilterChange(o.isSelected)}}:{value:this.valueModel.getValue(t),selectedListener:o=>this.onItemSelected(o.item,o.isSelected)}}updateSetListItem(t,o){const{isSelected:i,isExpanded:r}=this.isSelectedExpanded(t);o.refresh(t,i,r)}isSelectedExpanded(t){let o,i;return this.isSetFilterModelTreeItem(t)?(i=t.expanded,t.key===Ko?o=this.isSelectAllSelected():t.key===Yo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():t.children?o=this.areAllChildrenSelected(t):o=this.valueModel.isKeySelected(t.key)):t===Ko?o=this.isSelectAllSelected():t===Yo?o=this.valueModel.isAddCurrentSelectionToFilterChecked():o=this.valueModel.isKeySelected(t),{isSelected:o,isExpanded:i}}isSetFilterModelTreeItem(t){return t?.treeKey!==void 0}initMiniFilter(){const{eMiniFilter:t}=this,o=this.getLocaleTextFunc();t.setDisplayed(!this.setFilterParams.suppressMiniFilter),t.setValue(this.valueModel.getMiniFilter()),t.onValueChange(()=>this.onMiniFilterInput()),t.setInputAriaLabel(o("ariaSearchFilterValues","Search filter values")),this.addManagedElementListeners(t.getInputElement(),{keydown:i=>this.onMiniFilterKeyDown(i)})}updateMiniFilter(){const{eMiniFilter:t}=this;t.isDisplayed()!==!this.setFilterParams.suppressMiniFilter&&t.setDisplayed(!this.setFilterParams.suppressMiniFilter);const o=this.valueModel.getMiniFilter();t.getValue()!==o&&t.setValue(o)}afterGuiAttached(t){super.afterGuiAttached(t),this.resetExpansion(),this.refreshVirtualList();const{eMiniFilter:o}=this;o.setInputPlaceholder(this.translateForSetFilter("searchOoo")),(!t||!t.suppressFocus)&&(o.isDisplayed()?o.getFocusableElement().focus():this.virtualList.awaitStable(()=>this.virtualList.focusRow(0)))}afterGuiDetached(){super.afterGuiDetached(),this.setFilterParams.excelMode&&this.resetMiniFilter();const t=this.getModel();(this.setFilterParams.excelMode||!this.areModelsEqual(t,this.getModelFromUi()))&&(this.resetUiToActiveModel(t),this.showOrHideResults())}applyModel(t="api"){this.setFilterParams.excelMode&&t!=="rowDataUpdated"&&this.valueModel.isEverythingVisibleSelected()&&this.valueModel.selectAllMatchingMiniFilter();const o=this.valueModel.showAddCurrentSelectionToFilter()&&this.valueModel.isAddCurrentSelectionToFilterChecked();if(o&&!this.getModel())return!1;const i=super.applyModel(t),r=this.getModel();return r?(o||this.valueModel.setAppliedModelKeys(new Set),r.values.forEach(s=>{this.valueModel.addToAppliedModelKeys(s)})):o||this.valueModel.setAppliedModelKeys(null),i}isModelValid(t){return this.setFilterParams.excelMode?t==null||t.values.length>0:!0}doesFilterPass(t){if(!this.valueModel.getCaseFormattedAppliedModelKeys())return!0;if(!this.valueModel.hasAnyAppliedModelKey())return!1;const{node:o}=t;if(this.treeDataTreeList)return this.doesFilterPassForTreeData(o);if(this.groupingTreeList)return this.doesFilterPassForGrouping(o);const i=this.getValueFromNode(o);return i!=null&&Array.isArray(i)?i.length===0?this.valueModel.hasAppliedModelKey(null):i.some(r=>this.isInAppliedModel(this.createKey(r,o))):this.isInAppliedModel(this.createKey(i,o))}doesFilterPassForTreeData(t){return t.childrenAfterGroup?.length?!1:this.isInAppliedModel(this.createKey(Ha(t.getRoute()??[t.key??t.id],!0,this.gos.get("groupAllowUnbalanced"))))}doesFilterPassForGrouping(t){const o=(this.rowGroupColsSvc?.columns??[]).map(i=>this.valueSvc.getKeyForNode(i,t));return o.push(this.getValueFromNode(t)),this.isInAppliedModel(this.createKey(Ha(o,!1,this.gos.get("groupAllowUnbalanced"))))}isInAppliedModel(t){return this.valueModel.hasAppliedModelKey(t)}getValueFromNode(t){return this.setFilterParams.getValue(t)}getKeyCreatorParams(t,o=null){const{colDef:i,column:r,api:s,context:n}=this.setFilterParams;return{value:t,colDef:i,column:r,node:o,data:o?.data,api:s,context:n}}onNewRowsLoaded(){this.isValuesTakenFromGrid()&&this.syncAfterDataChange()}isValuesTakenFromGrid(){return this.valueModel.getValuesType()===2}setFilterValues(t){this.valueModel.overrideValues(t).then(()=>{this.isAlive()&&(this.checkAndRefreshVirtualList(),this.onUiChanged())})}resetFilterValues(){this.valueModel.setValuesType(2),this.syncAfterDataChange()}refreshFilterValues(){this.valueModel.isInitialised()&&this.valueModel.refreshValues().then(()=>{this.isAlive()&&(this.hardRefreshVirtualList=!0,this.checkAndRefreshVirtualList(),this.onUiChanged())})}onAnyFilterChanged(){setTimeout(()=>{this.isAlive()&&this.valueModel.refreshAfterAnyFilterChanged().then(t=>{t&&this.isAlive()&&(this.checkAndRefreshVirtualList(),this.showOrHideResults())})},0)}onMiniFilterInput(){if(!this.valueModel.setMiniFilter(this.eMiniFilter.getValue()))return;const{applyMiniFilterWhileTyping:t,readOnly:o}=this.setFilterParams;!o&&t?this.filterOnAllVisibleValues(!1):this.updateUiAfterMiniFilterChange()}updateUiAfterMiniFilterChange(){const{excelMode:t,readOnly:o}=this.setFilterParams;t==null||o?this.checkAndRefreshVirtualList():this.valueModel.getMiniFilter()==null?this.resetUiToActiveModel(this.getModel()):(this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged()),this.showOrHideResults()}showOrHideResults(){const t=this.valueModel.getMiniFilter()!=null&&this.valueModel.getDisplayedValueCount()<1;ge(this.eFilterNoMatches,t),ge(this.eSetFilterList,!t)}resetMiniFilter(){this.eMiniFilter.setValue(null,!0),this.valueModel.setMiniFilter(null)}resetUiToActiveModel(t,o){this.setModelAndRefresh(t==null?null:t.values).then(()=>{this.isAlive()&&(this.onUiChanged(!1,"prevent"),o?.())})}handleCancelEnd(t){this.setMiniFilter(null),super.handleCancelEnd(t)}onMiniFilterKeyDown(t){const{excelMode:o,readOnly:i}=this.setFilterParams;t.key===D.ENTER&&!o&&!i&&this.filterOnAllVisibleValues()}filterOnAllVisibleValues(t=!0){this.valueModel.selectAllMatchingMiniFilter(!0),this.checkAndRefreshVirtualList(),this.onUiChanged(!1,t?"immediately":"debounce"),this.showOrHideResults()}focusRowIfAlive(t){return t==null?Promise.resolve():new Promise(o=>{window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t),o()},0)})}onSelectAll(t){t?this.valueModel.selectAllMatchingMiniFilter():this.valueModel.deselectAllMatchingMiniFilter(),this.refreshAfterSelection()}onGroupItemSelected(t,o){const i=r=>{r.filterPasses&&(r.children?r.children.forEach(s=>i(s)):this.selectItem(r.key,o))};i(t),this.refreshAfterSelection()}onItemSelected(t,o){this.selectItem(t,o),this.refreshAfterSelection()}selectItem(t,o){o?this.valueModel.selectKey(t):this.valueModel.deselectKey(t)}onExpandAll(t,o){const i=r=>{r.filterPasses&&r.available&&r.children&&(r.children.forEach(s=>i(s)),r.expanded=o)};i(t),this.refreshAfterExpansion()}onExpandedChanged(t,o){t.expanded=o,this.refreshAfterExpansion()}refreshAfterExpansion(){const t=this.virtualList.getLastFocusedRow();this.valueModel.updateDisplayedValues("expansion"),this.checkAndRefreshVirtualList(),this.focusRowIfAlive(t)}refreshAfterSelection(){const t=this.virtualList.getLastFocusedRow();this.checkAndRefreshVirtualList(),this.onUiChanged(),this.focusRowIfAlive(t)}setMiniFilter(t){this.eMiniFilter.setValue(t),this.onMiniFilterInput()}getMiniFilter(){return this.valueModel.getMiniFilter()}checkAndRefreshVirtualList(){this.virtualList.refresh(!this.hardRefreshVirtualList),this.hardRefreshVirtualList&&(this.hardRefreshVirtualList=!1)}getFilterKeys(){return this.valueModel.getKeys()}getFilterValues(){return this.valueModel.getValues()}getValues(){return this.getFilterKeys()}refreshVirtualList(){this.setFilterParams.refreshValuesOnOpen?this.refreshFilterValues():this.checkAndRefreshVirtualList()}translateForSetFilter(t){return this.getLocaleTextFunc()(t,dD[t])}isSelectAllSelected(){if(this.setFilterParams.defaultToNothingSelected){if(this.valueModel.hasSelections()&&this.valueModel.isEverythingVisibleSelected())return!0;if(this.valueModel.isNothingVisibleSelected())return!1}else{if(this.valueModel.hasSelections()&&this.valueModel.isNothingVisibleSelected())return!1;if(this.valueModel.isEverythingVisibleSelected())return!0}}areAllChildrenSelected(t){const o=i=>{if(i.children){let r=!1,s=!1;return i.children.some(a=>{if(!a.filterPasses||!a.available)return!1;const l=o(a);return l===void 0?!0:(l?r=!0:s=!0,r&&s)})?void 0:r}else return this.valueModel.isKeySelected(i.key)};return this.setFilterParams.defaultToNothingSelected?this.valueModel.hasSelections()&&o(t):o(t)}destroy(){this.virtualList=this.destroyBean(this.virtualList),super.destroy()}caseFormat(t){return t==null||typeof t!="string"||this.caseSensitive?t:t.toUpperCase()}resetExpansion(){if(!this.setFilterParams.treeList)return;const t=this.valueModel.getSelectAllItem();if(this.isSetFilterModelTreeItem(t)){const o=i=>{i.children&&(i.children.forEach(r=>o(r)),i.expanded=!1)};o(t),this.valueModel.updateDisplayedValues("expansion")}}getModelAsString(t){return this.filterModelFormatter.getModelAsString(t,this)}getPositionableElement(){return this.eSetFilterList}},vD=class{constructor(e){this.model=e}getRowCount(){return this.model.getDisplayedValueCount()}getRow(e){return this.model.getDisplayedItem(e)}areRowsEqual(e,t){return e===t}},wD=class{constructor(e,t){this.model=e,this.isSelectAllSelected=t}getRowCount(){const t=this.model.showAddCurrentSelectionToFilter()?2:1;return this.model.getDisplayedValueCount()+t}getRow(e){if(e===0)return this.model.getSelectAllItem();const t=this.model.showAddCurrentSelectionToFilter(),o=t?2:1;return e===1&&t?this.model.getAddSelectionToFilterItem():this.model.getDisplayedItem(e-o)}areRowsEqual(e,t){return e===t}},bD=class{constructor(e){this.model=e}getRowCount(){return this.model.getRowCount()}getRow(e){return this.model.getRow(e)}areRowsEqual(e,t){return e==null&&t==null?!0:e!=null&&t!=null&&e.treeKey===t.treeKey&&e.depth===t.depth}},yD={tag:"div",cls:"ag-floating-filter-input ag-set-floating-filter-input",role:"presentation",children:[{tag:"ag-input-text-field",ref:"eFloatingFilterText"}]},SD=class extends pe{constructor(){super(yD,[ua]),this.eFloatingFilterText=V,this.availableValuesListenerAdded=!1,this.filterModelFormatter=new dh}wireBeans(e){this.colNames=e.colNames}init(e){this.params=e,this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams(e)}setParams(e){const t=this.colNames.getDisplayNameForColumn(e.column,"header",!0),o=this.getLocaleTextFunc();this.eFloatingFilterText.setInputAriaLabel(`${t} ${o("ariaFilterInput","Filter Input")}`)}refresh(e){this.params=e,this.setParams(e)}onParentModelChanged(e){this.updateFloatingFilterText(e)}parentSetFilterInstance(e){this.params.parentFilterInstance(t=>{if(!(t instanceof uh)){ce(248);return}e(t)})}addAvailableValuesListener(){this.parentSetFilterInstance(e=>{const t=e.getValueModel();t&&this.addManagedListeners(t,{availableValuesChanged:()=>this.updateFloatingFilterText()})}),this.availableValuesListenerAdded=!0}updateFloatingFilterText(e){this.availableValuesListenerAdded||this.addAvailableValuesListener(),this.parentSetFilterInstance(t=>{this.eFloatingFilterText.setValue(this.filterModelFormatter.getModelAsString(e,t))})}},RD={moduleName:"SetFilter",version:ze,userComponents:{agSetColumnFilter:uh,agSetColumnFloatingFilter:SD},icons:{setFilterGroupClosed:"tree-closed",setFilterGroupOpen:"tree-open",setFilterGroupIndeterminate:"tree-indeterminate",setFilterLoading:"loading"},dependsOn:[Ft,lR]},xD=class extends E{constructor(){super(...arguments),this.beanName="aggColNameSvc"}getHeaderName(e,t){if(this.gos.get("suppressAggFuncInHeader"))return t;const{valueColsSvc:o,colModel:i,rowGroupColsSvc:r}=this.beans,s=e.getColDef().pivotValueColumn,n=q(s);let a=null,l;if(n){const d=o?.columns??[],c=this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&d.length===1,u=e.getColDef().pivotTotalColumnIds!==void 0;if(c&&!u)return t;a=s?s.getAggFunc():null,l=!0}else{const d=e.isValueActive(),c=i.isPivotMode()||r?.columns.length!==0;d&&c?(a=e.getAggFunc(),l=!0):l=!1}if(l){const d=typeof a=="string"?a:"func";return`${this.getLocaleTextFunc()(d,d)}(${t})`}return t}},FD={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},DD=class extends E{constructor(){super(...arguments),this.beanName="aggFuncSvc",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const e=this.aggFuncsMap;e.sum=kD,e.first=MD,e.last=PD,e.min=ED,e.max=AD,e.count=TD,e.avg=ID,this.initialised=!0}isAggFuncPossible(e,t){const i=this.getFuncNames(e).includes(t),r=q(this.aggFuncsMap[t]);return i&&r}getDefaultFuncLabel(e){return FD[e]??e}getDefaultAggFunc(e){const t=e.getColDef().defaultAggFunc;if(q(t)&&this.isAggFuncPossible(e,t))return t;if(this.isAggFuncPossible(e,"sum"))return"sum";const o=this.getFuncNames(e);return o?.length?o[0]:null}addAggFuncs(e){if(this.init(),!!e)for(const t of Object.keys(e))this.aggFuncsMap[t]=e[t]}getAggFunc(e){return this.init(),this.aggFuncsMap[e]}getFuncNames(e){const t=e.getColDef().allowedAggFuncs;return t??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function kD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const r=t[i];typeof r=="number"?o===null?o=r:o+=typeof o=="number"?r:BigInt(r):typeof r=="bigint"&&(o===null?o=r:o=(typeof o=="bigint"?o:BigInt(o))+r)}return o}function MD(e){return e.values.length>0?e.values[0]:null}function PD(e){return e.values.length>0?Ce(e.values):null}function ED(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const r=t[i];(typeof r=="number"||typeof r=="bigint")&&(o===null||o>r)&&(o=r)}return o}function AD(e){const{values:t}=e;let o=null;for(let i=0;i<t.length;i++){const r=t[i];(typeof r=="number"||typeof r=="bigint")&&(o===null||o<r)&&(o=r)}return o}function TD(e){const{values:t}=e;let o=0;for(let r=0;r<t.length;r++){const s=t[r];o+=s!=null&&typeof s.value=="number"?s.value:1}const i=e.rowNode?.aggData?.[e.column.getColId()];return i&&i.value===o?i:{value:o,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function ID(e){const{values:t}=e;let o=0,i=0;for(let n=0;n<t.length;n++){const a=t[n];let l=null;typeof a=="number"||typeof a=="bigint"?(l=a,i++):a!=null&&(typeof a.value=="number"||typeof a.value=="bigint")&&typeof a.count=="number"&&(l=a.value*(typeof a.value=="number"?a.count:BigInt(a.count)),i+=a.count),typeof l=="number"?o+=typeof o=="number"?l:BigInt(l):typeof l=="bigint"&&(o=(typeof o=="bigint"?o:BigInt(o))+l)}let r=null;i>0&&(r=o/(typeof o=="number"?i:BigInt(i)));const s=e.rowNode?.aggData?.[e.column?.getColId()];return s&&s.count===i&&s.value===r?s:{count:i,value:r,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}function LD(e,t){e.aggFuncSvc&&e.aggFuncSvc.addAggFuncs(t)}function GD(e){e.aggFuncSvc&&e.aggFuncSvc.clear()}function BD(e,t,o){e.valueColsSvc?.setColumnAggFunc?.(t,o,"api")}function Va(e,t,o,i,r,s){const n=typeof o=="string"?e.aggFuncSvc.getAggFunc(o):o;if(typeof n!="function")return ce(109,{aggFuncOrString:o}),null;const a=Z(e.gos,{values:t,column:i,colDef:i.colDef,pivotResultColumn:s,rowNode:r,data:r?.data});return n(a)}var OD=class extends E{constructor(){super(...arguments),this.beanName="aggStage",this.refreshProps=new Set(["getGroupRowAgg","alwaysAggregateAtRootLevel","suppressAggFilteredOnly","grandTotalRow"]),this.step="aggregate"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.pivotResultCols=e.pivotResultCols,this.valueSvc=e.valueSvc}execute(e){const t=!this.valueColsSvc?.columns?.length,o=!this.gos.getCallback("getGroupRowAgg");if(t&&o&&e.changedPath?.active)return;const i=this.createAggDetails(e);this.recursivelyCreateAggData(i)}createAggDetails(e){const t=this.colModel.isPivotActive(),o=this.valueColsSvc?.columns,i=t&&this.pivotColsSvc?this.pivotColsSvc.columns:[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!Tn(this.gos),changedPath:e.changedPath,valueColumns:o??[],pivotColumns:i,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return Vi(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(e){const t=o=>{if(!o.hasChildren()){o.aggData&&this.setAggData(o,null);return}if(o.level===-1&&!e.groupIncludeTotalFooter){const s=!this.colModel.isPivotMode();if(!e.alwaysAggregateAtRootLevel&&s){this.setAggData(o,null);return}}this.aggregateRowNode(o,e)};e.changedPath.forEachChangedNodeDepthFirst(t,!0)}aggregateRowNode(e,t){const o=t.valueColumns.length===0,i=t.pivotColumns.length===0;let r;t.userAggFunc?r=t.userAggFunc({nodes:e.childrenAfterFilter}):o?r=null:i?r=this.aggregateRowNodeUsingValuesOnly(e,t):r=this.aggregateRowNodeUsingValuesAndPivot(e),this.setAggData(e,r),e.sibling&&this.setAggData(e.sibling,r)}aggregateRowNodeUsingValuesAndPivot(e){const t={},o=this.pivotResultCols?.getPivotResultCols()?.list??[];let i=!0;const r=this.beans;for(let s=0;s<o.length;s++){const n=o[s],a=n.getColDef();if(a.pivotTotalColumnIds!=null){i=!1;continue}const l=a.pivotKeys??[];let d;e.leafGroup?d=this.getValuesFromMappedSet(e.childrenMapped,l,a.pivotValueColumn):d=this.getValuesPivotNonLeaf(e,a.colId),t[a.colId]=Va(r,d,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,n)}if(!i)for(let s=0;s<o.length;s++){const n=o[s],a=n.getColDef();if(a.pivotTotalColumnIds==null||!a.pivotTotalColumnIds.length)continue;const l=a.pivotTotalColumnIds.map(d=>t[d]);t[a.colId]=Va(r,l,a.pivotValueColumn.getAggFunc(),a.pivotValueColumn,e,n)}return t}aggregateRowNodeUsingValuesOnly(e,t){const o={},{changedPath:i,valueColumns:r,filteredOnly:s}=t,n=i.active?i.getValueColumnsForNode(e,r):r,a=i.active?i.getNotValueColumnsForNode(e,r):null,l=this.getValuesNormal(e,n,s),d=e.aggData,c=this.beans;return n.forEach((u,g)=>{o[u.getId()]=Va(c,l[g],u.getAggFunc(),u,e)}),a&&d&&a.forEach(u=>{o[u.getId()]=d[u.getId()]}),o}getValuesPivotNonLeaf(e,t){return e.childrenAfterFilter.map(o=>o.aggData[t])}getValuesFromMappedSet(e,t,o){let i=e;for(let r=0;r<t.length;r++){const s=t[r];i=i?i[s]:null}return i?i.map(r=>this.valueSvc.getValue(o,r)):[]}getValuesNormal(e,t,o){const i=[];t.forEach(()=>i.push([]));const r=t.length,s=o?e.childrenAfterFilter:e.childrenAfterGroup,n=s.length;for(let a=0;a<n;a++){const l=s[a];for(let d=0;d<r;d++){const c=t[d],u=this.valueSvc.getValue(c,l);i[d].push(u)}}return i}setAggData(e,t){const o=e.aggData;if(e.aggData=t,e.__localEventService){const i=r=>{const s=e.aggData?e.aggData[r]:void 0,n=o?o[r]:void 0;if(s===n)return;const a=this.colModel.getCol(r);a&&e.dispatchCellChangedEvent(a,s,n)};if(o)for(const r of Object.keys(o))i(r);if(t)for(const r of Object.keys(t))(!o||!(r in o))&&i(r)}}},ND=class extends E{constructor(){super(...arguments),this.beanName="filterAggStage",this.refreshProps=new Set([]),this.step="filter_aggregates"}wireBeans(e){this.filterManager=e.filterManager}execute(e){const t=this.beans.colModel.isPivotMode(),o=this.filterManager?.isAggregateFilterPresent()||this.filterManager?.isAggregateQuickFilterPresent(),i=d=>!d.node.group,r=d=>d.node.leafGroup,s=Vi(this.gos)||(t?r:i),{changedPath:n}=e,a=(d,c=!1)=>{d.childrenAfterFilter&&(d.childrenAfterAggFilter=d.childrenAfterFilter,c&&d.childrenAfterAggFilter.forEach(u=>a(u,c)),this.setAllChildrenCount(d)),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)},l=d=>{d.childrenAfterAggFilter=d.childrenAfterFilter?.filter(c=>s({node:c})&&this.filterManager.doesRowPassAggregateFilters({rowNode:c})?(a(c,!0),!0):c.childrenAfterAggFilter?.length)||null,this.setAllChildrenCount(d),d.sibling&&(d.sibling.childrenAfterAggFilter=d.childrenAfterAggFilter)};n.forEachChangedNodeDepthFirst(o?l:a,!0)}setAllChildrenCountTreeData(e){const t=e.childrenAfterAggFilter;let o=0;if(t){const i=t.length;o=i;for(let r=0;r<i;++r)o+=t[r].allChildrenCount??0}e.setAllChildrenCount(o===0&&e.level>=0?null:o)}setAllChildrenCountGridGrouping(e){let t=0;e.childrenAfterAggFilter.forEach(o=>{o.group?t+=o.allChildrenCount:t++}),e.setAllChildrenCount(t)}setAllChildrenCount(e){if(!e.hasChildren()){e.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(e):this.setAllChildrenCountGridGrouping(e)}},HD=new Set(["__localEventService","__objectId","sticky","__autoHeights","__checkAutoHeightsDebounced"]);function ao(e,t){if(e.sibling)return;const o=new Wo(t);Object.keys(e).forEach(i=>{HD.has(i)||(o[i]=e[i])}),o.footer=!0,o.setRowTop(null),o.setRowIndex(null),o.oldRowTop=null,o.id="rowGroupFooter_"+e.id,o.sibling=e,e.sibling=o}function _a(e){e.sibling&&(e.sibling.setRowTop(null),e.sibling.setRowIndex(null),e.sibling=void 0)}var VD=class extends E{constructor(){super(...arguments),this.beanName="footerSvc"}addTotalRows(e,t,o,i,r,s){let n=e;if(r)return(i&&Tn(this.gos))===s&&(ao(t,this.beans),o(t.sibling,n++)),n;const a=di(this.gos);return(i&&a({node:t}))===s&&(ao(t,this.beans),o(t.sibling,n++)),n}getTopDisplayIndex(e,t,o,i){let r=t;if(e[0].footer){if(t===0)return 0;r-=1}const s=e[e.length-1],n=r>=o.length;return s.footer&&n?s.rowIndex:i(r)}getTotalValue(e){return this.getLocaleTextFunc()("footerTotal","Total")+" "+(e??"")}},hh=class extends Wn{constructor(){super(...arguments),this.beanName="valueColsSvc",this.eventName="columnValueChanged",this.columnProcessors={set:(e,t,o)=>this.setValueActive(t,e,o),add:(e,t,o)=>this.setValueActive(!0,e,o),remove:(e,t,o)=>this.setValueActive(!1,e,o)},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColValueActive(e,t,o),getIndexFunc:()=>{},getInitialIndexFunc:()=>{},getValueFunc:e=>{const t=e.aggFunc;if(t===null||t==="")return null;if(t!==void 0)return!!t},getInitialValueFunc:e=>e.initialAggFunc!=null&&e.initialAggFunc!=""},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>ot(this.columns,e)}}extractCols(e,t){return this.columns=super.extractCols(e,t),this.columns.forEach(o=>{const i=o.getColDef();i.aggFunc!=null&&i.aggFunc!=""?this.setColAggFunc(o,i.aggFunc):o.getAggFunc()||this.setColAggFunc(o,i.initialAggFunc)}),this.columns}setColumnAggFunc(e,t,o){if(!e)return;const i=this.colModel.getColDefCol(e);i&&(this.setColAggFunc(i,t),this.dispatchColumnChangedEvent(this.eventSvc,this.eventName,[i],o))}syncColumnWithState(e,t,o){const i=o("aggFunc").value1;i!==void 0&&(typeof i=="string"?(this.setColAggFunc(e,i),e.isValueActive()||(this.setColValueActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e))):(q(i)&&_(33),e.isValueActive()&&(this.setColValueActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e))))}setValueActive(e,t,o){if(e!==t.isValueActive()&&(this.setColValueActive(t,e,o),e&&!t.getAggFunc()&&this.aggFuncSvc)){const i=this.aggFuncSvc.getDefaultAggFunc(t);this.setColAggFunc(t,i)}}setColAggFunc(e,t){e.aggFunc=t,e.dispatchStateUpdatedEvent("aggFunc")}setColValueActive(e,t,o){e.aggregationActive!==t&&(e.aggregationActive=t,e.dispatchColEvent("columnValueChanged",o))}},za={moduleName:"SharedAggregation",version:ze,beans:[DD,xD,VD,hh],apiFunctions:{addAggFuncs:LD,clearAggFuncs:GD,setColumnAggFunc:BD},dependsOn:[Ft]},_D={moduleName:"Aggregation",version:ze,beans:[OD,ND],rowModels:["clientSide"],dependsOn:[za]},gh=class extends Wn{constructor(){super(...arguments),this.beanName="pivotColsSvc",this.eventName="columnPivotChanged",this.columnProcessors={set:(e,t,o)=>this.setColPivotActive(e,t,o),add:(e,t,o)=>this.setColPivotActive(e,!0,o),remove:(e,t,o)=>this.setColPivotActive(e,!1,o)},this.columnOrdering={enableProp:"pivot",initialEnableProp:"initialPivot",indexProp:"pivotIndex",initialIndexProp:"initialPivotIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColPivotActive(e,t,o),getIndexFunc:e=>e.pivotIndex,getInitialIndexFunc:e=>e.initialPivotIndex,getValueFunc:e=>e.pivot,getInitialValueFunc:e=>e.initialPivot},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>ot(this.columns,e)}}syncColumnWithState(e,t,o,i){const{value1:r,value2:s}=o("pivot","pivotIndex");(r!==void 0||s!==void 0)&&(typeof s=="number"||r?(e.isPivotActive()||(this.setColPivotActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof s=="number"&&(i[e.getId()]=s)):e.isPivotActive()&&(this.setColPivotActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setColPivotActive(e,t,o){e.pivotActive!==t&&(e.pivotActive=t,e.dispatchColEvent("columnPivotChanged",o)),e.dispatchStateUpdatedEvent("pivot")}},zD=class extends Wn{constructor(){super(...arguments),this.beanName="rowGroupColsSvc",this.eventName="columnRowGroupChanged",this.columnProcessors={set:(e,t,o)=>this.setActive(t,e,o),add:(e,t,o)=>this.setActive(!0,e,o),remove:(e,t,o)=>this.setActive(!1,e,o)},this.columnOrdering={enableProp:"rowGroup",initialEnableProp:"initialRowGroup",indexProp:"rowGroupIndex",initialIndexProp:"initialRowGroupIndex"},this.columnExtractors={setFlagFunc:(e,t,o)=>this.setColRowGroupActive(e,t,o),getIndexFunc:e=>e.rowGroupIndex,getInitialIndexFunc:e=>e.initialRowGroupIndex,getValueFunc:e=>e.rowGroup,getInitialValueFunc:e=>e.initialRowGroup},this.modifyColumnsNoEventsCallbacks={addCol:e=>this.columns.push(e),removeCol:e=>ot(this.columns,e)}}moveColumn(e,t,o){if(this.columns.length===0)return;const i=this.columns[e],r=this.columns.slice(e,t);this.columns.splice(e,1),this.columns.splice(t,0,i),this.updateIndexMap(),this.eventSvc.dispatchEvent({type:this.eventName,columns:r,column:r.length===1?r[0]:null,source:o})}syncColumnWithState(e,t,o,i){const{value1:r,value2:s}=o("rowGroup","rowGroupIndex");(r!==void 0||s!==void 0)&&(typeof s=="number"||r?(e.isRowGroupActive()||(this.setColRowGroupActive(e,!0,t),this.modifyColumnsNoEventsCallbacks.addCol(e)),i&&typeof s=="number"&&(i[e.getId()]=s)):e.isRowGroupActive()&&(this.setColRowGroupActive(e,!1,t),this.modifyColumnsNoEventsCallbacks.removeCol(e)))}setActive(e,t,o){e!==t.isRowGroupActive()&&(this.setColRowGroupActive(t,e,o),Np(this.gos,e)&&this.colModel.setColsVisible([t],!e,o))}setColRowGroupActive(e,t,o){e.rowGroupActive!==t&&(e.rowGroupActive=t,e.dispatchColEvent("columnRowGroupChanged",o)),e.dispatchStateUpdatedEvent("rowGroup")}},WD=class extends E{constructor(){super(...arguments),this.beanName="autoColSvc"}postConstruct(){this.addManagedPropertyListener("autoGroupColumnDef",this.updateColumns.bind(this))}addColumns(e){this.columns!=null&&(e.list=this.columns.list.concat(e.list),e.tree=this.columns.tree.concat(e.tree),Ed(e))}createColumns(e,t){const o=this.beans,{colModel:i,gos:r,rowGroupColsSvc:s,colGroupSvc:n}=o,a=i.isPivotMode(),l=_r(r,a),d=a?r.get("pivotSuppressAutoColumn"):this.isSuppressAutoCol(),c=s?.columns,g=!(c&&c.length>0||r.get("treeData"))||d||l,p=()=>{this.columns&&(wo(o,this.columns.tree),this.columns=null)};if(g){p();return}const f=this.generateAutoCols(c),m=Pd(f,this.columns?.list||null),C=e.treeDepth,y=(this.columns?this.columns.treeDepth:-1)==C;if(m&&y)return;p();const b=n?.findDepth(e.tree)??0,x=n?.balanceTreeForAutoCols(f,b)??[];this.columns={list:f,tree:x,treeDepth:b,map:{}},t(P=>{if(!P)return null;const k=P.filter(S=>!jr(S));return[...f,...k]})}updateColumns(e){const t=Ho(e.source);this.columns?.list.forEach((o,i)=>this.updateOneAutoCol(o,i,t))}getColumn(e){return this.columns?.list.find(t=>zn(t,e))??null}getColumns(){return this.columns?.list??null}generateAutoCols(e=[]){const t=[],o=this.gos.get("treeData");let i=In(this.gos);return o&&i&&(_(182),i=!1),i?e.forEach((r,s)=>{t.push(this.createOneAutoCol(r,s))}):t.push(this.createOneAutoCol()),t}isSuppressAutoCol(){const e=this.gos;return e.get("groupDisplayType")==="custom"?!0:e.get("treeDataDisplayType")==="custom"}createOneAutoCol(e,t){let o;e?o=`${No}-${e.getId()}`:o=No;const i=this.createAutoColDef(o,e,t);i.colId=o;const r=new $r(i,null,o,!0);return this.createBean(r),r}updateOneAutoCol(e,t,o){const i=e.getColDef(),r=typeof i.showRowGroup=="string"?i.showRowGroup:void 0,s=this.beans,n=r!=null?s.colModel.getColDefCol(r):void 0,a=e.getId(),l=this.createAutoColDef(a,n??void 0,t);e.setColDef(l,null,o),it(s,{state:[{colId:a,...l}]},o)}createAutoColDef(e,t,o){let i=this.createBaseColDef(t);const r=this.gos.get("autoGroupColumnDef");Ye(i,r),i=Yr(this.beans,i,e,!0),this.gos.get("treeData")||De(i.field)&&De(i.valueGetter)&&De(i.filterValueGetter)&&i.filter!=="agGroupColumnFilter"&&(i.filter=!1),o&&o>0&&(i.headerCheckboxSelection=!1);const s=At(this.gos),n=i.valueGetter||i.field!=null;return s&&!n&&(i.sortIndex=void 0,i.initialSort=void 0),i}createBaseColDef(e){const t=this.gos.get("autoGroupColumnDef"),i={headerName:this.getLocaleTextFunc()("group","Group"),showRowGroup:e?.getColId()??!0};return t&&(t.cellRenderer||t.cellRendererSelector)||(i.cellRenderer="agGroupCellRenderer",this.beans.findSvc?.setupGroupCol(i)),e&&(i.headerName=this.beans.colNames.getDisplayNameForColumn(e,"header")??void 0,i.headerValueGetter=e.colDef.headerValueGetter),i}destroy(){wo(this.beans,this.columns?.tree),super.destroy()}},ph=class extends E{addExpandedCss(e,t){t.isExpandable()&&(e.push("ag-row-group"),e.push(t.expanded?"ag-row-group-expanded":"ag-row-group-contracted"))}getRowExpandedListeners(e){const{rowNode:t}=e,o=this.updateExpandedCss.bind(this,e,t);return{expandedChanged:o,hasChildrenChanged:o}}setExpanded(e,t,o,i){if(e.expanded===t)return;e.expanded=t,e.dispatchRowEvent("expandedChanged");const r={...cc(e,this.gos,"rowGroupOpened"),expanded:t,event:o||null};this.dispatchExpandedEvent(r,i),this.beans.rowRenderer.refreshCells({rowNodes:[e]})}isExpandable(e){return e.footer?!1:this.beans.colModel.isPivotMode()?e.hasChildren()&&!e.leafGroup:e.hasChildren()||e.master}updateExpandedCss(e,t){const o=t.isExpandable(),i=t.expanded==!0;e.forEachGui(void 0,r=>{const s=r.rowComp;s.addOrRemoveCssClass("ag-row-group",o),s.addOrRemoveCssClass("ag-row-group-expanded",o&&i),s.addOrRemoveCssClass("ag-row-group-contracted",o&&!i),to(r.element,o&&i)})}},$D=class extends ph{constructor(){super(...arguments),this.beanName="expansionSvc",this.events=[]}wireBeans(e){this.rowModel=e.rowModel}expandRows(e){const t=new Set(e);this.rowModel.forEachNode(o=>{o.id&&t.has(o.id)&&(o.expanded=!0)}),this.onGroupExpandedOrCollapsed()}expandAll(e){const{gos:t,colModel:o,eventSvc:i}=this.beans,r=this.rowModel,s=t.get("treeData"),n=o.isPivotActive(),a=d=>{d&&d.forEach(c=>{const u=()=>{c.expanded=e,a(c.childrenAfterGroup)};if(s){q(c.childrenAfterGroup)&&u();return}if(n){!c.leafGroup&&u();return}c.group&&u()})},l=r.rootNode;l&&a(l.childrenAfterGroup),r.refreshModel({step:"map"}),i.dispatchEvent({type:"expandOrCollapseAll",source:e?"expandAll":"collapseAll"})}onGroupExpandedOrCollapsed(){this.rowModel.refreshModel({step:"map"})}dispatchExpandedEvent(e,t){this.events.push(e);const o=()=>{this.rowModel.onRowGroupOpened(),this.events.forEach(i=>this.eventSvc.dispatchEvent(i)),this.events=[]};t?o():(this.dispatchExpandedDebounced==null&&(this.dispatchExpandedDebounced=this.debounce(o)),this.dispatchExpandedDebounced())}debounce(e){const t=this.beans.animationFrameSvc;if(!t)return()=>window.setTimeout(e,0);let o=!1;return()=>{if(!t.active){window.setTimeout(e,0);return}o||(o=!0,t.addDestroyTask(()=>{o=!1,e()}))}}};function UD(e){let t=e.get("groupHideParentOfSingleChild");return t||(t=e.get("groupRemoveSingleChildren"),!t&&e.get("groupRemoveLowestSingleChildren")&&(t="leafGroupsOnly")),{groupHideParentOfSingleChild:t,isGroupMultiAutoColumn:In(e),hideOpenParents:e.get("groupHideOpenParents"),grandTotalRow:Tn(e),groupTotalRow:di(e)}}function jD(e,t,o){return e.groupHideParentOfSingleChild===!0&&o&&t.childrenAfterGroup.length===1}function KD(e,t,o){return e.groupHideParentOfSingleChild==="leafGroupsOnly"&&o&&t.leafGroup&&t.childrenAfterGroup.length===1}function YD(e,t,o,i,r,s){const n=i&&!o,a=i&&t.leafGroup,l=e.hideOpenParents&&t.expanded&&!t.master&&!a;return!n&&!l&&!r&&!s}var qD=class extends E{constructor(){super(...arguments),this.beanName="flattenStage",this.refreshProps=new Set(["groupHideParentOfSingleChild","groupRemoveSingleChildren","groupRemoveLowestSingleChildren","groupTotalRow","masterDetail"]),this.step="map"}execute(e){const t=e.rowNode,o=[],i=this.beans.colModel.isPivotMode(),r=i&&t.leafGroup&&t.aggData,s=r?[t]:t.childrenAfterSort,n=UD(this.gos);this.recursivelyAddToRowsToDisplay(n,s,o,i,0);const a=o.length>0;if(!r&&a&&n.grandTotalRow){ao(t,this.beans);const d=n.grandTotalRow==="top";this.addRowNodeToRowsToDisplay(n,t.sibling,o,0,d)}return o}recursivelyAddToRowsToDisplay(e,t,o,i,r){if(t?.length)for(let s=0;s<t.length;s++){const n=t[s],a=n.hasChildren(),l=jD(e,n,a),d=KD(e,n,a);if(YD(e,n,a,i,l,d)&&this.addRowNodeToRowsToDisplay(e,n,o,r),!(i&&n.leafGroup))if(a){const u=l||d;if(n.expanded||u){const g=e.groupTotalRow({node:n});g||_a(n);const p=u?r:r+1;g==="top"&&(ao(n,this.beans),this.addRowNodeToRowsToDisplay(e,n.sibling,o,p)),this.recursivelyAddToRowsToDisplay(e,n.childrenAfterSort,o,i,p),g==="bottom"&&(ao(n,this.beans),this.addRowNodeToRowsToDisplay(e,n.sibling,o,p))}}else{const u=this.beans.masterDetailSvc?.getDetail(n);u&&this.addRowNodeToRowsToDisplay(e,u,o,r)}}}addRowNodeToRowsToDisplay(e,t,o,i,r){r?o.unshift(t):o.push(t),t.setUiLevel(e.isGroupMultiAutoColumn?0:i)}},XD=class extends E{constructor(){super(...arguments),this.beanName="groupStage",this.refreshProps=new Set(["groupDefaultExpanded","groupAllowUnbalanced","initialGroupOrderComparator","groupHideOpenParents","groupDisplayType","treeData","treeDataChildrenField","treeDataParentIdField"]),this.step="group",this.approach=null,this.strategy=void 0}destroy(){super.destroy(),this.strategy=void 0,this.approach=null}createStrategy(){const{beans:e,approach:t}=this;let o;switch(t){case"treeSelfRef":o="treeParentIdStrategy";break;case"group":o="groupStrategy";break}if(o){const i=e.registry.createDynamicBean(o,!1);return this.createOptionalManagedBean(i),i}}execute(e){let t=this.strategy;const o=wd(this.gos);return this.approach!==o&&(this.approach=o,this.destroyBean(t),t&&this.approach!=="treeNested"&&this.approach!=="treePath"&&QD(e.rowNode),t=this.createStrategy(),this.strategy=t),t?.execute(e),!!t}},QD=e=>{const t=e.allLeafChildren,o=e.sibling;e.treeNodeFlags=0,e.childrenAfterGroup=t,e.childrenMapped=null,e.groupData=null,o&&(o.childrenAfterGroup=e.childrenAfterGroup,o.childrenAfterAggFilter=e.childrenAfterAggFilter,o.childrenAfterFilter=e.childrenAfterFilter,o.childrenAfterSort=e.childrenAfterSort,o.childrenMapped=null,o.groupData=null);for(const i of t){const r=i.sibling;fh(i),r&&fh(r),i.parent=e,i.level=0,i.key=null,i.treeNodeFlags=0,(i.group||i.hasChildren())&&(i.group=!1,i.updateHasChildren())}e.updateHasChildren()},fh=e=>{e.allLeafChildren=null,e.childrenAfterGroup=null,e.childrenAfterAggFilter=null,e.childrenAfterFilter=null,e.childrenAfterSort=null,e.childrenMapped=null,e.groupData&&(e.groupData=null)};function Wa(e,t,o){let i=e;const r=i.level-t.level;if(r<=0||!o.get("groupHideOpenParents"))return!1;for(let n=0;n<r;n++){if(!(i.parent?.childrenAfterSort?.[0]===i))return!1;i=i.parent}return i===t}function mh(e,t,o,i){const r=o.key==="",s=!!o.rowGroupColumn&&(!e||e?.isRowGroupDisplayed(o.rowGroupColumn.getId()));if(r&&s){const n=Wa(t,o,i.gos);if(o===t||n)return ln(i.localeSvc)("blanks","(Blanks)")}return null}var Ch=class extends E{constructor(){super(...arguments),this.indentClass=null}init(e,t,o,i,r,s,n){this.params=n,this.eGui=t,this.eCheckbox=o,this.eExpanded=i,this.eContracted=r,this.comp=e,this.compClass=s;const{node:a,column:l}=n;if(this.node=a,this.displayedNode=a,!this.isEmbeddedRowMismatch()){if(a.footer){this.initFooterCell();return}if(!l){this.initFullWidthCell();return}this.displayedNode=this.beans.valueSvc.getDisplayedNode(a,l)??this.node,this.setupExpand(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}}initFooterCell(){const{node:e,column:t}=this.params,o=e.level===-1;!(e.rowGroupColumn&&t&&t.isRowGroupDisplayed(e.rowGroupColumn.getId()))&&!o||(this.addFooterValue(),this.setupIndent(),o||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!0))}initFullWidthCell(){const e=()=>{const{rowDragSvc:t}=this.beans;if(!this.params.rowDrag||!t)return;const o=t.createRowDragComp(()=>this.params.value,this.params.node);this.createManagedBean(o),this.eGui.insertAdjacentElement("afterbegin",o.getGui())};this.setupExpand(),e(),this.setupCheckbox(),this.addGroupValue(),this.setupIndent()}getCellAriaRole(){const e=this.params.colDef?.cellAriaRole,t=this.params.column?.getColDef().cellAriaRole;return e||t||"gridcell"}isEmbeddedRowMismatch(){if(!this.params.fullWidth||!this.gos.get("embedFullWidthRows"))return!1;const{visibleCols:e}=this.beans,t=this.params.pinned==="left",o=this.params.pinned==="right",i=!t&&!o;return this.gos.get("enableRtl")?e.isPinningLeft()?!o:!i:e.isPinningLeft()?!t:!i}addGroupValue(){const{params:{column:e,value:t},node:o,displayedNode:i,beans:r}=this,s=this.getFormattedValue()??mh(e,o,i,r),n=this.getInnerCompDetails(s);this.comp.setInnerRenderer(n,s??t??null)}getFormattedValue(){const{valueSvc:e}=this.beans,{value:t,valueFormatted:o,column:i}=this.params,{rowGroupColumn:r}=this.displayedNode;return!r||!i?o:i?.isRowGroupDisplayed(r.getId())?e.formatValue(r,this.node,t):null}addFooterValue(){const{expressionSvc:e,footerSvc:t}=this.beans,{totalValueGetter:o,column:i,node:r,value:s}=this.params,n=this.getFormattedValue()??mh(i,r,r,this.beans);let a="";o?typeof o=="function"?a=o({...this.params,valueFormatted:n}):typeof o=="string"?a=e?.evaluate(o,{...this.params,valueFormatted:n}):_(179):a=t?.getTotalValue(n??s);const l=this.getInnerCompDetails(n);this.comp.setInnerRenderer(l,a??"")}setupExpand(){const{colModel:e}=this.beans,{eGridCell:t,column:o,suppressDoubleClickExpand:i}=this.params,r=(d,c)=>{const u=te(d,this.beans,null);u&&(c.appendChild(u),this.addDestroyFunc(()=>c.removeChild(u)))};r("groupExpanded",this.eExpanded),r("groupContracted",this.eContracted);const s=this.comp,n=()=>{if(!this.isExpandable())return;const c=this.displayedNode.expanded;s.setExpandedDisplayed(c),s.setContractedDisplayed(!c),to(t,!!this.displayedNode.expanded)},a=()=>{const d=this.isExpandable();s.addOrRemoveCssClass("ag-cell-expandable",d),s.addOrRemoveCssClass("ag-row-group",d);const c=!d&&e.isPivotMode();s.addOrRemoveCssClass("ag-pivot-leaf-group",c);const u=!e.isPivotMode()&&(!this.displayedNode.footer||this.displayedNode.level!==-1);s.addOrRemoveCssClass("ag-row-group-leaf-indent",!d&&u);const g=this.getChildCount(),p=g>0?`(${g})`:"";s.setChildCount(p),d?n():(s.setExpandedDisplayed(!1),s.setContractedDisplayed(!1),sp(t))};(()=>{!(o?.isCellEditable(this.displayedNode)&&this.gos.get("enableGroupEdit"))&&!i&&this.addManagedListeners(t,{dblclick:this.onCellDblClicked.bind(this)}),this.addManagedListeners(this.eExpanded,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(this.eContracted,{click:this.onExpandClicked.bind(this)}),this.addManagedListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedListeners(this.displayedNode,{allChildrenCountChanged:a,masterChanged:a,groupChanged:a,hasChildrenChanged:a,expandedChanged:n})})(),a()}getInnerCompDetails(e){const{userCompFactory:t,findSvc:o}=this.beans,i={...this.params,valueFormatted:e};if(i.fullWidth){const d=this.gos.get("groupRowRendererParams"),c=Xr(t,d,i);return c||(o?.isMatch(i.node,null)?Xr(t,{...d,innerRenderer:"agFindCellRenderer"},i):void 0)}const r=d=>d&&d.componentClass==this.compClass,s=Xr(t,i,i);if(s&&!r(s))return s;const{displayedNode:{rowGroupColumn:n}}=this,a=n?.colDef,l=n&&i.column?.isRowGroupDisplayed(n.getId());if(a&&l){const d=ui(t,a,i);if(d)if(r(d)){if(a?.cellRendererParams?.innerRenderer)return Xr(t,a.cellRendererParams,i)}else return d}if(o?.isMatch(i.node,i.column))return ui(t,{...a??i.colDef,cellRenderer:"agFindCellRenderer"},i)}getChildCount(){const{column:e,suppressCount:t}=this.params;if(t)return 0;const{allChildrenCount:o,rowGroupColumn:i}=this.displayedNode;return!((o??0)>0&&(!i||!e||e?.isRowGroupDisplayed(i.getId())))||this.gos.get("showOpenedGroup")&&this.displayedNode!==this.node&&!Wa(this.node,this.displayedNode,this.gos)?0:o??0}isExpandable(){const{node:e,column:t,colDef:o}=this.params;if(!this.displayedNode.isExpandable())return!1;if(!t)return!0;if(e.hasChildren()&&o){const{showRowGroup:s}=o;if(!s)return!1;if(s===!0)return!0}return e===this.displayedNode?e.rowGroupColumn&&t?.isRowGroupDisplayed(e.rowGroupColumn.getId())?!0:e.master?o?.showRowGroup===!0||o?.showRowGroup==null:!1:Wa(this.node,this.displayedNode,this.gos)}setupIndent(){const{suppressPadding:e,node:t,colDef:o}=this.params;if(e)return;const i=()=>{let r=0;o&&o.showRowGroup!==!0?r=0:r=t.uiLevel;const s="ag-row-group-indent-"+r;s!==this.indentClass&&(this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass=s,this.comp.addOrRemoveCssClass(s,!0),this.eGui.style.setProperty("--ag-indentation-level",String(r)))};this.addManagedListeners(t,{uiLevelChanged:i.bind(this)}),i()}setupCheckbox(){const{node:e}=this.params;!e.footer&&!e.rowPinned&&!e.detail&&(this.addManagedPropertyListener("rowSelection",({currentValue:o,previousValue:i})=>{const r=typeof o=="object"?o:void 0,s=typeof i=="object"?i:void 0;r?.checkboxLocation!==s?.checkboxLocation&&(this.destroyCheckbox(),this.addCheckbox())}),this.addCheckbox())}addCheckbox(){const{selectionSvc:e}=this.beans;if(!e||!Wt(this.gos))return;const{node:t,column:o}=this.params,i=this.gos.get("rowSelection"),r=zi(i);if(r==="selectionColumn")return;if(r==="autoGroupColumn"){const d=o?.getColDef().showRowGroup!=null,c=!o&&t.group;if(!(d||c))return}const s=typeof i=="object"?Go(i):this.params.checkbox;if(!(typeof s=="function"||s===!0))return;if(typeof o?.getColDef().showRowGroup=="string"&&!this.isExpandable()){this.comp.setCheckboxSpacing(!0);return}const l=e.createCheckboxSelectionComponent();this.cbComp=l,this.createBean(l),l.init({rowNode:t,column:o,overrides:{isVisible:s,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(l.getGui()),this.comp.setCheckboxVisible(!0)}destroyCheckbox(){this.comp.setCheckboxSpacing(!1),this.comp.setCheckboxVisible(!1),this.cbComp&&this.eCheckbox.removeChild(this.cbComp.getGui()),this.cbComp=this.destroyBean(this.cbComp)}onExpandClicked(e){Tt(e)||(io(e),this.onExpandOrContract(e))}onKeyDown(e){!(e.key===D.ENTER)||this.params.suppressEnterExpand||this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e)}onCellDblClicked(e){if(Tt(e))return;Hn(this.eExpanded,e)||Hn(this.eContracted,e)||this.onExpandOrContract(e)}onExpandOrContract(e){if(!this.isExpandable())return;const t=this.displayedNode,o=!t.expanded;!o&&t.sticky&&this.beans.ctrlsSvc.getScrollFeature().setVerticalScrollPosition(t.rowTop-t.stickyRowTop),t.setExpanded(o,e)}destroy(){super.destroy(),this.destroyCheckbox()}},ZD={tag:"span",cls:"ag-cell-wrapper",children:[{tag:"span",ref:"eExpanded",cls:"ag-group-expanded ag-hidden"},{tag:"span",ref:"eContracted",cls:"ag-group-contracted ag-hidden"},{tag:"span",ref:"eCheckbox",cls:"ag-group-checkbox ag-invisible"},{tag:"span",ref:"eValue",cls:"ag-group-value"},{tag:"span",ref:"eChildCount",cls:"ag-group-child-count"}]},vh=class extends pe{constructor(){super(ZD),this.eExpanded=V,this.eContracted=V,this.eCheckbox=V,this.eValue=V,this.eChildCount=V}init(e){const t={setInnerRenderer:(s,n)=>this.setRenderDetails(s,n),setChildCount:s=>this.eChildCount.textContent=s,addOrRemoveCssClass:(s,n)=>this.addOrRemoveCssClass(s,n),setContractedDisplayed:s=>ge(this.eContracted,s),setExpandedDisplayed:s=>ge(this.eExpanded,s),setCheckboxVisible:s=>this.eCheckbox.classList.toggle("ag-invisible",!s),setCheckboxSpacing:s=>this.eCheckbox.classList.toggle("ag-group-checkbox-spacing",s)},o=this.createManagedBean(new Ch),i=!e.colDef,r=this.getGui();o.init(t,r,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&Xe(r,o.getCellAriaRole())}setRenderDetails(e,t){e?e.newAgStackInstance().then(o=>{if(!o)return;const i=()=>this.destroyBean(o);this.isAlive()?(this.eValue.appendChild(o.getGui()),this.addDestroyFunc(i)):i()}):this.eValue.innerText=t}destroy(){this.destroyBean(this.innerCellRenderer),super.destroy()}refresh(){return!1}},JD=".ag-group-checkbox-spacing{width:var(--ag-icon-size)}:where(.ag-ltr) .ag-group-checkbox-spacing{margin-right:var(--ag-cell-widget-spacing)}:where(.ag-rtl) .ag-group-checkbox-spacing{margin-left:var(--ag-cell-widget-spacing)}",ek=class extends E{constructor(){super(...arguments),this.beanName="showRowGroupCols"}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={};const{colModel:e,rowGroupColsSvc:t}=this.beans;e.getCols().forEach(o=>{const r=o.getColDef().showRowGroup,s=typeof r=="string";!s&&!(r===!0)||(this.showRowGroupCols.push(o),s?this.showRowGroupColsMap[r]=o:t&&t.columns.forEach(a=>{this.showRowGroupColsMap[a.getId()]=o}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(e){return this.showRowGroupColsMap[e]}getSourceColumnsForGroupColumn(e){const t=e.getColDef().showRowGroup;if(!t)return null;const{rowGroupColsSvc:o,colModel:i}=this.beans;if(t===!0&&o)return o.columns.slice(0);const r=i.getColDefCol(t);return r?[r]:null}isRowGroupDisplayed(e,t){const{colDef:o}=e;if(o?.showRowGroup==null)return!1;const i=o.showRowGroup===!0,r=o.showRowGroup===t;return i||r}},tk=class extends E{constructor(e,t){super(),this.createRowCon=e,this.destroyRowCtrls=t,this.stickyTopRowCtrls=[],this.stickyBottomRowCtrls=[],this.extraTopHeight=0,this.extraBottomHeight=0}postConstruct(){this.isClientSide=Et(this.gos),this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl}),this.resetStickyContainers()}setOffsetTop(e){this.extraTopHeight!==e&&(this.extraTopHeight=e,this.eventSvc.dispatchEvent({type:"stickyTopOffsetChanged",offset:e}))}setOffsetBottom(e){this.extraBottomHeight!==e&&(this.extraBottomHeight=e)}resetOffsets(){this.setOffsetBottom(0),this.setOffsetTop(0)}getLastPixelOfGroup(e){return this.isClientSide?ik(e):ok(e)}getFirstPixelOfGroup(e){return e.footer?e.sibling.rowTop+e.sibling.rowHeight-1:e.hasChildren()?e.rowTop-1:0}updateStickyRows(e){const t=e==="top";let o=0;if(!this.canRowsBeSticky())return this.refreshNodesAndContainerHeight(e,new Set,o);const{rowModel:i,rowRenderer:r}=this.beans,s=t?r.firstVisibleVPixel-this.extraTopHeight:r.lastVisibleVPixel-this.extraTopHeight,n=new Set,a=u=>{if(n.add(u),t){const g=this.getLastPixelOfGroup(u),p=s+o+u.rowHeight;g<p?u.stickyRowTop=o+(g-p):u.stickyRowTop=o}else{const g=this.getFirstPixelOfGroup(u),p=s-(o+u.rowHeight);g>p?u.stickyRowTop=o-(g-p):u.stickyRowTop=o}o=0,n.forEach(g=>{const p=g.stickyRowTop+g.rowHeight;o<p&&(o=p)})},l=this.areFooterRowsStickySuppressed(),d=this.gos.get("suppressGroupRowsSticky"),c=u=>{if(!u.displayed)return!1;if(u.footer){if(l===!0||l==="grand"&&u.level===-1||l==="group"&&u.level>-1)return!1;const g=u.sibling.rowIndex?u.sibling.rowIndex+1===u.rowIndex:!1;return e==="bottom"&&g?!1:!n.has(u)}return u.isExpandable()?d===!0||e==="bottom"?!1:!n.has(u)&&u.expanded:!1};for(let u=0;u<100;u++){let g=s+o;t||(g=s-o);const p=i.getRowIndexAtPixel(g),f=i.getRow(p);if(f==null)break;const C=this.getStickyAncestors(f).find(y=>(t?y.rowIndex<p:y.rowIndex>p)&&c(y));if(C){a(C);continue}if((t?f.rowTop<g:f.rowTop+f.rowHeight>g)&&c(f)){a(f);continue}break}return t||n.forEach(u=>{u.stickyRowTop=o-(u.stickyRowTop+u.rowHeight)}),this.refreshNodesAndContainerHeight(e,n,o)}areFooterRowsStickySuppressed(){const e=this.gos.get("suppressStickyTotalRow");if(e===!0)return!0;const t=e==="group",o=e==="grand";return t&&o?!0:o?"grand":t?"group":!1}canRowsBeSticky(){const e=Vr(this.gos),t=this.areFooterRowsStickySuppressed(),o=this.gos.get("suppressGroupRowsSticky");return e&&(!t||!o)}getStickyAncestors(e){const t=[];let o=e.footer?e.sibling:e.parent;for(;o;)o.sibling&&t.push(o.sibling),t.push(o),o=o.parent;return t.reverse()}checkStickyRows(){const e=this.updateStickyRows("top"),t=this.updateStickyRows("bottom");return e||t}destroyStickyCtrls(){this.resetStickyContainers()}resetStickyContainers(){this.refreshNodesAndContainerHeight("top",new Set,0),this.refreshNodesAndContainerHeight("bottom",new Set,0)}refreshStickyNode(e){const t=new Set;if(this.stickyTopRowCtrls.some(o=>o.rowNode===e)){for(let o=0;o<this.stickyTopRowCtrls.length;o++){const i=this.stickyTopRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("top",t,this.topContainerHeight)&&this.checkStickyRows();return}for(let o=0;o<this.stickyBottomRowCtrls.length;o++){const i=this.stickyBottomRowCtrls[o].rowNode;i!==e&&t.add(i)}this.refreshNodesAndContainerHeight("bottom",t,this.bottomContainerHeight)&&this.checkStickyRows()}refreshNodesAndContainerHeight(e,t,o){const i=e==="top",r=i?this.stickyTopRowCtrls:this.stickyBottomRowCtrls,s={},n=[];for(let p=0;p<r.length;p++){const f=r[p].rowNode;if(!t.has(f)){s[f.id]=r[p],f.sticky=!1;continue}n.push(r[p])}const a=new Set;for(let p=0;p<n.length;p++)a.add(n[p].rowNode);const l=[];t.forEach(p=>{a.has(p)||(p.sticky=!0,l.push(this.createRowCon(p,!1,!1)))});let d=!!l.length||n.length!==r.length;i?this.topContainerHeight!==o&&(this.topContainerHeight=o,this.gridBodyCtrl.setStickyTopHeight(o),d=!0):this.bottomContainerHeight!==o&&(this.bottomContainerHeight=o,this.gridBodyCtrl.setStickyBottomHeight(o),d=!0),this.destroyRowCtrls(s,!1);const c=[...n,...l];c.sort((p,f)=>f.rowNode.rowIndex-p.rowNode.rowIndex),i||c.reverse(),c.forEach(p=>p.setRowTop(p.rowNode.stickyRowTop));const u=this.beans.pageBounds;let g=0;return i?(t.forEach(p=>{p.rowIndex<u.getFirstRow()&&(g+=p.rowHeight)}),g>this.topContainerHeight&&(g=this.topContainerHeight),this.setOffsetTop(g)):(t.forEach(p=>{p.rowIndex>u.getLastRow()&&(g+=p.rowHeight)}),g>this.bottomContainerHeight&&(g=this.bottomContainerHeight),this.setOffsetBottom(g)),d?(i?this.stickyTopRowCtrls=c:this.stickyBottomRowCtrls=c,!0):!1}ensureRowHeightsValid(){let e=!1;const t=o=>{const i=o.rowNode;if(i.rowHeightEstimated){const r=St(this.beans,i);i.setRowHeight(r.height),e=!0}};return this.stickyTopRowCtrls.forEach(t),this.stickyBottomRowCtrls.forEach(t),e}};function ok(e){if(e.isExpandable()||e.footer){if(e.master&&e.detailNode)return e.detailNode.rowTop+e.detailNode.rowHeight;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let o=e.childStore?.getStoreBounds();return e.footer&&(o=e.sibling.childStore?.getStoreBounds()),(o?.heightPx??0)+(o?.topPx??0)}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}function ik(e){if(e.isExpandable()||e.footer){if(e.footer&&e.rowIndex===0)return Number.MAX_SAFE_INTEGER;if(!e.sibling||Math.abs(e.sibling.rowIndex-e.rowIndex)===1){let i=e.footer?e.sibling:e;for(;i.isExpandable()&&i.expanded;)if(i.master&&i.detailNode)i=i.detailNode;else if(i.childrenAfterSort){if(i.childrenAfterSort.length===0)break;i=Ce(i.childrenAfterSort)}return i.rowTop+i.rowHeight}return e.footer?e.rowTop+e.rowHeight:e.sibling.rowTop+e.sibling.rowHeight}return Number.MAX_SAFE_INTEGER}var rk=class extends E{constructor(){super(...arguments),this.beanName="stickyRowSvc"}createStickyRowFeature(e,t,o){const i=this.gos;if(Vr(i)&&Et(i)||ht(i))return e.createManagedBean(new tk(t,o))}},sk={moduleName:"GroupCellRenderer",version:ze,userComponents:{agGroupRowRenderer:vh,agGroupCellRenderer:vh},dynamicBeans:{groupCellRendererCtrl:Ch},icons:{groupContracted:"tree-closed",groupExpanded:"tree-open"},css:[JD],dependsOn:[Ft]},wh={moduleName:"GroupColumn",version:ze,beans:[WD,ek,zD,gh,hh],dependsOn:[Ft,sk]},nk={moduleName:"ClientSideRowModelHierarchy",version:ze,rowModels:["clientSide"],beans:[XD,qD,$D],dependsOn:[Ft]},bh={moduleName:"StickyRow",version:ze,beans:[rk]},$a=class{constructor(){this.allSets=new Map}removeFromChildrenAfterGroup(e,t){const o=this.getSet(e);(o.fromChildrenAfterGroup??(o.fromChildrenAfterGroup=new Set)).add(t)}isRemoveFromAllLeafChildren(e,t){return!!this.allSets.get(e)?.fromAllLeafChildren?.has(t)}preventRemoveFromAllLeafChildren(e,t){this.allSets.get(e)?.fromAllLeafChildren?.delete(t)}removeFromAllLeafChildren(e,t){const o=this.getSet(e);(o.fromAllLeafChildren??(o.fromAllLeafChildren=new Set)).add(t)}getSet(e){let t=this.allSets.get(e);return t||(t={fromChildrenAfterGroup:null,fromAllLeafChildren:null},this.allSets.set(e,t)),t}getAllParents(){return Array.from(this.allSets.keys())}flush(){const e=this.allSets;for(const t of e.keys()){const o=e.get(t);if(o){const{fromChildrenAfterGroup:i,fromAllLeafChildren:r}=o,{childrenAfterGroup:s,allLeafChildren:n}=t;s&&i&&(yh(s,i),t.updateHasChildren()),n&&r&&yh(n,r)}}e.clear()}};function yh(e,t){let o=0;for(let i=0,r=e.length;i<r;++i){const s=e[i];t.has(s)||(e[o++]=s)}e.length=o}function ak(e){if(!e)return!1;const t=e.length;if(t<2)return!1;let o=!1;for(let i=1;i<t;i++)if(Sh(e[i-1],e[i])>0){o=!0;break}return o?(e.sort(Sh),!0):!1}function Sh(e,t){const o=e.sourceRowIndex,i=t.sourceRowIndex,r=o>=0,s=i>=0,n=r&&s,a=!r&&!s;return n?o-i:a?e.__objectId-t.__objectId:r?1:-1}var lk=class extends E{wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.valueSvc=e.valueSvc,this.selectionSvc=e.selectionSvc,this.showRowGroupCols=e.showRowGroupCols}execute(e){const t=this.createGroupingDetails(e),o=e.changedRowNodes;o?this.handleDeltaUpdate(t,o):this.shotgunResetEverything(t,!!e.afterColumnsChanged);const i=e.changedPath;this.positionLeafsAndGroups(i),this.orderGroups(t),this.selectionSvc?.updateSelectableAfterGrouping(i)}positionLeafsAndGroups(e){e.forEachChangedNodeDepthFirst(t=>{if(t.childrenAfterGroup){const o=[],i=[];let r;t.childrenAfterGroup.forEach(s=>{s.childrenAfterGroup?.length?s.key===""&&!r?r=s:i.push(s):o.push(s)}),r&&i.push(r),t.childrenAfterGroup=[...o,...i]}},!1)}createGroupingDetails(e){const{rowNode:t,changedPath:o,rowNodesOrderChanged:i}=e,r=this.rowGroupColsSvc?.columns;return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:r,rootNode:t,pivotMode:this.colModel.isPivotMode(),groupedColCount:r?.length??0,rowNodesOrderChanged:!!i,changedPath:o,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),keyCreators:r?.map(n=>n.getColDef().keyCreator)??[]}}handleDeltaUpdate(e,{removals:t,updates:o,adds:i}){const r=new $a;t.size&&this.removeNodes(t,e,r);for(const a of o)this.moveNodeInWrongPath(a,e,r);const s=e.changedPath;for(const a of i)this.insertOneNode(a,e),s.active&&s.addParentNode(a.parent);const n=r.getAllParents();r.flush(),this.removeEmptyGroups(n,e),e.rowNodesOrderChanged&&this.sortChildren(e)}sortChildren(e){e.changedPath.forEachChangedNodeDepthFirst(t=>{ak(t.childrenAfterGroup)&&e.changedPath.addParentNode(t)},!1,!0)}orderGroups(e){const t=e.initialGroupOrderComparator;q(t)&&o(e.rootNode);function o(i){q(i.childrenAfterGroup)&&!i.leafGroup&&(i.childrenAfterGroup.sort((s,n)=>t({nodeA:s,nodeB:n})),i.childrenAfterGroup.forEach(s=>o(s)))}}getExistingPathForNode(e,t){const o=[];let i=e.parent;for(;i&&i!==t.rootNode;)o.push({key:i.key,rowGroupColumn:i.rowGroupColumn,field:i.field}),i=i.parent;return o.reverse(),o}moveNodeInWrongPath(e,t,o){t.changedPath.active&&t.changedPath.addParentNode(e.parent);const i=a=>a.key,r=this.getExistingPathForNode(e,t).map(i),s=this.getGroupInfo(e,t).map(i);It(r,s)||this.moveNode(e,t,o)}moveNode(e,t,o){if(this.removeNodesFromParents([e],t,o),this.insertOneNode(e,t,o),e.setData(e.data),t.changedPath.active){const i=e.parent;t.changedPath.addParentNode(i)}}removeNodes(e,t,o){if(this.removeNodesFromParents(e,t,o),t.changedPath.active)for(const i of e)t.changedPath.addParentNode(i.parent)}forEachParentGroup(e,t,o){let i=t;for(;i&&i!==e.rootNode;)o(i),i=i.parent}removeNodesFromParents(e,t,o){const i=o==null,r=o||new $a;for(const s of e)this.removeFromParent(s,r),this.forEachParentGroup(t,s.parent,n=>{r.removeFromAllLeafChildren(n,s)});i&&r.flush()}removeEmptyGroups(e,t){let o=!0;const i=r=>{const s=this.getChildrenMappedKey(r.key,r.rowGroupColumn),n=r.parent;return(n?.childrenMapped?!n.childrenMapped[s]:!0)?!1:!!r.group&&(r.childrenAfterGroup?.length??0)===0};for(;o;){o=!1;const r=new $a;e.forEach(s=>{this.forEachParentGroup(t,s,n=>{i(n)&&(o=!0,this.removeFromParent(n,r),this.selectionSvc?.setNodesSelected({nodes:[n],newValue:!1,source:"rowGroupChanged"}))})}),r.flush()}}removeFromParent(e,t){e.parent&&(t?t.removeFromChildrenAfterGroup(e.parent,e):(ot(e.parent.childrenAfterGroup,e),e.parent.updateHasChildren()));const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);e.parent?.childrenMapped&&delete e.parent.childrenMapped[o],e.setRowTop(null),e.setRowIndex(null)}addToParent(e,t){const o=this.getChildrenMappedKey(e.key,e.rowGroupColumn);t?.childrenMapped&&t.childrenMapped[o]!==e&&(t.childrenMapped[o]=e,t.childrenAfterGroup.push(e),PF(t,this.beans,!0))}areGroupColsEqual(e,t){return e==null||t==null||e.pivotMode!==t.pivotMode?!1:It(e.groupedCols,t.groupedCols)&&It(e.keyCreators,t.keyCreators)}checkAllGroupDataAfterColsChanged(e){const t=o=>{o&&o.forEach(i=>{if(!i.group)return;const s={field:i.field,key:i.key,rowGroupColumn:i.rowGroupColumn,leafNode:i.allLeafChildren?.[0]};this.setGroupData(i,s),t(i.childrenAfterGroup)})};t(e.rootNode.childrenAfterGroup)}shotgunResetEverything(e,t){if(this.noChangeInGroupingColumns(e,t))return;this.selectionSvc?.filterFromSelection?.(s=>!s.group);const{groupedCols:o}=e,i=e.rootNode;i.leafGroup=o.length===0,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren();const r=i.sibling;r&&(r.childrenAfterGroup=i.childrenAfterGroup,r.childrenMapped=i.childrenMapped),this.insertNodes(i.allLeafChildren,e)}noChangeInGroupingColumns(e,t){let o=!1;const i=this.showRowGroupCols.getShowRowGroupCols(),r=i?i.map(s=>s.getId()).join("-"):"";return t&&(o=this.areGroupColsEqual(e,this.oldGroupingDetails),this.oldGroupDisplayColIds!==r&&this.checkAllGroupDataAfterColsChanged(e)),this.oldGroupingDetails=e,this.oldGroupDisplayColIds=r,o}insertNodes(e,t){e.forEach(o=>{this.insertOneNode(o,t),t.changedPath.active&&t.changedPath.addParentNode(o.parent)})}insertOneNode(e,t,o){const i=this.getGroupInfo(e,t),r=this.findParentForNode(e,i,t,o);r.group||_(184,{parentGroupData:r.data,childNodeData:e.data}),e.parent=r,e.level=i.length,r.childrenAfterGroup.push(e),r.updateHasChildren()}findParentForNode(e,t,o,i){let r=o.rootNode;return t.forEach((s,n)=>{r=this.getOrCreateNextNode(r,s,n,o),i?.isRemoveFromAllLeafChildren(r,e)?i?.preventRemoveFromAllLeafChildren(r,e):r.allLeafChildren.push(e)}),r}getOrCreateNextNode(e,t,o,i){const r=this.getChildrenMappedKey(t.key,t.rowGroupColumn);let s=e?.childrenMapped?.[r];return s||(s=this.createGroup(t,e,o,i),this.addToParent(s,e)),s}createGroup(e,t,o,i){const r=new Wo(this.beans);return r.group=!0,r.field=e.field,r.rowGroupColumn=e.rowGroupColumn,this.setGroupData(r,e),r.key=e.key,r.id=this.createGroupId(r,t,o),r.level=o,r.leafGroup=o===i.groupedColCount-1,r.allLeafChildren=[],r.setAllChildrenCount(0),r.rowGroupIndex=o,r.childrenAfterGroup=[],r.childrenMapped={},r.updateHasChildren(),r.parent=t,this.setExpandedInitialValue(i,r),r}createGroupId(e,t,o){const i=(r,s)=>{if(!r.rowGroupColumn)return null;const n=s?i(s,s.parent):null;return`${n==null?"":n+"-"}${r.rowGroupColumn.getColId()}-${r.key}`};return ns+i(e,t)}setGroupData(e,t){const o=t.rowGroupColumn;o&&t.leafNode&&(e.groupValue=this.valueSvc.getValue(o,t.leafNode)),e.groupData={},this.showRowGroupCols.getShowRowGroupCols().forEach(r=>{const s=e.rowGroupColumn;s!==null&&r.isRowGroupDisplayed(s.getId())&&(e.groupData[r.getColId()]=this.valueSvc.getValue(s,t.leafNode))})}getChildrenMappedKey(e,t){return t?t.getId()+"-"+e:e}setExpandedInitialValue(e,t){if(e.pivotMode&&t.leafGroup){t.expanded=!1;return}const o=e.isGroupOpenByDefault;if(o){const i={rowNode:t,field:t.field,key:t.key,level:t.level,rowGroupColumn:t.rowGroupColumn};t.expanded=o(i)==!0;return}if(e.expandByDefault===-1){t.expanded=!0;return}t.expanded=t.level<e.expandByDefault}getGroupInfo(e,t){const o=[];return t.groupedCols.forEach(i=>{let r=this.valueSvc.getKeyForNode(i,e),s=r!=null&&r!=="";if((t.pivotMode||!t.groupAllowUnbalanced)&&!s&&(r="",s=!0),s){const a={key:r,field:i.getColDef().field,rowGroupColumn:i,leafNode:e};o.push(a)}}),o}};function dk(e,t){e.rowGroupColsSvc?.setColumns(t,"api")}function ck(e,t){e.rowGroupColsSvc?.removeColumns(t,"api")}function uk(e,t){e.rowGroupColsSvc?.addColumns(t,"api")}function hk(e,t,o){e.rowGroupColsSvc?.moveColumn?.(t,o,"api")}function gk(e){return e.rowGroupColsSvc?.columns??[]}var Rh={moduleName:"SharedRowGrouping",version:ze,apiFunctions:{setRowGroupColumns:dk,removeRowGroupColumns:ck,addRowGroupColumns:uk,getRowGroupColumns:gk,moveRowGroupColumn:hk},dependsOn:[Ft,za,wh,bh]},pk={moduleName:"RowGrouping",version:ze,dynamicBeans:{groupStrategy:lk},rowModels:["clientSide"],dependsOn:[Rh,_D,nk]},fk={tag:"div",cls:"ag-loading",children:[{tag:"span",ref:"eLoadingIcon",cls:"ag-loading-icon"},{tag:"span",ref:"eLoadingText",cls:"ag-loading-text"}]},mk=class extends pe{constructor(){super(fk),this.eLoadingIcon=V,this.eLoadingText=V}init(e){e.node.failedLoad?this.setupFailed():this.setupLoading()}setupFailed(){const e=this.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")}setupLoading(){const e=te("groupLoading",this.beans,null);e&&this.eLoadingIcon.appendChild(e);const t=this.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")}refresh(e){return!1}},Ck={tag:"div",cls:"ag-skeleton-container"},vk=class extends pe{constructor(){super(Ck)}init(e){const t=`ag-cell-skeleton-renderer-${this.getCompId()}`;this.getGui().setAttribute("id",t),this.addDestroyFunc(()=>oi(e.eParentOfValue)),oi(e.eParentOfValue,t),e.node.failedLoad?this.setupFailed():this.setupLoading(e)}setupFailed(){const e=this.getLocaleTextFunc();this.getGui().innerText=e("loadingError","ERR");const t=e("ariaSkeletonCellLoadingFailed","Row failed to load");dt(this.getGui(),t)}setupLoading(e){const o=Te(this.beans).createElement("div");o.classList.add("ag-skeleton-effect");const i=e.node.rowIndex;if(i!=null){const n=75+25*(i%2===0?Math.sin(i):Math.cos(i));o.style.width=`${n}%`}this.getGui().appendChild(o);const s=this.getLocaleTextFunc()("ariaSkeletonCellLoading","Row data is loading");dt(this.getGui(),s)}refresh(e){return!1}},wk={moduleName:"LoadingCellRenderer",version:ze,userComponents:{agLoadingCellRenderer:mk},icons:{groupLoading:"loading"},dependsOn:[Ft]},bk={moduleName:"SkeletonCellRenderer",version:ze,userComponents:{agSkeletonCellRenderer:vk},dependsOn:[Ft]};function yk(e){return e.colModel.isPivotMode()}function Sk(e,t,o){return e.pivotResultCols?.lookupPivotResultCol(t,o)??null}function Rk(e,t){e.valueColsSvc?.setColumns(t,"api")}function xk(e){return e.valueColsSvc?.columns??[]}function Fk(e,t){e.valueColsSvc?.removeColumns(t,"api")}function Dk(e,t){e.valueColsSvc?.addColumns(t,"api")}function kk(e,t){e.pivotColsSvc?.setColumns(t,"api")}function Mk(e,t){e.pivotColsSvc?.removeColumns(t,"api")}function Pk(e,t){e.pivotColsSvc?.addColumns(t,"api")}function Ek(e){return e.pivotColsSvc?.columns??[]}function Ak(e,t){e.pivotResultCols?.setPivotResultCols(t,"api")}function Tk(e){const t=e.pivotResultCols?.getPivotResultCols();return t?t.list:null}var xh="PivotRowTotal_",Ik=({headerName:e},{headerName:t})=>e&&!t?1:!e&&t?-1:!e&&!t?0:e<t?-1:e>t?1:0,Lk=e=>(t,o)=>e(t.headerName,o.headerName),Gk=class extends E{constructor(){super(...arguments),this.beanName="pivotColDefSvc"}wireBeans(e){this.colModel=e.colModel,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.colNames=e.colNames}postConstruct(){const e=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=e(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=e()});const t=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=t(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=t()})}createPivotColumnDefs(e){const t=this.createPivotColumnsFromUniqueValues(e);function o(s,n=[]){return s.forEach(a=>{a.children!==void 0?o(a.children,n):n.push(a)}),n}const i=o(t);this.addRowGroupTotals(t,i),this.addExpandablePivotGroups(t,i),this.addPivotTotalsToGroups(t,i);const r=i.map(s=>({...s}));return{pivotColumnGroupDefs:t,pivotColumnDefs:r}}createPivotColumnsFromUniqueValues(e){const t=this.pivotColsSvc?.columns??[],o=t.length;return this.recursivelyBuildGroup(0,e,[],o,t)}recursivelyBuildGroup(e,t,o,i,r){if(e>=i)return this.buildMeasureCols(o);const{pivotComparator:s}=r[e].getColDef(),n=s?Lk(s):Ik,a=this.valueColsSvc?.columns;if(a?.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&e===i-1){const d=[];for(const c of t.keys()){const u=[...o,c],g=this.createColDef(a[0],c,u);g.columnGroupShow="open",d.push(g)}return d.sort(n),d}const l=[];for(const d of t.keys()){const c=this.pivotDefaultExpanded===-1||e<this.pivotDefaultExpanded,u=[...o,d];l.push({children:this.recursivelyBuildGroup(e+1,t.get(d),u,i,r),headerName:d,pivotKeys:u,columnGroupShow:"open",openByDefault:c,groupId:this.generateColumnGroupId(u)})}return l.sort(n),l}buildMeasureCols(e){const t=this.valueColsSvc?.columns??[];return t.length===0?[this.createColDef(null,"-",e)]:t.map(o=>{const i=this.colNames.getDisplayNameForColumn(o,"header");return{...this.createColDef(o,i,e),columnGroupShow:"open"}})}addExpandablePivotGroups(e,t){const o=this.gos.get("suppressExpandablePivotGroups");if(o||this.gos.get("pivotColumnGroupTotals"))return;const i=(r,s,n)=>{if("children"in r){const{valueColsSvc:d}=this,{columns:c=[]}=d??{},u=new Map;r.children.forEach(f=>{i(f,s,u)});const g=!r.children.some(f=>f.children),p=g&&c.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn");c.forEach(f=>{const m=this.colNames.getDisplayNameForColumn(f,"header"),C=this.createColDef(f,m,r.pivotKeys);C.pivotTotalColumnIds=u.get(f.getColId()),C.columnGroupShow=o?"open":"closed",C.aggFunc=f.getAggFunc(),(!g||p)&&(r.children.push(C),s.push(C))}),this.merge(n,u);return}if(!r.pivotValueColumn)return;const a=r.pivotValueColumn.getColId();n.has(a)?n.get(a).push(r.colId):n.set(a,[r.colId])};e.forEach(r=>{i(r,t,new Map)})}addPivotTotalsToGroups(e,t){if(!this.gos.get("pivotColumnGroupTotals"))return;const o=this.gos.get("pivotColumnGroupTotals")==="after",i=this.valueColsSvc?.columns,r=i?.map(s=>s.getAggFunc());if(!(!r||r.length<1||!this.sameAggFuncs(r))&&i){const s=i[0];e.forEach(n=>{this.recursivelyAddPivotTotal(n,t,s,o)})}}recursivelyAddPivotTotal(e,t,o,i){const r=e;if(!r.children){const n=e;return n.colId?[n.colId]:null}let s=[];if(r.children.forEach(n=>{const a=this.recursivelyAddPivotTotal(n,t,o,i);a&&(s=s.concat(a))}),r.children.length>1){const a=this.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),l=this.createColDef(o,a,e.pivotKeys,!0);l.pivotTotalColumnIds=s,l.aggFunc=o.getAggFunc(),l.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const d=e.children;i?d.push(l):d.unshift(l),t.push(l)}return s}addRowGroupTotals(e,t){if(!this.gos.get("pivotRowTotals"))return;const o=this.gos.get("pivotRowTotals")==="after",r=(this.valueColsSvc?.columns??[]).slice();o||r.reverse();const s=r.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let n=0;n<r.length;n++){const a=r[n],l=this.colNames.getDisplayNameForColumn(a,"header"),d=this.createColDef(a,l,[]),c=[];for(let g=0;g<t.length;g++){const p=t[g];p.pivotValueColumn===a&&c.push(p.colId)}d.pivotTotalColumnIds=c,d.colId=xh+d.colId;const u=s?{children:[d],pivotKeys:[],groupId:`${xh}_pivotGroup_${a.getColId()}`}:d;t.push(d),o?e.push(u):e.unshift(u)}}createColDef(e,t,o,i=!1){const r={};if(e){const s=e.getColDef();Object.assign(r,s),r.hide=!1}return r.headerName=t,r.colId=this.generateColumnId(o||[],e&&!i?e.getColId():""),r.field=r.colId,r.valueGetter=s=>s.data?.[s.colDef.field],r.pivotKeys=o,r.pivotValueColumn=e,r.filter===!0&&(r.filter="agNumberColumnFilter"),r}sameAggFuncs(e){if(e.length==1)return!0;for(let t=1;t<e.length;t++)if(e[t]!==e[0])return!1;return!0}merge(e,t){t.forEach((o,i)=>{const s=[...e.has(i)?e.get(i):[],...o];e.set(i,s)})}generateColumnGroupId(e){return`pivotGroup_${(this.pivotColsSvc?.columns??[]).map(o=>o.getColId()).join("-")}_${e.join("-")}`}generateColumnId(e,t){return`pivot_${(this.pivotColsSvc?.columns??[]).map(i=>i.getColId()).join("-")}_${e.join("-")}_${t}`}createColDefsFromFields(e){const t={};for(let r=0;r<e.length;r++){const n=e[r].split(this.fieldSeparator);let a=t;for(let l=0;l<n.length;l++){const d=n[l];a[d]==null&&(a[d]={}),a=a[d]}}const o=(r,s,n,a)=>{const l=[];for(const u of Object.keys(n)){const g=n[u],p=o(`${r}${this.fieldSeparator}${u}`,u,g,a+1);l.push(p)}if(l.length===0){const u=this.colModel.getColDefCol(s);if(u){const p=this.colNames.getDisplayNameForColumn(u,"header")??s,f=this.createColDef(u,p,void 0,!1);return f.colId=r,f.aggFunc=u.getAggFunc(),f.valueGetter=m=>m.data?.[r],f}return{colId:r,headerName:s,valueGetter:p=>p.data?.[r]}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&l.length===1&&"colId"in l[0]?(l[0].headerName=s,l[0]):{openByDefault:this.pivotDefaultExpanded===-1||a<this.pivotDefaultExpanded,groupId:r,headerName:s,children:l}},i=[];for(const r of Object.keys(t)){const s=t[r],n=o(r,r,s,0);i.push(n)}return i}},Bk=class extends E{constructor(){super(...arguments),this.beanName="pivotResultCols"}wireBeans(e){this.colModel=e.colModel,this.visibleCols=e.visibleCols}destroy(){wo(this.beans,this.pivotResultCols?.tree),super.destroy()}isPivotResultColsPresent(){return this.pivotResultCols!=null}lookupPivotResultCol(e,t){if(this.pivotResultCols==null)return null;const o=this.colModel.getColDefCol(t);let i=null;return this.pivotResultCols.list.forEach(r=>{const s=r.getColDef().pivotKeys,n=r.getColDef().pivotValueColumn;It(s,e)&&n===o&&(i=r)}),i}getPivotResultCols(){return this.pivotResultCols}getPivotResultCol(e){return this.pivotResultCols?this.colModel.getColFromCollection(e,this.pivotResultCols):null}setPivotResultCols(e,t){if(this.colModel.ready&&!(e==null&&this.pivotResultCols==null)){if(e){this.processPivotResultColDef(e);const o=Ad(this.beans,e,!1,this.pivotResultCols?.tree||this.previousPivotResultCols||void 0,t);wo(this.beans,this.pivotResultCols?.tree,o.columnTree);const i=o.columnTree,r=o.treeDept,s=_n(i),n={};this.pivotResultCols={tree:i,treeDepth:r,list:s,map:n},this.pivotResultCols.list.forEach(l=>this.pivotResultCols.map[l.getId()]=l);const a=!!this.previousPivotResultCols;this.previousPivotResultCols=null,this.colModel.refreshCols(!a)}else this.previousPivotResultCols=this.pivotResultCols?this.pivotResultCols.tree:null,this.pivotResultCols=null,this.colModel.refreshCols(!1);this.visibleCols.refresh(t)}}processPivotResultColDef(e){const t=this.gos.get("processPivotResultColDef"),o=this.gos.get("processPivotResultColGroupDef");if(!t&&!o)return;const i=r=>{r.forEach(s=>{if(q(s.children)){const a=s;o&&o(a),i(a.children)}else t&&t(s)})};e&&i(e)}},Ok={moduleName:"SharedPivot",version:ze,beans:[Bk,Gk,gh],apiFunctions:{isPivotMode:yk,getPivotResultColumn:Sk,setValueColumns:Rk,getValueColumns:xk,removeValueColumns:Fk,addValueColumns:Dk,setPivotColumns:kk,removePivotColumns:Mk,addPivotColumns:Pk,getPivotColumns:Ek,setPivotResultColumns:Ak,getPivotResultColumns:Tk},dependsOn:[Rh,Zc]};Vn.values();var Nk={moduleName:"SharedTreeData",version:ze,dependsOn:[Ft,za,wh,bh]},Hk="ag-Grid-MissingKey",Vk=class extends E{constructor(){super(...arguments),this.beanName="ssrmBlockUtils"}wireBeans(e){this.valueSvc=e.valueSvc,this.showRowGroupCols=e.showRowGroupCols,this.nodeManager=e.ssrmNodeManager,this.expansionSvc=e.expansionSvc,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}createRowNode(e){const t=new Wo(this.beans),o=e.rowHeight!=null?e.rowHeight:vo(this.beans);return t.setRowHeight(o),t.group=e.group,t.leafGroup=e.leafGroup,t.level=e.level,t.uiLevel=e.level,t.parent=e.parent,t.stub=!0,t.__needsRefreshWhenVisible=!1,t.group&&(t.expanded=!1,t.field=e.field,t.rowGroupColumn=e.rowGroupColumn,t.rowGroupIndex=e.level),t}destroyRowNode(e,t=!1){e.childStore&&!t&&(this.destroyBean(e.childStore),e.childStore=null),e.sibling&&!e.footer&&this.destroyRowNode(e.sibling,!1),e.clearRowTopAndRowIndex(),e.id!=null&&this.nodeManager.removeNode(e)}setTreeGroupInfo(e){e.updateHasChildren();const t=this.gos.get("getServerSideGroupKey"),o=e.hasChildren();o&&t!=null&&(e.key=t(e.data)),!o&&e.childStore!=null&&(this.destroyBean(e.childStore),e.childStore=null,e.expanded=!1)}setRowGroupInfo(e){if(e.key=this.valueSvc.getValue(e.rowGroupColumn,e),(e.key===null||e.key===void 0)&&xn(()=>{_(190,{rowGroupId:e.rowGroupColumn?.getId(),data:e.data})},"SSBlock-BadKey"),this.gos.get("groupAllowUnbalanced")&&e.key===""){const r=this.serverSideRowModel.getParams();e.childStore=this.createBean(this.storeFactory.createStore(r,e))}di(this.beans.gos)({node:e})&&(ao(e,this.beans),e.sibling&&(e.sibling.uiLevel=e.uiLevel+1))}setMasterDetailInfo(e){const t=this.gos.get("isRowMaster");t!=null?e.master=t(e.data):e.master=!0}updateDataIntoRowNode(e,t){e.updateData(t),this.gos.get("treeData")?(this.setTreeGroupInfo(e),this.setChildCountIntoRowNode(e)):e.group?(this.setChildCountIntoRowNode(e),e.footer||(di(this.beans.gos)({node:e})?e.sibling?e.sibling.updateData(t):ao(e,this.beans):e.sibling&&_a(e))):this.gos.get("masterDetail")}setDataIntoRowNode(e,t,o,i){e.stub=!1;const r=this.gos.get("treeData");e.setDataAndId(t,o),r?this.setTreeGroupInfo(e):e.group?this.setRowGroupInfo(e):this.gos.get("masterDetail")&&this.setMasterDetailInfo(e),(r||e.group)&&(this.setGroupDataIntoRowNode(e),this.setChildCountIntoRowNode(e)),q(t)&&(e.setRowHeight(St(this.beans,e,!1,i).height),e.sibling?.setRowHeight(St(this.beans,e.sibling,!1,i).height))}setChildCountIntoRowNode(e){const t=this.gos.get("getChildCount");t&&e.setAllChildrenCount(t(e.data))}setGroupDataIntoRowNode(e){e.groupValue=e.key;const t=this.showRowGroupCols?.getShowRowGroupCols()??[],o=this.gos.get("treeData");t.forEach(i=>{if(e.groupData==null&&(e.groupData={}),o)e.groupData[i.getColId()]=e.key;else if(i.isRowGroupDisplayed(e.rowGroupColumn.getId())){const r=this.valueSvc.getValue(e.rowGroupColumn,e);e.groupData[i.getColId()]=r}})}clearDisplayIndex(e){e.clearRowTopAndRowIndex(),e.hasChildren()&&!!e.childStore&&e.childStore?.clearDisplayIndexes(),e.master&&e.detailNode&&e.detailNode?.clearRowTopAndRowIndex()}setDisplayIndex(e,t,o,i){const r=this.gos.get("groupAllowUnbalanced")&&e.group&&e.key==="";if(this.gos.get("groupHideOpenParents")&&e.group&&e.expanded||r?(e.setRowIndex(null),e.setRowTop(null)):(e.setRowIndex(t.value++),e.setRowTop(o.value),o.value+=e.rowHeight),e.setUiLevel(i),e.footer)return;if(e.master&&(e.expanded&&e.detailNode?(e.detailNode.setRowIndex(t.value++),e.detailNode.setRowTop(o.value),o.value+=e.detailNode.rowHeight):e.detailNode&&e.detailNode.clearRowTopAndRowIndex()),e.hasChildren()&&!!e.childStore){const l=e.childStore;e.expanded||r?l.setDisplayIndexes(t,o,r?i:i+1):l.clearDisplayIndexes()}}extractRowBounds(e,t){const o=i=>({rowHeight:i.rowHeight,rowTop:i.rowTop});if(e.rowIndex===t)return o(e);if(e.hasChildren()&&e.expanded&&e.childStore){const i=e.childStore;if(i.isDisplayIndexInStore(t))return i.getRowBounds(t)}else if(e.master&&e.expanded&&e.detailNode&&e.detailNode.rowIndex===t)return o(e.detailNode)}isPixelInNodeRange(e,t){return!q(e.rowTop)||!q(e.rowHeight)?!1:t>=e.rowTop&&t<e.rowTop+e.rowHeight}getIndexAtPixel(e,t){if(this.isPixelInNodeRange(e,t))return e.rowIndex;const o=e.master&&e.expanded,i=e.detailNode;if(o&&i&&this.isPixelInNodeRange(i,t))return i.rowIndex;if(e.hasChildren()&&e.expanded&&e.childStore){const r=e.childStore;if(r.isPixelInRange(t))return r.getRowIndexAtPixel(t)}return null}createNodeIdPrefix(e){const t=[];let o=e;for(;o&&o.level>=0;)o.key===""?t.push(Hk):t.push(o.key),o=o.parent;if(t.length>0)return t.reverse().join("-")}checkOpenByDefault(e){return this.expansionSvc?.checkOpenByDefault(e)}},_k=class extends E{constructor(){super(...arguments),this.beanName="ssrmExpandListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}postConstruct(){ht(this.gos)&&this.addManagedEventListeners({rowGroupOpened:this.onRowGroupOpened.bind(this)})}onRowGroupOpened(e){const t=e.node;if(t.expanded){if(t.master)this.createDetailNode(t);else if(De(t.childStore)){const o=this.serverSideRowModel.getParams();t.childStore=this.createBean(this.storeFactory.createStore(o,t))}}else this.gos.get("purgeClosedRowNodes")&&q(t.childStore)&&(t.childStore=this.destroyBean(t.childStore));this.eventSvc.dispatchEvent({type:"storeUpdated"})}createDetailNode(e){if(q(e.detailNode))return e.detailNode;const t=new Wo(this.beans);t.detail=!0,t.selectable=!1,t.parent=e,q(e.id)&&(t.id="detail_"+e.id),t.data=e.data,t.level=e.level+1;const o=200,i=St(this.beans,t).height;return t.rowHeight=i||o,e.detailNode=t,t}},zk=class extends E{constructor(){super(...arguments),this.beanName="ssrmFilterListener"}wireBeans(e){this.serverSideRowModel=e.rowModel,this.filterManager=e.filterManager,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){ht(this.gos)&&this.addManagedEventListeners({advancedFilterEnabledChanged:()=>this.onFilterChanged(!0),filterChanged:()=>this.onFilterChanged()})}onFilterChanged(e){const t=this.serverSideRowModel.getParams();if(!t)return;const o=t.filterModel;let i,r;if(this.filterManager?.isAdvFilterEnabled()){i=this.filterManager.getAdvFilterModel();const l=e?Object.keys(o??{}):this.getAdvancedFilterColumns(o),d=this.getAdvancedFilterColumns(i);l.forEach(c=>d.add(c)),r=Array.from(d)}else if(i=this.filterManager?.getFilterModel()??{},e){const l=this.getAdvancedFilterColumns(o);Object.keys(i).forEach(d=>l.add(d)),r=Array.from(l)}else r=this.findChangedColumns(o,i);const s=this.listenerUtils.isSortingWithValueColumn(r),n=this.listenerUtils.isSortingWithSecondaryColumn(r),a={valueColChanged:s,secondaryColChanged:n,changedColumns:r};this.serverSideRowModel.refreshAfterFilter(i,a)}findChangedColumns(e,t){const o={};Object.keys(e).forEach(r=>o[r]=!0),Object.keys(t).forEach(r=>o[r]=!0);const i=[];return Object.keys(o).forEach(r=>{const s=JSON.stringify(e[r]),n=JSON.stringify(t[r]);s!=n&&i.push(r)}),i}getAdvancedFilterColumns(e){const t=new Set;if(!e)return t;const o=i=>{i.filterType==="join"?i.conditions.forEach(r=>o(r)):t.add(i.colId)};return o(e),t}},Wk=class extends E{constructor(){super(...arguments),this.beanName="ssrmListenerUtils"}wireBeans(e){this.pivotResultCols=e.pivotResultCols,this.valueColsSvc=e.valueColsSvc}isSortingWithValueColumn(e){const t=(this.valueColsSvc?.columns??[]).map(o=>o.getColId());for(let o=0;o<e.length;o++)if(t.indexOf(e[o])>-1)return!0;return!1}isSortingWithSecondaryColumn(e){const t=this.pivotResultCols?.getPivotResultCols();if(!t)return!1;const o=t.list.map(i=>i.getColId());for(let i=0;i<e.length;i++)if(o.indexOf(e[i])>-1)return!0;return!1}},$k=class extends E{constructor(){super(...arguments),this.beanName="ssrmSortSvc"}wireBeans(e){this.sortSvc=e.sortSvc,this.serverSideRowModel=e.rowModel,this.listenerUtils=e.ssrmListenerUtils}postConstruct(){ht(this.gos)&&this.addManagedEventListeners({sortChanged:this.onSortChanged.bind(this)})}onSortChanged(){const e=this.serverSideRowModel.getParams();if(!e)return;const t=this.sortSvc.getSortModel(),o=e.sortModel,i=this.findChangedColumnsInSort(t,o),r=this.listenerUtils.isSortingWithValueColumn(i),s=this.listenerUtils.isSortingWithSecondaryColumn(i),n={valueColChanged:r,secondaryColChanged:s,changedColumns:i};this.serverSideRowModel.refreshAfterSort(t,n)}findChangedColumnsInSort(e,t){let o=[];[e,t].forEach(s=>{if(s){const n=s.map(a=>a.colId);o=o.concat(n)}});const i=(s,n)=>{const a=s?s.sort:null,l=n?n.sort:null;return a!==l},r=(s,n)=>{const a=s?t.indexOf(s):-1,l=n?e.indexOf(n):-1;return a!==l};return o.filter(s=>{const n=t.find(l=>l.colId===s),a=e.find(l=>l.colId===s);return i(n,a)||r(n,a)})}},Uk=class extends E{constructor(){super(...arguments),this.beanName="ssrmNodeManager",this.rowNodes=new Map}addRowNode(e){const t=e.id;this.rowNodes.has(t)&&_(187,{rowId:t,firstData:this.rowNodes.get(t).data,secondData:e.data}),this.rowNodes.set(t,e)}removeNode(e){const t=e.id;this.rowNodes.delete(t)}destroy(){this.clear(),super.destroy()}clear(){this.rowNodes.clear(),super.destroy()}},jk=class extends E{constructor(){super(...arguments),this.beanName="rowModel",this.pauseStoreUpdateListening=!1,this.started=!1,this.managingPivotResultColumns=!1,this.onRowHeightChanged_debounced=tt(this,this.onRowHeightChanged.bind(this),100)}wireBeans(e){this.colModel=e.colModel,this.colNames=e.colNames,this.pivotResultCols=e.pivotResultCols,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.valueColsSvc=e.valueColsSvc,this.filterManager=e.filterManager,this.sortSvc=e.sortSvc,this.rowRenderer=e.rowRenderer,this.nodeManager=e.ssrmNodeManager,this.storeFactory=e.ssrmStoreFactory,this.pivotColDefSvc=e.pivotColDefSvc}ensureRowHeightsValid(){return!1}start(){this.started=!0,this.updateDatasource()}destroyDatasource(){this.datasource&&(this.datasource.destroy&&this.datasource.destroy(),this.rowRenderer.datasourceChanged(),this.datasource=void 0)}postConstruct(){const e=this.resetRootStore.bind(this);this.addManagedEventListeners({newColumnsLoaded:this.onColumnEverything.bind(this),storeUpdated:this.onStoreUpdated.bind(this),columnValueChanged:e,columnPivotChanged:e,columnRowGroupChanged:e,columnPivotModeChanged:e}),this.addManagedPropertyListeners(["masterDetail","treeData","removePivotHeaderRowWhenSingleValueColumn","cacheBlockSize"],e),this.addManagedPropertyListener("groupAllowUnbalanced",()=>this.onStoreUpdated()),this.addManagedPropertyListener("rowHeight",()=>this.resetRowHeights()),this.verifyProps(),this.addManagedPropertyListener("serverSideDatasource",()=>this.updateDatasource())}updateDatasource(){const e=this.gos.get("serverSideDatasource");e&&this.setDatasource(e)}verifyProps(){Wt(this.gos)&&!this.gos.exists("getRowId")&&_(188)}setDatasource(e){this.started&&(this.destroyDatasource(),this.datasource=e,this.resetRootStore())}applyRowData(e,t,o){const i=this.getRootStore();if(!i)return;const r=i.getChildStore(o);r&&r.applyRowData(e,t,e.rowData.length)}isLastRowIndexKnown(){const e=this.getRootStore();return e?e.isLastRowIndexKnown():!1}onColumnEverything(){if(!this.storeParams){this.resetRootStore();return}const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=d=>{const c={};d.oldCols.forEach(p=>c[p.id]=p);const u=d.newCols.every(p=>{const f=c[p.id];return f&&delete c[p.id],f&&f.field===p.field&&f.aggFunc===p.aggFunc}),g=!d.allowRemovedColumns&&!!Object.values(c).length;return u&&!g},r=!Oi(this.storeParams.sortModel,this.sortSvc?.getSortModel()??[]),s=!i({oldCols:this.storeParams.rowGroupCols,newCols:e}),n=!i({oldCols:this.storeParams.pivotCols,newCols:o}),a=!!e?.length&&!i({oldCols:this.storeParams.valueCols,newCols:t,allowRemovedColumns:!0});if(r||s||n||a)this.resetRootStore();else{const d=this.createStoreParams();this.storeParams.rowGroupCols=d.rowGroupCols,this.storeParams.pivotCols=d.pivotCols,this.storeParams.valueCols=d.valueCols}}destroyRootStore(){!this.rootNode||!this.rootNode.childStore||(this.rootNode.childStore=this.destroyBean(this.rootNode.childStore),this.nodeManager.clear())}refreshAfterSort(e,t){this.storeParams&&(this.storeParams.sortModel=e);const o=this.getRootStore();o&&(o.refreshAfterSort(t),this.onStoreUpdated())}generateSecondaryColumns(e){if(!this.pivotColDefSvc){this.gos.assertModuleRegistered("SharedPivot",2);return}const t=this.pivotColDefSvc.createColDefsFromFields(e);this.managingPivotResultColumns=!0,this.pivotResultCols?.setPivotResultCols(t,"rowModelUpdated")}resetRowHeights(){const e=this.resetRowHeightsForAllRowNodes(),t=St(this.beans,this.rootNode);if(this.rootNode.setRowHeight(t.height,t.estimated),this.rootNode.sibling){const o=St(this.beans,this.rootNode.sibling);this.rootNode.sibling.setRowHeight(o.height,o.estimated)}e&&this.onRowHeightChanged()}resetRowHeightsForAllRowNodes(){let e=!1;return this.forEachNode(t=>{const o=St(this.beans,t);t.setRowHeight(o.height,o.estimated);const i=t.detailNode;if(i){const r=St(this.beans,i);i.setRowHeight(r.height,r.estimated)}if(t.sibling){const r=St(this.beans,t.sibling);i?.setRowHeight(r.height,r.estimated)}e=!0}),e}resetRootStore(){this.destroyRootStore(),this.rootNode=new Wo(this.beans),this.rootNode.group=!0,this.rootNode.level=-1,this.datasource&&(this.storeParams=this.createStoreParams(),this.rootNode.childStore=this.createBean(this.storeFactory.createStore(this.storeParams,this.rootNode)),this.updateRowIndexesAndBounds()),this.managingPivotResultColumns&&(this.pivotResultCols?.setPivotResultCols(null,"api"),this.managingPivotResultColumns=!1),this.dispatchModelUpdated(!0)}columnsToValueObjects(e=[]){return e.map(t=>({id:t.getId(),aggFunc:t.getAggFunc(),displayName:this.colNames.getDisplayNameForColumn(t,"model"),field:t.getColDef().field}))}createStoreParams(){const e=this.columnsToValueObjects(this.rowGroupColsSvc?.columns),t=this.columnsToValueObjects(this.valueColsSvc?.columns),o=this.columnsToValueObjects(this.pivotColsSvc?.columns),i=Pn(this.gos);return{valueCols:t,rowGroupCols:e,pivotCols:o,pivotMode:this.colModel.isPivotMode(),filterModel:this.filterManager?.isAdvFilterEnabled()?this.filterManager?.getAdvFilterModel():this.filterManager?.getFilterModel()??{},sortModel:this.sortSvc?.getSortModel()??[],datasource:this.datasource,lastAccessedSequence:{value:0},dynamicRowHeight:i}}getParams(){return this.storeParams}dispatchModelUpdated(e=!1){this.eventSvc.dispatchEvent({type:"modelUpdated",animate:!e,keepRenderedRows:!e,newPage:!1,newData:!1})}onStoreUpdated(){this.pauseStoreUpdateListening||(this.updateRowIndexesAndBounds(),this.dispatchModelUpdated())}onRowHeightChanged(){this.updateRowIndexesAndBounds(),this.dispatchModelUpdated()}updateRowIndexesAndBounds(){const e=this.getRootStore();e&&e.setDisplayIndexes({value:0},{value:0},0)}retryLoads(){const e=this.getRootStore();e&&(e.retryLoads(),this.onStoreUpdated())}getRow(e){const t=this.getRootStore();if(t)return t.getRowUsingDisplayIndex(e)}setPaused(e){this.pauseStoreUpdateListening=e}expandAll(e){this.pauseStoreUpdateListening=!0,this.forEachNode(t=>{t.stub||t.hasChildren()&&t.setExpanded(e)}),this.pauseStoreUpdateListening=!1,this.onStoreUpdated()}refreshAfterFilter(e,t){this.storeParams&&(this.storeParams.filterModel=e);const o=this.getRootStore();o&&(o.refreshAfterFilter(t),this.onStoreUpdated())}getRootStore(){return this.rootNode?.childStore}getRowCount(){const e=this.getRootStore();return e?e.getDisplayIndexEnd():0}getTopLevelRowCount(){const e=this.getRootStore();return e?e.getRowCount():1}getTopLevelRowDisplayedIndex(e){const t=this.getRootStore();return t?t.getTopLevelRowDisplayedIndex(e):e}getRowBounds(e){const t=this.getRootStore();return t?t.getRowBounds(e):{rowTop:0,rowHeight:vo(this.beans)}}getBlockStates(){const e=this.getRootStore();if(!e)return;const t={};return e.forEachStoreDeep(o=>{const i=o.getBlockStates();for(const r of Object.keys(i))t[r]=i[r]}),t}getRowIndexAtPixel(e){const t=this.getRootStore();return e<=0||!t?0:t.getRowIndexAtPixel(e)}isEmpty(){return!1}isRowsToRender(){return this.getRootStore()!=null&&this.getRowCount()>0}getType(){return"serverSide"}forEachNode(e){const t=this.getRootStore();t&&t.forEachNodeDeep(e)}forEachDisplayedNode(e){const t=(o,i)=>{o.stub||!o.displayed||e(o,i)};this.forEachNode(t)}forEachNodeAfterFilterAndSort(e,t=!1){const o=this.getRootStore();o&&o.forEachNodeDeepAfterFilterAndSort(e,void 0,t)}executeOnStore(e,t){if(!this.started)return!1;const o=this.getRootStore();if(!o)return!0;const i=o.getChildStore(e);return i&&t(i),!0}refreshStore(e={}){const t=e.route?e.route:[];this.executeOnStore(t,o=>o.refreshStore(e.purge==!0))}getStoreState(){const e=[],t=this.getRootStore();return t&&t.addStoreStates(e),e}getNodesInRangeForSelection(e,t){const o=e.rowIndex,i=t.rowIndex;if(o===null&&i===null)return[];if(i===null)return e?[e]:[];if(o===null)return[t];const r=[],[s,n]=[o,i].sort((a,l)=>a-l);return this.forEachNode(a=>{const l=a.rowIndex;l==null||a.stub||l>=s&&l<=n&&r.push(a)}),r.length!==n-s+1?null:r}getRowNode(e){let t;return this.forEachNode(o=>{o.id===e&&(t=o),o.detailNode&&o.detailNode.id===e&&(t=o.detailNode)}),t}isRowPresent(e){return!!this.getRowNode(e.id)}setRowCount(e,t){const o=this.getRootStore();o&&o.setRowCount(e,t)}destroy(){this.destroyDatasource(),this.destroyRootStore(),super.destroy()}onRowHeightChangedDebounced(){this.onRowHeightChanged_debounced()}};function Kk(e){return e.selectionSvc?.getSelectionState()??null}function Yk(e,t){e.selectionSvc?.setSelectionState(t,"api")}function qk(e,t){return e.ssrmTxnManager?.applyTransaction(t)}function Xk(e,t){const o=t.startRow??0,i=t.route??[];if(o<0){_(189,{startRow:o});return}bi(e)?.applyRowData(t.successParams,o,i)}function Qk(e,t,o){return e.ssrmTxnManager?.applyTransactionAsync(t,o)}function Zk(e){bi(e)?.retryLoads()}function Jk(e){return e.ssrmTxnManager?.flushAsyncTransactions()}function eM(e,t){bi(e)?.refreshStore(t)}function tM(e){return bi(e)?.getStoreState()??[]}var oM=class extends ph{constructor(){super(...arguments),this.beanName="expansionSvc",this.queuedRowIds=new Set}wireBeans(e){this.serverSideRowModel=e.rowModel}postConstruct(){this.addManagedEventListeners({columnRowGroupChanged:()=>{this.queuedRowIds.clear()}})}checkOpenByDefault(e){if(!e.isExpandable())return;if(this.queuedRowIds.has(e.id)){this.queuedRowIds.delete(e.id),e.setExpanded(!0);return}const t=this.gos.getCallback("isServerSideGroupOpenByDefault");if(!t)return;const o={data:e.data,rowNode:e};t(o)&&e.setExpanded(!0)}expandRows(e){e.forEach(t=>{const o=this.serverSideRowModel.getRowNode(t);o?o.setExpanded(!0):this.queuedRowIds.add(t)})}expandAll(e){this.serverSideRowModel.expandAll(e)}onGroupExpandedOrCollapsed(){}dispatchExpandedEvent(e){this.eventSvc.dispatchEvent(e)}},Ua=class extends E{constructor(){super(...arguments),this.selectedState={selectAll:!1,toggledNodes:new Set},this.selectAllUsed=!1,this.selectedNodes={}}getSelectedState(){return{selectAll:this.selectedState.selectAll,toggledNodes:[...this.selectedState.toggledNodes]}}setSelectedState(e){if(typeof e!="object"){ce(116);return}if(!("selectAll"in e)){ce(116);return}if(typeof e.selectAll!="boolean"){ce(117);return}if(!("toggledNodes"in e)||!Array.isArray(e.toggledNodes))return _(197);const t={selectAll:e.selectAll,toggledNodes:new Set};e.toggledNodes.forEach(i=>{typeof i=="string"?t.toggledNodes.add(i):_(196,{key:i})});const o=t.selectAll||t.toggledNodes.size>1;if(pd(this.gos)&&!Oo(this.gos)&&o){_(130);return}this.selectedState=t}deleteSelectionStateFromParent(e,t){if(this.selectedState.toggledNodes.size===0)return!1;let o=!1;return t.forEach(i=>{this.selectedState.toggledNodes.delete(i)&&(o=!0)}),o}setNodesSelected(e){const{nodes:t,clearSelection:o,newValue:i}=e;if(t.length===0)return 0;const r=o&&i;if(!Oo(this.gos)||r){if(t.length>1)return ce(130),0;const n=t[0],a=n.footer?n.sibling:n;return i&&a.selectable?(this.selectedNodes={[a.id]:a},this.selectedState={selectAll:!1,toggledNodes:new Set([a.id])}):(this.selectedNodes={},this.selectedState={selectAll:!1,toggledNodes:new Set}),1}const s=(n,a=i)=>{const l=n.footer?n.sibling:n;a&&l.selectable?this.selectedNodes[l.id]=l:delete this.selectedNodes[l.id],a===this.selectedState.selectAll||!l.selectable?this.selectedState.toggledNodes.delete(l.id):this.selectedState.toggledNodes.add(l.id)};return t.forEach(n=>s(n)),1}processNewRow(e){this.selectedNodes[e.id]&&(this.selectedNodes[e.id]=e)}isNodeSelected(e){const t=this.selectedState.toggledNodes.has(e.id);return this.selectedState.selectAll?!t:t}getSelectedNodes(e=!1,t=!0){const{selectedState:{selectAll:o},selectedNodes:i,selectAllUsed:r}=this;return t&&r&&_(199),e&&o?null:Object.values(i)}getSelectedRows(){return(this.getSelectedNodes()??[]).map(e=>e.data)}getSelectionCount(){return this.selectedState.selectAll?-1:this.selectedState.toggledNodes.size}isEmpty(){return!this.selectedState.selectAll&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAll:e,toggledNodes:new Set},this.selectedNodes={},this.selectAllUsed||(this.selectAllUsed=e)}getSelectAllState(){return this.selectedState.selectAll?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},ks=class extends E{constructor(){super(...arguments),this.selectedState={selectAllChildren:!1,toggledNodes:new Map}}wireBeans(e){this.rowModel=e.rowModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.filterManager=e.filterManager,this.selectionSvc=e.selectionSvc}postConstruct(){this.addManagedEventListeners({modelUpdated:()=>this.removeRedundantState(),columnRowGroupChanged:()=>this.selectionSvc.reset("rowGroupChanged")})}getSelectedState(){const{gos:e,rowGroupColsSvc:t,selectedState:o}=this,i=e.get("treeData"),r=(s,n,a)=>{const l={nodeId:a};if((i||t&&n<=t.columns.length)&&(l.selectAllChildren=s.selectAllChildren),s.toggledNodes.size){const d=[];s.toggledNodes.forEach((c,u)=>{const g=r(c,n+1,u);d.push(g)}),l.toggledNodes=d}return l};return r(o,0)}setSelectedState(e){if("selectAll"in e){ce(111);return}const t=(o,i)=>{if(typeof o!="object")throw ce(243),new Error;if("selectAllChildren"in o&&typeof o.selectAllChildren!="boolean")throw ce(244),new Error;if("toggledNodes"in o){if(!Array.isArray(o.toggledNodes))throw ce(245),new Error;if(!o.toggledNodes.every(l=>typeof l=="object"&&"nodeId"in l&&typeof l.nodeId=="string"))throw ce(246),new Error}const r=o.selectAllChildren??!i,s=o.toggledNodes?.map(a=>[a.nodeId,t(a,r)]);if(s?.some(([,a])=>r===a.selectAllChildren&&a.toggledNodes.size===0))throw ce(247),new Error;return{selectAllChildren:r,toggledNodes:new Map(s)}};try{this.selectedState=t(e,!!e.selectAllChildren)}catch{}}deleteSelectionStateFromParent(e,t){let o=this.selectedState;const i=[...e];for(;o&&i.length;)o=o.toggledNodes.get(i.pop());if(!o)return!1;let r=!1;return t.forEach(s=>{o?.toggledNodes.delete(s)&&(r=!0)}),r&&this.removeRedundantState(),r}setNodesSelected({nodes:e,newValue:t,clearSelection:o}){if(e.length===0)return 0;const i=o&&t;if(!Oo(this.gos)||i){if(e.length>1)return ce(130),0;this.deselectAllRowNodes()}return e.forEach(r=>{const s=r.footer?r.sibling:r,n=this.getRouteToNode(s);this.recursivelySelectNode(n,this.selectedState,t)}),this.removeRedundantState(),1}isNodeSelected(e){const t=this.getRouteToNode(e);return this.isNodePathSelected(t,this.selectedState)}isNodePathSelected([e,...t],o){if(t.length===0){const i=o.toggledNodes.has(e.id);if(e.hasChildren()){const r=o.toggledNodes.get(e.id);if(r&&r.toggledNodes.size)return}return o.selectAllChildren?!i:i}if(o.toggledNodes.has(e.id)){const i=o.toggledNodes.get(e.id);if(i)return this.isNodePathSelected(t,i)}return o.selectAllChildren}getRouteToNode(e){const t=[];let o=e;for(;o.parent;)t.push(o),o=o.parent;return t.reverse()}removeRedundantState(){if(this.filterManager?.isAnyFilterPresent())return;const e=(t=this.selectedState,o,i)=>{if(t.toggledNodes.forEach((n,a)=>{e(n,a,t)}),o){const a=this.rowModel.getRowNode(o)?.childStore;if(a?.isLastRowIndexKnown()&&t.toggledNodes.size>=a.getRowCount()){for(const c of t.toggledNodes.entries()){const[u,g]=c;if(g.toggledNodes.size>0||!this.rowModel.getRowNode(u))return}t.selectAllChildren=!t.selectAllChildren,t.toggledNodes.clear()}}const r=t.toggledNodes.size===0,s=i?.selectAllChildren===t.selectAllChildren;r&&s&&i?.toggledNodes.delete(o)};e()}recursivelySelectNode([e,...t],o,i){if(!e)return;if(!t.length){const a=e.selectable;if(o.selectAllChildren===i||!a){o.toggledNodes.delete(e.id);return}const d={selectAllChildren:i,toggledNodes:new Map};o.toggledNodes.set(e.id,d);return}const s=o.toggledNodes.has(e.id),n=o.toggledNodes.get(e.id)??{selectAllChildren:o.selectAllChildren,toggledNodes:new Map};s||o.toggledNodes.set(e.id,n),this.recursivelySelectNode(t,n,i),o.selectAllChildren===n.selectAllChildren&&n.toggledNodes.size===0&&o.toggledNodes.delete(e.id)}getSelectedNodes(e=!1){if(_(202),this.selectedState.selectAllChildren&&e)return null;const t=[];return this.rowModel.forEachNode(o=>{o.isSelected()&&t.push(o)}),t}processNewRow(){}getSelectedRows(){return this.getSelectedNodes()?.map(e=>e.data)??[]}getSelectionCount(){return-1}isEmpty(){return!this.selectedState.selectAllChildren&&!this.selectedState.toggledNodes?.size}selectAllRowNodes(){this.reset(!0)}deselectAllRowNodes(){this.reset(!1)}reset(e){this.selectedState={selectAllChildren:e,toggledNodes:new Map}}getSelectAllState(){return this.selectedState.selectAllChildren?this.selectedState.toggledNodes.size>0?null:!0:this.selectedState.toggledNodes.size>0?null:!1}},iM=class extends hv{constructor(){super(...arguments),this.beanName="selectionSvc"}postConstruct(){super.postConstruct(),this.addManagedPropertyListeners(["groupSelectsChildren","rowSelection"],()=>{const o=Wi(this.gos),i=o&&this.selectionStrategy instanceof Ua?ks:!o&&this.selectionStrategy instanceof ks?Ua:void 0;i&&(this.destroyBean(this.selectionStrategy),this.selectionStrategy=this.createManagedBean(new i),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}),this.addManagedPropertyListeners(["rowSelection"],()=>{const o=Wr(this.gos);o!==this.selectionMode&&(this.selectionMode=o,this.deselectAllRowNodes({source:"api"}))}),this.selectionMode=Wr(this.gos);const t=Wi(this.gos)?ks:Ua;this.selectionStrategy=this.createManagedBean(new t)}handleSelectionEvent(e,t,o){if(this.isRowSelectionBlocked(t))return 0;let i=0;const r=this.inferNodeSelections(t,e.shiftKey,e.metaKey||e.ctrlKey,o);return r==null?0:(this.selectionCtx.selectAll=!1,"select"in r?(r.reset?this.selectionStrategy.deselectAllRowNodes({source:"api"}):this.selectionStrategy.setNodesSelected({nodes:r.deselect,newValue:!1,source:o}),i=this.selectionStrategy.setNodesSelected({nodes:r.select,newValue:!0,source:o})):i=this.selectionStrategy.setNodesSelected({nodes:[r.node],newValue:r.newValue,clearSelection:r.clearSelection,event:e,source:o}),this.shotgunResetNodeSelectionState(o),this.dispatchSelectionChanged(o),i)}getSelectionState(){return this.selectionStrategy.getSelectedState()}setSelectionState(e,t){if(!Wt(this.gos)){_(132);return}Array.isArray(e)||(this.selectionStrategy.setSelectedState(e),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged(t))}setNodesSelected(e){if(!Wt(this.gos)&&e.newValue)return _(132),0;const{nodes:t,...o}=e;if(t.length>1&&this.selectionMode!=="multiRow")return _(130),0;const i={nodes:t.filter(s=>s.selectable),...o};if(!i.nodes.length)return 0;const r=this.selectionStrategy.setNodesSelected(i);return this.shotgunResetNodeSelectionState(i.source),this.dispatchSelectionChanged(i.source),r}deleteSelectionStateFromParent(e,t){this.selectionStrategy.deleteSelectionStateFromParent(e,t)&&(this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api"))}shotgunResetNodeSelectionState(e){this.beans.rowModel.forEachNode(t=>{if(t.stub)return;const o=this.selectionStrategy.isNodeSelected(t);o!==t.isSelected()&&this.selectRowNode(t,o,void 0,e)})}getSelectedNodes(){return this.selectionStrategy.getSelectedNodes()??[]}getSelectedRows(){return this.selectionStrategy.getSelectedRows()}getSelectionCount(){return this.selectionStrategy.getSelectionCount()}syncInRowNode(e){this.selectionStrategy.processNewRow(e);const t=this.selectionStrategy.isNodeSelected(e);if(t!=!1&&!e.selectable){this.selectionStrategy.setNodesSelected({nodes:[e],newValue:!1,source:"api"}),this.shotgunResetNodeSelectionState(),this.dispatchSelectionChanged("api");return}e.__selected=t}reset(){this.selectionStrategy.deselectAllRowNodes({source:"api"}),this.selectionCtx.reset()}isEmpty(){return this.selectionStrategy.isEmpty()}hasNodesToSelect(){return!0}selectAllRowNodes(e){if(!Wt(this.gos)){_(132);return}if(Fh(e),pd(this.gos)&&!Oo(this.gos))return _(130);this.selectionStrategy.selectAllRowNodes(e),this.selectionCtx.selectAll=!0,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!0,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}deselectAllRowNodes(e){Fh(e),this.selectionStrategy.deselectAllRowNodes(e),this.selectionCtx.selectAll=!1,this.beans.rowModel.forEachNode(t=>{t.stub||this.selectRowNode(t,!1,void 0,e.source)}),this.dispatchSelectionChanged(e.source)}getSelectAllState(e){return this.selectionStrategy.getSelectAllState(e)}getBestCostNodeSelection(){return _(194,{method:"getBestCostNodeSelection"})}updateSelectable(){if(!Wt(this.gos))return;const e=[];this.beans.rowModel.forEachNode(t=>{!this.updateRowSelectable(t,!0)&&t.isSelected()&&e.push(t)}),e.length&&this.setNodesSelected({nodes:e,newValue:!1,source:"selectableChanged"})}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e,selectedNodes:this.selectionStrategy instanceof ks?null:this.selectionStrategy.getSelectedNodes(!0,!1),serverSideState:this.getSelectionState()})}updateSelectableAfterGrouping(){return ce(194,{method:"updateSelectableAfterGrouping"})}refreshMasterNodeState(){}setDetailSelectionState(){}};function Fh({selectAll:e}){(e==="filtered"||e==="currentPage")&&_(195,{justCurrentPage:e==="currentPage"})}var rM=class extends E{constructor(){super(...arguments),this.beanName="rowChildrenSvc"}getHasChildrenValue(e){const t=this.gos.get("treeData"),o=this.gos.get("isServerSideGroup");return!e.stub&&!e.footer&&(t?!!o&&o(e.data):!!e.group)}},sM=class extends E{constructor(){super(...arguments),this.beanName="lazyBlockLoadingSvc",this.outboundRequests=0,this.cacheLoadingNodesMap=new Map,this.isCheckQueued=!1,this.nextBlockToLoad=void 0}wireBeans(e){this.rowRenderer=e.rowRenderer,this.rowModel=e.rowModel}postConstruct(){this.maxOutboundRequests=Op(this.gos)}subscribe(e){this.cacheLoadingNodesMap.set(e,new Set)}unsubscribe(e){this.cacheLoadingNodesMap.delete(e)}queueLoadCheck(){this.isCheckQueued||(this.isCheckQueued=!0,window.queueMicrotask(()=>{this.queueLoadAction(),this.isCheckQueued=!1}))}onLoadComplete(){this.outboundRequests-=1,this.queueLoadCheck()}hasAvailableLoadBandwidth(){return this.maxOutboundRequests===void 0?!0:this.outboundRequests<this.maxOutboundRequests}queueLoadAction(){const e=this.getBlockToLoad();if(!e)return;const t=this.nextBlockToLoad&&this.nextBlockToLoad.cache===e.cache&&this.nextBlockToLoad.index===e.index;if(!t&&(!this.nextBlockToLoad||!t)){this.nextBlockToLoad=e,window.clearTimeout(this.loaderTimeout);const o=Number(this.nextBlockToLoad.index),i=this.nextBlockToLoad.cache,r=e.index+e.cache.getBlockSize();this.loaderTimeout=window.setTimeout(()=>{i.isAlive()&&(this.loaderTimeout=void 0,this.attemptLoad(i,o,r),this.nextBlockToLoad=void 0)},this.gos.get("blockLoadDebounceMillis"))}}attemptLoad(e,t,o){this.hasAvailableLoadBandwidth()&&(this.executeLoad(e,t,o),this.queueLoadCheck())}executeLoad(e,t,o){const i=e.getSsrmParams(),r={startRow:t,endRow:o,rowGroupCols:i.rowGroupCols,valueCols:i.valueCols,pivotCols:i.pivotCols,pivotMode:i.pivotMode,groupKeys:e.store.getParentNode().getRoute()??[],filterModel:i.filterModel,sortModel:i.sortModel},s=this.cacheLoadingNodesMap.get(e),n=()=>{for(let u=0;u<o-t;u++)s.delete(t+u)},a=()=>{for(let u=0;u<o-t;u++)s.add(t+u)},l=u=>{this.onLoadComplete(),e.onLoadSuccess(t,o-t,u),n()},d=()=>{this.onLoadComplete(),e.onLoadFailed(t,o-t),n()},c=Z(this.gos,{request:r,success:l,fail:d,parentNode:e.store.getParentNode()});a(),this.outboundRequests+=1,e.getSsrmParams().datasource?.getRows(c)}getBlockToLoad(){const e=this.rowRenderer.firstRenderedRow,t=this.rowRenderer.lastRenderedRow;for(let a=e;a<=t;a++){const l=this.rowModel.getRow(a);if(!l)continue;const d=l.parent?.childStore;if(!d)continue;const c=d.getCache(),u=c.getNodes().getBy("node",l);if(!(!u||this.cacheLoadingNodesMap.get(c)?.has(u.index))&&(l.__needsRefreshWhenVisible||l.stub&&!l.failedLoad))return{cache:c,index:c.getBlockStartIndex(u.index)}}let o=null,i=null,r=Number.MAX_SAFE_INTEGER;for(const a of this.cacheLoadingNodesMap.keys())a.getNodesToRefresh().forEach(d=>{if(d.rowIndex==null){i=d,o=a;return}const c=a.getNodes().getBy("node",d);if(!c||this.cacheLoadingNodesMap.get(a)?.has(c.index))return;const g=Math.abs(e-d.rowIndex),p=Math.abs(d.rowIndex-t);g<r&&(i=d,r=g,o=a),p<r&&(i=d,r=p,o=a)});if(!o)return;const s=o,n=s.getNodes().getBy("node",i)?.index;return n==null?void 0:{cache:s,index:s.getBlockStartIndex(n)}}isRowLoading(e,t){return this.cacheLoadingNodesMap.get(e)?.has(t)??!1}},nM=class{constructor(...e){this.indexes=e,this.maps=new Map(this.indexes.map(t=>[t,new Map]))}getSize(){return this.maps.get(this.indexes[0]).size}getBy(e,t){return this.maps.get(e).get(t)}set(e){this.indexes.forEach(t=>{this.maps.get(t).set(e[t],e)})}delete(e){this.indexes.forEach(t=>{this.maps.get(t).delete(e[t])})}clear(){this.maps.forEach(e=>e.clear())}getIterator(e){return this.maps.get(e).values()}forEach(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)e(o.value)}find(e){const t=this.getIterator(this.indexes[0]);let o;for(;(o=t.next())&&!o.done;)if(e(o.value))return o.value}filter(e){const t=this.getIterator(this.indexes[0]);let o;const i=[];for(;(o=t.next())&&!o.done;)e(o.value)&&i.push(o.value);return i}},aM=100,ja=class extends E{constructor(e,t,o,i){super(),this.live=!0,this.removedNodeCache=new Map,this.store=e,this.numberOfRows=t,this.isLastRowKnown=o,this.storeParams=i}wireBeans(e){this.rowRenderer=e.rowRenderer,this.blockUtils=e.ssrmBlockUtils,this.focusSvc=e.focusSvc,this.nodeManager=e.ssrmNodeManager,this.serverSideRowModel=e.rowModel,this.rowNodeSorter=e.rowNodeSorter,this.sortSvc=e.sortSvc,this.lazyBlockLoadingSvc=e.lazyBlockLoadingSvc,this.colModel=e.colModel}postConstruct(){this.lazyBlockLoadingSvc.subscribe(this),this.nodeMap=new nM("index","id","node"),this.nodeDisplayIndexMap=new Map,this.nodesToRefresh=new Set,this.defaultNodeIdPrefix=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),this.getRowIdFunc=_i(this.gos),this.isMasterDetail=this.gos.get("masterDetail")}destroy(){this.lazyBlockLoadingSvc.unsubscribe(this),this.numberOfRows=0,this.nodeMap.forEach(e=>this.blockUtils.destroyRowNode(e.node)),this.nodeMap.clear(),this.nodeDisplayIndexMap.clear(),this.nodesToRefresh.clear(),this.live=!1,super.destroy()}getRowByDisplayIndex(e){if(!this.store.isDisplayIndexInStore(e))return;const t=this.nodeDisplayIndexMap.get(e);if(t)return(t.stub||t.__needsRefreshWhenVisible)&&this.lazyBlockLoadingSvc.queueLoadCheck(),t;if(this.gos.get("groupHideOpenParents")||this.gos.get("groupAllowUnbalanced")){const l=this.nodeMap.find(d=>!!d.node.childStore?.isDisplayIndexInStore(e));if(l)return l.node.childStore?.getRowUsingDisplayIndex(e)}if(e===this.store.getDisplayIndexStart())return this.createStubNode(0,e);const i=this.nodeDisplayIndexMap.get(e-1);if(i){if(this.isMasterDetail&&i.master&&i.expanded)return i.detailNode;if(i.expanded&&i.childStore?.isDisplayIndexInStore(e))return i.childStore?.getRowUsingDisplayIndex(e);const l=this.nodeMap.getBy("node",i);return this.createStubNode(l.index+1,e)}const r=this.getSurroundingNodesByDisplayIndex(e);if(r==null){const l=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(l,e)}const{previousNode:s,nextNode:n}=r;if(s&&s.node.expanded&&s.node.childStore?.isDisplayIndexInStore(e))return s.node.childStore?.getRowUsingDisplayIndex(e);if(n){const l=n.node.rowIndex-e,d=n.index-l;return this.createStubNode(d,e)}const a=this.store.getRowCount()-(this.store.getDisplayIndexEnd()-e);return this.createStubNode(a,e)}createStubNode(e,t){const o=this.store.getRowBounds(t),i=this.createRowAtIndex(e,null,r=>{r.setRowIndex(t),r.setRowTop(o.rowTop),this.nodeDisplayIndexMap.set(t,r)});if(e===0&&this.gos.get("groupHideOpenParents")){const r=this.store.getParentNode().groupData;if(r)for(const s of Object.keys(r))oh(i,this.colModel,s,r[s])}return this.lazyBlockLoadingSvc.queueLoadCheck(),i}getRowByStoreIndex(e){return this.nodeMap.getBy("index",e)?.node}skipDisplayIndexes(e,t,o){if(e===0)return;const i=vo(this.beans);t.value+=e,o.value+=e*i}setDisplayIndexes(e,t,o){this.nodeDisplayIndexMap.clear();const i={};this.nodeMap.forEach(n=>{i[n.index]=n.node});let r=-1;for(const n of Object.keys(i)){const a=i[n],l=Number(n),d=l-1-r;this.skipDisplayIndexes(d,e,t);const c=l===0;if(a.setFirstChild(c),c&&this.gos.get("groupHideOpenParents")){const u=this.store.getParentNode().groupData;if(u)for(const g of Object.keys(u))oh(a,this.colModel,g,c?u[g]:void 0)}this.blockUtils.setDisplayIndex(a,e,t,o),a.rowIndex!=null&&this.nodeDisplayIndexMap.set(a.rowIndex,a),r=l}const s=this.numberOfRows-1-r;this.skipDisplayIndexes(s,e,t),this.purgeExcessRows()}getRowCount(){return this.numberOfRows}setRowCount(e,t){this.numberOfRows=e,t!=null&&(this.isLastRowKnown=t,t===!1&&(this.numberOfRows+=1)),this.fireStoreUpdatedEvent()}getNodes(){return this.nodeMap}getNodeCachedByDisplayIndex(e){return this.nodeDisplayIndexMap.get(e)??null}getNodesToRefresh(){return this.nodesToRefresh}getSurroundingNodesByDisplayIndex(e){let t,o;return this.nodeMap.forEach(i=>{if(e>i.node.rowIndex){(o==null||o.node.rowIndex<i.node.rowIndex)&&(o=i);return}if(t==null||t.node.rowIndex>i.node.rowIndex){t=i;return}}),!o&&!t?null:{previousNode:o,nextNode:t}}getDisplayIndexFromStoreIndex(e){const t=this.nodeMap.getBy("index",e);if(t)return t.node.rowIndex;let o,i;if(this.nodeMap.forEach(n=>{if(e>n.index){(i==null||i.index<n.index)&&(i=n);return}if(o==null||o.index>n.index){o=n;return}}),!o)return this.store.getDisplayIndexEnd()-(this.numberOfRows-e);if(!i)return this.store.getDisplayIndexStart()+e;const r=e-i.index;return(i.node.childStore?.getDisplayIndexEnd()??i.node.rowIndex)+r}createRowAtIndex(e,t,o){const i=this.nodeMap.getBy("index",e);if(i){const{node:s}=i;if(s.__needsRefreshWhenVisible=!1,this.doesNodeMatch(t,s))return this.blockUtils.updateDataIntoRowNode(s,t),this.nodesToRefresh.delete(s),s;if(this.getRowIdFunc==null&&s.hasChildren()&&s.expanded)return this.nodesToRefresh.delete(s),s;this.destroyRowAtIndex(e)}if(t&&this.getRowIdFunc!=null){const s=this.getRowId(t),n=s&&this.removedNodeCache?.get(s);if(n)return this.removedNodeCache?.delete(s),this.blockUtils.updateDataIntoRowNode(n,t),this.nodeMap.set({id:n.id,node:n,index:e}),this.nodesToRefresh.delete(n),n.__needsRefreshWhenVisible=!1,n;const a=this.nodeMap.getBy("id",s);if(a){this.nodeMap.delete(a);const{node:l,index:d}=a;return this.blockUtils.updateDataIntoRowNode(l,t),this.nodeMap.set({id:l.id,node:l,index:e}),this.nodesToRefresh.delete(l),l.__needsRefreshWhenVisible=!1,this.getBlockStartIndex(d)===this.getBlockStartIndex(e)||this.markBlockForVerify(d),l}}const r=this.blockUtils.createRowNode(this.store.getRowDetails());if(t!=null){const s=this.getPrefixedId(this.store.getIdSequence().value++);this.blockUtils.setDataIntoRowNode(r,t,s,void 0),this.serverSideRowModel.setPaused(!0),this.blockUtils.checkOpenByDefault(r),this.serverSideRowModel.setPaused(!1),this.nodeManager.addRowNode(r)}return this.nodeMap.set({id:r.id,node:r,index:e}),o&&o(r),r}getBlockStates(){const e={},t={};this.nodeMap.forEach(({node:s,index:n})=>{const a=this.getBlockStartIndex(n);!s.stub&&!s.failedLoad&&(e[a]=(e[a]??0)+1);let l="loaded";s.failedLoad?l="failed":this.lazyBlockLoadingSvc.isRowLoading(this,a)?l="loading":(this.nodesToRefresh.has(s)||s.stub)&&(l="needsLoading"),t[a]||(t[a]=new Set),t[a].add(l)});const o={loading:4,failed:3,needsLoading:2,loaded:1},i=this.blockUtils.createNodeIdPrefix(this.store.getParentNode()),r={};for(const s of Object.keys(t)){const a=[...t[s]].sort((c,u)=>(o[c]??0)-(o[u]??0))[0],l=Number(s)/this.getBlockSize(),d=i?`${i}-${l}`:String(l);r[d]={blockNumber:l,startRow:Number(s),endRow:Number(s)+this.getBlockSize(),pageStatus:a,loadedRowCount:e[s]??0}}return r}destroyRowAtIndex(e){const t=this.nodeMap.getBy("index",e);t&&(this.nodeMap.delete(t),this.nodeDisplayIndexMap.delete(t.node.rowIndex),this.nodesToRefresh.size>0?this.removedNodeCache.set(t.node.id,t.node):this.blockUtils.destroyRowNode(t.node),this.nodesToRefresh.delete(t.node))}getSsrmParams(){return this.store.getSsrmParams()}getPrefixedId(e){return this.defaultNodeIdPrefix?this.defaultNodeIdPrefix+"-"+e:e.toString()}markBlockForVerify(e){const[t,o]=this.getBlockBounds(e);this.nodeMap.filter(r=>r.index>=t&&r.index<o).forEach(({node:r})=>{r.__needsRefreshWhenVisible=!0})}doesNodeMatch(e,t){if(t.stub)return!1;const o=this.getRowId(e);return o===null?t.data===e:t.id===o}purgeStubsOutsideOfViewport(){const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=this.getBlockStartIndex(e),[,i]=this.getBlockBounds(t);this.nodeMap.forEach(r=>{this.lazyBlockLoadingSvc.isRowLoading(this,r.index)||r.node.failedLoad||r.node.stub&&(r.index<o||r.index>i)&&this.destroyRowAtIndex(r.index)})}getBlocksDistanceFromRow(e,t){const o={};return e.forEach(({node:i,index:r})=>{const[s,n]=this.getBlockBounds(r);if(s in o)return;const a=Math.abs(i.rowIndex-t);let l;const d=this.nodeMap.getBy("index",[n-1]);d&&(l=Math.abs(d.node.rowIndex-t));const c=l==null||a<l?a:l;o[s]=c}),Object.entries(o)}purgeExcessRows(){if(this.purgeStubsOutsideOfViewport(),this.store.getDisplayIndexEnd()==null||this.storeParams.maxBlocksInCache==null)return;const{firstRenderedRow:e,lastRenderedRow:t}=this.rowRenderer,o=new Set,i=new Set;this.nodeMap.forEach(({index:p,node:f})=>{const m=this.getBlockStartIndex(p);o.add(m),f.rowIndex>=e&&f.rowIndex<=t&&i.add(m)});const r=Math.max(i.size,this.storeParams.maxBlocksInCache??0),n=o.size-r;if(n<=0)return;let a=Number.MAX_SAFE_INTEGER,l=Number.MIN_SAFE_INTEGER;i.forEach(p=>{a>p&&(a=p),l<p&&(l=p)});const d=this.nodeMap.filter(({node:p,index:f})=>{const m=this.getBlockStartIndex(f);return!(m>=a&&m<=l)&&!this.isNodeCached(p)});if(d.length===0)return;const c=e+(t-e)/2,u=this.getBlocksDistanceFromRow(d,c),g=this.getBlockSize();u.sort((p,f)=>Math.sign(f[1]-p[1]));for(let p=0;p<Math.min(n,u.length);p++){const f=Number(u[p][0]);for(let m=f;m<f+g;m++){const C=this.nodeMap.getBy("index",m);!C||this.isNodeCached(C.node)||this.destroyRowAtIndex(m)}}}isNodeFocused(e){const t=this.focusSvc.getFocusCellToUseAfterRefresh();return!t||t.rowPinned!=null?!1:t.rowIndex===e.rowIndex}isNodeCached(e){const t=this.gos.get("groupAllowUnbalanced")&&e.key==="";return e.isExpandable()&&e.expanded||this.isNodeFocused(e)||t}extractDuplicateIds(e){if(this.getRowIdFunc==null)return[];const t=new Set,o=new Set;return e.forEach(i=>{const r=this.getRowId(i);if(t.has(r)){o.add(r);return}t.add(r)}),[...o]}onLoadSuccess(e,t,o){if(!this.live)return;const i=o.groupLevelInfo;if(this.store.setStoreInfo(i),this.getRowIdFunc!=null){const n=this.extractDuplicateIds(o.rowData);if(n.length>0){const a=n.join(", ");_(205,{duplicateIdText:a}),this.onLoadFailed(e,t);return}}o.pivotResultFields&&this.serverSideRowModel.generateSecondaryColumns(o.pivotResultFields);const r=this.nodesToRefresh.size>0;if(o.rowData.forEach((n,a)=>{const l=e+a,d=this.nodeMap.getBy("index",l);if(d?.node?.stub){this.createRowAtIndex(l,n);return}if(d&&this.doesNodeMatch(n,d.node)){this.blockUtils.updateDataIntoRowNode(d.node,n),this.nodesToRefresh.delete(d.node),d.node.__needsRefreshWhenVisible=!1;return}this.createRowAtIndex(l,n)}),o.rowCount!=null&&o.rowCount!==-1)this.numberOfRows=o.rowCount,this.isLastRowKnown=!0;else if(t>o.rowData.length)this.numberOfRows=e+o.rowData.length,this.isLastRowKnown=!0;else if(!this.isLastRowKnown){const n=e+o.rowData.length+1;n>this.numberOfRows&&(this.numberOfRows=n)}this.isLastRowKnown&&this.nodeMap.filter(a=>a.index>=this.numberOfRows).forEach(a=>this.destroyRowAtIndex(a.index)),this.fireStoreUpdatedEvent();const s=this.nodesToRefresh.size===0;r&&s&&this.fireRefreshFinishedEvent()}fireRefreshFinishedEvent(){this.nodesToRefresh.size===0&&(this.removedNodeCache.forEach(t=>{this.blockUtils.destroyRowNode(t)}),this.removedNodeCache=new Map,this.store.fireRefreshFinishedEvent())}isStoreFullyLoaded(){const e=this.isLastRowKnown,t=this.nodeMap.getSize()===this.numberOfRows;if(!e||!t||this.nodesToRefresh.size>0)return;let o=-1;return this.nodeMap.find(r=>(o+=1,!!(r.index!==o||r.node.__needsRefreshWhenVisible||r.node.stub)))==null}isLastRowIndexKnown(){return this.isLastRowKnown}onLoadFailed(e,t){if(!this.live)return;const o=this.nodesToRefresh.size>0;for(let r=e;r<e+t&&r<this.getRowCount();r++){let{node:s}=this.nodeMap.getBy("index",r)??{};s&&this.nodesToRefresh.delete(s),(!s||!s.stub)&&(s&&!s.stub&&this.destroyRowAtIndex(r),s=this.createRowAtIndex(r)),s.__needsRefreshWhenVisible=!1,s.failedLoad=!0}const i=this.nodesToRefresh.size===0;o&&i&&this.fireRefreshFinishedEvent(),this.fireStoreUpdatedEvent()}markNodesForRefresh(){this.nodeMap.forEach(e=>{e.node.stub&&!e.node.failedLoad||this.nodesToRefresh.add(e.node)}),this.lazyBlockLoadingSvc.queueLoadCheck(),this.isLastRowKnown&&this.numberOfRows===0&&(this.numberOfRows=1,this.isLastRowKnown=!1,this.fireStoreUpdatedEvent())}isNodeInCache(e){return!!this.nodeMap.getBy("id",e)}fireStoreUpdatedEvent(){this.live&&this.store.fireStoreUpdatedEvent()}getRowId(e){if(this.getRowIdFunc==null)return null;const{level:t}=this.store.getRowDetails(),o=this.store.getParentNode().getRoute()??[];return this.getRowIdFunc({data:e,parentKeys:o.length>0?o:void 0,level:t})}getOrderedNodeMap(){const e={};return this.nodeMap.forEach(t=>e[t.index]=t),e}clearDisplayIndexes(){this.nodeDisplayIndexMap.clear()}clientSideSortRows(){const e=this.sortSvc?.getSortOptions()??[];if(!e.some(r=>r.sort!=null)||!this.rowNodeSorter)return;const o=new Array(this.nodeMap.getSize());this.nodeMap.forEach(r=>o[r.index]=r.node),this.nodeMap.clear(),this.rowNodeSorter.doFullSort(o,e).forEach((r,s)=>{this.nodeMap.set({id:r.id,node:r,index:s})})}updateRowNodes(e){const t=[];return e.forEach(o=>{const i=this.getRowId(o),r=this.nodeMap.getBy("id",i);r&&(this.blockUtils.updateDataIntoRowNode(r.node,o),t.push(r.node))}),t}insertRowNodes(e,t){const o=this.store.getRowCount()-(this.store.getParentNode().sibling?1:0),i=t==null&&this.isLastRowKnown?o:t;if(i==null||o<i)return[];const r={};e.forEach(l=>{const d=this.getRowId(l);d&&this.isNodeInCache(d)||(r[d]=l)});const s=Object.values(r),n=s.length;if(n===0)return[];const a=this.nodeMap.filter(l=>l.index>=i);return a.forEach(l=>this.nodeMap.delete(l)),a.forEach(l=>{this.nodeMap.set({node:l.node,index:l.index+n,id:l.id})}),this.numberOfRows+=n,s.map((l,d)=>this.createRowAtIndex(i+d,l))}removeRowNodes(e){const t=[],o=[];let i=0;const r=[...e],s=this.getOrderedNodeMap();let n=-1;for(const a of Object.keys(s)){n+=1;const l=s[a],d=r.findIndex(u=>u===l.id);if(d!==-1){r.splice(d,1),this.destroyRowAtIndex(Number(a)),t.push(l.node),i+=1;continue}if(i===0)continue;const c=Number(a);n!==c&&o.push(l.node),this.nodeMap.delete(l),this.nodeMap.set({id:l.id,node:l.node,index:c-i})}return this.numberOfRows-=this.isLastRowIndexKnown()?e.length:i,r.length>0&&o.length>0&&(o.forEach(a=>a.__needsRefreshWhenVisible=!0),this.lazyBlockLoadingSvc.queueLoadCheck()),t}getBlockSize(){return this.storeParams.cacheBlockSize||aM}getBlockStartIndex(e){const t=this.getBlockSize();return e-e%t}getBlockBounds(e){const t=this.getBlockStartIndex(e),o=this.getBlockSize();return[t,t+o]}},lM=class extends E{constructor(e,t,o){super(),this.idSequence={value:0},this.ssrmParams=e,this.parentRowNode=o,this.storeParams=t,this.level=o.level+1,this.group=e.rowGroupCols?this.level<e.rowGroupCols.length:!1,this.leafGroup=e.rowGroupCols?this.level===e.rowGroupCols.length-1:!1,this.info={}}wireBeans(e){this.blockUtils=e.ssrmBlockUtils,this.storeUtils=e.ssrmStoreUtils,this.selectionSvc=e.selectionSvc,this.rowGroupColsSvc=e.rowGroupColsSvc}postConstruct(){let e=1;if(this.level===0&&(e=this.storeUtils.getServerSideInitialRowCount()??1,this.eventSvc.dispatchEventOnce({type:"rowCountReady"})),this.cache=this.createManagedBean(new ja(this,e,!1,this.storeParams)),!this.gos.get("treeData")&&this.group&&this.rowGroupColsSvc){const o=this.ssrmParams.rowGroupCols[this.level];this.groupField=o.field,this.rowGroupColumn=this.rowGroupColsSvc.columns[this.level]}}destroy(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.destroyBean(this.cache),super.destroy()}applyRowData(e,t,o){this.cache.onLoadSuccess(t,o,e)}applyTransaction(e){const t=_i(this.gos);if(!t)return _(206),{status:Kt.Cancelled};const o=this.gos.getCallback("isApplyServerSideTransaction");if(o){const c={transaction:e,parentNode:this.parentRowNode,groupLevelInfo:this.info};if(!o(c))return{status:Kt.Cancelled}}const i=this.cache.isStoreFullyLoaded();let r;e.update?.length&&(r=this.cache.updateRowNodes(e.update));let s;if(e.add?.length){let c=e.addIndex;c!=null&&c<0&&(c=void 0),s=this.cache.insertRowNodes(e.add,c)}let n;if(e.remove?.length){const c=e.remove.map(g=>t({level:this.level,parentKeys:this.parentRowNode.getRoute()??[],data:g})),u=[...new Set(c)];n=this.cache.removeRowNodes(u)}const a=this.gos.get("serverSideEnableClientSideSort"),l=r?.length||s?.length;return i&&a&&l&&this.cache.clientSideSortRows(),this.updateSelectionAfterTransaction(r,n),{status:Kt.Applied,update:r,add:s,remove:n}}updateSelectionAfterTransaction(e,t){if(!this.selectionSvc)return;const o=[];e?.forEach(i=>{i.isSelected()&&!i.selectable&&o.push(i)}),t?.forEach(i=>{i.isSelected()&&o.push(i)}),o.length&&this.selectionSvc.setNodesSelected({newValue:!1,clearSelection:!1,nodes:o,source:"rowDataChanged"})}clearDisplayIndexes(){this.displayIndexStart=void 0,this.displayIndexEnd=void 0,this.cache.getNodes().forEach(e=>this.blockUtils.clearDisplayIndex(e.node)),this.parentRowNode.sibling&&this.blockUtils.clearDisplayIndex(this.parentRowNode.sibling),this.cache.clearDisplayIndexes()}getDisplayIndexStart(){return this.displayIndexStart}getDisplayIndexEnd(){return this.displayIndexEnd}getRowCount(){return this.parentRowNode.sibling?this.cache.getRowCount()+1:this.cache.getRowCount()}setRowCount(e,t){this.cache.setRowCount(e,t)}isDisplayIndexInStore(e){return this.cache.getRowCount()===0?!1:this.displayIndexStart<=e&&e<this.getDisplayIndexEnd()}setDisplayIndexes(e,t,o){this.displayIndexStart=e.value,this.topPx=t.value;const i=this.parentRowNode.level>-1&&di(this.gos)({node:this.parentRowNode});i||_a(this.parentRowNode),i==="top"&&(ao(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.cache.setDisplayIndexes(e,t,o),i==="bottom"&&(ao(this.parentRowNode,this.beans),this.blockUtils.setDisplayIndex(this.parentRowNode.sibling,e,t,o)),this.displayIndexEnd=e.value,this.heightPx=t.value-this.topPx}forEachStoreDeep(e,t={value:0}){e(this,t.value++),this.cache.getNodes().forEach(o=>{const i=o.node.childStore;i&&i.forEachStoreDeep(e,t)})}forEachNodeDeep(e,t={value:0}){this.cache.getNodes().forEach(o=>{e(o.node,t.value++);const i=o.node.childStore;i&&i.forEachNodeDeep(e,t)})}forEachNodeDeepAfterFilterAndSort(e,t={value:0},o=!1){const i=this.parentRowNode.level>-1&&di(this.gos)({node:this.parentRowNode});i==="top"&&e(this.parentRowNode.sibling,t.value++);const r=this.cache.getOrderedNodeMap();for(const s of Object.values(r)){e(s.node,t.value++);const n=s.node.childStore;n&&n.forEachNodeDeepAfterFilterAndSort(e,t,o)}i==="bottom"&&e(this.parentRowNode.sibling,t.value++)}retryLoads(){this.cache.getNodes().forEach(({node:e})=>{e.failedLoad&&(e.failedLoad=!1,e.__needsRefreshWhenVisible=!0,e.stub=!0)}),this.forEachChildStoreShallow(e=>e.retryLoads()),this.fireStoreUpdatedEvent()}getRowUsingDisplayIndex(e){return this.parentRowNode.sibling&&e===this.parentRowNode.sibling.rowIndex?this.parentRowNode.sibling:this.cache.getRowByDisplayIndex(e)}getRowBounds(e){if(!this.isDisplayIndexInStore(e))return null;const t=this.cache.getNodeCachedByDisplayIndex(e);if(t){const a=this.blockUtils.extractRowBounds(t,e);if(a)return a}const{previousNode:o,nextNode:i}=this.cache.getSurroundingNodesByDisplayIndex(e)??{};if(o){const a=this.blockUtils.extractRowBounds(o.node,e);if(a!=null)return a}const r=vo(this.beans);if(i){const a=(i.node.rowIndex-e)*r;return{rowTop:i.node.rowTop-a,rowHeight:r}}const s=this.topPx+this.heightPx,n=(this.getDisplayIndexEnd()-e)*r;return{rowTop:s-n,rowHeight:r}}isPixelInRange(e){return e>=this.topPx&&e<this.topPx+this.heightPx}getRowIndexAtPixel(e){if(e<this.topPx)return this.getDisplayIndexStart();if(e>=this.topPx+this.heightPx)return this.getDisplayIndexEnd()-1;if(this.parentRowNode.sibling&&e>this.parentRowNode.sibling.rowTop&&e<this.parentRowNode.sibling.rowTop+this.parentRowNode.sibling.rowHeight)return this.parentRowNode.sibling.rowIndex;let t=Number.MAX_SAFE_INTEGER,o=null,i=Number.MAX_SAFE_INTEGER,r=null;if(this.cache.getNodes().forEach(({node:l})=>{const d=Math.abs(e-l.rowTop);if(l.rowTop<e){d<t&&(t=d,o=l);return}d<i&&(i=d,r=l)}),o=o,r=r,o){const l=this.blockUtils.getIndexAtPixel(o,e);if(l!=null)return l}const s=vo(this.beans);if(r){const l=r.rowTop,d=Math.ceil((l-e)/s);return r.rowIndex-d}const n=this.topPx+this.heightPx,a=Math.floor((n-e)/s);return this.getDisplayIndexEnd()-a}getChildStore(e){return this.storeUtils.getChildStore(e,this,t=>{const o=this.cache.getNodes().find(i=>i.node.key==t);return o?o.node:null})}forEachChildStoreShallow(e){this.cache.getNodes().forEach(({node:t})=>{t.childStore&&e(t.childStore)})}refreshAfterSort(e){if(this.storeUtils.isServerSideSortAllLevels()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){const o=this.cache.isStoreFullyLoaded(),i=this.gos.get("serverSideEnableClientSideSort");if(!(o&&i)){const s=this.cache.getRowCount(),n=this.cache.isLastRowIndexKnown();this.destroyBean(this.cache),this.cache=this.createManagedBean(new ja(this,s,n,this.storeParams));return}this.cache.clientSideSortRows()}this.forEachChildStoreShallow(o=>o.refreshAfterSort(e))}refreshAfterFilter(e){if(!this.storeUtils.isServerSideOnlyRefreshFilteredGroups()||this.storeUtils.isServerRefreshNeeded(this.parentRowNode,this.ssrmParams.rowGroupCols,e)){this.refreshStore(!0);return}this.forEachChildStoreShallow(o=>o.refreshAfterFilter(e))}refreshStore(e){if(e){this.destroyBean(this.cache),this.cache=this.createManagedBean(new ja(this,1,!1,this.storeParams)),this.fireStoreUpdatedEvent();return}this.cache.markNodesForRefresh()}getTopLevelRowDisplayedIndex(e){return this.cache.getDisplayIndexFromStoreIndex(e)??e}isLastRowIndexKnown(){return this.cache.isLastRowIndexKnown()}getRowNodesInRange(e,t){return this.cache.getNodes().filter(({node:o})=>o.rowIndex>=e.rowIndex&&o.rowIndex<=t.rowIndex).map(({node:o})=>o)}addStoreStates(e){e.push({route:this.parentRowNode.getRoute()??[],rowCount:this.getRowCount(),lastRowIndexKnown:this.isLastRowIndexKnown(),info:this.info,maxBlocksInCache:this.storeParams.maxBlocksInCache,cacheBlockSize:this.storeParams.cacheBlockSize}),this.forEachChildStoreShallow(t=>t.addStoreStates(e))}getIdSequence(){return this.idSequence}getParentNode(){return this.parentRowNode}getRowDetails(){return{field:this.groupField,group:this.group,leafGroup:this.leafGroup,level:this.level,parent:this.parentRowNode,rowGroupColumn:this.rowGroupColumn}}getSsrmParams(){return this.ssrmParams}setStoreInfo(e){e&&Object.assign(this.info,e)}fireStoreUpdatedEvent(){this.eventSvc.dispatchEvent({type:"storeUpdated"})}fireRefreshFinishedEvent(){this.eventSvc.dispatchEvent({type:"storeRefreshed",route:this.parentRowNode.getRoute()})}getBlockStates(){return this.cache.getBlockStates()}getStoreBounds(){return{topPx:this.topPx,heightPx:this.heightPx}}getCache(){return this.cache}},dM=class extends E{constructor(){super(...arguments),this.beanName="ssrmStoreFactory"}wireBeans(e){this.colModel=e.colModel,this.rowGroupColsSvc=e.rowGroupColsSvc,this.pivotColsSvc=e.pivotColsSvc,this.rowAutoHeight=e.rowAutoHeight}createStore(e,t){const o=this.getStoreParams(e,t);return new lM(e,o,t)}getStoreParams(e,t){const o=this.getLevelSpecificParams(t),i=this.getBlockSize(o),r=this.getMaxBlocksInCache(e,o);return{cacheBlockSize:i,maxBlocksInCache:r}}getMaxBlocksInCache(e,t){const o=t&&t.maxBlocksInCache!=null?t.maxBlocksInCache:this.gos.get("maxBlocksInCache");if(o!=null&&o>=0){if(e.dynamicRowHeight){_(203);return}if(this.rowAutoHeight?.active){_(204);return}return o}}getBlockSize(e){const t=e&&e.cacheBlockSize!=null?e.cacheBlockSize:this.gos.get("cacheBlockSize");return t!=null&&t>0?t:100}getLevelSpecificParams(e){const t=this.gos.getCallback("getServerSideGroupLevelParams");if(!t)return;const o={level:e.level+1,parentRowNode:e.level>=0?e:void 0,rowGroupColumns:this.rowGroupColsSvc?.columns??[],pivotColumns:this.pivotColsSvc?.columns??[],pivotMode:this.colModel.isPivotMode()};return t(o)}},cM=class extends E{constructor(){super(...arguments),this.beanName="ssrmStoreUtils"}wireBeans(e){this.colModel=e.colModel,this.serverSideRowModel=e.rowModel,this.storeFactory=e.ssrmStoreFactory}getChildStore(e,t,o){if(!e?.length)return t;const i=e[0],r=o(i);if(r){if(e.length===1&&!r.childStore){const a=this.serverSideRowModel.getParams();r.childStore=this.createBean(this.storeFactory.createStore(a,r))}const s=e.slice(1,e.length),n=r.childStore;return n?n.getChildStore(s):null}return null}isServerRefreshNeeded(e,t,o){if(o.valueColChanged||o.secondaryColChanged)return!0;const i=e.level+1;if(!(i<t.length))return!0;const n=t[i].id;return o.changedColumns.indexOf(n)>-1?!0:this.colModel.getCols().filter(c=>c.getColDef().showRowGroup&&o.changedColumns.includes(c.getId())).map(c=>c.getColDef().showRowGroup).some(c=>c===!0||c===n)}getServerSideInitialRowCount(){return this.gos.get("serverSideInitialRowCount")}isServerSideSortAllLevels(){return this.gos.get("serverSideSortAllLevels")&&ht(this.gos)}isServerSideOnlyRefreshFilteredGroups(){return this.gos.get("serverSideOnlyRefreshFilteredGroups")&&ht(this.gos)}},uM=class extends E{constructor(){super(...arguments),this.beanName="ssrmTxnManager",this.asyncTransactions=[]}wireBeans(e){this.valueCache=e.valueCache,this.serverSideRowModel=e.rowModel,this.selectionSvc=e.selectionSvc}postConstruct(){ht(this.gos)}applyTransactionAsync(e,t){this.asyncTransactionsTimeout==null&&this.scheduleExecuteAsync(),this.asyncTransactions.push({transaction:e,callback:t})}scheduleExecuteAsync(){const e=this.gos.get("asyncTransactionWaitMillis");this.asyncTransactionsTimeout=window.setTimeout(()=>{this.executeAsyncTransactions()},e)}executeAsyncTransactions(){if(!this.asyncTransactions)return;const e=[],t=[],o=[];let i=!1;this.asyncTransactions.forEach(r=>{let s;if(this.serverSideRowModel.executeOnStore(r.transaction.route,l=>{s=l.applyTransaction(r.transaction)})?s==null&&(s={status:Kt.StoreNotFound}):s={status:Kt.StoreNotStarted},t.push(s),s.status==Kt.StoreLoading){o.push(r);return}r.callback&&e.push(()=>r.callback(s)),s.status===Kt.Applied&&(i=!0)}),e.length>0&&window.setTimeout(()=>{e.forEach(r=>r())},0),this.asyncTransactionsTimeout=void 0,this.asyncTransactions=o,i&&(this.valueCache?.onDataChanged(),this.eventSvc.dispatchEvent({type:"storeUpdated"})),t.length>0&&this.eventSvc.dispatchEvent({type:"asyncTransactionsFlushed",results:t})}flushAsyncTransactions(){this.asyncTransactionsTimeout!=null&&clearTimeout(this.asyncTransactionsTimeout),this.executeAsyncTransactions()}applyTransaction(e){let t;if(this.serverSideRowModel.executeOnStore(e.route,i=>{t=i.applyTransaction(e)}))if(t){if(this.valueCache?.onDataChanged(),t.remove&&this.selectionSvc){const i=t.remove.map(r=>r.id);this.selectionSvc.deleteSelectionStateFromParent(e.route||[],i)}return this.eventSvc.dispatchEvent({type:"storeUpdated"}),t}else return{status:Kt.StoreNotFound};else return{status:Kt.StoreNotStarted}}},hM={moduleName:"ServerSideRowModel",version:ze,rowModels:["serverSide"],beans:[jk,_k,cM,Vk,Uk,uM,zk,dM,Wk,iM,sM,rM,oM,$k],dependsOn:[Ft,Aa,wR,Ok,Nk,wk,bk]},gM={moduleName:"ServerSideRowModelApi",version:ze,apiFunctions:{getServerSideSelectionState:Kk,setServerSideSelectionState:Yk,applyServerSideTransaction:qk,applyServerSideTransactionAsync:Qk,applyServerSideRowData:Xk,retryServerSideLoads:Zk,flushServerSideAsyncTransactions:Jk,refreshServerSide:eM,getServerSideGroupLevelState:tM},dependsOn:[Ft,_u,DR]},pM=["number","category","grouped-category","log","time"];pM.reduce((e,t)=>({...e,[t]:{title:{_enabledFromTheme:!0}}}),{});function Dh(e){return e.map((t,o,i)=>t.map((r,s)=>i.slice(0,o+1).reduce((n,a)=>n+a[s],0)))}function kh(e){const t=e.map((o,i)=>e.reduce((r,s)=>Math.max(r,s[i]),0));return e.map(o=>o.map((i,r)=>i/t[r]*19))}var Mh=[[1,3,5],[2,6,4],[5,3,1]],fM=Dh(Mh);kh(fM);var mM=Mh,CM=Dh(mM);kh(CM);function dr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ms={exports:{}};/* @license
61
+ Papa Parse
62
+ v5.5.3
63
+ https://github.com/mholt/PapaParse
64
+ License: MIT
65
+ */var vM=Ms.exports,Ph;function wM(){return Ph||(Ph=1,function(e,t){((o,i)=>{e.exports=i()})(vM,function o(){var i=typeof self<"u"?self:typeof window<"u"?window:i!==void 0?i:{},r,s=!i.document&&!!i.postMessage,n=i.IS_PAPA_WORKER||!1,a={},l=0,d={};function c(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(v){var R=M(v);R.chunkSize=parseInt(R.chunkSize),v.step||v.chunk||(R.chunkSize=null),this._handle=new m(R),(this._handle.streamer=this)._config=R}.call(this,S),this.parseChunk=function(v,R){var F=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&0<F){let z=this._config.newline;z||(G=this._config.quoteChar||'"',z=this._handle.guessLineEndings(v,G)),v=[...v.split(z).slice(F)].join(z)}this.isFirstChunk&&k(this._config.beforeFirstChunk)&&(G=this._config.beforeFirstChunk(v))!==void 0&&(v=G),this.isFirstChunk=!1,this._halted=!1;var F=this._partialLine+v,G=(this._partialLine="",this._handle.parse(F,this._baseIndex,!this._finished));if(!this._handle.paused()&&!this._handle.aborted()){if(v=G.meta.cursor,F=(this._finished||(this._partialLine=F.substring(v-this._baseIndex),this._baseIndex=v),G&&G.data&&(this._rowCount+=G.data.length),this._finished||this._config.preview&&this._rowCount>=this._config.preview),n)i.postMessage({results:G,workerId:d.WORKER_ID,finished:F});else if(k(this._config.chunk)&&!R){if(this._config.chunk(G,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);this._completeResults=G=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(G.data),this._completeResults.errors=this._completeResults.errors.concat(G.errors),this._completeResults.meta=G.meta),this._completed||!F||!k(this._config.complete)||G&&G.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||G&&G.meta.paused||this._nextChunk(),G}this._halted=!0},this._sendError=function(v){k(this._config.error)?this._config.error(v):n&&this._config.error&&i.postMessage({workerId:d.WORKER_ID,error:v,finished:!1})}}function u(S){var v;(S=S||{}).chunkSize||(S.chunkSize=d.RemoteChunkSize),c.call(this,S),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(R){this._input=R,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(v=new XMLHttpRequest,this._config.withCredentials&&(v.withCredentials=this._config.withCredentials),s||(v.onload=P(this._chunkLoaded,this),v.onerror=P(this._chunkError,this)),v.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var R,F=this._config.downloadRequestHeaders;for(R in F)v.setRequestHeader(R,F[R])}var G;this._config.chunkSize&&(G=this._start+this._config.chunkSize-1,v.setRequestHeader("Range","bytes="+this._start+"-"+G));try{v.send(this._config.downloadRequestBody)}catch(z){this._chunkError(z.message)}s&&v.status===0&&this._chunkError()}},this._chunkLoaded=function(){v.readyState===4&&(v.status<200||400<=v.status?this._chunkError():(this._start+=this._config.chunkSize||v.responseText.length,this._finished=!this._config.chunkSize||this._start>=(R=>(R=R.getResponseHeader("Content-Range"))!==null?parseInt(R.substring(R.lastIndexOf("/")+1)):-1)(v),this.parseChunk(v.responseText)))},this._chunkError=function(R){R=v.statusText||R,this._sendError(new Error(R))}}function g(S){(S=S||{}).chunkSize||(S.chunkSize=d.LocalChunkSize),c.call(this,S);var v,R,F=typeof FileReader<"u";this.stream=function(G){this._input=G,R=G.slice||G.webkitSlice||G.mozSlice,F?((v=new FileReader).onload=P(this._chunkLoaded,this),v.onerror=P(this._chunkError,this)):v=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var G=this._input,z=(this._config.chunkSize&&(z=Math.min(this._start+this._config.chunkSize,this._input.size),G=R.call(G,this._start,z)),v.readAsText(G,this._config.encoding));F||this._chunkLoaded({target:{result:z}})},this._chunkLoaded=function(G){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(G.target.result)},this._chunkError=function(){this._sendError(v.error)}}function p(S){var v;c.call(this,S=S||{}),this.stream=function(R){return v=R,this._nextChunk()},this._nextChunk=function(){var R,F;if(!this._finished)return R=this._config.chunkSize,v=R?(F=v.substring(0,R),v.substring(R)):(F=v,""),this._finished=!v,this.parseChunk(F)}}function f(S){c.call(this,S=S||{});var v=[],R=!0,F=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(G){this._input=G,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){F&&v.length===1&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),v.length?this.parseChunk(v.shift()):R=!0},this._streamData=P(function(G){try{v.push(typeof G=="string"?G:G.toString(this._config.encoding)),R&&(R=!1,this._checkIsFinished(),this.parseChunk(v.shift()))}catch(z){this._streamError(z)}},this),this._streamError=P(function(G){this._streamCleanUp(),this._sendError(G)},this),this._streamEnd=P(function(){this._streamCleanUp(),F=!0,this._streamData("")},this),this._streamCleanUp=P(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function m(S){var v,R,F,G,z=Math.pow(2,53),B=-z,H=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,O=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,L=this,N=0,I=0,K=!1,W=!1,Y=[],$={data:[],errors:[],meta:{}};function se(ne){return S.skipEmptyLines==="greedy"?ne.join("").trim()==="":ne.length===1&&ne[0].length===0}function fe(){if($&&F&&(be("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+d.DefaultDelimiter+"'"),F=!1),S.skipEmptyLines&&($.data=$.data.filter(function(Q){return!se(Q)})),Se()){let Q=function(ye,Fe){k(S.transformHeader)&&(ye=S.transformHeader(ye,Fe)),Y.push(ye)};if($)if(Array.isArray($.data[0])){for(var ne=0;Se()&&ne<$.data.length;ne++)$.data[ne].forEach(Q);$.data.splice(0,1)}else $.data.forEach(Q)}function le(Q,ye){for(var Fe=S.header?{}:[],Re=0;Re<Q.length;Re++){var xe=Re,he=Q[Re],he=((Ue,T)=>(X=>(S.dynamicTypingFunction&&S.dynamicTyping[X]===void 0&&(S.dynamicTyping[X]=S.dynamicTypingFunction(X)),(S.dynamicTyping[X]||S.dynamicTyping)===!0))(Ue)?T==="true"||T==="TRUE"||T!=="false"&&T!=="FALSE"&&((X=>{if(H.test(X)&&(X=parseFloat(X),B<X&&X<z))return 1})(T)?parseFloat(T):O.test(T)?new Date(T):T===""?null:T):T)(xe=S.header?Re>=Y.length?"__parsed_extra":Y[Re]:xe,he=S.transform?S.transform(he,xe):he);xe==="__parsed_extra"?(Fe[xe]=Fe[xe]||[],Fe[xe].push(he)):Fe[xe]=he}return S.header&&(Re>Y.length?be("FieldMismatch","TooManyFields","Too many fields: expected "+Y.length+" fields but parsed "+Re,I+ye):Re<Y.length&&be("FieldMismatch","TooFewFields","Too few fields: expected "+Y.length+" fields but parsed "+Re,I+ye)),Fe}var de;$&&(S.header||S.dynamicTyping||S.transform)&&(de=1,!$.data.length||Array.isArray($.data[0])?($.data=$.data.map(le),de=$.data.length):$.data=le($.data,0),S.header&&$.meta&&($.meta.fields=Y),I+=de)}function Se(){return S.header&&Y.length===0}function be(ne,le,de,Q){ne={type:ne,code:le,message:de},Q!==void 0&&(ne.row=Q),$.errors.push(ne)}k(S.step)&&(G=S.step,S.step=function(ne){$=ne,Se()?fe():(fe(),$.data.length!==0&&(N+=ne.data.length,S.preview&&N>S.preview?R.abort():($.data=$.data[0],G($,L))))}),this.parse=function(ne,le,de){var Q=S.quoteChar||'"',Q=(S.newline||(S.newline=this.guessLineEndings(ne,Q)),F=!1,S.delimiter?k(S.delimiter)&&(S.delimiter=S.delimiter(ne),$.meta.delimiter=S.delimiter):((Q=((ye,Fe,Re,xe,he)=>{var Ue,T,X,J;he=he||[","," ","|",";",d.RECORD_SEP,d.UNIT_SEP];for(var Oe=0;Oe<he.length;Oe++){for(var je,fo=he[Oe],Ve=0,Mt=0,A=0,U=(X=void 0,new w({comments:xe,delimiter:fo,newline:Fe,preview:10}).parse(ye)),ee=0;ee<U.data.length;ee++)Re&&se(U.data[ee])?A++:(je=U.data[ee].length,Mt+=je,X===void 0?X=je:0<je&&(Ve+=Math.abs(je-X),X=je));0<U.data.length&&(Mt/=U.data.length-A),(T===void 0||Ve<=T)&&(J===void 0||J<Mt)&&1.99<Mt&&(T=Ve,Ue=fo,J=Mt)}return{successful:!!(S.delimiter=Ue),bestDelimiter:Ue}})(ne,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess)).successful?S.delimiter=Q.bestDelimiter:(F=!0,S.delimiter=d.DefaultDelimiter),$.meta.delimiter=S.delimiter),M(S));return S.preview&&S.header&&Q.preview++,v=ne,R=new w(Q),$=R.parse(v,le,de),fe(),K?{meta:{paused:!0}}:$||{meta:{paused:!1}}},this.paused=function(){return K},this.pause=function(){K=!0,R.abort(),v=k(S.chunk)?"":v.substring(R.getCharIndex())},this.resume=function(){L.streamer._halted?(K=!1,L.streamer.parseChunk(v,!0)):setTimeout(L.resume,3)},this.aborted=function(){return W},this.abort=function(){W=!0,R.abort(),$.meta.aborted=!0,k(S.complete)&&S.complete($),v=""},this.guessLineEndings=function(ye,Q){ye=ye.substring(0,1048576);var Q=new RegExp(C(Q)+"([^]*?)"+C(Q),"gm"),de=(ye=ye.replace(Q,"")).split("\r"),Q=ye.split(`
66
+ `),ye=1<Q.length&&Q[0].length<de[0].length;if(de.length===1||ye)return`
67
+ `;for(var Fe=0,Re=0;Re<de.length;Re++)de[Re][0]===`
68
+ `&&Fe++;return Fe>=de.length/2?`\r
69
+ `:"\r"}}function C(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(S){var v=(S=S||{}).delimiter,R=S.newline,F=S.comments,G=S.step,z=S.preview,B=S.fastMode,H=null,O=!1,L=S.quoteChar==null?'"':S.quoteChar,N=L;if(S.escapeChar!==void 0&&(N=S.escapeChar),(typeof v!="string"||-1<d.BAD_DELIMITERS.indexOf(v))&&(v=","),F===v)throw new Error("Comment character same as delimiter");F===!0?F="#":(typeof F!="string"||-1<d.BAD_DELIMITERS.indexOf(F))&&(F=!1),R!==`
70
+ `&&R!=="\r"&&R!==`\r
71
+ `&&(R=`
72
+ `);var I=0,K=!1;this.parse=function(W,Y,$){if(typeof W!="string")throw new Error("Input must be a string");var se=W.length,fe=v.length,Se=R.length,be=F.length,ne=k(G),le=[],de=[],Q=[],ye=I=0;if(!W)return Ve();if(B||B!==!1&&W.indexOf(L)===-1){for(var Fe=W.split(R),Re=0;Re<Fe.length;Re++){if(Q=Fe[Re],I+=Q.length,Re!==Fe.length-1)I+=R.length;else if($)return Ve();if(!F||Q.substring(0,be)!==F){if(ne){if(le=[],J(Q.split(v)),Mt(),K)return Ve()}else J(Q.split(v));if(z&&z<=Re)return le=le.slice(0,z),Ve(!0)}}return Ve()}for(var xe=W.indexOf(v,I),he=W.indexOf(R,I),Ue=new RegExp(C(N)+C(L),"g"),T=W.indexOf(L,I);;)if(W[I]===L)for(T=I,I++;;){if((T=W.indexOf(L,T+1))===-1)return $||de.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:le.length,index:I}),je();if(T===se-1)return je(W.substring(I,T).replace(Ue,L));if(L===N&&W[T+1]===N)T++;else if(L===N||T===0||W[T-1]!==N){xe!==-1&&xe<T+1&&(xe=W.indexOf(v,T+1));var X=Oe((he=he!==-1&&he<T+1?W.indexOf(R,T+1):he)===-1?xe:Math.min(xe,he));if(W.substr(T+1+X,fe)===v){Q.push(W.substring(I,T).replace(Ue,L)),W[I=T+1+X+fe]!==L&&(T=W.indexOf(L,I)),xe=W.indexOf(v,I),he=W.indexOf(R,I);break}if(X=Oe(he),W.substring(T+1+X,T+1+X+Se)===R){if(Q.push(W.substring(I,T).replace(Ue,L)),fo(T+1+X+Se),xe=W.indexOf(v,I),T=W.indexOf(L,I),ne&&(Mt(),K))return Ve();if(z&&le.length>=z)return Ve(!0);break}de.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:le.length,index:I}),T++}}else if(F&&Q.length===0&&W.substring(I,I+be)===F){if(he===-1)return Ve();I=he+Se,he=W.indexOf(R,I),xe=W.indexOf(v,I)}else if(xe!==-1&&(xe<he||he===-1))Q.push(W.substring(I,xe)),I=xe+fe,xe=W.indexOf(v,I);else{if(he===-1)break;if(Q.push(W.substring(I,he)),fo(he+Se),ne&&(Mt(),K))return Ve();if(z&&le.length>=z)return Ve(!0)}return je();function J(A){le.push(A),ye=I}function Oe(A){var U=0;return U=A!==-1&&(A=W.substring(T+1,A))&&A.trim()===""?A.length:U}function je(A){return $||(A===void 0&&(A=W.substring(I)),Q.push(A),I=se,J(Q),ne&&Mt()),Ve()}function fo(A){I=A,J(Q),Q=[],he=W.indexOf(R,I)}function Ve(A){if(S.header&&!Y&&le.length&&!O){var U=le[0],ee=Object.create(null),me=new Set(U);let Me=!1;for(let Je=0;Je<U.length;Je++){let at=U[Je];if(ee[at=k(S.transformHeader)?S.transformHeader(at,Je):at]){let ei,an=ee[at];for(;ei=at+"_"+an,an++,me.has(ei););me.add(ei),U[Je]=ei,ee[at]++,Me=!0,(H=H===null?{}:H)[ei]=at}else ee[at]=1,U[Je]=at;me.add(at)}Me&&console.warn("Duplicate headers found and renamed."),O=!0}return{data:le,errors:de,meta:{delimiter:v,linebreak:R,aborted:K,truncated:!!A,cursor:ye+(Y||0),renamedHeaders:H}}}function Mt(){G(Ve()),le=[],de=[]}},this.abort=function(){K=!0},this.getCharIndex=function(){return I}}function y(S){var v=S.data,R=a[v.workerId],F=!1;if(v.error)R.userError(v.error,v.file);else if(v.results&&v.results.data){var G={abort:function(){F=!0,b(v.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:x,resume:x};if(k(R.userStep)){for(var z=0;z<v.results.data.length&&(R.userStep({data:v.results.data[z],errors:v.results.errors,meta:v.results.meta},G),!F);z++);delete v.results}else k(R.userChunk)&&(R.userChunk(v.results,G,v.file),delete v.results)}v.finished&&!F&&b(v.workerId,v.results)}function b(S,v){var R=a[S];k(R.userComplete)&&R.userComplete(v),R.terminate(),delete a[S]}function x(){throw new Error("Not implemented.")}function M(S){if(typeof S!="object"||S===null)return S;var v,R=Array.isArray(S)?[]:{};for(v in S)R[v]=M(S[v]);return R}function P(S,v){return function(){S.apply(v,arguments)}}function k(S){return typeof S=="function"}return d.parse=function(S,v){var R=(v=v||{}).dynamicTyping||!1;if(k(R)&&(v.dynamicTypingFunction=R,R={}),v.dynamicTyping=R,v.transform=!!k(v.transform)&&v.transform,!v.worker||!d.WORKERS_SUPPORTED)return R=null,d.NODE_STREAM_INPUT,typeof S=="string"?(S=(F=>F.charCodeAt(0)!==65279?F:F.slice(1))(S),R=new(v.download?u:p)(v)):S.readable===!0&&k(S.read)&&k(S.on)?R=new f(v):(i.File&&S instanceof File||S instanceof Object)&&(R=new g(v)),R.stream(S);(R=(()=>{var F;return!!d.WORKERS_SUPPORTED&&(F=(()=>{var G=i.URL||i.webkitURL||null,z=o.toString();return d.BLOB_URL||(d.BLOB_URL=G.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",z,")();"],{type:"text/javascript"})))})(),(F=new i.Worker(F)).onmessage=y,F.id=l++,a[F.id]=F)})()).userStep=v.step,R.userChunk=v.chunk,R.userComplete=v.complete,R.userError=v.error,v.step=k(v.step),v.chunk=k(v.chunk),v.complete=k(v.complete),v.error=k(v.error),delete v.worker,R.postMessage({input:S,config:v,workerId:R.id})},d.unparse=function(S,v){var R=!1,F=!0,G=",",z=`\r
73
+ `,B='"',H=B+B,O=!1,L=null,N=!1,I=((()=>{if(typeof v=="object"){if(typeof v.delimiter!="string"||d.BAD_DELIMITERS.filter(function(Y){return v.delimiter.indexOf(Y)!==-1}).length||(G=v.delimiter),typeof v.quotes!="boolean"&&typeof v.quotes!="function"&&!Array.isArray(v.quotes)||(R=v.quotes),typeof v.skipEmptyLines!="boolean"&&typeof v.skipEmptyLines!="string"||(O=v.skipEmptyLines),typeof v.newline=="string"&&(z=v.newline),typeof v.quoteChar=="string"&&(B=v.quoteChar),typeof v.header=="boolean"&&(F=v.header),Array.isArray(v.columns)){if(v.columns.length===0)throw new Error("Option columns is empty");L=v.columns}v.escapeChar!==void 0&&(H=v.escapeChar+B),v.escapeFormulae instanceof RegExp?N=v.escapeFormulae:typeof v.escapeFormulae=="boolean"&&v.escapeFormulae&&(N=/^[=+\-@\t\r].*$/)}})(),new RegExp(C(B),"g"));if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return K(null,S,O);if(typeof S[0]=="object")return K(L||Object.keys(S[0]),S,O)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||L),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),K(S.fields||[],S.data||[],O);throw new Error("Unable to serialize unrecognized input");function K(Y,$,se){var fe="",Se=(typeof Y=="string"&&(Y=JSON.parse(Y)),typeof $=="string"&&($=JSON.parse($)),Array.isArray(Y)&&0<Y.length),be=!Array.isArray($[0]);if(Se&&F){for(var ne=0;ne<Y.length;ne++)0<ne&&(fe+=G),fe+=W(Y[ne],ne);0<$.length&&(fe+=z)}for(var le=0;le<$.length;le++){var de=(Se?Y:$[le]).length,Q=!1,ye=Se?Object.keys($[le]).length===0:$[le].length===0;if(se&&!Se&&(Q=se==="greedy"?$[le].join("").trim()==="":$[le].length===1&&$[le][0].length===0),se==="greedy"&&Se){for(var Fe=[],Re=0;Re<de;Re++){var xe=be?Y[Re]:Re;Fe.push($[le][xe])}Q=Fe.join("").trim()===""}if(!Q){for(var he=0;he<de;he++){0<he&&!ye&&(fe+=G);var Ue=Se&&be?Y[he]:he;fe+=W($[le][Ue],he)}le<$.length-1&&(!se||0<de&&!ye)&&(fe+=z)}}return fe}function W(Y,$){var se,fe;return Y==null?"":Y.constructor===Date?JSON.stringify(Y).slice(1,25):(fe=!1,N&&typeof Y=="string"&&N.test(Y)&&(Y="'"+Y,fe=!0),se=Y.toString().replace(I,H),(fe=fe||R===!0||typeof R=="function"&&R(Y,$)||Array.isArray(R)&&R[$]||((Se,be)=>{for(var ne=0;ne<be.length;ne++)if(-1<Se.indexOf(be[ne]))return!0;return!1})(se,d.BAD_DELIMITERS)||-1<se.indexOf(G)||se.charAt(0)===" "||se.charAt(se.length-1)===" ")?B+se+B:se)}},d.RECORD_SEP="",d.UNIT_SEP="",d.BYTE_ORDER_MARK="\uFEFF",d.BAD_DELIMITERS=["\r",`
74
+ `,'"',d.BYTE_ORDER_MARK],d.WORKERS_SUPPORTED=!s&&!!i.Worker,d.NODE_STREAM_INPUT=1,d.LocalChunkSize=10485760,d.RemoteChunkSize=5242880,d.DefaultDelimiter=",",d.Parser=w,d.ParserHandle=m,d.NetworkStreamer=u,d.FileStreamer=g,d.StringStreamer=p,d.ReadableStreamStreamer=f,i.jQuery&&((r=i.jQuery).fn.parse=function(S){var v=S.config||{},R=[];return this.each(function(z){if(!(r(this).prop("tagName").toUpperCase()==="INPUT"&&r(this).attr("type").toLowerCase()==="file"&&i.FileReader)||!this.files||this.files.length===0)return!0;for(var B=0;B<this.files.length;B++)R.push({file:this.files[B],inputElem:this,instanceConfig:r.extend({},v)})}),F(),this;function F(){if(R.length===0)k(S.complete)&&S.complete();else{var z,B,H,O,L=R[0];if(k(S.before)){var N=S.before(L.file,L.inputElem);if(typeof N=="object"){if(N.action==="abort")return z="AbortError",B=L.file,H=L.inputElem,O=N.reason,void(k(S.error)&&S.error({name:z},B,H,O));if(N.action==="skip")return void G();typeof N.config=="object"&&(L.instanceConfig=r.extend(L.instanceConfig,N.config))}else if(N==="skip")return void G()}var I=L.instanceConfig.complete;L.instanceConfig.complete=function(K){k(I)&&I(K,L.file,L.inputElem),G()},d.parse(L.file,L.instanceConfig)}}function G(){R.splice(0,1),F()}}),n&&(i.onmessage=function(S){S=S.data,d.WORKER_ID===void 0&&S&&(d.WORKER_ID=S.workerId),typeof S.input=="string"?i.postMessage({workerId:d.WORKER_ID,results:d.parse(S.input,S.config),finished:!0}):(i.File&&S.input instanceof File||S.input instanceof Object)&&(S=d.parse(S.input,S.config))&&i.postMessage({workerId:d.WORKER_ID,results:S,finished:!0})}),(u.prototype=Object.create(c.prototype)).constructor=u,(g.prototype=Object.create(c.prototype)).constructor=g,(p.prototype=Object.create(p.prototype)).constructor=p,(f.prototype=Object.create(c.prototype)).constructor=f,d})}(Ms)),Ms.exports}var bM=wM();const yM=dr(bM);function Ps(e){return h.getCurrentScope()?(h.onScopeDispose(e),!0):!1}const Es=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const SM=Object.prototype.toString,Eh=e=>SM.call(e)==="[object Object]",lo=()=>{},Ka=RM();function RM(){var e,t;return Es&&((e=window?.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window?.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function Ah(...e){if(e.length!==1)return h.toRef(...e);const t=e[0];return typeof t=="function"?h.readonly(h.customRef(()=>({get:t,set:lo}))):h.ref(t)}function xM(e,t){function o(...i){return new Promise((r,s)=>{Promise.resolve(e(()=>t.apply(this,i),{fn:t,thisArg:this,args:i})).then(r).catch(s)})}return o}const FM=e=>e();function DM(e,t={}){let o,i,r=lo;const s=l=>{clearTimeout(l),r(),r=lo};let n;return l=>{const d=h.toValue(e),c=h.toValue(t.maxWait);return o&&s(o),d<=0||c!==void 0&&c<=0?(i&&(s(i),i=void 0),Promise.resolve(l())):new Promise((u,g)=>{r=t.rejectOnCancel?g:u,n=l,c&&!i&&(i=setTimeout(()=>{o&&s(o),i=void 0,u(n())},c)),o=setTimeout(()=>{i&&s(i),i=void 0,u(l())},d)})}}function Fi(e){return Array.isArray(e)?e:[e]}function kM(e){return h.getCurrentInstance()}function MM(e,t,o={}){const{eventFilter:i=FM,...r}=o;return h.watch(e,xM(i,t),r)}function PM(e,t=!0,o){kM()?h.onMounted(e,o):t?e():h.nextTick(e)}function EM(e,t,o={}){const{debounce:i=0,maxWait:r=void 0,...s}=o;return MM(e,t,{...s,eventFilter:DM(i,{maxWait:r})})}function Th(e,t,o){return h.watch(e,t,{...o,immediate:!0})}const Ih=Es?window:void 0,AM=Es?window.document:void 0;function Lh(e){var t;const o=h.toValue(e);return(t=o?.$el)!=null?t:o}function TM(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,c)=>(a.addEventListener(l,d,c),()=>a.removeEventListener(l,d,c)),r=h.computed(()=>{const a=Fi(h.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=Th(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(d=>Lh(d)))!=null?l:[Ih].filter(d=>d!=null),Fi(h.toValue(r.value?e[1]:e[0])),Fi(h.unref(r.value?e[2]:e[1])),h.toValue(r.value?e[3]:e[2])]},([a,l,d,c])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const u=Eh(c)?{...c}:c;t.push(...a.flatMap(g=>l.flatMap(p=>d.map(f=>i(g,p,f,u)))))},{flush:"post"}),n=()=>{s(),o()};return Ps(o),n}function IM(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function LM(...e){let t,o,i={};e.length===3?(t=e[0],o=e[1],i=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,o=e[0],i=e[1]):(t=e[0],o=e[1]):(t=!0,o=e[0]);const{target:r=Ih,eventName:s="keydown",passive:n=!1,dedupe:a=!1}=i,l=IM(t);return TM(r,s,c=>{c.repeat&&h.toValue(a)||l(c)&&o(c)},n)}/**!
75
+ * Sortable 1.15.6
76
+ * @author RubaXa <trash@rubaxa.org>
77
+ * @author owenm <owen23355@gmail.com>
78
+ * @license MIT
79
+ */function Gh(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,i)}return o}function Zt(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?Gh(Object(o),!0).forEach(function(i){GM(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):Gh(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function As(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?As=function(t){return typeof t}:As=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},As(e)}function GM(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function co(){return co=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i])}return e},co.apply(this,arguments)}function BM(e,t){if(e==null)return{};var o={},i=Object.keys(e),r,s;for(s=0;s<i.length;s++)r=i[s],!(t.indexOf(r)>=0)&&(o[r]=e[r]);return o}function OM(e,t){if(e==null)return{};var o=BM(e,t),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)i=s[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(o[i]=e[i])}return o}var NM="1.15.6";function uo(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var ho=uo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),cr=uo(/Edge/i),Bh=uo(/firefox/i),ur=uo(/safari/i)&&!uo(/chrome/i)&&!uo(/android/i),Ya=uo(/iP(ad|od|hone)/i),Oh=uo(/chrome/i)&&uo(/android/i),Nh={capture:!1,passive:!1};function we(e,t,o){e.addEventListener(t,o,!ho&&Nh)}function ve(e,t,o){e.removeEventListener(t,o,!ho&&Nh)}function Ts(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Hh(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function Ot(e,t,o,i){if(e){o=o||document;do{if(t!=null&&(t[0]===">"?e.parentNode===o&&Ts(e,t):Ts(e,t))||i&&e===o)return e;if(e===o)break}while(e=Hh(e))}return null}var Vh=/\s+/g;function pt(e,t,o){if(e&&t)if(e.classList)e.classList[o?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(Vh," ").replace(" "+t+" "," ");e.className=(i+(o?" "+t:"")).replace(Vh," ")}}function ie(e,t,o){var i=e&&e.style;if(i){if(o===void 0)return document.defaultView&&document.defaultView.getComputedStyle?o=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(o=e.currentStyle),t===void 0?o:o[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=o+(typeof o=="string"?"":"px")}}function Di(e,t){var o="";if(typeof e=="string")o=e;else do{var i=ie(e,"transform");i&&i!=="none"&&(o=i+" "+o)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(o)}function _h(e,t,o){if(e){var i=e.getElementsByTagName(t),r=0,s=i.length;if(o)for(;r<s;r++)o(i[r],r);return i}return[]}function Jt(){var e=document.scrollingElement;return e||document.documentElement}function Ne(e,t,o,i,r){if(!(!e.getBoundingClientRect&&e!==window)){var s,n,a,l,d,c,u;if(e!==window&&e.parentNode&&e!==Jt()?(s=e.getBoundingClientRect(),n=s.top,a=s.left,l=s.bottom,d=s.right,c=s.height,u=s.width):(n=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||o)&&e!==window&&(r=r||e.parentNode,!ho))do if(r&&r.getBoundingClientRect&&(ie(r,"transform")!=="none"||o&&ie(r,"position")!=="static")){var g=r.getBoundingClientRect();n-=g.top+parseInt(ie(r,"border-top-width")),a-=g.left+parseInt(ie(r,"border-left-width")),l=n+s.height,d=a+s.width;break}while(r=r.parentNode);if(i&&e!==window){var p=Di(r||e),f=p&&p.a,m=p&&p.d;p&&(n/=m,a/=f,u/=f,c/=m,l=n+c,d=a+u)}return{top:n,left:a,bottom:l,right:d,width:u,height:c}}}function zh(e,t,o){for(var i=ko(e,!0),r=Ne(e)[t];i;){var s=Ne(i)[o],n=void 0;if(n=r>=s,!n)return i;if(i===Jt())break;i=ko(i,!1)}return!1}function ki(e,t,o,i){for(var r=0,s=0,n=e.children;s<n.length;){if(n[s].style.display!=="none"&&n[s]!==re.ghost&&(i||n[s]!==re.dragged)&&Ot(n[s],o.draggable,e,!1)){if(r===t)return n[s];r++}s++}return null}function qa(e,t){for(var o=e.lastElementChild;o&&(o===re.ghost||ie(o,"display")==="none"||t&&!Ts(o,t));)o=o.previousElementSibling;return o||null}function Dt(e,t){var o=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==re.clone&&(!t||Ts(e,t))&&o++;return o}function Wh(e){var t=0,o=0,i=Jt();if(e)do{var r=Di(e),s=r.a,n=r.d;t+=e.scrollLeft*s,o+=e.scrollTop*n}while(e!==i&&(e=e.parentNode));return[t,o]}function HM(e,t){for(var o in e)if(e.hasOwnProperty(o)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[o][i])return Number(o)}return-1}function ko(e,t){if(!e||!e.getBoundingClientRect)return Jt();var o=e,i=!1;do if(o.clientWidth<o.scrollWidth||o.clientHeight<o.scrollHeight){var r=ie(o);if(o.clientWidth<o.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||o.clientHeight<o.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!o.getBoundingClientRect||o===document.body)return Jt();if(i||t)return o;i=!0}}while(o=o.parentNode);return Jt()}function VM(e,t){if(e&&t)for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);return e}function Xa(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var hr;function $h(e,t){return function(){if(!hr){var o=arguments,i=this;o.length===1?e.call(i,o[0]):e.apply(i,o),hr=setTimeout(function(){hr=void 0},t)}}}function _M(){clearTimeout(hr),hr=void 0}function Uh(e,t,o){e.scrollLeft+=t,e.scrollTop+=o}function jh(e){var t=window.Polymer,o=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):o?o(e).clone(!0)[0]:e.cloneNode(!0)}function Kh(e,t,o){var i={};return Array.from(e.children).forEach(function(r){var s,n,a,l;if(!(!Ot(r,t.draggable,e,!1)||r.animated||r===o)){var d=Ne(r);i.left=Math.min((s=i.left)!==null&&s!==void 0?s:1/0,d.left),i.top=Math.min((n=i.top)!==null&&n!==void 0?n:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var st="Sortable"+new Date().getTime();function zM(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(ie(r,"display")==="none"||r===re.ghost)){e.push({target:r,rect:Ne(r)});var s=Zt({},e[e.length-1].rect);if(r.thisAnimationDuration){var n=Di(r,!0);n&&(s.top-=n.f,s.left-=n.e)}r.fromRect=s}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(HM(e,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var s=!1,n=0;e.forEach(function(a){var l=0,d=a.target,c=d.fromRect,u=Ne(d),g=d.prevFromRect,p=d.prevToRect,f=a.rect,m=Di(d,!0);m&&(u.top-=m.f,u.left-=m.e),d.toRect=u,d.thisAnimationDuration&&Xa(g,u)&&!Xa(c,u)&&(f.top-u.top)/(f.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=$M(f,g,p,r.options)),Xa(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=r.options.animation),r.animate(d,f,u,l)),l&&(s=!0,n=Math.max(n,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),s?t=setTimeout(function(){typeof i=="function"&&i()},n):typeof i=="function"&&i(),e=[]},animate:function(i,r,s,n){if(n){ie(i,"transition",""),ie(i,"transform","");var a=Di(this.el),l=a&&a.a,d=a&&a.d,c=(r.left-s.left)/(l||1),u=(r.top-s.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,ie(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=WM(i),ie(i,"transition","transform "+n+"ms"+(this.options.easing?" "+this.options.easing:"")),ie(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){ie(i,"transition",""),ie(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},n)}}}}function WM(e){return e.offsetWidth}function $M(e,t,o,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-o.top,2)+Math.pow(t.left-o.left,2))*i.animation}var Mi=[],Qa={initializeByDefault:!0},gr={mount:function(t){for(var o in Qa)Qa.hasOwnProperty(o)&&!(o in t)&&(t[o]=Qa[o]);Mi.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Mi.push(t)},pluginEvent:function(t,o,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var s=t+"Global";Mi.forEach(function(n){o[n.pluginName]&&(o[n.pluginName][s]&&o[n.pluginName][s](Zt({sortable:o},i)),o.options[n.pluginName]&&o[n.pluginName][t]&&o[n.pluginName][t](Zt({sortable:o},i)))})},initializePlugins:function(t,o,i,r){Mi.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,o,t.options);d.sortable=t,d.options=t.options,t[l]=d,co(i,d.defaults)}});for(var s in t.options)if(t.options.hasOwnProperty(s)){var n=this.modifyOption(t,s,t.options[s]);typeof n<"u"&&(t.options[s]=n)}},getEventProperties:function(t,o){var i={};return Mi.forEach(function(r){typeof r.eventProperties=="function"&&co(i,r.eventProperties.call(o[r.pluginName],t))}),i},modifyOption:function(t,o,i){var r;return Mi.forEach(function(s){t[s.pluginName]&&s.optionListeners&&typeof s.optionListeners[o]=="function"&&(r=s.optionListeners[o].call(t[s.pluginName],i))}),r}};function UM(e){var t=e.sortable,o=e.rootEl,i=e.name,r=e.targetEl,s=e.cloneEl,n=e.toEl,a=e.fromEl,l=e.oldIndex,d=e.newIndex,c=e.oldDraggableIndex,u=e.newDraggableIndex,g=e.originalEvent,p=e.putSortable,f=e.extraEventProperties;if(t=t||o&&o[st],!!t){var m,C=t.options,w="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ho&&!cr?m=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(m=document.createEvent("Event"),m.initEvent(i,!0,!0)),m.to=n||o,m.from=a||o,m.item=r||o,m.clone=s,m.oldIndex=l,m.newIndex=d,m.oldDraggableIndex=c,m.newDraggableIndex=u,m.originalEvent=g,m.pullMode=p?p.lastPutMode:void 0;var y=Zt(Zt({},f),gr.getEventProperties(i,t));for(var b in y)m[b]=y[b];o&&o.dispatchEvent(m),C[w]&&C[w].call(t,m)}}var jM=["evt"],nt=function(t,o){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,s=OM(i,jM);gr.pluginEvent.bind(re)(t,o,Zt({dragEl:j,parentEl:Ge,ghostEl:ue,rootEl:Ae,nextEl:qo,lastDownEl:Is,cloneEl:Le,cloneHidden:Mo,dragStarted:fr,putSortable:$e,activeSortable:re.active,originalEvent:r,oldIndex:Pi,oldDraggableIndex:pr,newIndex:ft,newDraggableIndex:Po,hideGhostForTarget:eg,unhideGhostForTarget:tg,cloneNowHidden:function(){Mo=!0},cloneNowShown:function(){Mo=!1},dispatchSortableEvent:function(a){Ze({sortable:o,name:a,originalEvent:r})}},s))};function Ze(e){UM(Zt({putSortable:$e,cloneEl:Le,targetEl:j,rootEl:Ae,oldIndex:Pi,oldDraggableIndex:pr,newIndex:ft,newDraggableIndex:Po},e))}var j,Ge,ue,Ae,qo,Is,Le,Mo,Pi,ft,pr,Po,Ls,$e,Ei=!1,Gs=!1,Bs=[],Xo,Nt,Za,Ja,Yh,qh,fr,Ai,mr,Cr=!1,Os=!1,Ns,qe,el=[],tl=!1,Hs=[],Vs=typeof document<"u",_s=Ya,Xh=cr||ho?"cssFloat":"float",KM=Vs&&!Oh&&!Ya&&"draggable"in document.createElement("div"),Qh=function(){if(Vs){if(ho)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Zh=function(t,o){var i=ie(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),s=ki(t,0,o),n=ki(t,1,o),a=s&&ie(s),l=n&&ie(n),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Ne(s).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Ne(n).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return n&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return s&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=r&&i[Xh]==="none"||n&&i[Xh]==="none"&&d+c>r)?"vertical":"horizontal"},YM=function(t,o,i){var r=i?t.left:t.top,s=i?t.right:t.bottom,n=i?t.width:t.height,a=i?o.left:o.top,l=i?o.right:o.bottom,d=i?o.width:o.height;return r===a||s===l||r+n/2===a+d/2},qM=function(t,o){var i;return Bs.some(function(r){var s=r[st].options.emptyInsertThreshold;if(!(!s||qa(r))){var n=Ne(r),a=t>=n.left-s&&t<=n.right+s,l=o>=n.top-s&&o<=n.bottom+s;if(a&&l)return i=r}}),i},Jh=function(t){function o(s,n){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(s==null&&(n||u))return!0;if(s==null||s===!1)return!1;if(n&&s==="clone")return s;if(typeof s=="function")return o(s(a,l,d,c),n)(a,l,d,c);var g=(n?a:l).options.group.name;return s===!0||typeof s=="string"&&s===g||s.join&&s.indexOf(g)>-1}}var i={},r=t.group;(!r||As(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=o(r.pull,!0),i.checkPut=o(r.put),i.revertClone=r.revertClone,t.group=i},eg=function(){!Qh&&ue&&ie(ue,"display","none")},tg=function(){!Qh&&ue&&ie(ue,"display","")};Vs&&!Oh&&document.addEventListener("click",function(e){if(Gs)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Gs=!1,!1},!0);var Qo=function(t){if(j){t=t.touches?t.touches[0]:t;var o=qM(t.clientX,t.clientY);if(o){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=o,i.preventDefault=void 0,i.stopPropagation=void 0,o[st]._onDragOver(i)}}},XM=function(t){j&&j.parentNode[st]._isOutsideThisEl(t.target)};function re(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=co({},t),e[st]=this;var o={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Zh(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(n,a){n.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:re.supportPointer!==!1&&"PointerEvent"in window&&(!ur||Ya),emptyInsertThreshold:5};gr.initializePlugins(this,e,o);for(var i in o)!(i in t)&&(t[i]=o[i]);Jh(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:KM,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?we(e,"pointerdown",this._onTapStart):(we(e,"mousedown",this._onTapStart),we(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(we(e,"dragover",this),we(e,"dragenter",this)),Bs.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),co(this,zM())}re.prototype={constructor:re,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Ai=null)},_getDirection:function(t,o){return typeof this.options.direction=="function"?this.options.direction.call(this,t,o,j):this.options.direction},_onTapStart:function(t){if(t.cancelable){var o=this,i=this.el,r=this.options,s=r.preventOnFilter,n=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=r.filter;if(rP(i),!j&&!(/mousedown|pointerdown/.test(n)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&ur&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Ot(l,r.draggable,i,!1),!(l&&l.animated)&&Is!==l)){if(Pi=Dt(l),pr=Dt(l,r.draggable),typeof c=="function"){if(c.call(this,t,l,this)){Ze({sortable:o,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),nt("filter",o,{evt:t}),s&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=Ot(d,u.trim(),i,!1),u)return Ze({sortable:o,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),nt("filter",o,{evt:t}),!0}),c)){s&&t.preventDefault();return}r.handle&&!Ot(d,r.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,o,i){var r=this,s=r.el,n=r.options,a=s.ownerDocument,l;if(i&&!j&&i.parentNode===s){var d=Ne(i);if(Ae=s,j=i,Ge=j.parentNode,qo=j.nextSibling,Is=i,Ls=n.group,re.dragged=j,Xo={target:j,clientX:(o||t).clientX,clientY:(o||t).clientY},Yh=Xo.clientX-d.left,qh=Xo.clientY-d.top,this._lastX=(o||t).clientX,this._lastY=(o||t).clientY,j.style["will-change"]="all",l=function(){if(nt("delayEnded",r,{evt:t}),re.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Bh&&r.nativeDraggable&&(j.draggable=!0),r._triggerDragStart(t,o),Ze({sortable:r,name:"choose",originalEvent:t}),pt(j,n.chosenClass,!0)},n.ignore.split(",").forEach(function(c){_h(j,c.trim(),ol)}),we(a,"dragover",Qo),we(a,"mousemove",Qo),we(a,"touchmove",Qo),n.supportPointer?(we(a,"pointerup",r._onDrop),!this.nativeDraggable&&we(a,"pointercancel",r._onDrop)):(we(a,"mouseup",r._onDrop),we(a,"touchend",r._onDrop),we(a,"touchcancel",r._onDrop)),Bh&&this.nativeDraggable&&(this.options.touchStartThreshold=4,j.draggable=!0),nt("delayStart",this,{evt:t}),n.delay&&(!n.delayOnTouchOnly||o)&&(!this.nativeDraggable||!(cr||ho))){if(re.eventCanceled){this._onDrop();return}n.supportPointer?(we(a,"pointerup",r._disableDelayedDrag),we(a,"pointercancel",r._disableDelayedDrag)):(we(a,"mouseup",r._disableDelayedDrag),we(a,"touchend",r._disableDelayedDrag),we(a,"touchcancel",r._disableDelayedDrag)),we(a,"mousemove",r._delayedDragTouchMoveHandler),we(a,"touchmove",r._delayedDragTouchMoveHandler),n.supportPointer&&we(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,n.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var o=t.touches?t.touches[0]:t;Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){j&&ol(j),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;ve(t,"mouseup",this._disableDelayedDrag),ve(t,"touchend",this._disableDelayedDrag),ve(t,"touchcancel",this._disableDelayedDrag),ve(t,"pointerup",this._disableDelayedDrag),ve(t,"pointercancel",this._disableDelayedDrag),ve(t,"mousemove",this._delayedDragTouchMoveHandler),ve(t,"touchmove",this._delayedDragTouchMoveHandler),ve(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,o){o=o||t.pointerType=="touch"&&t,!this.nativeDraggable||o?this.options.supportPointer?we(document,"pointermove",this._onTouchMove):o?we(document,"touchmove",this._onTouchMove):we(document,"mousemove",this._onTouchMove):(we(j,"dragend",this),we(Ae,"dragstart",this._onDragStart));try{document.selection?Ws(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,o){if(Ei=!1,Ae&&j){nt("dragStarted",this,{evt:o}),this.nativeDraggable&&we(document,"dragover",XM);var i=this.options;!t&&pt(j,i.dragClass,!1),pt(j,i.ghostClass,!0),re.active=this,t&&this._appendGhost(),Ze({sortable:this,name:"start",originalEvent:o})}else this._nulling()},_emulateDragOver:function(){if(Nt){this._lastX=Nt.clientX,this._lastY=Nt.clientY,eg();for(var t=document.elementFromPoint(Nt.clientX,Nt.clientY),o=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(Nt.clientX,Nt.clientY),t!==o);)o=t;if(j.parentNode[st]._isOutsideThisEl(t),o)do{if(o[st]){var i=void 0;if(i=o[st]._onDragOver({clientX:Nt.clientX,clientY:Nt.clientY,target:t,rootEl:o}),i&&!this.options.dragoverBubble)break}t=o}while(o=Hh(o));tg()}},_onTouchMove:function(t){if(Xo){var o=this.options,i=o.fallbackTolerance,r=o.fallbackOffset,s=t.touches?t.touches[0]:t,n=ue&&Di(ue,!0),a=ue&&n&&n.a,l=ue&&n&&n.d,d=_s&&qe&&Wh(qe),c=(s.clientX-Xo.clientX+r.x)/(a||1)+(d?d[0]-el[0]:0)/(a||1),u=(s.clientY-Xo.clientY+r.y)/(l||1)+(d?d[1]-el[1]:0)/(l||1);if(!re.active&&!Ei){if(i&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(ue){n?(n.e+=c-(Za||0),n.f+=u-(Ja||0)):n={a:1,b:0,c:0,d:1,e:c,f:u};var g="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");ie(ue,"webkitTransform",g),ie(ue,"mozTransform",g),ie(ue,"msTransform",g),ie(ue,"transform",g),Za=c,Ja=u,Nt=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!ue){var t=this.options.fallbackOnBody?document.body:Ae,o=Ne(j,!0,_s,!0,t),i=this.options;if(_s){for(qe=t;ie(qe,"position")==="static"&&ie(qe,"transform")==="none"&&qe!==document;)qe=qe.parentNode;qe!==document.body&&qe!==document.documentElement?(qe===document&&(qe=Jt()),o.top+=qe.scrollTop,o.left+=qe.scrollLeft):qe=Jt(),el=Wh(qe)}ue=j.cloneNode(!0),pt(ue,i.ghostClass,!1),pt(ue,i.fallbackClass,!0),pt(ue,i.dragClass,!0),ie(ue,"transition",""),ie(ue,"transform",""),ie(ue,"box-sizing","border-box"),ie(ue,"margin",0),ie(ue,"top",o.top),ie(ue,"left",o.left),ie(ue,"width",o.width),ie(ue,"height",o.height),ie(ue,"opacity","0.8"),ie(ue,"position",_s?"absolute":"fixed"),ie(ue,"zIndex","100000"),ie(ue,"pointerEvents","none"),re.ghost=ue,t.appendChild(ue),ie(ue,"transform-origin",Yh/parseInt(ue.style.width)*100+"% "+qh/parseInt(ue.style.height)*100+"%")}},_onDragStart:function(t,o){var i=this,r=t.dataTransfer,s=i.options;if(nt("dragStart",this,{evt:t}),re.eventCanceled){this._onDrop();return}nt("setupClone",this),re.eventCanceled||(Le=jh(j),Le.removeAttribute("id"),Le.draggable=!1,Le.style["will-change"]="",this._hideClone(),pt(Le,this.options.chosenClass,!1),re.clone=Le),i.cloneId=Ws(function(){nt("clone",i),!re.eventCanceled&&(i.options.removeCloneOnHide||Ae.insertBefore(Le,j),i._hideClone(),Ze({sortable:i,name:"clone"}))}),!o&&pt(j,s.dragClass,!0),o?(Gs=!0,i._loopId=setInterval(i._emulateDragOver,50)):(ve(document,"mouseup",i._onDrop),ve(document,"touchend",i._onDrop),ve(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",s.setData&&s.setData.call(i,r,j)),we(document,"drop",i),ie(j,"transform","translateZ(0)")),Ei=!0,i._dragStartId=Ws(i._dragStarted.bind(i,o,t)),we(document,"selectstart",i),fr=!0,window.getSelection().removeAllRanges(),ur&&ie(document.body,"user-select","none")},_onDragOver:function(t){var o=this.el,i=t.target,r,s,n,a=this.options,l=a.group,d=re.active,c=Ls===l,u=a.sort,g=$e||d,p,f=this,m=!1;if(tl)return;function C(N,I){nt(N,f,Zt({evt:t,isOwner:c,axis:p?"vertical":"horizontal",revert:n,dragRect:r,targetRect:s,canSort:u,fromSortable:g,target:i,completed:y,onMove:function(W,Y){return zs(Ae,o,j,r,W,Ne(W),t,Y)},changed:b},I))}function w(){C("dragOverAnimationCapture"),f.captureAnimationState(),f!==g&&g.captureAnimationState()}function y(N){return C("dragOverCompleted",{insertion:N}),N&&(c?d._hideClone():d._showClone(f),f!==g&&(pt(j,$e?$e.options.ghostClass:d.options.ghostClass,!1),pt(j,a.ghostClass,!0)),$e!==f&&f!==re.active?$e=f:f===re.active&&$e&&($e=null),g===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){C("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(i===j&&!j.animated||i===o&&!i.animated)&&(Ai=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(j.parentNode[st]._isOutsideThisEl(t.target),!N&&Qo(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function b(){ft=Dt(j),Po=Dt(j,a.draggable),Ze({sortable:f,name:"change",toEl:o,newIndex:ft,newDraggableIndex:Po,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=Ot(i,a.draggable,o,!0),C("dragOver"),re.eventCanceled)return m;if(j.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return y(!1);if(Gs=!1,d&&!a.disabled&&(c?u||(n=Ge!==Ae):$e===this||(this.lastPutMode=Ls.checkPull(this,d,j,t))&&l.checkPut(this,d,j,t))){if(p=this._getDirection(t,i)==="vertical",r=Ne(j),C("dragOverValid"),re.eventCanceled)return m;if(n)return Ge=Ae,w(),this._hideClone(),C("revert"),re.eventCanceled||(qo?Ae.insertBefore(j,qo):Ae.appendChild(j)),y(!0);var x=qa(o,a.draggable);if(!x||eP(t,p,this)&&!x.animated){if(x===j)return y(!1);if(x&&o===t.target&&(i=x),i&&(s=Ne(i)),zs(Ae,o,j,r,i,s,t,!!i)!==!1)return w(),x&&x.nextSibling?o.insertBefore(j,x.nextSibling):o.appendChild(j),Ge=o,b(),y(!0)}else if(x&&JM(t,p,this)){var M=ki(o,0,a,!0);if(M===j)return y(!1);if(i=M,s=Ne(i),zs(Ae,o,j,r,i,s,t,!1)!==!1)return w(),o.insertBefore(j,M),Ge=o,b(),y(!0)}else if(i.parentNode===o){s=Ne(i);var P=0,k,S=j.parentNode!==o,v=!YM(j.animated&&j.toRect||r,i.animated&&i.toRect||s,p),R=p?"top":"left",F=zh(i,"top","top")||zh(j,"top","top"),G=F?F.scrollTop:void 0;Ai!==i&&(k=s[R],Cr=!1,Os=!v&&a.invertSwap||S),P=tP(t,i,s,p,v?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Os,Ai===i);var z;if(P!==0){var B=Dt(j);do B-=P,z=Ge.children[B];while(z&&(ie(z,"display")==="none"||z===ue))}if(P===0||z===i)return y(!1);Ai=i,mr=P;var H=i.nextElementSibling,O=!1;O=P===1;var L=zs(Ae,o,j,r,i,s,t,O);if(L!==!1)return(L===1||L===-1)&&(O=L===1),tl=!0,setTimeout(ZM,30),w(),O&&!H?o.appendChild(j):i.parentNode.insertBefore(j,O?H:i),F&&Uh(F,0,G-F.scrollTop),Ge=j.parentNode,k!==void 0&&!Os&&(Ns=Math.abs(k-Ne(i)[R])),b(),y(!0)}if(o.contains(j))return y(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){ve(document,"mousemove",this._onTouchMove),ve(document,"touchmove",this._onTouchMove),ve(document,"pointermove",this._onTouchMove),ve(document,"dragover",Qo),ve(document,"mousemove",Qo),ve(document,"touchmove",Qo)},_offUpEvents:function(){var t=this.el.ownerDocument;ve(t,"mouseup",this._onDrop),ve(t,"touchend",this._onDrop),ve(t,"pointerup",this._onDrop),ve(t,"pointercancel",this._onDrop),ve(t,"touchcancel",this._onDrop),ve(document,"selectstart",this)},_onDrop:function(t){var o=this.el,i=this.options;if(ft=Dt(j),Po=Dt(j,i.draggable),nt("drop",this,{evt:t}),Ge=j&&j.parentNode,ft=Dt(j),Po=Dt(j,i.draggable),re.eventCanceled){this._nulling();return}Ei=!1,Os=!1,Cr=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),il(this.cloneId),il(this._dragStartId),this.nativeDraggable&&(ve(document,"drop",this),ve(o,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ur&&ie(document.body,"user-select",""),ie(j,"transform",""),t&&(fr&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),ue&&ue.parentNode&&ue.parentNode.removeChild(ue),(Ae===Ge||$e&&$e.lastPutMode!=="clone")&&Le&&Le.parentNode&&Le.parentNode.removeChild(Le),j&&(this.nativeDraggable&&ve(j,"dragend",this),ol(j),j.style["will-change"]="",fr&&!Ei&&pt(j,$e?$e.options.ghostClass:this.options.ghostClass,!1),pt(j,this.options.chosenClass,!1),Ze({sortable:this,name:"unchoose",toEl:Ge,newIndex:null,newDraggableIndex:null,originalEvent:t}),Ae!==Ge?(ft>=0&&(Ze({rootEl:Ge,name:"add",toEl:Ge,fromEl:Ae,originalEvent:t}),Ze({sortable:this,name:"remove",toEl:Ge,originalEvent:t}),Ze({rootEl:Ge,name:"sort",toEl:Ge,fromEl:Ae,originalEvent:t}),Ze({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),$e&&$e.save()):ft!==Pi&&ft>=0&&(Ze({sortable:this,name:"update",toEl:Ge,originalEvent:t}),Ze({sortable:this,name:"sort",toEl:Ge,originalEvent:t})),re.active&&((ft==null||ft===-1)&&(ft=Pi,Po=pr),Ze({sortable:this,name:"end",toEl:Ge,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){nt("nulling",this),Ae=j=Ge=ue=qo=Le=Is=Mo=Xo=Nt=fr=ft=Po=Pi=pr=Ai=mr=$e=Ls=re.dragged=re.ghost=re.clone=re.active=null,Hs.forEach(function(t){t.checked=!0}),Hs.length=Za=Ja=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":j&&(this._onDragOver(t),QM(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],o,i=this.el.children,r=0,s=i.length,n=this.options;r<s;r++)o=i[r],Ot(o,n.draggable,this.el,!1)&&t.push(o.getAttribute(n.dataIdAttr)||iP(o));return t},sort:function(t,o){var i={},r=this.el;this.toArray().forEach(function(s,n){var a=r.children[n];Ot(a,this.options.draggable,r,!1)&&(i[s]=a)},this),o&&this.captureAnimationState(),t.forEach(function(s){i[s]&&(r.removeChild(i[s]),r.appendChild(i[s]))}),o&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,o){return Ot(t,o||this.options.draggable,this.el,!1)},option:function(t,o){var i=this.options;if(o===void 0)return i[t];var r=gr.modifyOption(this,t,o);typeof r<"u"?i[t]=r:i[t]=o,t==="group"&&Jh(i)},destroy:function(){nt("destroy",this);var t=this.el;t[st]=null,ve(t,"mousedown",this._onTapStart),ve(t,"touchstart",this._onTapStart),ve(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(ve(t,"dragover",this),ve(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(o){o.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Bs.splice(Bs.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Mo){if(nt("hideClone",this),re.eventCanceled)return;ie(Le,"display","none"),this.options.removeCloneOnHide&&Le.parentNode&&Le.parentNode.removeChild(Le),Mo=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Mo){if(nt("showClone",this),re.eventCanceled)return;j.parentNode==Ae&&!this.options.group.revertClone?Ae.insertBefore(Le,j):qo?Ae.insertBefore(Le,qo):Ae.appendChild(Le),this.options.group.revertClone&&this.animate(j,Le),ie(Le,"display",""),Mo=!1}}};function QM(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function zs(e,t,o,i,r,s,n,a){var l,d=e[st],c=d.options.onMove,u;return window.CustomEvent&&!ho&&!cr?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=o,l.draggedRect=i,l.related=r||t,l.relatedRect=s||Ne(t),l.willInsertAfter=a,l.originalEvent=n,e.dispatchEvent(l),c&&(u=c.call(d,l,n)),u}function ol(e){e.draggable=!1}function ZM(){tl=!1}function JM(e,t,o){var i=Ne(ki(o.el,0,o.options,!0)),r=Kh(o.el,o.options,ue),s=10;return t?e.clientX<r.left-s||e.clientY<i.top&&e.clientX<i.right:e.clientY<r.top-s||e.clientY<i.bottom&&e.clientX<i.left}function eP(e,t,o){var i=Ne(qa(o.el,o.options.draggable)),r=Kh(o.el,o.options,ue),s=10;return t?e.clientX>r.right+s||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>r.bottom+s||e.clientX>i.right&&e.clientY>i.top}function tP(e,t,o,i,r,s,n,a){var l=i?e.clientY:e.clientX,d=i?o.height:o.width,c=i?o.top:o.left,u=i?o.bottom:o.right,g=!1;if(!n){if(a&&Ns<d*r){if(!Cr&&(mr===1?l>c+d*s/2:l<u-d*s/2)&&(Cr=!0),Cr)g=!0;else if(mr===1?l<c+Ns:l>u-Ns)return-mr}else if(l>c+d*(1-r)/2&&l<u-d*(1-r)/2)return oP(t)}return g=g||n,g&&(l<c+d*s/2||l>u-d*s/2)?l>c+d/2?1:-1:0}function oP(e){return Dt(j)<Dt(e)?1:-1}function iP(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,o=t.length,i=0;o--;)i+=t.charCodeAt(o);return i.toString(36)}function rP(e){Hs.length=0;for(var t=e.getElementsByTagName("input"),o=t.length;o--;){var i=t[o];i.checked&&Hs.push(i)}}function Ws(e){return setTimeout(e,0)}function il(e){return clearTimeout(e)}Vs&&we(document,"touchmove",function(e){(re.active||Ei)&&e.cancelable&&e.preventDefault()}),re.utils={on:we,off:ve,css:ie,find:_h,is:function(t,o){return!!Ot(t,o,t,!1)},extend:VM,throttle:$h,closest:Ot,toggleClass:pt,clone:jh,index:Dt,nextTick:Ws,cancelNextTick:il,detectDirection:Zh,getChild:ki,expando:st},re.get=function(e){return e[st]},re.mount=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(re.utils=Zt(Zt({},re.utils),i.utils)),gr.mount(i)})},re.create=function(e,t){return new re(e,t)},re.version=NM;var He=[],vr,rl,sl=!1,nl,al,$s,wr;function sP(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return e.prototype={dragStarted:function(o){var i=o.originalEvent;this.sortable.nativeDraggable?we(document,"dragover",this._handleAutoScroll):this.options.supportPointer?we(document,"pointermove",this._handleFallbackAutoScroll):i.touches?we(document,"touchmove",this._handleFallbackAutoScroll):we(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(o){var i=o.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?ve(document,"dragover",this._handleAutoScroll):(ve(document,"pointermove",this._handleFallbackAutoScroll),ve(document,"touchmove",this._handleFallbackAutoScroll),ve(document,"mousemove",this._handleFallbackAutoScroll)),og(),Us(),_M()},nulling:function(){$s=rl=vr=sl=wr=nl=al=null,He.length=0},_handleFallbackAutoScroll:function(o){this._handleAutoScroll(o,!0)},_handleAutoScroll:function(o,i){var r=this,s=(o.touches?o.touches[0]:o).clientX,n=(o.touches?o.touches[0]:o).clientY,a=document.elementFromPoint(s,n);if($s=o,i||this.options.forceAutoScrollFallback||cr||ho||ur){ll(o,this.options,a,i);var l=ko(a,!0);sl&&(!wr||s!==nl||n!==al)&&(wr&&og(),wr=setInterval(function(){var d=ko(document.elementFromPoint(s,n),!0);d!==l&&(l=d,Us()),ll(o,r.options,d,i)},10),nl=s,al=n)}else{if(!this.options.bubbleScroll||ko(a,!0)===Jt()){Us();return}ll(o,this.options,ko(a,!1),!1)}}},co(e,{pluginName:"scroll",initializeByDefault:!0})}function Us(){He.forEach(function(e){clearInterval(e.pid)}),He=[]}function og(){clearInterval(wr)}var ll=$h(function(e,t,o,i){if(t.scroll){var r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,n=t.scrollSensitivity,a=t.scrollSpeed,l=Jt(),d=!1,c;rl!==o&&(rl=o,Us(),vr=t.scroll,c=t.scrollFn,vr===!0&&(vr=ko(o,!0)));var u=0,g=vr;do{var p=g,f=Ne(p),m=f.top,C=f.bottom,w=f.left,y=f.right,b=f.width,x=f.height,M=void 0,P=void 0,k=p.scrollWidth,S=p.scrollHeight,v=ie(p),R=p.scrollLeft,F=p.scrollTop;p===l?(M=b<k&&(v.overflowX==="auto"||v.overflowX==="scroll"||v.overflowX==="visible"),P=x<S&&(v.overflowY==="auto"||v.overflowY==="scroll"||v.overflowY==="visible")):(M=b<k&&(v.overflowX==="auto"||v.overflowX==="scroll"),P=x<S&&(v.overflowY==="auto"||v.overflowY==="scroll"));var G=M&&(Math.abs(y-r)<=n&&R+b<k)-(Math.abs(w-r)<=n&&!!R),z=P&&(Math.abs(C-s)<=n&&F+x<S)-(Math.abs(m-s)<=n&&!!F);if(!He[u])for(var B=0;B<=u;B++)He[B]||(He[B]={});(He[u].vx!=G||He[u].vy!=z||He[u].el!==p)&&(He[u].el=p,He[u].vx=G,He[u].vy=z,clearInterval(He[u].pid),(G!=0||z!=0)&&(d=!0,He[u].pid=setInterval(function(){i&&this.layer===0&&re.active._onTouchMove($s);var H=He[this.layer].vy?He[this.layer].vy*a:0,O=He[this.layer].vx?He[this.layer].vx*a:0;typeof c=="function"&&c.call(re.dragged.parentNode[st],O,H,e,$s,He[this.layer].el)!=="continue"||Uh(He[this.layer].el,O,H)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&g!==l&&(g=ko(g,!1)));sl=d}},30),ig=function(t){var o=t.originalEvent,i=t.putSortable,r=t.dragEl,s=t.activeSortable,n=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(o){var d=i||s;a();var c=o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(n("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function dl(){}dl.prototype={startIndex:null,dragStart:function(t){var o=t.oldDraggableIndex;this.startIndex=o},onSpill:function(t){var o=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=ki(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(o,r):this.sortable.el.appendChild(o),this.sortable.animateAll(),i&&i.animateAll()},drop:ig},co(dl,{pluginName:"revertOnSpill"});function cl(){}cl.prototype={onSpill:function(t){var o=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),o.parentNode&&o.parentNode.removeChild(o),r.animateAll()},drop:ig},co(cl,{pluginName:"removeOnSpill"}),re.mount(new sP),re.mount(cl,dl);function nP(e,t,o={}){let i;const{document:r=AM,...s}=o,n={onUpdate:c=>{dP(t,c.oldIndex,c.newIndex,c)}},a=()=>{const c=typeof e=="string"?r?.querySelector(e):Lh(e);!c||i!==void 0||(i=new re(c,{...n,...s}))},l=()=>{i?.destroy(),i=void 0},d=(c,u)=>{if(u!==void 0)i?.option(c,u);else return i?.option(c)};return PM(a),Ps(l),{stop:l,start:a,option:d}}function aP(e,t,o){const i=e.children[o];e.insertBefore(t,i)}function lP(e){e.parentNode&&e.parentNode.removeChild(e)}function dP(e,t,o,i=null){i!=null&&(lP(i.item),aP(i.from,i.item,t));const r=h.isRef(e),s=r?[...h.toValue(e)]:h.toValue(e);if(o>=0&&o<s.length){const n=s.splice(t,1)[0];h.nextTick(()=>{s.splice(o,0,n),r&&(e.value=s)})}}const cP=["data-align"],uP=h.defineComponent({__name:"PvPopover",props:{alignment:{default:void 0},cssCustomProperties:{default:()=>({})},cssCustomListProperties:{},isList:{type:Boolean,default:!1},isSortable:{type:Boolean}},emits:["list-order-updated"],setup(e,{expose:t,emit:o}){const i=h.ref(null),r=h.useTemplateRef("popoverList"),s=e,n=o;return s.isSortable&&s.isList&&nP(r,[],{animation:150,onUpdate:()=>{const a=Array.from(r.value?.children||[]).map(l=>l.id);n("list-order-updated",a)}}),t({popoverRoot:i}),(a,l)=>(h.openBlock(),h.createElementBlock("div",{ref_key:"popoverRoot",ref:i,class:"pv-popover","data-testid":"pv-popover","data-align":a.alignment,style:h.normalizeStyle(a.cssCustomProperties)},[a.isList?(h.openBlock(),h.createElementBlock("ul",{key:0,ref:"popoverList",role:"list",class:"pv-popover-list",style:h.normalizeStyle(a.cssCustomListProperties)},[h.renderSlot(a.$slots,"default",{},void 0,!0)],4)):h.renderSlot(a.$slots,"default",{key:1},void 0,!0)],12,cP))}}),go=(e,t)=>{const o=e.__vccOpts||e;for(const[i,r]of t)o[i]=r;return o},hP=go(uP,[["__scopeId","data-v-cda1af8c"]]),rg=Es?window:void 0;function br(e){var t;const o=h.toValue(e);return(t=o?.$el)!=null?t:o}function js(...e){const t=[],o=()=>{t.forEach(a=>a()),t.length=0},i=(a,l,d,c)=>(a.addEventListener(l,d,c),()=>a.removeEventListener(l,d,c)),r=h.computed(()=>{const a=Fi(h.toValue(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),s=Th(()=>{var a,l;return[(l=(a=r.value)==null?void 0:a.map(d=>br(d)))!=null?l:[rg].filter(d=>d!=null),Fi(h.toValue(r.value?e[1]:e[0])),Fi(h.unref(r.value?e[2]:e[1])),h.toValue(r.value?e[3]:e[2])]},([a,l,d,c])=>{if(o(),!a?.length||!l?.length||!d?.length)return;const u=Eh(c)?{...c}:c;t.push(...a.flatMap(g=>l.flatMap(p=>d.map(f=>i(g,p,f,u)))))},{flush:"post"}),n=()=>{s(),o()};return Ps(o),n}let sg=!1;function ng(e,t,o={}){const{window:i=rg,ignore:r=[],capture:s=!0,detectIframe:n=!1,controls:a=!1}=o;if(!i)return a?{stop:lo,cancel:lo,trigger:lo}:lo;if(Ka&&!sg){sg=!0;const C={passive:!0};Array.from(i.document.body.children).forEach(w=>w.addEventListener("click",lo,C)),i.document.documentElement.addEventListener("click",lo,C)}let l=!0;const d=C=>h.toValue(r).some(w=>{if(typeof w=="string")return Array.from(i.document.querySelectorAll(w)).some(y=>y===C.target||C.composedPath().includes(y));{const y=br(w);return y&&(C.target===y||C.composedPath().includes(y))}});function c(C){const w=h.toValue(C);return w&&w.$.subTree.shapeFlag===16}function u(C,w){const y=h.toValue(C),b=y.$.subTree&&y.$.subTree.children;return b==null||!Array.isArray(b)?!1:b.some(x=>x.el===w.target||w.composedPath().includes(x.el))}const g=C=>{const w=br(e);if(C.target!=null&&!(!(w instanceof Element)&&c(e)&&u(e,C))&&!(!w||w===C.target||C.composedPath().includes(w))){if("detail"in C&&C.detail===0&&(l=!d(C)),!l){l=!0;return}t(C)}};let p=!1;const f=[js(i,"click",C=>{p||(p=!0,setTimeout(()=>{p=!1},0),g(C))},{passive:!0,capture:s}),js(i,"pointerdown",C=>{const w=br(e);l=!d(C)&&!!(w&&!C.composedPath().includes(w))},{passive:!0}),n&&js(i,"blur",C=>{setTimeout(()=>{var w;const y=br(e);((w=i.document.activeElement)==null?void 0:w.tagName)==="IFRAME"&&!y?.contains(i.document.activeElement)&&t(C)},0)},{passive:!0})].filter(Boolean),m=()=>f.forEach(C=>C());return a?{stop:m,cancel:()=>{l=!1},trigger:C=>{l=!0,g(C),l=!1}}:m}const ul=new WeakMap,gP={mounted(e,t){const o=!t.modifiers.bubble;let i;if(typeof t.value=="function")i=ng(e,t.value,{capture:o});else{const[r,s]=t.value;i=ng(e,r,Object.assign({capture:o},s))}ul.set(e,i)},unmounted(e){const t=ul.get(e);t&&typeof t=="function"?t():t?.stop(),ul.delete(e)}};function hl(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function ag(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const o=e.parentNode;return!o||o.tagName==="BODY"?!1:ag(o)}}function pP(e){const t=e||window.event,o=t.target;return ag(o)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}const gl=new WeakMap;function fP(e,t=!1){const o=h.shallowRef(t);let i=null,r="";h.watch(Ah(e),a=>{const l=hl(h.toValue(a));if(l){const d=l;if(gl.get(d)||gl.set(d,d.style.overflow),d.style.overflow!=="hidden"&&(r=d.style.overflow),d.style.overflow==="hidden")return o.value=!0;if(o.value)return d.style.overflow="hidden"}},{immediate:!0});const s=()=>{const a=hl(h.toValue(e));!a||o.value||(Ka&&(i=js(a,"touchmove",l=>{pP(l)},{passive:!1})),a.style.overflow="hidden",o.value=!0)},n=()=>{const a=hl(h.toValue(e));!a||!o.value||(Ka&&i?.(),a.style.overflow=r,gl.delete(a),o.value=!1)};return Ps(n),h.computed({get(){return o.value},set(a){a?s():n()}})}function mP(){let e=!1;const t=h.shallowRef(!1);return(o,i)=>{if(t.value=i.value,e)return;e=!0;const r=fP(o,i.value);h.watch(t,s=>r.value=s)}}mP();const CP={class:"pv-relative",style:{width:"fit-content"}},vP=["disabled"],wP={key:0,class:"pv-shimmer"},lg=go(h.defineComponent({__name:"PvDropdown",props:{defaultOpen:{type:Boolean,default:!1},popoverCssProperties:{},alignment:{default:void 0},isList:{type:Boolean,default:!1},isSortable:{type:Boolean},icon:{type:Boolean},disabled:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},useTeleport:{type:Boolean,default:!1},teleportLocation:{default:"body"}},emits:["dropdown-open","dropdown-closed","list-order-updated"],setup(e,{expose:t,emit:o}){const i=e,r=o,s=h.ref(i.defaultOpen),n=h.ref(null),a=h.ref(null),l=h.ref(null),d=h.ref(null),c=()=>{n.value&&(l.value=n.value.getBoundingClientRect()),a.value?.popoverRoot&&(d.value=a.value.popoverRoot.getBoundingClientRect())},u=h.computed(()=>({"pv-hide":!s.value})),g=w=>{s.value=!s.value},p=()=>{s.value=!1};t({closeDropdown:p}),h.watch(s,w=>{w?h.nextTick(()=>{c(),r("dropdown-open")}):r("dropdown-closed")});const f=h.computed(()=>!l.value||!d.value?0:i.alignment==="right"||i.alignment==="top right"?l.value.left+l.value.width-d.value.width:l.value.left),m=h.computed(()=>!l.value||!d.value?0:i.alignment==="top"||i.alignment==="top right"?l.value.top-d.value.height:l.value.top+window.scrollY+l.value.height),C=h.computed(()=>i.useTeleport?{...{position:"absolute",left:`${f.value}px`,top:`${m.value}px`,zIndex:10},...i.popoverCssProperties}:i.popoverCssProperties);return(w,y)=>h.withDirectives((h.openBlock(),h.createElementBlock("div",CP,[h.createElementVNode("button",{ref_key:"triggerRef",ref:n,class:h.normalizeClass({"pv-select":!w.icon,"pv-icon-button":w.icon}),style:{width:"auto"},onClick:g,disabled:w.disabled},[h.renderSlot(w.$slots,"trigger",{},()=>[y[1]||(y[1]=h.createTextVNode("Open"))],!0)],10,vP),(h.openBlock(),h.createBlock(h.Teleport,{to:w.teleportLocation,disabled:!w.useTeleport},[h.createVNode(hP,{ref_key:"popoverRef",ref:a,class:h.normalizeClass(u.value),"css-custom-properties":C.value,alignment:w.alignment,isList:w.isList,isSortable:w.isSortable,onListOrderUpdated:y[0]||(y[0]=b=>w.$emit("list-order-updated",b))},{default:h.withCtx(()=>[h.renderSlot(w.$slots,"default",{},()=>[w.isLoading?(h.openBlock(),h.createElementBlock("span",wP,"Loading...")):h.createCommentVNode("",!0)],!0)]),_:3},8,["class","css-custom-properties","alignment","isList","isSortable"])],8,["to","disabled"]))])),[[h.unref(gP),p]])}}),[["__scopeId","data-v-bdffc608"]]),bP=[void 0,10,12,20,24,32,64],yP=["xlink:href"],mt=h.defineComponent({__name:"PvIcon",props:{name:{},size:{}},setup(e){const t=e,o=h.ref(null),i=h.computed(()=>({"pv-icon":!0,[`pv-icon-${t.size}`]:bP.includes(t.size)})),r=h.computed(()=>o.value?`${o.value}#${t.name}`:`#${t.name}`);return h.onBeforeMount(()=>{globalThis.__PV_GLOBAL_SPRITE_PATH__&&(o.value=globalThis.__PV_GLOBAL_SPRITE_PATH__)}),(s,n)=>(h.openBlock(),h.createElementBlock("svg",{"data-testid":"pv-icon","aria-hidden":"true",class:h.normalizeClass(i.value)},[h.createElementVNode("use",{"xlink:href":r.value},null,8,yP)],2))}}),SP=["disabled"],RP={key:0,class:"pv-button-loading","data-testid":"pv-button-loading"},xP={key:1,"data-testid":"pv-button-label"},FP={xl:"large",lg:void 0,md:"small"},kt=go(h.defineComponent({__name:"PvButton",props:{variant:{default:"primary"},disabled:{type:Boolean,default:!1},size:{default:"lg"},loading:{type:Boolean,default:!1},label:{},leftIcon:{},rightIcon:{}},setup(e){const t=e,o=h.computed(()=>({[`pv-button-${t.variant}`]:!0,[`pv-button-${FP[t.size]}`]:!!t.size}));return(i,r)=>(h.openBlock(),h.createElementBlock("button",{type:"button",class:h.normalizeClass(o.value),disabled:i.disabled,"data-testid":"pv-button"},[i.loading?(h.openBlock(),h.createElementBlock("span",RP)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[i.leftIcon?(h.openBlock(),h.createBlock(mt,{key:0,name:i.leftIcon,"data-testid":"pv-button-left-icon"},null,8,["name"])):h.createCommentVNode("",!0),i.label?(h.openBlock(),h.createElementBlock("span",xP,h.toDisplayString(i.label),1)):h.createCommentVNode("",!0),i.rightIcon?(h.openBlock(),h.createBlock(mt,{key:2,name:i.rightIcon,"data-testid":"pv-button-right-icon"},null,8,["name"])):h.createCommentVNode("",!0)],64))],10,SP))}}),[["__scopeId","data-v-942d55a7"]]),pl=go(h.defineComponent({__name:"PvCounterBadge",props:{value:{},prefix:{default:""},variant:{default:"primary"},size:{default:"sm"},maxValue:{default:99}},setup(e){const t=e,o=h.computed(()=>t.size=="md"?"md":(t.size=="sm","sm")),i=h.computed(()=>t.maxValue&&t.value&&t.value>t.maxValue?`${t.maxValue}+`:t.value!=null?`${t.prefix}${t.value}`:"-"),r=h.computed(()=>({"pv-inline-block pv-inset-square pv-radius pv-text-center":!0,"pv-badge-md pv-text-body-md":o.value=="md","pv-badge-sm pv-text-body-sm":o.value=="sm","pv-surface-brand-inverse pv-text-inverse":t.variant=="primary","pv-surface pv-bordered":t.variant=="secondary","pv-surface-lighten-5":t.variant=="tertiary","pv-text-secondary":t.variant=="ghost"||t.variant=="tertiary","pv-surface":t.variant=="ghost"}));return(s,n)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(r.value),"data-testid":"pv-counter-badge"},h.toDisplayString(i.value),3))}}),[["__scopeId","data-v-fc3c1104"]]),DP=["data-style"],kP=h.defineComponent({__name:"PvTag",props:{size:{default:"md"},variant:{default:"tertiary"},icon:{},label:{},showClear:{type:Boolean},rounded:{type:Boolean}},emits:["handle-close","handle-click"],setup(e){const t=e,o=h.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}}),i=h.computed(()=>{switch(t.variant){case"primary":return"pv-tag-primary";case"tertiary":return"pv-tag-tertiary";default:return""}});return(r,s)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass([i.value,o.value]),onClick:s[1]||(s[1]=n=>r.$emit("handle-click",r.label)),"data-testid":"pv-tag","data-style":r.rounded?"rounded":void 0},[r.icon?(h.openBlock(),h.createBlock(mt,{key:0,"data-testid":"pv-tag-icon",name:r.icon,size:12},null,8,["name"])):h.createCommentVNode("",!0),h.createElementVNode("span",null,h.toDisplayString(r.label),1),r.showClear?(h.openBlock(),h.createBlock(mt,{key:1,"data-testid":"pv-tag-close-icon",size:12,name:"close",onClick:s[0]||(s[0]=h.withModifiers(n=>r.$emit("handle-close",r.label),["stop"]))})):h.createCommentVNode("",!0)],10,DP))}});var Ks=(e=>(e.Vertical="Vertical",e.Horizontal="Horizontal",e))(Ks||{}),yr=(e=>(e.Primary="Primary",e.Secondary="Secondary",e.Tertiary="Tertiary",e))(yr||{});const MP={class:"pv-text-title-sm pv-line-clamp",style:{"--lines":"2"}},PP={key:0,class:"pv-flex"};yr.Primary,Ks.Horizontal;const EP=["data-style"],AP=h.defineComponent({__name:"PvSuggestionTag",props:{size:{default:"md"},label:{},showIcon:{type:Boolean},rounded:{type:Boolean}},emits:["handle-click"],setup(e){const t=e,o=h.computed(()=>{switch(t.size){case"lg":return"pv-tag-lg";case"sm":return"pv-tag-sm";default:return""}});return(i,r)=>(h.openBlock(),h.createElementBlock("button",{class:h.normalizeClass(["pv-border-dashed pv-tag-secondary",o.value]),onClick:r[0]||(r[0]=s=>i.$emit("handle-click",i.label)),"data-testid":"pv-suggestion-tag","data-style":i.rounded?"rounded":void 0},[i.showIcon?(h.openBlock(),h.createBlock(mt,{key:0,"data-testid":"pv-suggestion-tag-icon",name:"expand",size:12})):h.createCommentVNode("",!0),h.createElementVNode("span",null,h.toDisplayString(i.label),1)],10,EP))}}),TP={class:"pv-relative"},IP=["disabled","placeholder"],LP={key:0,"data-testid":"pv-search-input-shortcut",class:"pv-kbd"},dg="/",GP=h.defineComponent({__name:"PvSearchInput",props:h.mergeModels({placeholder:{default:"Search"},disabled:{type:Boolean,default:!1},displayShortcut:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,o=h.useTemplateRef("search-input"),i=h.useModel(e,"modelValue"),r=h.computed(()=>({"pv-input-search":!0,"pv-full-width":!0,"pv-input-padded-end":!0}));return h.onMounted(()=>{t.displayShortcut&&LM(dg,s=>{const n=s.target,a=n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||(n?.isContentEditable??!1),l=document.activeElement===o.value;(!a||l)&&(l||(s.preventDefault(),o.value?.focus()))})}),(s,n)=>(h.openBlock(),h.createElementBlock("div",TP,[h.withDirectives(h.createElementVNode("input",{ref:"search-input","onUpdate:modelValue":n[0]||(n[0]=a=>i.value=a),"data-testid":"pv-search-input",type:"text",disabled:s.disabled,class:h.normalizeClass(r.value),placeholder:s.placeholder},null,10,IP),[[h.vModelText,i.value]]),s.displayShortcut?(h.openBlock(),h.createElementBlock("kbd",LP,h.toDisplayString(dg))):h.createCommentVNode("",!0)]))}});function BP(e){if(e){let t=e.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function OP(e){return!!(e!==null&&typeof e<"u"&&e.nodeName&&BP(e))}function cg(e){return typeof Element<"u"?e instanceof Element:e!==null&&typeof e=="object"&&e.nodeType===1&&typeof e.nodeName=="string"}function fl(e,t={}){if(cg(e)){const o=(i,r)=>{var s,n;const a=(s=e?.$attrs)!=null&&s[i]?[(n=e?.$attrs)==null?void 0:n[i]]:[];return[r].flat().reduce((l,d)=>{if(d!=null){const c=typeof d;if(c==="string"||c==="number")l.push(d);else if(c==="object"){const u=Array.isArray(d)?o(i,d):Object.entries(d).map(([g,p])=>i==="style"&&(p||p===0)?`${g.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${p}`:p?g:void 0);l=u.length?l.concat(u.filter(g=>!!g)):l}}return l},a)};Object.entries(t).forEach(([i,r])=>{if(r!=null){const s=i.match(/^on(.+)/);s?e.addEventListener(s[1].toLowerCase(),r):i==="p-bind"||i==="pBind"?fl(e,r):(r=i==="class"?[...new Set(o("class",r))].join(" ").trim():i==="style"?o("style",r).join(";").trim():r,(e.$attrs=e.$attrs||{})&&(e.$attrs[i]=r),e.setAttribute(i,r))}})}}function NP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function HP(e,t="",o){cg(e)&&o!==null&&o!==void 0&&e.setAttribute(t,o)}function VP(){const e=new Map;return{on(t,o){let i=e.get(t);return i?i.push(o):i=[o],e.set(t,i),this},off(t,o){const i=e.get(t);return i&&i.splice(i.indexOf(o)>>>0,1),this},emit(t,o){const i=e.get(t);i&&i.forEach(r=>{r(o)})},clear(){e.clear()}}}function ug(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0}function _P(e){return typeof e=="function"&&"call"in e&&"apply"in e}function Be(e){return!ug(e)}function Ys(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function Eo(e,...t){return _P(e)?e(...t):e}function Sr(e,t=!0){return typeof e=="string"&&(t||e!=="")}function zP(e){return Be(e)&&!isNaN(e)}function Ti(e,t){if(t){const o=t.test(e);return t.lastIndex=0,o}return!1}function Rr(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":").trim()}function hg(e){return Sr(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,o)=>o===0?t:"-"+t.toLowerCase()).toLowerCase():e}var WP=Object.defineProperty,$P=Object.defineProperties,UP=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,gg=Object.prototype.hasOwnProperty,pg=Object.prototype.propertyIsEnumerable,fg=(e,t,o)=>t in e?WP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Ht=(e,t)=>{for(var o in t||(t={}))gg.call(t,o)&&fg(e,o,t[o]);if(qs)for(var o of qs(t))pg.call(t,o)&&fg(e,o,t[o]);return e},ml=(e,t)=>$P(e,UP(t)),po=(e,t)=>{var o={};for(var i in e)gg.call(e,i)&&t.indexOf(i)<0&&(o[i]=e[i]);if(e!=null&&qs)for(var i of qs(e))t.indexOf(i)<0&&pg.call(e,i)&&(o[i]=e[i]);return o},jP=VP(),Zo=jP,Cl=/{([^}]*)}/g,KP=/(\d+\s+[\+\-\*\/]\s+\d+)/g,YP=/var\([^)]+\)/g;function qP(e){return Ys(e)&&e.hasOwnProperty("$value")&&e.hasOwnProperty("$type")?e.$value:e}function XP(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function vl(e="",t=""){return XP(`${Sr(e,!1)&&Sr(t,!1)?`${e}-`:e}${t}`)}function mg(e="",t=""){return`--${vl(e,t)}`}function QP(e=""){const t=(e.match(/{/g)||[]).length,o=(e.match(/}/g)||[]).length;return(t+o)%2!==0}function Cg(e,t="",o="",i=[],r){if(Sr(e)){const s=e.trim();if(QP(s))return;if(Ti(s,Cl)){const n=s.replaceAll(Cl,a=>{const d=a.replace(/{|}/g,"").split(".").filter(c=>!i.some(u=>Ti(c,u)));return`var(${mg(o,hg(d.join("-")))}${Be(r)?`, ${r}`:""})`});return Ti(n.replace(YP,"0"),KP)?`calc(${n})`:n}return s}else if(zP(e))return e}function ZP(e,t,o){Sr(t,!1)&&e.push(`${t}:${o};`)}function Ii(e,t){return e?`${e}{${t}}`:""}function vg(e,t){if(e.indexOf("dt(")===-1)return e;function o(n,a){const l=[];let d=0,c="",u=null,g=0;for(;d<=n.length;){const p=n[d];if((p==='"'||p==="'"||p==="`")&&n[d-1]!=="\\"&&(u=u===p?null:p),!u&&(p==="("&&g++,p===")"&&g--,(p===","||d===n.length)&&g===0)){const f=c.trim();f.startsWith("dt(")?l.push(vg(f,a)):l.push(i(f)),c="",d++;continue}p!==void 0&&(c+=p),d++}return l}function i(n){const a=n[0];if((a==='"'||a==="'"||a==="`")&&n[n.length-1]===a)return n.slice(1,-1);const l=Number(n);return isNaN(l)?n:l}const r=[],s=[];for(let n=0;n<e.length;n++)if(e[n]==="d"&&e.slice(n,n+3)==="dt(")s.push(n),n+=2;else if(e[n]===")"&&s.length>0){const a=s.pop();s.length===0&&r.push([a,n])}if(!r.length)return e;for(let n=r.length-1;n>=0;n--){const[a,l]=r[n],d=e.slice(a+3,l),c=o(d,t),u=t(...c);e=e.slice(0,a)+u+e.slice(l+1)}return e}var Jo=(...e)=>JP(Ct.getTheme(),...e),JP=(e={},t,o,i)=>{if(t){const{variable:r,options:s}=Ct.defaults||{},{prefix:n,transform:a}=e?.options||s||{},l=Ti(t,Cl)?t:`{${t}}`;return i==="value"||ug(i)&&a==="strict"?Ct.getTokenValue(t):Cg(l,void 0,n,[r.excludedKeyRegex],o)}return""};function Xs(e,...t){if(e instanceof Array){const o=e.reduce((i,r,s)=>{var n;return i+r+((n=Eo(t[s],{dt:Jo}))!=null?n:"")},"");return vg(o,Jo)}return Eo(e,{dt:Jo})}function eE(e,t={}){const o=Ct.defaults.variable,{prefix:i=o.prefix,selector:r=o.selector,excludedKeyRegex:s=o.excludedKeyRegex}=t,n=[],a=[],l=[{node:e,path:i}];for(;l.length;){const{node:c,path:u}=l.pop();for(const g in c){const p=c[g],f=qP(p),C=Ti(g,s)?vl(u):vl(u,hg(g));if(Ys(f))l.push({node:f,path:C});else{const w=mg(C),y=Cg(f,C,i,[s]);ZP(a,w,y);let b=C;i&&b.startsWith(i+"-")&&(b=b.slice(i.length+1)),n.push(b.replace(/-/g,"."))}}}const d=a.join("");return{value:a,tokens:n,declarations:d,css:Ii(r,d)}}var Vt={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return{type:"custom",selector:e,matched:!0}}}},resolve(e){const t=Object.keys(this.rules).filter(o=>o!=="custom").map(o=>this.rules[o]);return[e].flat().map(o=>{var i;return(i=t.map(r=>r.resolve(o)).find(r=>r.matched))!=null?i:this.rules.custom.resolve(o)})}},_toVariables(e,t){return eE(e,{prefix:t?.prefix})},getCommon({name:e="",theme:t={},params:o,set:i,defaults:r}){var s,n,a,l,d,c,u;const{preset:g,options:p}=t;let f,m,C,w,y,b,x;if(Be(g)&&p.transform!=="strict"){const{primitive:M,semantic:P,extend:k}=g,S=P||{},{colorScheme:v}=S,R=po(S,["colorScheme"]),F=k||{},{colorScheme:G}=F,z=po(F,["colorScheme"]),B=v||{},{dark:H}=B,O=po(B,["dark"]),L=G||{},{dark:N}=L,I=po(L,["dark"]),K=Be(M)?this._toVariables({primitive:M},p):{},W=Be(R)?this._toVariables({semantic:R},p):{},Y=Be(O)?this._toVariables({light:O},p):{},$=Be(H)?this._toVariables({dark:H},p):{},se=Be(z)?this._toVariables({semantic:z},p):{},fe=Be(I)?this._toVariables({light:I},p):{},Se=Be(N)?this._toVariables({dark:N},p):{},[be,ne]=[(s=K.declarations)!=null?s:"",K.tokens],[le,de]=[(n=W.declarations)!=null?n:"",W.tokens||[]],[Q,ye]=[(a=Y.declarations)!=null?a:"",Y.tokens||[]],[Fe,Re]=[(l=$.declarations)!=null?l:"",$.tokens||[]],[xe,he]=[(d=se.declarations)!=null?d:"",se.tokens||[]],[Ue,T]=[(c=fe.declarations)!=null?c:"",fe.tokens||[]],[X,J]=[(u=Se.declarations)!=null?u:"",Se.tokens||[]];f=this.transformCSS(e,be,"light","variable",p,i,r),m=ne;const Oe=this.transformCSS(e,`${le}${Q}`,"light","variable",p,i,r),je=this.transformCSS(e,`${Fe}`,"dark","variable",p,i,r);C=`${Oe}${je}`,w=[...new Set([...de,...ye,...Re])];const fo=this.transformCSS(e,`${xe}${Ue}color-scheme:light`,"light","variable",p,i,r),Ve=this.transformCSS(e,`${X}color-scheme:dark`,"dark","variable",p,i,r);y=`${fo}${Ve}`,b=[...new Set([...he,...T,...J])],x=Eo(g.css,{dt:Jo})}return{primitive:{css:f,tokens:m},semantic:{css:C,tokens:w},global:{css:y,tokens:b},style:x}},getPreset({name:e="",preset:t={},options:o,params:i,set:r,defaults:s,selector:n}){var a,l,d;let c,u,g;if(Be(t)&&o.transform!=="strict"){const p=e.replace("-directive",""),f=t,{colorScheme:m,extend:C,css:w}=f,y=po(f,["colorScheme","extend","css"]),b=C||{},{colorScheme:x}=b,M=po(b,["colorScheme"]),P=m||{},{dark:k}=P,S=po(P,["dark"]),v=x||{},{dark:R}=v,F=po(v,["dark"]),G=Be(y)?this._toVariables({[p]:Ht(Ht({},y),M)},o):{},z=Be(S)?this._toVariables({[p]:Ht(Ht({},S),F)},o):{},B=Be(k)?this._toVariables({[p]:Ht(Ht({},k),R)},o):{},[H,O]=[(a=G.declarations)!=null?a:"",G.tokens||[]],[L,N]=[(l=z.declarations)!=null?l:"",z.tokens||[]],[I,K]=[(d=B.declarations)!=null?d:"",B.tokens||[]],W=this.transformCSS(p,`${H}${L}`,"light","variable",o,r,s,n),Y=this.transformCSS(p,I,"dark","variable",o,r,s,n);c=`${W}${Y}`,u=[...new Set([...O,...N,...K])],g=Eo(w,{dt:Jo})}return{css:c,tokens:u,style:g}},getPresetC({name:e="",theme:t={},params:o,set:i,defaults:r}){var s;const{preset:n,options:a}=t,l=(s=n?.components)==null?void 0:s[e];return this.getPreset({name:e,preset:l,options:a,params:o,set:i,defaults:r})},getPresetD({name:e="",theme:t={},params:o,set:i,defaults:r}){var s,n;const a=e.replace("-directive",""),{preset:l,options:d}=t,c=((s=l?.components)==null?void 0:s[a])||((n=l?.directives)==null?void 0:n[a]);return this.getPreset({name:a,preset:c,options:d,params:o,set:i,defaults:r})},applyDarkColorScheme(e){return!(e.darkModeSelector==="none"||e.darkModeSelector===!1)},getColorSchemeOption(e,t){var o;return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===!0?t.options.darkModeSelector:(o=e.darkModeSelector)!=null?o:t.options.darkModeSelector):[]},getLayerOrder(e,t={},o,i){const{cssLayer:r}=t;return r?`@layer ${Eo(r.order||"primeui",o)}`:""},getCommonStyleSheet({name:e="",theme:t={},params:o,props:i={},set:r,defaults:s}){const n=this.getCommon({name:e,theme:t,params:o,set:r,defaults:s}),a=Object.entries(i).reduce((l,[d,c])=>l.push(`${d}="${c}"`)&&l,[]).join(" ");return Object.entries(n||{}).reduce((l,[d,c])=>{if(Ys(c)&&Object.hasOwn(c,"css")){const u=Rr(c.css),g=`${d}-variables`;l.push(`<style type="text/css" data-primevue-style-id="${g}" ${a}>${u}</style>`)}return l},[]).join("")},getStyleSheet({name:e="",theme:t={},params:o,props:i={},set:r,defaults:s}){var n;const a={name:e,theme:t,params:o,set:r,defaults:s},l=(n=e.includes("-directive")?this.getPresetD(a):this.getPresetC(a))==null?void 0:n.css,d=Object.entries(i).reduce((c,[u,g])=>c.push(`${u}="${g}"`)&&c,[]).join(" ");return l?`<style type="text/css" data-primevue-style-id="${e}-variables" ${d}>${Rr(l)}</style>`:""},createTokens(e={},t,o="",i="",r={}){return{}},getTokenValue(e,t,o){var i;const s=(l=>l.split(".").filter(c=>!Ti(c.toLowerCase(),o.variable.excludedKeyRegex)).join("."))(t),n=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,a=[(i=e[s])==null?void 0:i.computed(n)].flat().filter(l=>l);return a.length===1?a[0].value:a.reduce((l={},d)=>{const c=d,{colorScheme:u}=c,g=po(c,["colorScheme"]);return l[u]=g,l},void 0)},getSelectorRule(e,t,o,i){return o==="class"||o==="attr"?Ii(Be(t)?`${e}${t},${e} ${t}`:e,i):Ii(e,Be(t)?Ii(t,i):i)},transformCSS(e,t,o,i,r={},s,n,a){if(Be(t)){const{cssLayer:l}=r;if(i!=="style"){const d=this.getColorSchemeOption(r,n);t=o==="dark"?d.reduce((c,{type:u,selector:g})=>(Be(g)&&(c+=g.includes("[CSS]")?g.replace("[CSS]",t):this.getSelectorRule(g,a,u,t)),c),""):Ii(a??":root",t)}if(l){const d={name:"primeui"};Ys(l)&&(d.name=Eo(l.name,{name:e,type:i})),Be(d.name)&&(t=Ii(`@layer ${d.name}`,t),s?.layerNames(d.name))}return t}return""}},Ct={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=ml(Ht({},t),{options:Ht(Ht({},this.defaults.options),t.options)}),this._tokens=Vt.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return((e=this.theme)==null?void 0:e.preset)||{}},get options(){var e;return((e=this.theme)==null?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),Zo.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=ml(Ht({},this.theme),{preset:e}),this._tokens=Vt.createTokens(e,this.defaults),this.clearLoadedStyleNames(),Zo.emit("preset:change",e),Zo.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=ml(Ht({},this.theme),{options:e}),this.clearLoadedStyleNames(),Zo.emit("options:change",e),Zo.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return Vt.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return Vt.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const o={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vt.getPresetC(o)},getDirective(e="",t){const o={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vt.getPresetD(o)},getCustomPreset(e="",t,o,i){const r={name:e,preset:t,options:this.options,selector:o,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return Vt.getPreset(r)},getLayerOrderCSS(e=""){return Vt.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,o="style",i){return Vt.transformCSS(e,t,i,o,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,o={}){return Vt.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:o,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,o={}){return Vt.getStyleSheet({name:e,theme:this.theme,params:t,props:o,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),Zo.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&Zo.emit("theme:load"))}},tE=`
80
+ *,
81
+ ::before,
82
+ ::after {
83
+ box-sizing: border-box;
84
+ }
85
+
86
+ /* Non vue overlay animations */
87
+ .p-connected-overlay {
88
+ opacity: 0;
89
+ transform: scaleY(0.8);
90
+ transition:
91
+ transform 0.12s cubic-bezier(0, 0, 0.2, 1),
92
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
93
+ }
94
+
95
+ .p-connected-overlay-visible {
96
+ opacity: 1;
97
+ transform: scaleY(1);
98
+ }
99
+
100
+ .p-connected-overlay-hidden {
101
+ opacity: 0;
102
+ transform: scaleY(1);
103
+ transition: opacity 0.1s linear;
104
+ }
105
+
106
+ /* Vue based overlay animations */
107
+ .p-connected-overlay-enter-from {
108
+ opacity: 0;
109
+ transform: scaleY(0.8);
110
+ }
111
+
112
+ .p-connected-overlay-leave-to {
113
+ opacity: 0;
114
+ }
115
+
116
+ .p-connected-overlay-enter-active {
117
+ transition:
118
+ transform 0.12s cubic-bezier(0, 0, 0.2, 1),
119
+ opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
120
+ }
121
+
122
+ .p-connected-overlay-leave-active {
123
+ transition: opacity 0.1s linear;
124
+ }
125
+
126
+ /* Toggleable Content */
127
+ .p-toggleable-content-enter-from,
128
+ .p-toggleable-content-leave-to {
129
+ max-height: 0;
130
+ }
131
+
132
+ .p-toggleable-content-enter-to,
133
+ .p-toggleable-content-leave-from {
134
+ max-height: 1000px;
135
+ }
136
+
137
+ .p-toggleable-content-leave-active {
138
+ overflow: hidden;
139
+ transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
140
+ }
141
+
142
+ .p-toggleable-content-enter-active {
143
+ overflow: hidden;
144
+ transition: max-height 1s ease-in-out;
145
+ }
146
+
147
+ .p-disabled,
148
+ .p-disabled * {
149
+ cursor: default;
150
+ pointer-events: none;
151
+ user-select: none;
152
+ }
153
+
154
+ .p-disabled,
155
+ .p-component:disabled {
156
+ opacity: dt('disabled.opacity');
157
+ }
158
+
159
+ .pi {
160
+ font-size: dt('icon.size');
161
+ }
162
+
163
+ .p-icon {
164
+ width: dt('icon.size');
165
+ height: dt('icon.size');
166
+ }
167
+
168
+ .p-overlay-mask {
169
+ background: dt('mask.background');
170
+ color: dt('mask.color');
171
+ position: fixed;
172
+ top: 0;
173
+ left: 0;
174
+ width: 100%;
175
+ height: 100%;
176
+ }
177
+
178
+ .p-overlay-mask-enter {
179
+ animation: p-overlay-mask-enter-animation dt('mask.transition.duration') forwards;
180
+ }
181
+
182
+ .p-overlay-mask-leave {
183
+ animation: p-overlay-mask-leave-animation dt('mask.transition.duration') forwards;
184
+ }
185
+
186
+ @keyframes p-overlay-mask-enter-animation {
187
+ from {
188
+ background: transparent;
189
+ }
190
+ to {
191
+ background: dt('mask.background');
192
+ }
193
+ }
194
+ @keyframes p-overlay-mask-leave-animation {
195
+ from {
196
+ background: dt('mask.background');
197
+ }
198
+ to {
199
+ background: transparent;
200
+ }
201
+ }
202
+ `;function xr(e){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(e)}function wg(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,i)}return o}function bg(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?wg(Object(o),!0).forEach(function(i){oE(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):wg(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function oE(e,t,o){return(t=iE(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function iE(e){var t=rE(e,"string");return xr(t)=="symbol"?t:t+""}function rE(e,t){if(xr(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t);if(xr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;h.getCurrentInstance()&&h.getCurrentInstance().components?h.onMounted(e):t?e():h.nextTick(e)}var nE=0;function aE(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=h.ref(!1),i=h.ref(e),r=h.ref(null),s=NP()?window.document:void 0,n=t.document,a=n===void 0?s:n,l=t.immediate,d=l===void 0?!0:l,c=t.manual,u=c===void 0?!1:c,g=t.name,p=g===void 0?"style_".concat(++nE):g,f=t.id,m=f===void 0?void 0:f,C=t.media,w=C===void 0?void 0:C,y=t.nonce,b=y===void 0?void 0:y,x=t.first,M=x===void 0?!1:x,P=t.onMounted,k=P===void 0?void 0:P,S=t.onUpdated,v=S===void 0?void 0:S,R=t.onLoad,F=R===void 0?void 0:R,G=t.props,z=G===void 0?{}:G,B=function(){},H=function(N){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a){var K=bg(bg({},z),I),W=K.name||p,Y=K.id||m,$=K.nonce||b;r.value=a.querySelector('style[data-primevue-style-id="'.concat(W,'"]'))||a.getElementById(Y)||a.createElement("style"),r.value.isConnected||(i.value=N||e,fl(r.value,{type:"text/css",id:Y,media:w,nonce:$}),M?a.head.prepend(r.value):a.head.appendChild(r.value),HP(r.value,"data-primevue-style-id",W),fl(r.value,K),r.value.onload=function(se){return F?.(se,{name:W})},k?.(W)),!o.value&&(B=h.watch(i,function(se){r.value.textContent=se,v?.(W)},{immediate:!0}),o.value=!0)}},O=function(){!a||!o.value||(B(),OP(r.value)&&a.head.removeChild(r.value),o.value=!1,r.value=null)};return d&&!u&&sE(H),{id:m,name:p,el:r,css:i,unload:O,load:H,isLoaded:h.readonly(o)}}function Fr(e){"@babel/helpers - typeof";return Fr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fr(e)}var yg,Sg,Rg,xg;function Fg(e,t){return uE(e)||cE(e,t)||dE(e,t)||lE()}function lE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
203
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dE(e,t){if(e){if(typeof e=="string")return Dg(e,t);var o={}.toString.call(e).slice(8,-1);return o==="Object"&&e.constructor&&(o=e.constructor.name),o==="Map"||o==="Set"?Array.from(e):o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Dg(e,t):void 0}}function Dg(e,t){(t==null||t>e.length)&&(t=e.length);for(var o=0,i=Array(t);o<t;o++)i[o]=e[o];return i}function cE(e,t){var o=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(o!=null){var i,r,s,n,a=[],l=!0,d=!1;try{if(s=(o=o.call(e)).next,t!==0)for(;!(l=(i=s.call(o)).done)&&(a.push(i.value),a.length!==t);l=!0);}catch(c){d=!0,r=c}finally{try{if(!l&&o.return!=null&&(n=o.return(),Object(n)!==n))return}finally{if(d)throw r}}return a}}function uE(e){if(Array.isArray(e))return e}function kg(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),o.push.apply(o,i)}return o}function wl(e){for(var t=1;t<arguments.length;t++){var o=arguments[t]!=null?arguments[t]:{};t%2?kg(Object(o),!0).forEach(function(i){hE(e,i,o[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):kg(Object(o)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(o,i))})}return e}function hE(e,t,o){return(t=gE(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function gE(e){var t=pE(e,"string");return Fr(t)=="symbol"?t:t+""}function pE(e,t){if(Fr(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var i=o.call(e,t);if(Fr(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qs(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var fE=function(t){var o=t.dt;return`
204
+ .p-hidden-accessible {
205
+ border: 0;
206
+ clip: rect(0 0 0 0);
207
+ height: 1px;
208
+ margin: -1px;
209
+ opacity: 0;
210
+ overflow: hidden;
211
+ padding: 0;
212
+ pointer-events: none;
213
+ position: absolute;
214
+ white-space: nowrap;
215
+ width: 1px;
216
+ }
217
+
218
+ .p-overflow-hidden {
219
+ overflow: hidden;
220
+ padding-right: `.concat(o("scrollbar.width"),`;
221
+ }
222
+ `)},mE={},CE={},Mg={name:"base",css:fE,style:tE,classes:mE,inlineStyles:CE,load:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(s){return s},r=i(Xs(yg||(yg=Qs(["",""])),t));return Be(r)?aE(Rr(r),wl({name:this.name},o)):{}},loadCSS:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,t)},loadStyle:function(){var t=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.load(this.style,o,function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return Ct.transformCSS(o.name||t.name,"".concat(r).concat(Xs(Sg||(Sg=Qs(["",""])),i)))})},getCommonTheme:function(t){return Ct.getCommon(this.name,t)},getComponentTheme:function(t){return Ct.getComponent(this.name,t)},getDirectiveTheme:function(t){return Ct.getDirective(this.name,t)},getPresetTheme:function(t,o,i){return Ct.getCustomPreset(this.name,t,o,i)},getLayerOrderThemeCSS:function(){return Ct.getLayerOrderCSS(this.name)},getStyleSheet:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Eo(this.css,{dt:Jo})||"",r=Rr(Xs(Rg||(Rg=Qs(["","",""])),i,t)),s=Object.entries(o).reduce(function(n,a){var l=Fg(a,2),d=l[0],c=l[1];return n.push("".concat(d,'="').concat(c,'"'))&&n},[]).join(" ");return Be(r)?'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(s,">").concat(r,"</style>"):""}return""},getCommonThemeStyleSheet:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ct.getCommonStyleSheet(this.name,t,o)},getThemeStyleSheet:function(t){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=[Ct.getStyleSheet(this.name,t,o)];if(this.style){var r=this.name==="base"?"global-style":"".concat(this.name,"-style"),s=Xs(xg||(xg=Qs(["",""])),Eo(this.style,{dt:Jo})),n=Rr(Ct.transformCSS(r,s)),a=Object.entries(o).reduce(function(l,d){var c=Fg(d,2),u=c[0],g=c[1];return l.push("".concat(u,'="').concat(g,'"'))&&l},[]).join(" ");Be(n)&&i.push('<style type="text/css" data-primevue-style-id="'.concat(r,'" ').concat(a,">").concat(n,"</style>"))}return i.join("")},extend:function(t){return wl(wl({},this),{},{css:void 0,style:void 0},t)}};Mg.extend({name:"common"});var Zs={exports:{}},vE=Zs.exports,Pg;function wE(){return Pg||(Pg=1,function(e,t){(function(o,i){e.exports=i()})(vE,function(){var o=1e3,i=6e4,r=36e5,s="millisecond",n="second",a="minute",l="hour",d="day",c="week",u="month",g="quarter",p="year",f="date",m="Invalid Date",C=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var H=["th","st","nd","rd"],O=B%100;return"["+B+(H[(O-20)%10]||H[O]||H[0])+"]"}},b=function(B,H,O){var L=String(B);return!L||L.length>=H?B:""+Array(H+1-L.length).join(O)+B},x={s:b,z:function(B){var H=-B.utcOffset(),O=Math.abs(H),L=Math.floor(O/60),N=O%60;return(H<=0?"+":"-")+b(L,2,"0")+":"+b(N,2,"0")},m:function B(H,O){if(H.date()<O.date())return-B(O,H);var L=12*(O.year()-H.year())+(O.month()-H.month()),N=H.clone().add(L,u),I=O-N<0,K=H.clone().add(L+(I?-1:1),u);return+(-(L+(O-N)/(I?N-K:K-N))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:u,y:p,w:c,d,D:f,h:l,m:a,s:n,ms:s,Q:g}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},M="en",P={};P[M]=y;var k="$isDayjsObject",S=function(B){return B instanceof G||!(!B||!B[k])},v=function B(H,O,L){var N;if(!H)return M;if(typeof H=="string"){var I=H.toLowerCase();P[I]&&(N=I),O&&(P[I]=O,N=I);var K=H.split("-");if(!N&&K.length>1)return B(K[0])}else{var W=H.name;P[W]=H,N=W}return!L&&N&&(M=N),N||!L&&M},R=function(B,H){if(S(B))return B.clone();var O=typeof H=="object"?H:{};return O.date=B,O.args=arguments,new G(O)},F=x;F.l=v,F.i=S,F.w=function(B,H){return R(B,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var G=function(){function B(O){this.$L=v(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[k]=!0}var H=B.prototype;return H.parse=function(O){this.$d=function(L){var N=L.date,I=L.utc;if(N===null)return new Date(NaN);if(F.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var K=N.match(C);if(K){var W=K[2]-1||0,Y=(K[7]||"0").substring(0,3);return I?new Date(Date.UTC(K[1],W,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)):new Date(K[1],W,K[3]||1,K[4]||0,K[5]||0,K[6]||0,Y)}}return new Date(N)}(O),this.init()},H.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},H.$utils=function(){return F},H.isValid=function(){return this.$d.toString()!==m},H.isSame=function(O,L){var N=R(O);return this.startOf(L)<=N&&N<=this.endOf(L)},H.isAfter=function(O,L){return R(O)<this.startOf(L)},H.isBefore=function(O,L){return this.endOf(L)<R(O)},H.$g=function(O,L,N){return F.u(O)?this[L]:this.set(N,O)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(O,L){var N=this,I=!!F.u(L)||L,K=F.p(O),W=function(le,de){var Q=F.w(N.$u?Date.UTC(N.$y,de,le):new Date(N.$y,de,le),N);return I?Q:Q.endOf(d)},Y=function(le,de){return F.w(N.toDate()[le].apply(N.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(de)),N)},$=this.$W,se=this.$M,fe=this.$D,Se="set"+(this.$u?"UTC":"");switch(K){case p:return I?W(1,0):W(31,11);case u:return I?W(1,se):W(0,se+1);case c:var be=this.$locale().weekStart||0,ne=($<be?$+7:$)-be;return W(I?fe-ne:fe+(6-ne),se);case d:case f:return Y(Se+"Hours",0);case l:return Y(Se+"Minutes",1);case a:return Y(Se+"Seconds",2);case n:return Y(Se+"Milliseconds",3);default:return this.clone()}},H.endOf=function(O){return this.startOf(O,!1)},H.$set=function(O,L){var N,I=F.p(O),K="set"+(this.$u?"UTC":""),W=(N={},N[d]=K+"Date",N[f]=K+"Date",N[u]=K+"Month",N[p]=K+"FullYear",N[l]=K+"Hours",N[a]=K+"Minutes",N[n]=K+"Seconds",N[s]=K+"Milliseconds",N)[I],Y=I===d?this.$D+(L-this.$W):L;if(I===u||I===p){var $=this.clone().set(f,1);$.$d[W](Y),$.init(),this.$d=$.set(f,Math.min(this.$D,$.daysInMonth())).$d}else W&&this.$d[W](Y);return this.init(),this},H.set=function(O,L){return this.clone().$set(O,L)},H.get=function(O){return this[F.p(O)]()},H.add=function(O,L){var N,I=this;O=Number(O);var K=F.p(L),W=function(se){var fe=R(I);return F.w(fe.date(fe.date()+Math.round(se*O)),I)};if(K===u)return this.set(u,this.$M+O);if(K===p)return this.set(p,this.$y+O);if(K===d)return W(1);if(K===c)return W(7);var Y=(N={},N[a]=i,N[l]=r,N[n]=o,N)[K]||1,$=this.$d.getTime()+O*Y;return F.w($,this)},H.subtract=function(O,L){return this.add(-1*O,L)},H.format=function(O){var L=this,N=this.$locale();if(!this.isValid())return N.invalidDate||m;var I=O||"YYYY-MM-DDTHH:mm:ssZ",K=F.z(this),W=this.$H,Y=this.$m,$=this.$M,se=N.weekdays,fe=N.months,Se=N.meridiem,be=function(de,Q,ye,Fe){return de&&(de[Q]||de(L,I))||ye[Q].slice(0,Fe)},ne=function(de){return F.s(W%12||12,de,"0")},le=Se||function(de,Q,ye){var Fe=de<12?"AM":"PM";return ye?Fe.toLowerCase():Fe};return I.replace(w,function(de,Q){return Q||function(ye){switch(ye){case"YY":return String(L.$y).slice(-2);case"YYYY":return F.s(L.$y,4,"0");case"M":return $+1;case"MM":return F.s($+1,2,"0");case"MMM":return be(N.monthsShort,$,fe,3);case"MMMM":return be(fe,$);case"D":return L.$D;case"DD":return F.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return be(N.weekdaysMin,L.$W,se,2);case"ddd":return be(N.weekdaysShort,L.$W,se,3);case"dddd":return se[L.$W];case"H":return String(W);case"HH":return F.s(W,2,"0");case"h":return ne(1);case"hh":return ne(2);case"a":return le(W,Y,!0);case"A":return le(W,Y,!1);case"m":return String(Y);case"mm":return F.s(Y,2,"0");case"s":return String(L.$s);case"ss":return F.s(L.$s,2,"0");case"SSS":return F.s(L.$ms,3,"0");case"Z":return K}return null}(de)||K.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(O,L,N){var I,K=this,W=F.p(L),Y=R(O),$=(Y.utcOffset()-this.utcOffset())*i,se=this-Y,fe=function(){return F.m(K,Y)};switch(W){case p:I=fe()/12;break;case u:I=fe();break;case g:I=fe()/3;break;case c:I=(se-$)/6048e5;break;case d:I=(se-$)/864e5;break;case l:I=se/r;break;case a:I=se/i;break;case n:I=se/o;break;default:I=se}return N?I:F.a(I)},H.daysInMonth=function(){return this.endOf(u).$D},H.$locale=function(){return P[this.$L]},H.locale=function(O,L){if(!O)return this.$L;var N=this.clone(),I=v(O,L,!0);return I&&(N.$L=I),N},H.clone=function(){return F.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},B}(),z=G.prototype;return R.prototype=z,[["$ms",s],["$s",n],["$m",a],["$H",l],["$W",d],["$M",u],["$y",p],["$D",f]].forEach(function(B){z[B[1]]=function(H){return this.$g(H,B[0],B[1])}}),R.extend=function(B,H){return B.$i||(B(H,G,R),B.$i=!0),R},R.locale=v,R.isDayjs=S,R.unix=function(B){return R(1e3*B)},R.en=P[M],R.Ls=P,R.p={},R})}(Zs)),Zs.exports}var bE=wE();const bl=dr(bE);var Js={exports:{}},yE=Js.exports,Eg;function SE(){return Eg||(Eg=1,function(e,t){(function(o,i){e.exports=i()})(yE,function(){var o="minute",i=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(s,n,a){var l=n.prototype;a.utc=function(m){var C={date:m,utc:!0,args:arguments};return new n(C)},l.utc=function(m){var C=a(this.toDate(),{locale:this.$L,utc:!0});return m?C.add(this.utcOffset(),o):C},l.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var d=l.parse;l.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),d.call(this,m)};var c=l.init;l.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else c.call(this)};var u=l.utcOffset;l.utcOffset=function(m,C){var w=this.$utils().u;if(w(m))return this.$u?0:w(this.$offset)?u.call(this):this.$offset;if(typeof m=="string"&&(m=function(M){M===void 0&&(M="");var P=M.match(i);if(!P)return null;var k=(""+P[0]).match(r)||["-",0,0],S=k[0],v=60*+k[1]+ +k[2];return v===0?0:S==="+"?v:-v}(m),m===null))return this;var y=Math.abs(m)<=16?60*m:m,b=this;if(C)return b.$offset=y,b.$u=m===0,b;if(m!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(b=this.local().add(y+x,o)).$offset=y,b.$x.$localOffset=x}else b=this.utc();return b};var g=l.format;l.format=function(m){var C=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return g.call(this,C)},l.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},l.isUTC=function(){return!!this.$u},l.toISOString=function(){return this.toDate().toISOString()},l.toString=function(){return this.toDate().toUTCString()};var p=l.toDate;l.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var f=l.diff;l.diff=function(m,C,w){if(m&&this.$u===m.$u)return f.call(this,m,C,w);var y=this.local(),b=a(m).local();return f.call(y,b,C,w)}}})}(Js)),Js.exports}var RE=SE();const xE=dr(RE);var en={exports:{}},FE=en.exports,Ag;function DE(){return Ag||(Ag=1,function(e,t){(function(o,i){e.exports=i()})(FE,function(){var o={year:0,month:1,day:2,hour:3,minute:4,second:5},i={};return function(r,s,n){var a,l=function(g,p,f){f===void 0&&(f={});var m=new Date(g),C=function(w,y){y===void 0&&(y={});var b=y.timeZoneName||"short",x=w+"|"+b,M=i[x];return M||(M=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:w,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:b}),i[x]=M),M}(p,f);return C.formatToParts(m)},d=function(g,p){for(var f=l(g,p),m=[],C=0;C<f.length;C+=1){var w=f[C],y=w.type,b=w.value,x=o[y];x>=0&&(m[x]=parseInt(b,10))}var M=m[3],P=M===24?0:M,k=m[0]+"-"+m[1]+"-"+m[2]+" "+P+":"+m[4]+":"+m[5]+":000",S=+g;return(n.utc(k).valueOf()-(S-=S%1e3))/6e4},c=s.prototype;c.tz=function(g,p){g===void 0&&(g=a);var f,m=this.utcOffset(),C=this.toDate(),w=C.toLocaleString("en-US",{timeZone:g}),y=Math.round((C-new Date(w))/1e3/60),b=15*-Math.round(C.getTimezoneOffset()/15)-y;if(!Number(b))f=this.utcOffset(0,p);else if(f=n(w,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(b,!0),p){var x=f.utcOffset();f=f.add(m-x,"minute")}return f.$x.$timezone=g,f},c.offsetName=function(g){var p=this.$x.$timezone||n.tz.guess(),f=l(this.valueOf(),p,{timeZoneName:g}).find(function(m){return m.type.toLowerCase()==="timezonename"});return f&&f.value};var u=c.startOf;c.startOf=function(g,p){if(!this.$x||!this.$x.$timezone)return u.call(this,g,p);var f=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return u.call(f,g,p).tz(this.$x.$timezone,!0)},n.tz=function(g,p,f){var m=f&&p,C=f||p||a,w=d(+n(),C);if(typeof g!="string")return n(g).tz(C);var y=function(P,k,S){var v=P-60*k*1e3,R=d(v,S);if(k===R)return[v,k];var F=d(v-=60*(R-k)*1e3,S);return R===F?[v,R]:[P-60*Math.min(R,F)*1e3,Math.max(R,F)]}(n.utc(g,m).valueOf(),w,C),b=y[0],x=y[1],M=n(b).utcOffset(x);return M.$x.$timezone=C,M},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(g){a=g}}})}(en)),en.exports}var kE=DE();const ME=dr(kE);var tn={exports:{}},PE=tn.exports,Tg;function EE(){return Tg||(Tg=1,function(e,t){(function(o,i){e.exports=i()})(PE,function(){return function(o,i){var r=i.prototype,s=r.format;r.format=function(n){var a=this,l=this.$locale();if(!this.isValid())return s.bind(this)(n);var d=this.$utils(),c=(n||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(u){switch(u){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return d.s(a.week(),u==="w"?1:2,"0");case"W":case"WW":return d.s(a.isoWeek(),u==="W"?1:2,"0");case"k":case"kk":return d.s(String(a.$H===0?24:a.$H),u==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return u}});return s.bind(this)(c)}}})}(tn)),tn.exports}var AE=EE();const TE=dr(AE);bl.extend(TE),bl.extend(xE),bl.extend(ME);const IE=["for"],LE=["disabled","type","placeholder","id","data-invalid"];Math.random().toString(),Mg.extend({name:"common"});var GE={transitionDuration:"{transition.duration}"},BE={borderWidth:"0 0 1px 0",borderColor:"{content.border.color}"},OE={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",padding:"1.125rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},NE={borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.125rem 1.125rem 1.125rem"},HE={root:GE,panel:BE,header:OE,content:NE},VE={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},_E={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},zE={padding:"{list.padding}",gap:"{list.gap}"},WE={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},$E={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},UE={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},jE={borderRadius:"{border.radius.sm}"},KE={padding:"{list.option.padding}"},YE={light:{chip:{focusBackground:"{surface.200}",focusColor:"{surface.800}"},dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",focusColor:"{surface.0}"},dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"}}},qE={root:VE,overlay:_E,list:zE,option:WE,optionGroup:$E,dropdown:UE,chip:jE,emptyMessage:KE,colorScheme:YE},XE={width:"2rem",height:"2rem",fontSize:"1rem",background:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},QE={size:"1rem"},ZE={borderColor:"{content.background}",offset:"-0.75rem"},JE={width:"3rem",height:"3rem",fontSize:"1.5rem",icon:{size:"1.5rem"},group:{offset:"-1rem"}},eA={width:"4rem",height:"4rem",fontSize:"2rem",icon:{size:"2rem"},group:{offset:"-1.5rem"}},tA={root:XE,icon:QE,group:ZE,lg:JE,xl:eA},oA={borderRadius:"{border.radius.md}",padding:"0 0.5rem",fontSize:"0.75rem",fontWeight:"700",minWidth:"1.5rem",height:"1.5rem"},iA={size:"0.5rem"},rA={fontSize:"0.625rem",minWidth:"1.25rem",height:"1.25rem"},sA={fontSize:"0.875rem",minWidth:"1.75rem",height:"1.75rem"},nA={fontSize:"1rem",minWidth:"2rem",height:"2rem"},aA={light:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.500}",color:"{surface.0}"},info:{background:"{sky.500}",color:"{surface.0}"},warn:{background:"{orange.500}",color:"{surface.0}"},danger:{background:"{red.500}",color:"{surface.0}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"{green.400}",color:"{green.950}"},info:{background:"{sky.400}",color:"{sky.950}"},warn:{background:"{orange.400}",color:"{orange.950}"},danger:{background:"{red.400}",color:"{red.950}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}},lA={root:oA,dot:iA,sm:rA,lg:sA,xl:nA,colorScheme:aA},dA={borderRadius:{none:"0",xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"12px"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"}},cA={transitionDuration:"0.2s",focusRing:{width:"1px",style:"solid",color:"{primary.color}",offset:"2px",shadow:"none"},disabledOpacity:"0.6",iconSize:"1rem",anchorGutter:"2px",primary:{50:"{emerald.50}",100:"{emerald.100}",200:"{emerald.200}",300:"{emerald.300}",400:"{emerald.400}",500:"{emerald.500}",600:"{emerald.600}",700:"{emerald.700}",800:"{emerald.800}",900:"{emerald.900}",950:"{emerald.950}"},formField:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{fontSize:"0.875rem",paddingX:"0.625rem",paddingY:"0.375rem"},lg:{fontSize:"1.125rem",paddingX:"0.875rem",paddingY:"0.625rem"},borderRadius:"{border.radius.md}",focusRing:{width:"0",style:"none",color:"transparent",offset:"0",shadow:"none"},transitionDuration:"{transition.duration}"},list:{padding:"0.25rem 0.25rem",gap:"2px",header:{padding:"0.5rem 1rem 0.25rem 1rem"},option:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}"},optionGroup:{padding:"0.5rem 0.75rem",fontWeight:"600"}},content:{borderRadius:"{border.radius.md}"},mask:{transitionDuration:"0.15s"},navigation:{list:{padding:"0.25rem 0.25rem",gap:"2px"},item:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}",gap:"0.5rem"},submenuLabel:{padding:"0.5rem 0.75rem",fontWeight:"600"},submenuIcon:{size:"0.875rem"}},overlay:{select:{borderRadius:"{border.radius.md}",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},popover:{borderRadius:"{border.radius.md}",padding:"0.75rem",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},modal:{borderRadius:"{border.radius.xl}",padding:"1.25rem",shadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},navigation:{shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}},colorScheme:{light:{surface:{0:"#ffffff",50:"{slate.50}",100:"{slate.100}",200:"{slate.200}",300:"{slate.300}",400:"{slate.400}",500:"{slate.500}",600:"{slate.600}",700:"{slate.700}",800:"{slate.800}",900:"{slate.900}",950:"{slate.950}"},primary:{color:"{primary.500}",contrastColor:"#ffffff",hoverColor:"{primary.600}",activeColor:"{primary.700}"},highlight:{background:"{primary.50}",focusBackground:"{primary.100}",color:"{primary.700}",focusColor:"{primary.800}"},mask:{background:"rgba(0,0,0,0.4)",color:"{surface.200}"},formField:{background:"{surface.0}",disabledBackground:"{surface.200}",filledBackground:"{surface.50}",filledHoverBackground:"{surface.50}",filledFocusBackground:"{surface.50}",borderColor:"{surface.300}",hoverBorderColor:"{surface.400}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.400}",color:"{surface.700}",disabledColor:"{surface.500}",placeholderColor:"{surface.500}",invalidPlaceholderColor:"{red.600}",floatLabelColor:"{surface.500}",floatLabelFocusColor:"{primary.600}",floatLabelActiveColor:"{surface.500}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.700}",hoverColor:"{surface.800}",mutedColor:"{surface.500}",hoverMutedColor:"{surface.600}"},content:{background:"{surface.0}",hoverBackground:"{surface.100}",borderColor:"{surface.200}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},popover:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},modal:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.100}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.100}",activeBackground:"{surface.100}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}}},dark:{surface:{0:"#ffffff",50:"{zinc.50}",100:"{zinc.100}",200:"{zinc.200}",300:"{zinc.300}",400:"{zinc.400}",500:"{zinc.500}",600:"{zinc.600}",700:"{zinc.700}",800:"{zinc.800}",900:"{zinc.900}",950:"{zinc.950}"},primary:{color:"{primary.400}",contrastColor:"{surface.900}",hoverColor:"{primary.300}",activeColor:"{primary.200}"},highlight:{background:"color-mix(in srgb, {primary.400}, transparent 84%)",focusBackground:"color-mix(in srgb, {primary.400}, transparent 76%)",color:"rgba(255,255,255,.87)",focusColor:"rgba(255,255,255,.87)"},mask:{background:"rgba(0,0,0,0.6)",color:"{surface.200}"},formField:{background:"{surface.950}",disabledBackground:"{surface.700}",filledBackground:"{surface.800}",filledHoverBackground:"{surface.800}",filledFocusBackground:"{surface.800}",borderColor:"{surface.600}",hoverBorderColor:"{surface.500}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.300}",color:"{surface.0}",disabledColor:"{surface.400}",placeholderColor:"{surface.400}",invalidPlaceholderColor:"{red.400}",floatLabelColor:"{surface.400}",floatLabelFocusColor:"{primary.color}",floatLabelActiveColor:"{surface.400}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.0}",hoverColor:"{surface.0}",mutedColor:"{surface.400}",hoverMutedColor:"{surface.300}"},content:{background:"{surface.900}",hoverBackground:"{surface.800}",borderColor:"{surface.700}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},popover:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},modal:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.800}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.800}",activeBackground:"{surface.800}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}}}}},uA={primitive:dA,semantic:cA},hA={borderRadius:"{content.border.radius}"},gA={root:hA},pA={padding:"1rem",background:"{content.background}",gap:"0.5rem",transitionDuration:"{transition.duration}"},fA={color:"{text.muted.color}",hoverColor:"{text.color}",borderRadius:"{content.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",hoverColor:"{navigation.item.icon.focus.color}"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},mA={color:"{navigation.item.icon.color}"},CA={root:pA,item:fA,separator:mA},vA={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",gap:"0.5rem",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",iconOnlyWidth:"2.5rem",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}",iconOnlyWidth:"2rem"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}",iconOnlyWidth:"3rem"},label:{fontWeight:"500"},raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"},badgeSize:"1rem",transitionDuration:"{form.field.transition.duration}"},wA={light:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",borderColor:"{surface.100}",hoverBorderColor:"{surface.200}",activeBorderColor:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}",focusRing:{color:"{surface.600}",shadow:"none"}},info:{background:"{sky.500}",hoverBackground:"{sky.600}",activeBackground:"{sky.700}",borderColor:"{sky.500}",hoverBorderColor:"{sky.600}",activeBorderColor:"{sky.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{sky.500}",shadow:"none"}},success:{background:"{green.500}",hoverBackground:"{green.600}",activeBackground:"{green.700}",borderColor:"{green.500}",hoverBorderColor:"{green.600}",activeBorderColor:"{green.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{green.500}",shadow:"none"}},warn:{background:"{orange.500}",hoverBackground:"{orange.600}",activeBackground:"{orange.700}",borderColor:"{orange.500}",hoverBorderColor:"{orange.600}",activeBorderColor:"{orange.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{orange.500}",shadow:"none"}},help:{background:"{purple.500}",hoverBackground:"{purple.600}",activeBackground:"{purple.700}",borderColor:"{purple.500}",hoverBorderColor:"{purple.600}",activeBorderColor:"{purple.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{purple.500}",shadow:"none"}},danger:{background:"{red.500}",hoverBackground:"{red.600}",activeBackground:"{red.700}",borderColor:"{red.500}",hoverBorderColor:"{red.600}",activeBorderColor:"{red.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{red.500}",shadow:"none"}},contrast:{background:"{surface.950}",hoverBackground:"{surface.900}",activeBackground:"{surface.800}",borderColor:"{surface.950}",hoverBorderColor:"{surface.900}",activeBorderColor:"{surface.800}",color:"{surface.0}",hoverColor:"{surface.0}",activeColor:"{surface.0}",focusRing:{color:"{surface.950}",shadow:"none"}}},outlined:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",borderColor:"{primary.200}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",borderColor:"{green.200}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",borderColor:"{sky.200}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",borderColor:"{orange.200}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",borderColor:"{purple.200}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",borderColor:"{red.200}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.700}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.700}"}},text:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.700}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}},dark:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",borderColor:"{surface.800}",hoverBorderColor:"{surface.700}",activeBorderColor:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}",focusRing:{color:"{surface.300}",shadow:"none"}},info:{background:"{sky.400}",hoverBackground:"{sky.300}",activeBackground:"{sky.200}",borderColor:"{sky.400}",hoverBorderColor:"{sky.300}",activeBorderColor:"{sky.200}",color:"{sky.950}",hoverColor:"{sky.950}",activeColor:"{sky.950}",focusRing:{color:"{sky.400}",shadow:"none"}},success:{background:"{green.400}",hoverBackground:"{green.300}",activeBackground:"{green.200}",borderColor:"{green.400}",hoverBorderColor:"{green.300}",activeBorderColor:"{green.200}",color:"{green.950}",hoverColor:"{green.950}",activeColor:"{green.950}",focusRing:{color:"{green.400}",shadow:"none"}},warn:{background:"{orange.400}",hoverBackground:"{orange.300}",activeBackground:"{orange.200}",borderColor:"{orange.400}",hoverBorderColor:"{orange.300}",activeBorderColor:"{orange.200}",color:"{orange.950}",hoverColor:"{orange.950}",activeColor:"{orange.950}",focusRing:{color:"{orange.400}",shadow:"none"}},help:{background:"{purple.400}",hoverBackground:"{purple.300}",activeBackground:"{purple.200}",borderColor:"{purple.400}",hoverBorderColor:"{purple.300}",activeBorderColor:"{purple.200}",color:"{purple.950}",hoverColor:"{purple.950}",activeColor:"{purple.950}",focusRing:{color:"{purple.400}",shadow:"none"}},danger:{background:"{red.400}",hoverBackground:"{red.300}",activeBackground:"{red.200}",borderColor:"{red.400}",hoverBorderColor:"{red.300}",activeBorderColor:"{red.200}",color:"{red.950}",hoverColor:"{red.950}",activeColor:"{red.950}",focusRing:{color:"{red.400}",shadow:"none"}},contrast:{background:"{surface.0}",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{surface.0}",hoverBorderColor:"{surface.100}",activeBorderColor:"{surface.200}",color:"{surface.950}",hoverColor:"{surface.950}",activeColor:"{surface.950}",focusRing:{color:"{surface.0}",shadow:"none"}}},outlined:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",borderColor:"{primary.700}",color:"{primary.color}"},secondary:{hoverBackground:"rgba(255,255,255,0.04)",activeBackground:"rgba(255,255,255,0.16)",borderColor:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",borderColor:"{green.700}",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",borderColor:"{sky.700}",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",borderColor:"{orange.700}",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",borderColor:"{purple.700}",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",borderColor:"{red.700}",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.500}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.600}",color:"{surface.0}"}},text:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",color:"{primary.color}"},secondary:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}}},bA={root:vA,colorScheme:wA},yA={background:"{content.background}",borderRadius:"{border.radius.xl}",color:"{content.color}",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},SA={padding:"1.25rem",gap:"0.5rem"},RA={gap:"0.5rem"},xA={fontSize:"1.25rem",fontWeight:"500"},FA={color:"{text.muted.color}"},DA={root:yA,body:SA,caption:RA,title:xA,subtitle:FA},kA={transitionDuration:"{transition.duration}"},MA={gap:"0.25rem"},PA={padding:"1rem",gap:"0.5rem"},EA={width:"2rem",height:"0.5rem",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},AA={light:{indicator:{background:"{surface.200}",hoverBackground:"{surface.300}",activeBackground:"{primary.color}"}},dark:{indicator:{background:"{surface.700}",hoverBackground:"{surface.600}",activeBackground:"{primary.color}"}}},TA={root:kA,content:MA,indicatorList:PA,indicator:EA,colorScheme:AA},IA={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},LA={width:"2.5rem",color:"{form.field.icon.color}"},GA={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},BA={padding:"{list.padding}",gap:"{list.gap}",mobileIndent:"1rem"},OA={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",icon:{color:"{list.option.icon.color}",focusColor:"{list.option.icon.focus.color}",size:"0.875rem"}},NA={color:"{form.field.icon.color}"},HA={root:IA,dropdown:LA,overlay:GA,list:BA,option:OA,clearIcon:NA},VA={borderRadius:"{border.radius.sm}",width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},_A={size:"0.875rem",color:"{form.field.color}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.75rem"},lg:{size:"1rem"}},zA={root:VA,icon:_A},WA={borderRadius:"16px",paddingX:"0.75rem",paddingY:"0.5rem",gap:"0.5rem",transitionDuration:"{transition.duration}"},$A={width:"2rem",height:"2rem"},UA={size:"1rem"},jA={size:"1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"}},KA={light:{root:{background:"{surface.100}",color:"{surface.800}"},icon:{color:"{surface.800}"},removeIcon:{color:"{surface.800}"}},dark:{root:{background:"{surface.800}",color:"{surface.0}"},icon:{color:"{surface.0}"},removeIcon:{color:"{surface.0}"}}},YA={root:WA,image:$A,icon:UA,removeIcon:jA,colorScheme:KA},qA={transitionDuration:"{transition.duration}"},XA={width:"1.5rem",height:"1.5rem",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},QA={shadow:"{overlay.popover.shadow}",borderRadius:"{overlay.popover.borderRadius}"},ZA={light:{panel:{background:"{surface.800}",borderColor:"{surface.900}"},handle:{color:"{surface.0}"}},dark:{panel:{background:"{surface.900}",borderColor:"{surface.700}"},handle:{color:"{surface.0}"}}},JA={root:qA,preview:XA,panel:QA,colorScheme:ZA},eT={size:"2rem",color:"{overlay.modal.color}"},tT={gap:"1rem"},oT={icon:eT,content:tT},iT={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},rT={padding:"{overlay.popover.padding}",gap:"1rem"},sT={size:"1.5rem",color:"{overlay.popover.color}"},nT={gap:"0.5rem",padding:"0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}"},aT={root:iT,content:rT,icon:sT,footer:nT},lT={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},dT={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},cT={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},uT={mobileIndent:"1rem"},hT={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},gT={borderColor:"{content.border.color}"},pT={root:lT,list:dT,item:cT,submenu:uT,submenuIcon:hT,separator:gT},fT={transitionDuration:"{transition.duration}"},mT={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},CT={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{datatable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},vT={fontWeight:"600"},wT={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},bT={borderColor:"{datatable.border.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},yT={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},ST={fontWeight:"600"},RT={background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",sm:{padding:"0.375rem 0.5rem"},lg:{padding:"1rem 1.25rem"}},xT={color:"{primary.color}"},FT={width:"0.5rem"},DT={width:"1px",color:"{primary.color}"},kT={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},MT={size:"2rem"},PT={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},ET={inlineGap:"0.5rem",overlaySelect:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},overlayPopover:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}",gap:"0.5rem"},rule:{borderColor:"{content.border.color}"},constraintList:{padding:"{list.padding}",gap:"{list.gap}"},constraint:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",separator:{borderColor:"{content.border.color}"},padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"}},AT={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},TT={borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},IT={light:{root:{borderColor:"{content.border.color}"},row:{stripedBackground:"{surface.50}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},row:{stripedBackground:"{surface.950}"},bodyCell:{selectedBorderColor:"{primary.900}"}}},LT={root:fT,header:mT,headerCell:CT,columnTitle:vT,row:wT,bodyCell:bT,footerCell:yT,columnFooter:ST,footer:RT,dropPoint:xT,columnResizer:FT,resizeIndicator:DT,sortIcon:kT,loadingIcon:MT,rowToggleButton:PT,filter:ET,paginatorTop:AT,paginatorBottom:TT,colorScheme:IT},GT={borderColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0"},BT={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",borderRadius:"0"},OT={background:"{content.background}",color:"{content.color}",borderColor:"transparent",borderWidth:"0",padding:"0",borderRadius:"0"},NT={background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"1px 0 0 0",padding:"0.75rem 1rem",borderRadius:"0"},HT={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},VT={borderColor:"{content.border.color}",borderWidth:"1px 0 0 0"},_T={root:GT,header:BT,content:OT,footer:NT,paginatorTop:HT,paginatorBottom:VT},zT={transitionDuration:"{transition.duration}"},WT={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}"},$T={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",padding:"0 0 0.5rem 0"},UT={gap:"0.5rem",fontWeight:"500"},jT={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},KT={color:"{form.field.icon.color}"},YT={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},qT={hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},XT={borderColor:"{content.border.color}",gap:"{overlay.popover.padding}"},QT={margin:"0.5rem 0 0 0"},ZT={padding:"0.25rem",fontWeight:"500",color:"{content.color}"},JT={hoverBackground:"{content.hover.background}",selectedBackground:"{primary.color}",rangeSelectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{primary.contrast.color}",rangeSelectedColor:"{highlight.color}",width:"2rem",height:"2rem",borderRadius:"50%",padding:"0.25rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},eI={margin:"0.5rem 0 0 0"},tI={padding:"0.375rem",borderRadius:"{content.border.radius}"},oI={margin:"0.5rem 0 0 0"},iI={padding:"0.375rem",borderRadius:"{content.border.radius}"},rI={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}"},sI={padding:"0.5rem 0 0 0",borderColor:"{content.border.color}",gap:"0.5rem",buttonGap:"0.25rem"},nI={light:{dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"},today:{background:"{surface.200}",color:"{surface.900}"}},dark:{dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"},today:{background:"{surface.700}",color:"{surface.0}"}}},aI={root:zT,panel:WT,header:$T,title:UT,dropdown:jT,inputIcon:KT,selectMonth:YT,selectYear:qT,group:XT,dayView:QT,weekDay:ZT,date:JT,monthView:eI,month:tI,yearView:oI,year:iI,buttonbar:rI,timePicker:sI,colorScheme:nI},lI={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",borderRadius:"{overlay.modal.border.radius}",shadow:"{overlay.modal.shadow}"},dI={padding:"{overlay.modal.padding}",gap:"0.5rem"},cI={fontSize:"1.25rem",fontWeight:"600"},uI={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},hI={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}",gap:"0.5rem"},gI={root:lI,header:dI,title:cI,content:uI,footer:hI},pI={borderColor:"{content.border.color}"},fI={background:"{content.background}",color:"{text.color}"},mI={margin:"1rem 0",padding:"0 1rem",content:{padding:"0 0.5rem"}},CI={margin:"0 1rem",padding:"0.5rem 0",content:{padding:"0.5rem 0"}},vI={root:pI,content:fI,horizontal:mI,vertical:CI},wI={background:"rgba(255, 255, 255, 0.1)",borderColor:"rgba(255, 255, 255, 0.2)",padding:"0.5rem",borderRadius:"{border.radius.xl}"},bI={borderRadius:"{content.border.radius}",padding:"0.5rem",size:"3rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},yI={root:wI,item:bI},SI={background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",shadow:"{overlay.modal.shadow}"},RI={padding:"{overlay.modal.padding}"},xI={fontSize:"1.5rem",fontWeight:"600"},FI={padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},DI={padding:"{overlay.modal.padding}"},kI={root:SI,header:RI,title:xI,content:FI,footer:DI},MI={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}"},PI={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},EI={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}",padding:"{list.padding}"},AI={focusBackground:"{list.option.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},TI={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},II={toolbar:MI,toolbarItem:PI,overlay:EI,overlayOption:AI,content:TI},LI={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",padding:"0 1.125rem 1.125rem 1.125rem",transitionDuration:"{transition.duration}"},GI={background:"{content.background}",hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",borderRadius:"{content.border.radius}",borderWidth:"1px",borderColor:"transparent",padding:"0.5rem 0.75rem",gap:"0.5rem",fontWeight:"600",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},BI={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}"},OI={padding:"0"},NI={root:LI,legend:GI,toggleIcon:BI,content:OI},HI={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},VI={background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"unset",borderWidth:"0",borderRadius:"0",gap:"0.5rem"},_I={highlightBorderColor:"{primary.color}",padding:"0 1.125rem 1.125rem 1.125rem",gap:"1rem"},zI={padding:"1rem",gap:"1rem",borderColor:"{content.border.color}",info:{gap:"0.5rem"}},WI={gap:"0.5rem"},$I={height:"0.25rem"},UI={gap:"0.5rem"},jI={root:HI,header:VI,content:_I,file:zI,fileList:WI,progressbar:$I,basic:UI},KI={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",activeColor:"{form.field.float.label.active.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",positionY:"{form.field.padding.y}",fontWeight:"500",active:{fontSize:"0.75rem",fontWeight:"400"}},YI={active:{top:"-1.25rem"}},qI={input:{paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"},active:{top:"{form.field.padding.y}"}},XI={borderRadius:"{border.radius.xs}",active:{background:"{form.field.background}",padding:"0 0.125rem"}},QI={root:KI,over:YI,in:qI,on:XI},ZI={borderWidth:"1px",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},JI={background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.100}",hoverColor:"{surface.0}",size:"3rem",gutter:"0.5rem",prev:{borderRadius:"50%"},next:{borderRadius:"50%"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},eL={size:"1.5rem"},tL={background:"{content.background}",padding:"1rem 0.25rem"},oL={size:"2rem",borderRadius:"{content.border.radius}",gutter:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},iL={size:"1rem"},rL={background:"rgba(0, 0, 0, 0.5)",color:"{surface.100}",padding:"1rem"},sL={gap:"0.5rem",padding:"1rem"},nL={width:"1rem",height:"1rem",activeBackground:"{primary.color}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},aL={background:"rgba(0, 0, 0, 0.5)"},lL={background:"rgba(255, 255, 255, 0.4)",hoverBackground:"rgba(255, 255, 255, 0.6)",activeBackground:"rgba(255, 255, 255, 0.9)"},dL={size:"3rem",gutter:"0.5rem",background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.50}",hoverColor:"{surface.0}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},cL={size:"1.5rem"},uL={light:{thumbnailNavButton:{hoverBackground:"{surface.100}",color:"{surface.600}",hoverColor:"{surface.700}"},indicatorButton:{background:"{surface.200}",hoverBackground:"{surface.300}"}},dark:{thumbnailNavButton:{hoverBackground:"{surface.700}",color:"{surface.400}",hoverColor:"{surface.0}"},indicatorButton:{background:"{surface.700}",hoverBackground:"{surface.600}"}}},hL={root:ZI,navButton:JI,navIcon:eL,thumbnailsContent:tL,thumbnailNavButton:oL,thumbnailNavButtonIcon:iL,caption:rL,indicatorList:sL,indicatorButton:nL,insetIndicatorList:aL,insetIndicatorButton:lL,closeButton:dL,closeButtonIcon:cL,colorScheme:uL},gL={color:"{form.field.icon.color}"},pL={icon:gL},fL={color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",top:"{form.field.padding.y}",fontSize:"0.75rem",fontWeight:"400"},mL={paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"},CL={root:fL,input:mL},vL={transitionDuration:"{transition.duration}"},wL={icon:{size:"1.5rem"},mask:{background:"{mask.background}",color:"{mask.color}"}},bL={position:{left:"auto",right:"1rem",top:"1rem",bottom:"auto"},blur:"8px",background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2)",borderWidth:"1px",borderRadius:"30px",padding:".5rem",gap:"0.5rem"},yL={hoverBackground:"rgba(255,255,255,0.1)",color:"{surface.50}",hoverColor:"{surface.0}",size:"3rem",iconSize:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},SL={root:vL,preview:wL,toolbar:bL,action:yL},RL={size:"15px",hoverSize:"30px",background:"rgba(255,255,255,0.3)",hoverBackground:"rgba(255,255,255,0.3)",borderColor:"unset",hoverBorderColor:"unset",borderWidth:"0",borderRadius:"50%",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"rgba(255,255,255,0.3)",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},xL={handle:RL},FL={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",gap:"0.5rem"},DL={fontWeight:"500"},kL={size:"1rem"},ML={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}}},PL={root:FL,text:DL,icon:kL,colorScheme:ML},EL={padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{transition.duration}"},AL={hoverBackground:"{content.hover.background}",hoverColor:"{content.hover.color}"},TL={root:EL,display:AL},IL={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},LL={borderRadius:"{border.radius.sm}"},GL={light:{chip:{focusBackground:"{surface.200}",color:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",color:"{surface.0}"}}},BL={root:IL,chip:LL,colorScheme:GL},OL={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.icon.color}",borderRadius:"{form.field.border.radius}",padding:"0.5rem",minWidth:"2.5rem"},NL={addon:OL},HL={transitionDuration:"{transition.duration}"},VL={width:"2.5rem",borderRadius:"{form.field.border.radius}",verticalPadding:"{form.field.padding.y}"},_L={light:{button:{background:"transparent",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.500}",activeColor:"{surface.600}"}},dark:{button:{background:"transparent",hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.300}",activeColor:"{surface.200}"}}},zL={root:HL,button:VL,colorScheme:_L},WL={gap:"0.5rem"},$L={width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"}},UL={root:WL,input:$L},jL={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},KL={root:jL},YL={transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},qL={background:"{primary.color}"},XL={background:"{content.border.color}"},QL={color:"{text.muted.color}"},ZL={root:YL,value:qL,range:XL,text:QL},JL={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",borderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",shadow:"{form.field.shadow}",borderRadius:"{form.field.border.radius}",transitionDuration:"{form.field.transition.duration}"},eG={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},tG={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},oG={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},iG={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},rG={padding:"{list.option.padding}"},sG={light:{option:{stripedBackground:"{surface.50}"}},dark:{option:{stripedBackground:"{surface.900}"}}},nG={root:JL,list:eG,option:tG,optionGroup:oG,checkmark:iG,emptyMessage:rG,colorScheme:sG},aG={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",verticalOrientation:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},horizontalOrientation:{padding:"0.5rem 0.75rem",gap:"0.5rem"},transitionDuration:"{transition.duration}"},lG={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},dG={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},cG={padding:"0",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"{overlay.navigation.shadow}",gap:"0.5rem"},uG={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},hG={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background.}",color:"{navigation.submenu.label.color}"},gG={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},pG={borderColor:"{content.border.color}"},fG={borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},mG={root:aG,baseItem:lG,item:dG,overlay:cG,submenu:uG,submenuLabel:hG,submenuIcon:gG,separator:pG,mobileButton:fG},CG={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},vG={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},wG={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},bG={padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background}",color:"{navigation.submenu.label.color}"},yG={borderColor:"{content.border.color}"},SG={root:CG,list:vG,item:wG,submenuLabel:bG,separator:yG},RG={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.5rem 0.75rem",transitionDuration:"{transition.duration}"},xG={borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},FG={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},DG={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",mobileIndent:"1rem",icon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"}},kG={borderColor:"{content.border.color}"},MG={borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},PG={root:RG,baseItem:xG,item:FG,submenu:DG,separator:kG,mobileButton:MG},EG={borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},AG={padding:"0.5rem 0.75rem",gap:"0.5rem",sm:{padding:"0.375rem 0.625rem"},lg:{padding:"0.625rem 0.875rem"}},TG={fontSize:"1rem",fontWeight:"500",sm:{fontSize:"0.875rem"},lg:{fontSize:"1.125rem"}},IG={size:"1.125rem",sm:{size:"1rem"},lg:{size:"1.25rem"}},LG={width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},GG={size:"1rem",sm:{size:"0.875rem"},lg:{size:"1.125rem"}},BG={root:{borderWidth:"1px"}},OG={content:{padding:"0"}},NG={light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}},outlined:{color:"{blue.600}",borderColor:"{blue.600}"},simple:{color:"{blue.600}"}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}},outlined:{color:"{green.600}",borderColor:"{green.600}"},simple:{color:"{green.600}"}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}},outlined:{color:"{yellow.600}",borderColor:"{yellow.600}"},simple:{color:"{yellow.600}"}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}},outlined:{color:"{red.600}",borderColor:"{red.600}"},simple:{color:"{red.600}"}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}},outlined:{color:"{surface.500}",borderColor:"{surface.500}"},simple:{color:"{surface.500}"}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}},outlined:{color:"{surface.950}",borderColor:"{surface.950}"},simple:{color:"{surface.950}"}}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}},outlined:{color:"{blue.500}",borderColor:"{blue.500}"},simple:{color:"{blue.500}"}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}},outlined:{color:"{green.500}",borderColor:"{green.500}"},simple:{color:"{green.500}"}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}},outlined:{color:"{yellow.500}",borderColor:"{yellow.500}"},simple:{color:"{yellow.500}"}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}},outlined:{color:"{red.500}",borderColor:"{red.500}"},simple:{color:"{red.500}"}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}},outlined:{color:"{surface.400}",borderColor:"{surface.400}"},simple:{color:"{surface.400}"}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}},outlined:{color:"{surface.0}",borderColor:"{surface.0}"},simple:{color:"{surface.0}"}}}},HG={root:EG,content:AG,text:TG,icon:IG,closeButton:LG,closeIcon:GG,outlined:BG,simple:OG,colorScheme:NG},VG={borderRadius:"{content.border.radius}",gap:"1rem"},_G={background:"{content.border.color}",size:"0.5rem"},zG={gap:"0.5rem"},WG={size:"0.5rem"},$G={size:"1rem"},UG={verticalGap:"0.5rem",horizontalGap:"1rem"},jG={root:VG,meters:_G,label:zG,labelMarker:WG,labelIcon:$G,labelList:UG},KG={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},YG={width:"2.5rem",color:"{form.field.icon.color}"},qG={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},XG={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},QG={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",gap:"0.5rem"},ZG={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},JG={color:"{form.field.icon.color}"},eB={borderRadius:"{border.radius.sm}"},tB={padding:"{list.option.padding}"},oB={root:KG,dropdown:YG,overlay:qG,list:XG,option:QG,optionGroup:ZG,chip:eB,clearIcon:JG,emptyMessage:tB},iB={gap:"1.125rem"},rB={gap:"0.5rem"},sB={root:iB,controls:rB},nB={gutter:"0.75rem",transitionDuration:"{transition.duration}"},aB={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{content.border.color}",color:"{content.color}",selectedColor:"{highlight.color}",hoverColor:"{content.hover.color}",padding:"0.75rem 1rem",toggleablePadding:"0.75rem 1rem 1.25rem 1rem",borderRadius:"{content.border.radius}"},lB={background:"{content.background}",hoverBackground:"{content.hover.background}",borderColor:"{content.border.color}",color:"{text.muted.color}",hoverColor:"{text.color}",size:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},dB={color:"{content.border.color}",borderRadius:"{content.border.radius}",height:"24px"},cB={root:nB,node:aB,nodeToggleButton:lB,connector:dB},uB={outline:{width:"2px",color:"{content.background}"}},hB={root:uB},gB={padding:"0.5rem 1rem",gap:"0.25rem",borderRadius:"{content.border.radius}",background:"{content.background}",color:"{content.color}",transitionDuration:"{transition.duration}"},pB={background:"transparent",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}",width:"2.5rem",height:"2.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},fB={color:"{text.muted.color}"},mB={maxWidth:"2.5rem"},CB={root:gB,navButton:pB,currentPageReport:fB,jumpToPageInput:mB},vB={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},wB={background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"{content.border.color}",borderWidth:"0",borderRadius:"0"},bB={padding:"0.375rem 1.125rem"},yB={fontWeight:"600"},SB={padding:"0 1.125rem 1.125rem 1.125rem"},RB={padding:"0 1.125rem 1.125rem 1.125rem"},xB={root:vB,header:wB,toggleableHeader:bB,title:yB,content:SB,footer:RB},FB={gap:"0.5rem",transitionDuration:"{transition.duration}"},DB={background:"{content.background}",borderColor:"{content.border.color}",borderWidth:"1px",color:"{content.color}",padding:"0.25rem 0.25rem",borderRadius:"{content.border.radius}",first:{borderWidth:"1px",topBorderRadius:"{content.border.radius}"},last:{borderWidth:"1px",bottomBorderRadius:"{content.border.radius}"}},kB={focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",gap:"0.5rem",padding:"{navigation.item.padding}",borderRadius:"{content.border.radius}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},MB={indent:"1rem"},PB={color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}"},EB={root:FB,panel:DB,item:kB,submenu:MB,submenuIcon:PB},AB={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:".75rem"},TB={color:"{form.field.icon.color}"},IB={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",padding:"{overlay.popover.padding}",shadow:"{overlay.popover.shadow}"},LB={gap:"0.5rem"},GB={light:{strength:{weakBackground:"{red.500}",mediumBackground:"{amber.500}",strongBackground:"{green.500}"}},dark:{strength:{weakBackground:"{red.400}",mediumBackground:"{amber.400}",strongBackground:"{green.400}"}}},BB={meter:AB,icon:TB,overlay:IB,content:LB,colorScheme:GB},OB={gap:"1.125rem"},NB={gap:"0.5rem"},HB={root:OB,controls:NB},VB={background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},_B={padding:"{overlay.popover.padding}"},zB={root:VB,content:_B},WB={background:"{content.border.color}",borderRadius:"{content.border.radius}",height:"1.25rem"},$B={background:"{primary.color}"},UB={color:"{primary.contrast.color}",fontSize:"0.75rem",fontWeight:"600"},jB={root:WB,value:$B,label:UB},KB={light:{root:{colorOne:"{red.500}",colorTwo:"{blue.500}",colorThree:"{green.500}",colorFour:"{yellow.500}"}},dark:{root:{colorOne:"{red.400}",colorTwo:"{blue.400}",colorThree:"{green.400}",colorFour:"{yellow.400}"}}},YB={colorScheme:KB},qB={width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},XB={size:"0.75rem",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.5rem"},lg:{size:"1rem"}},QB={root:qB,icon:XB},ZB={gap:"0.25rem",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},JB={size:"1rem",color:"{text.muted.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"},e1={root:ZB,icon:JB},t1={light:{root:{background:"rgba(0,0,0,0.1)"}},dark:{root:{background:"rgba(255,255,255,0.3)"}}},o1={colorScheme:t1},i1={transitionDuration:"{transition.duration}"},r1={size:"9px",borderRadius:"{border.radius.sm}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},s1={light:{bar:{background:"{surface.100}"}},dark:{bar:{background:"{surface.800}"}}},n1={root:i1,bar:r1,colorScheme:s1},a1={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},l1={width:"2.5rem",color:"{form.field.icon.color}"},d1={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},c1={padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},u1={focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},h1={background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},g1={color:"{form.field.icon.color}"},p1={color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},f1={padding:"{list.option.padding}"},m1={root:a1,dropdown:l1,overlay:d1,list:c1,option:u1,optionGroup:h1,clearIcon:g1,checkmark:p1,emptyMessage:f1},C1={borderRadius:"{form.field.border.radius}"},v1={light:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}},dark:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}}},w1={root:C1,colorScheme:v1},b1={borderRadius:"{content.border.radius}"},y1={light:{root:{background:"{surface.200}",animationBackground:"rgba(255,255,255,0.4)"}},dark:{root:{background:"rgba(255, 255, 255, 0.06)",animationBackground:"rgba(255, 255, 255, 0.04)"}}},S1={root:b1,colorScheme:y1},R1={transitionDuration:"{transition.duration}"},x1={background:"{content.border.color}",borderRadius:"{content.border.radius}",size:"3px"},F1={background:"{primary.color}"},D1={width:"20px",height:"20px",borderRadius:"50%",background:"{content.border.color}",hoverBackground:"{content.border.color}",content:{borderRadius:"50%",hoverBackground:"{content.background}",width:"16px",height:"16px",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},k1={light:{handle:{content:{background:"{surface.0}"}}},dark:{handle:{content:{background:"{surface.950}"}}}},M1={root:R1,track:x1,range:F1,handle:D1,colorScheme:k1},P1={gap:"0.5rem",transitionDuration:"{transition.duration}"},E1={root:P1},A1={borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"},T1={root:A1},I1={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",transitionDuration:"{transition.duration}"},L1={background:"{content.border.color}"},G1={size:"24px",background:"transparent",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},B1={root:I1,gutter:L1,handle:G1},O1={transitionDuration:"{transition.duration}"},N1={background:"{content.border.color}",activeBackground:"{primary.color}",margin:"0 0 0 1.625rem",size:"2px"},H1={padding:"0.5rem",gap:"1rem"},V1={padding:"0",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},_1={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},z1={background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"},W1={padding:"0.875rem 0.5rem 1.125rem 0.5rem"},$1={background:"{content.background}",color:"{content.color}",padding:"0",indent:"1rem"},U1={root:O1,separator:N1,step:H1,stepHeader:V1,stepTitle:_1,stepNumber:z1,steppanels:W1,steppanel:$1},j1={transitionDuration:"{transition.duration}"},K1={background:"{content.border.color}"},Y1={borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},q1={color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},X1={background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"},Q1={root:j1,separator:K1,itemLink:Y1,itemLabel:q1,itemNumber:X1},Z1={transitionDuration:"{transition.duration}"},J1={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},eO={background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},tO={color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},oO={height:"1px",bottom:"-1px",background:"{primary.color}"},iO={root:Z1,tablist:J1,item:eO,itemIcon:tO,activeBar:oO},rO={transitionDuration:"{transition.duration}"},sO={borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},nO={background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},aO={background:"{content.background}",color:"{content.color}",padding:"0.875rem 1.125rem 1.125rem 1.125rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"inset {focus.ring.shadow}"}},lO={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",width:"2.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},dO={height:"1px",bottom:"-1px",background:"{primary.color}"},cO={light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}},uO={root:rO,tablist:sO,tab:nO,tabpanel:aO,navButton:lO,activeBar:dO,colorScheme:cO},hO={transitionDuration:"{transition.duration}"},gO={background:"{content.background}",borderColor:"{content.border.color}"},pO={borderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},fO={background:"{content.background}",color:"{content.color}"},mO={background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}"},CO={light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}},vO={root:hO,tabList:gO,tab:pO,tabPanel:fO,navButton:mO,colorScheme:CO},wO={fontSize:"0.875rem",fontWeight:"700",padding:"0.25rem 0.5rem",gap:"0.25rem",borderRadius:"{content.border.radius}",roundedBorderRadius:"{border.radius.xl}"},bO={size:"0.75rem"},yO={light:{primary:{background:"{primary.100}",color:"{primary.700}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.100}",color:"{green.700}"},info:{background:"{sky.100}",color:"{sky.700}"},warn:{background:"{orange.100}",color:"{orange.700}"},danger:{background:"{red.100}",color:"{red.700}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"color-mix(in srgb, {primary.500}, transparent 84%)",color:"{primary.300}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",color:"{green.300}"},info:{background:"color-mix(in srgb, {sky.500}, transparent 84%)",color:"{sky.300}"},warn:{background:"color-mix(in srgb, {orange.500}, transparent 84%)",color:"{orange.300}"},danger:{background:"color-mix(in srgb, {red.500}, transparent 84%)",color:"{red.300}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}},SO={root:wO,icon:bO,colorScheme:yO},RO={background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.color}",height:"18rem",padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{form.field.border.radius}"},xO={gap:"0.25rem"},FO={margin:"2px 0"},DO={root:RO,prompt:xO,commandResponse:FO},kO={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},MO={root:kO},PO={background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},EO={padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},AO={focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},TO={mobileIndent:"1rem"},IO={size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},LO={borderColor:"{content.border.color}"},GO={root:PO,list:EO,item:AO,submenu:TO,submenuIcon:IO,separator:LO},BO={minHeight:"5rem"},OO={eventContent:{padding:"1rem 0"}},NO={eventContent:{padding:"0 1rem"}},HO={size:"1.125rem",borderRadius:"50%",borderWidth:"2px",background:"{content.background}",borderColor:"{content.border.color}",content:{borderRadius:"50%",size:"0.375rem",background:"{primary.color}",insetShadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"}},VO={color:"{content.border.color}",size:"2px"},_O={event:BO,horizontal:OO,vertical:NO,eventMarker:HO,eventConnector:VO},zO={width:"25rem",borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},WO={size:"1.125rem"},$O={padding:"{overlay.popover.padding}",gap:"0.5rem"},UO={gap:"0.5rem"},jO={fontWeight:"500",fontSize:"1rem"},KO={fontWeight:"500",fontSize:"0.875rem"},YO={width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},qO={size:"1rem"},XO={light:{root:{blur:"1.5px"},info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}}}},dark:{root:{blur:"10px"},info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",detailColor:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}}}}},QO={root:zO,icon:WO,content:$O,text:UO,summary:jO,detail:KO,closeButton:YO,closeIcon:qO,colorScheme:XO},ZO={padding:"0.25rem",borderRadius:"{content.border.radius}",gap:"0.5rem",fontWeight:"500",disabledBackground:"{form.field.disabled.background}",disabledBorderColor:"{form.field.disabled.background}",disabledColor:"{form.field.disabled.color}",invalidBorderColor:"{form.field.invalid.border.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",padding:"0.25rem"},lg:{fontSize:"{form.field.lg.font.size}",padding:"0.25rem"}},JO={disabledColor:"{form.field.disabled.color}"},eN={padding:"0.25rem 0.75rem",borderRadius:"{content.border.radius}",checkedShadow:"0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)",sm:{padding:"0.25rem 0.75rem"},lg:{padding:"0.25rem 0.75rem"}},tN={light:{root:{background:"{surface.100}",checkedBackground:"{surface.100}",hoverBackground:"{surface.100}",borderColor:"{surface.100}",color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}",checkedBorderColor:"{surface.100}"},content:{checkedBackground:"{surface.0}"},icon:{color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}"}},dark:{root:{background:"{surface.950}",checkedBackground:"{surface.950}",hoverBackground:"{surface.950}",borderColor:"{surface.950}",color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}",checkedBorderColor:"{surface.950}"},content:{checkedBackground:"{surface.800}"},icon:{color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}"}}},oN={root:ZO,icon:JO,content:eN,colorScheme:tN},iN={width:"2.5rem",height:"1.5rem",borderRadius:"30px",gap:"0.25rem",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},borderWidth:"1px",borderColor:"transparent",hoverBorderColor:"transparent",checkedBorderColor:"transparent",checkedHoverBorderColor:"transparent",invalidBorderColor:"{form.field.invalid.border.color}",transitionDuration:"{form.field.transition.duration}",slideDuration:"0.2s"},rN={borderRadius:"50%",size:"1rem"},sN={light:{root:{background:"{surface.300}",disabledBackground:"{form.field.disabled.background}",hoverBackground:"{surface.400}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.0}",disabledBackground:"{form.field.disabled.color}",hoverBackground:"{surface.0}",checkedBackground:"{surface.0}",checkedHoverBackground:"{surface.0}",color:"{text.muted.color}",hoverColor:"{text.color}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}},dark:{root:{background:"{surface.700}",disabledBackground:"{surface.600}",hoverBackground:"{surface.600}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.400}",disabledBackground:"{surface.900}",hoverBackground:"{surface.300}",checkedBackground:"{surface.900}",checkedHoverBackground:"{surface.900}",color:"{surface.900}",hoverColor:"{surface.800}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}}},nN={root:iN,handle:rN,colorScheme:sN},aN={background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.75rem"},lN={root:aN},dN={maxWidth:"12.5rem",gutter:"0.25rem",shadow:"{overlay.popover.shadow}",padding:"0.5rem 0.75rem",borderRadius:"{overlay.popover.border.radius}"},cN={light:{root:{background:"{surface.700}",color:"{surface.0}"}},dark:{root:{background:"{surface.700}",color:"{surface.0}"}}},uN={root:dN,colorScheme:cN},hN={background:"{content.background}",color:"{content.color}",padding:"1rem",gap:"2px",indent:"1rem",transitionDuration:"{transition.duration}"},gN={padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.color}",hoverColor:"{text.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},gap:"0.25rem"},pN={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}"},fN={borderRadius:"50%",size:"1.75rem",hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedHoverColor:"{primary.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},mN={size:"2rem"},CN={margin:"0 0 0.5rem 0"},vN={root:hN,node:gN,nodeIcon:pN,nodeToggleButton:fN,loadingIcon:mN,filter:CN},wN={background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},bN={width:"2.5rem",color:"{form.field.icon.color}"},yN={background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},SN={padding:"{list.padding}"},RN={padding:"{list.option.padding}"},xN={borderRadius:"{border.radius.sm}"},FN={color:"{form.field.icon.color}"},DN={root:wN,dropdown:bN,overlay:yN,tree:SN,emptyMessage:RN,chip:xN,clearIcon:FN},kN={transitionDuration:"{transition.duration}"},MN={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},PN={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{treetable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},EN={fontWeight:"600"},AN={background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},TN={borderColor:"{treetable.border.color}",padding:"0.75rem 1rem",gap:"0.5rem"},IN={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},LN={fontWeight:"600"},GN={background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},BN={width:"0.5rem"},ON={width:"1px",color:"{primary.color}"},NN={color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},HN={size:"2rem"},VN={hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},_N={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},zN={borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},WN={light:{root:{borderColor:"{content.border.color}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},bodyCell:{selectedBorderColor:"{primary.900}"}}},$N={root:kN,header:MN,headerCell:PN,columnTitle:EN,row:AN,bodyCell:TN,footerCell:IN,columnFooter:LN,footer:GN,columnResizer:BN,resizeIndicator:ON,sortIcon:NN,loadingIcon:HN,nodeToggleButton:VN,paginatorTop:_N,paginatorBottom:zN,colorScheme:WN},UN={mask:{background:"{content.background}",color:"{text.muted.color}"},icon:{size:"2rem"}},jN={loader:UN},KN=Object.defineProperty,YN=Object.defineProperties,qN=Object.getOwnPropertyDescriptors,Ig=Object.getOwnPropertySymbols,XN=Object.prototype.hasOwnProperty,QN=Object.prototype.propertyIsEnumerable,Lg=(e,t,o)=>t in e?KN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Gg;Gg=((e,t)=>{for(var o in t||(t={}))XN.call(t,o)&&Lg(e,o,t[o]);if(Ig)for(var o of Ig(t))QN.call(t,o)&&Lg(e,o,t[o]);return e})({},uA),YN(Gg,qN({components:{accordion:HE,autocomplete:qE,avatar:tA,badge:lA,blockui:gA,breadcrumb:CA,button:bA,card:DA,carousel:TA,cascadeselect:HA,checkbox:zA,chip:YA,colorpicker:JA,confirmdialog:oT,confirmpopup:aT,contextmenu:pT,datatable:LT,dataview:_T,datepicker:aI,dialog:gI,divider:vI,dock:yI,drawer:kI,editor:II,fieldset:NI,fileupload:jI,floatlabel:QI,galleria:hL,iconfield:pL,iftalabel:CL,image:SL,imagecompare:xL,inlinemessage:PL,inplace:TL,inputchips:BL,inputgroup:NL,inputnumber:zL,inputotp:UL,inputtext:KL,knob:ZL,listbox:nG,megamenu:mG,menu:SG,menubar:PG,message:HG,metergroup:jG,multiselect:oB,orderlist:sB,organizationchart:cB,overlaybadge:hB,paginator:CB,panel:xB,panelmenu:EB,password:BB,picklist:HB,popover:zB,progressbar:jB,progressspinner:YB,radiobutton:QB,rating:e1,ripple:o1,scrollpanel:n1,select:m1,selectbutton:w1,skeleton:S1,slider:M1,speeddial:E1,splitbutton:T1,splitter:B1,stepper:U1,steps:Q1,tabmenu:iO,tabs:uO,tabview:vO,tag:SO,terminal:DO,textarea:MO,tieredmenu:GO,timeline:_O,toast:QO,togglebutton:oN,toggleswitch:nN,toolbar:lN,tooltip:uN,tree:vN,treeselect:DN,treetable:$N,virtualscroller:jN}}));const Bg=Symbol("focusDataKey"),on=()=>{const{focuses:e,focusType:t}=h.inject(Bg,{focuses:h.ref([]),focusType:h.ref(null)}),o=n=>n?e.value.includes(n):!1,i=n=>{e.value=e.value.filter(a=>a!==n),e.value.length===0&&(t.value=null)};return{focuses:e,focusType:t,clearAllFocuses:()=>{e.value=[],t.value=null},handleFocusUpdate:(n,a)=>{if(a){if(t.value&&n!==t.value){e.value=[a],t.value=n;return}e.value.includes(a)?i(a):(e.value=[a],t.value=n)}},isFocused:o,removeFocus:i}},ZN={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},JN=["id"],eH={key:1,style:{"padding-left":"16px"}},tH=["checked","disabled","onChange"],oH={class:"pv-text-body-md"},iH={key:2},rH={key:0,class:"pv-text-subdued pv-text-body-xxs"},sH=h.defineComponent({__name:"GroupBySelector",props:{rowGroupLimit:{},enableFocusView:{type:Boolean}},setup(e){const t=h.inject("gridApi"),o=h.inject("availableRowGroupColumns"),i=h.inject("rowGroupColumnFields"),r=e;h.watch(i,()=>{},{deep:!0});const s=C=>i.value.includes(C||""),{clearAllFocuses:n,focusType:a}=on(),l=(C,w)=>{w?t.value.addRowGroupColumns([C]):t.value.removeRowGroupColumns([C]),r.enableFocusView&&a.value&&a.value!==i.value[0]&&n()},d=h.computed(()=>({"pv-hide":o.value.length===0})),c=h.computed(()=>r.rowGroupLimit?i.value.length>=r.rowGroupLimit:!1),u=h.computed(()=>i.value.map(C=>o.value.find(w=>w.field===C)).filter(C=>C!==void 0)),g=h.computed(()=>o.value.filter(C=>!i.value.includes(C.field))),p=h.computed(()=>{const C={label:"",value:"divider"},w=u.value.map(b=>({label:b.headerName,value:b.field})),y=g.value.map(b=>({label:b.headerName,value:b.field}));return[...w,C,...y]}),f=C=>`group-by-list-item-${C}`,m=C=>{const w=C.findIndex(x=>x==="divider"),b=C.slice(0,w).slice(0,r.rowGroupLimit).map(x=>x.replace("group-by-list-item-",""));t.value.setRowGroupColumns(b)};return(C,w)=>(h.openBlock(),h.createBlock(lg,{isList:!0,isSortable:!0,popoverCssProperties:{width:"auto"},alignment:"right",class:h.normalizeClass(d.value),onListOrderUpdated:m},{trigger:h.withCtx(()=>[h.createElementVNode("div",ZN,[w[0]||(w[0]=h.createElementVNode("p",{class:"pv-truncate pv-text-body-md"},"Compare",-1)),h.unref(i).length>0?(h.openBlock(),h.createBlock(h.unref(pl),{key:0,value:h.unref(i).length,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0)])]),default:h.withCtx(()=>[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(p.value,(y,b)=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:y.value},[y.value!=="divider"?(h.openBlock(),h.createElementBlock("li",{key:0,id:f(y.value)},[h.createElementVNode("label",{class:h.normalizeClass(["pv-flex",{"pv-border-bottom":b+1===h.unref(i).length}])},[s(y.value)?(h.openBlock(),h.createBlock(mt,{key:0,name:"reorder",class:"pv-text-subdued"})):(h.openBlock(),h.createElementBlock("span",eH)),h.createElementVNode("input",{type:"checkbox",class:"pv-checkbox",checked:s(y.value),disabled:!s(y.value)&&c.value,onChange:x=>l(y.value,x.target.checked)},null,40,tH),h.createElementVNode("span",oH,h.toDisplayString(y.label),1),s(y.value)?(h.openBlock(),h.createElementBlock("sup",iH,h.toDisplayString(b+1),1)):h.createCommentVNode("",!0)],2)],8,JN)):h.createCommentVNode("",!0)],64))),128)),c.value?(h.openBlock(),h.createElementBlock("p",rH," Supports "+h.toDisplayString(C.rowGroupLimit)+" compare levels ",1)):h.createCommentVNode("",!0)]),_:1},8,["class"]))}}),nH={},aH={class:"ag-custom-loading-cell pv-shimmer"};function lH(e,t){return h.openBlock(),h.createElementBlock("div",aH)}const dH=go(nH,[["render",lH]]),cH={key:0,class:"pv-table-group-cell"},uH={class:"pv-text-body-xxs pv-text-subdued"},hH={key:0},gH={class:"pv-flex pv-space-between",style:{"line-height":"20px"}},pH={class:"pv-text-title-md"},fH={key:0,class:"pv-table-row-number"},mH=h.defineComponent({__name:"GroupedCellRenderer",props:{params:{}},setup(e){const t=e,o=h.inject("rowGroupColumnFields"),i=h.inject("groupColumnCellValueColumn"),r=h.inject("expandedRows"),s=h.computed(()=>!t.params.displayBaseAggregationsOnly||a.value.level===o.value.length-1),n=h.computed(()=>t.params.rowNode.group),a=Ah(t.params,"rowNode"),l=(p,f)=>p?p({value:f,data:a.value.data,node:a.value,api:t.params.api}):f,d=h.computed(()=>{if(!i.value)return"";const p=i.value.getColId()||"",f=i.value.getColDef().valueFormatter,m=a.value;return p&&m&&m.data&&p in m.data?l(f,m.data[p]):""}),c=h.computed(()=>a.value.data&&a.value.data.groupedRecordCount?a.value.data.groupedRecordCount||0:a.value.allChildrenCount||0),u=h.computed(()=>{const p=a.value.rowIndex,f=a.value.parent?.rowIndex;return p!=null&&f!=null?p-f:null}),g=p=>{const f=p.node.expanded,m=p.node.rowIndex;m!=null&&(r.value[m]=f)};return h.onMounted(()=>{const p=a.value,f=p.rowIndex,m=p.expanded;f!=null&&(r.value[f]=m),a.value.addEventListener("expandedChanged",g)}),h.onBeforeUnmount(()=>{const p=a.value;a.value.removeEventListener("expandedChanged",g);const f=p.rowIndex;f!=null&&(r.value[f]=!1)}),(p,f)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[n.value?(h.openBlock(),h.createElementBlock("div",cH,[h.createElementVNode("p",uH,[h.createTextVNode(h.toDisplayString(h.unref(a).rowGroupColumn?.getColDef().headerName)+" ",1),p.params.displayCount&&s.value&&c.value>0?(h.openBlock(),h.createElementBlock("span",hH," ("+h.toDisplayString(c.value.toLocaleString())+") ",1)):h.createCommentVNode("",!0)]),h.createElementVNode("div",gH,[h.createElementVNode("p",pH,h.toDisplayString(p.params.formattedValue||p.params.rowNode.key),1)])])):h.createCommentVNode("",!0),h.createElementVNode("div",null,[h.createElementVNode("p",null,[p.params.displayRowNumber&&u.value?(h.openBlock(),h.createElementBlock("span",fH,h.toDisplayString(u.value),1)):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(d.value),1)])])],64))}});function Og(e){const t=e.filter(i=>i!=null&&!isNaN(i)).sort((i,r)=>i-r),o=t.length;return o===0?null:t[Math.floor(o/2)]}var vt=(e=>(e.String="string",e.Number="number",e.Boolean="boolean",e.Date="date",e.Currency="currency",e.Formula="formula",e.Select="select",e.Percent="percent",e.Entity="entity",e.Id="id",e.Integer="integer",e.User="user",e.Link="link",e.Location="location",e.Status="status",e.Tag="tag",e.File="file",e.None="none",e))(vt||{});const CH=e=>{switch(e){case"string":return"fonts";case"number":return"hash";case"boolean":return"list";case"date":return"calendar";case"currency":return"currency-dollar";case"formula":return"formula";case"select":return"list";case"percent":return"percent";case"entity":return"building";case"id":return"id-2";case"link":return"link";case"location":return"location";case"integer":return"hash";case"user":return"user";case"status":return"circle-chevron-down";case"tag":return"circle-chevron-down";case"file":return"file";case"none":return null;default:return null}},vH=(e,t)=>{if(!e)return e;switch(t){case"percent":return e.replace(/^%+/,"").trim();default:return e}},wH={style:{"line-height":"20px"}},bH={class:"pv-text-subdued pv-text-body-xxs pv-relative"},yH=h.defineComponent({__name:"GroupAggCellRenderer",props:{params:{}},setup(e){const t=e,o=h.inject("expandedRows"),i=h.computed(()=>{const c=t.params.column?.getColDef()?.context;return c&&c.aggFuncDisplayName?c.aggFuncDisplayName:(t.params.column?.getAggFunc()||"agg").toLowerCase()}),r=()=>{const d=t.params.api;if(d){const c=!n.value;d.setRowNodeExpanded(t.params.node,c),s.value&&(o.value[s.value]=c)}},s=h.computed(()=>t.params.node?.rowIndex),n=h.computed(()=>{let d=!1;return s.value!=null&&(d=s.value in o.value?o.value[s.value]:!1),d}),a=h.computed(()=>n.value?"chevron-down":"chevron-right"),l=h.computed(()=>{const c=t.params.column?.getColDef()?.context,u=t.params.valueFormatted||t.params.value;return c&&c.dataType&&[vt.Currency,vt.Percent,vt.Number,vt.Integer].includes(c.dataType)?u.toLocaleString():u});return h.onMounted(()=>{t.params.node.expanded&&s.value&&(o.value[s.value]=!0)}),(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:"pv-flex",ondblclick:r},[h.createElementVNode("div",wH,[h.createElementVNode("p",null,h.toDisplayString(l.value),1),h.createElementVNode("p",bH,h.toDisplayString(i.value),1)]),h.createVNode(kt,{size:"xl",variant:"ghost","left-icon":a.value,onClick:r},null,8,["left-icon"])]))}}),rn=h.ref({}),Ng=h.ref(null),SH=h.ref(0),RH=h.ref(0),yl=h.ref({}),Sl=h.ref(void 0),Rl=h.ref({}),sn=h.ref({}),xl=h.ref({}),Hg=h.ref({}),xH=()=>{const e={};return Object.entries(sn.value).forEach(([t,o])=>{const i=o.filter(r=>!!r);i.length>0&&(e[t]={filterType:"set",values:i})}),e},FH=async(e,t,o,i)=>{const r=Hg.value[t.field]||void 0,s=sn.value[t.field]||[];let n=i;Ng.value!=null&&(n=xH());const a={api:e,colDef:t,column:o,filterModel:n,query:r,selectedValues:s};yl.value[t.field]=!0;const l=s.map(u=>{const g=Fl(t.field,u);return{value:g?.value||u,label:g?.label||u,isPreference:g?.isPreference||!1,isSelectable:g?.isSelectable||!0,metadata:g?.metadata||{}}}),d=await Sl.value?.(a);l.forEach(u=>{d?.some(g=>g?.value===u?.value)||d?.push(u)}),t.field&&d&&(Rl.value[t.field]=d);const c=d?.filter(u=>u!=null).map(u=>u.value)||[];return yl.value[t.field]=!1,c.filter((u,g)=>c.indexOf(u)===g)},DH=(e,t)=>e&&e.trim()!==""?t?.toLowerCase().includes(e.toLowerCase())||!1:!0,Fl=(e,t)=>{const o=[...Rl.value[e]||[],...xl.value[e]||[]];return o?o.find(i=>i?.value===t):null},kH=()=>Sl.value!=null,MH=(e,t)=>{sn.value[e]=t;const o=[];if(rn.value&&rn.value[e]?.values){const r=rn.value[e].values||[];o.push(...r)}o.push(...t);const i=[];return t.forEach(r=>{const s=Fl(e,r);s&&i.push(s)}),xl.value[e]=i,o.filter((r,s)=>o.indexOf(r)===s)},PH=e=>sn.value[e]||[],EH=(e,t)=>{Hg.value[e]=t},Dl=()=>({filterModel:rn,filterModelUpdated:SH,filterModelCleared:RH,filterValuesLoadingStatus:yl,filterValueMap:Rl,filterValueSelectedMetadataMap:xl,filterStoreHandler:Sl,fetchFilterValues:FH,filterValueContext:Fl,filterResultByQuery:DH,getFilterSelectedValues:PH,isServerSideFilter:kH,prevFilterModel:Ng,setFilterSelectedValues:MH,setFilterValueSearchText:EH}),AH={class:"pv-flex"},TH=["type","value","checked","disabled"],IH={key:1,class:"pv-text-body-md",style:{"padding-left":"4px"}},Vg=go(h.defineComponent({__name:"FilterValueLabel",props:{option:{},enableFocusView:{type:Boolean},filterField:{},filterOptionsRenderer:{},forceCheckSelection:{type:Boolean},formatDisplayValue:{type:Function},handleInputChange:{type:Function},isSingleSelect:{type:Boolean},selectedValues:{},selectionDisabled:{type:Function}},emits:["focus-update"],setup(e){const t=e,{isFocused:o}=on(),i=h.inject("rowGroupColumnFields"),r=a=>i.value[0]===a&&t.enableFocusView,s=h.computed(()=>r(t.filterField)?"pv-space-between option-label":"pv-flex"),n=h.computed(()=>o(t.option)?"":"focus-button");return(a,l)=>(h.openBlock(),h.createElementBlock("label",{class:h.normalizeClass(s.value)},[h.createElementVNode("div",AH,[h.createElementVNode("input",{type:a.isSingleSelect?"radio":"checkbox",class:h.normalizeClass(a.isSingleSelect?"pv-radio":"pv-checkbox"),value:a.option,checked:a.selectedValues.includes(a.option)||a.forceCheckSelection,disabled:a.selectionDisabled(a.option),onChange:l[0]||(l[0]=d=>a.handleInputChange(d,a.option))},null,42,TH),a.filterOptionsRenderer?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(a.filterOptionsRenderer),{key:0,option:a.option,"display-option":a.formatDisplayValue(a.option)},null,8,["option","display-option"])):(h.openBlock(),h.createElementBlock("span",IH,h.toDisplayString(a.formatDisplayValue(a.option)),1))]),r(a.filterField)?(h.openBlock(),h.createBlock(kt,{key:0,class:h.normalizeClass(n.value),variant:"ghost","left-icon":"focus",onClick:l[1]||(l[1]=d=>a.$emit("focus-update",a.option))},null,8,["class"])):h.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5bb7bd55"]]),LH={class:"pv-stack-8"},GH={class:"pv-flex",style:{"--flex-wrap":"nowrap"}},BH={key:1,class:"pv-text-body-md pv-text-subdued",style:{"padding-top":"8px"}},OH={class:"pv-flex pv-text-subdued pv-space-between",style:{"padding-top":"8px"}},NH={key:0,class:"pv-flex pv-text-body-xxs pv-text-subdued",style:{"padding-top":"8px",cursor:"default"}},HH={key:0,class:"pv-tooltip suggested-label","aria-labelledby":"description"},VH=["role"],_H={key:3,class:"pv-text-body-xxs pv-text-subdued"},zH={class:"pv-border-top pv-flex",style:{"--flex-justify":"end","padding-top":"8px"}},WH={key:0,class:"pv-full-width"},$H={class:"pv-flex-inline"},UH={role:"list",class:"pv-flex pv-stack-8",style:{"--flex-wrap":"wrap"}},jH=4,_g=go(h.defineComponent({__name:"SetFilter",props:{enableFocusView:{type:Boolean,default:!1},filterColDef:{},filterStyle:{default:"horizontal"},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["filter-selection-changed","filter-closed","handle-settings-icon"],setup(e,{emit:t}){const o=e,i=t,r=h.inject("gridApi"),{filterModel:s,filterModelCleared:n,filterModelUpdated:a,filterValuesLoadingStatus:l,filterValueContext:d,filterResultByQuery:c,getFilterSelectedValues:u,isServerSideFilter:g,setFilterValueSearchText:p,setFilterSelectedValues:f}=Dl(),{handleFocusUpdate:m,isFocused:C,removeFocus:w}=on(),y=h.inject("firstDataRendered"),b=h.ref([]),x=h.ref([]),M=h.computed(()=>o.filterColDef.field||""),P=h.computed(()=>o.filterColDef.headerName||""),k=h.ref(!1),S=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterValueFormatter&&typeof T.filterValueFormatter=="function"?T.filterValueFormatter:typeof o.filterColDef.valueFormatter=="function"?o.filterColDef.valueFormatter:null}),v=h.ref(""),R=h.ref(0),F=async()=>{G(),await z().then(()=>{k.value=!1})},G=()=>{const T=[];if(s.value&&s.value[M.value]?.values){const X=s.value[M.value].values||[];T.push(...X)}b.value=Array.from(new Set([...u(M.value),...T]))},z=async(T=!1,X=!1)=>{const J=await r.value.getColumnFilterInstance(M.value);g()&&(X||T&&l.value[M.value]!==!0&&a.value>R.value)&&(J.refreshFilterValues(),R.value=a.value),x.value=B(J.getFilterValues())},B=T=>T.sort((X,J)=>{const Oe=b.value.includes(X),je=b.value.includes(J);return Oe&&!je?-1:!Oe&&je?1:0}),H=T=>{const X=d(M.value,T);return S.value?S.value({value:T,context:X}):T},O=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterSelectMax?T.filterSelectMax:null}),L=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterSelectMin?T.filterSelectMin===1&&O.value===1:!1}),N=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterOptionsSortDescription?T.filterOptionsSortDescription:null}),I=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterOptionsSortTooltip?T.filterOptionsSortTooltip:null}),K=h.computed(()=>{const T=o.filterColDef.context;return T.filterSearch===void 0?!0:T.filterSearch}),W=h.computed(()=>{const T=o.filterColDef.context;return T&&T.emptyFilterResultsRenderer?T.emptyFilterResultsRenderer:null}),Y=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterOptionsRenderer?T.filterOptionsRenderer:null}),$=h.computed(()=>{const T=o.filterColDef.context;return T&&T.filterFooterRenderer?T.filterFooterRenderer:null}),se=h.computed(()=>O.value?b.value.length>=O.value:!1),fe=h.computed(()=>x.value.filter(T=>!b.value.includes(T))),Se=h.computed(()=>x.value.length===1&&x.value[0]===null&&b.value.length===0),be=h.computed(()=>x.value.filter(T=>d(M.value,T)?.isPreference)),ne=h.computed(()=>v.value===""&&be.value.length>0),le=T=>Se.value||d(M.value,T)?.isSelectable===!1?!0:L.value?!1:se.value&&!b.value.includes(T),de=h.computed(()=>{const T=v.value;let X=x.value.filter((J,Oe)=>x.value.indexOf(J)===Oe).filter(J=>J!=null&&J!=="");return ne.value&&(X=X.filter(J=>!be.value.includes(J))),X.filter(J=>{const Oe=H(J);return c(T,Oe)})});h.watch(()=>l.value[M.value],()=>{const T=l.value[M.value];k.value&&!T?(z(),k.value=!1):T&&(k.value=!0)},{deep:!0}),h.watch(()=>s.value,()=>{a.value+=1,G()}),h.watch(()=>n.value,()=>{b.value=[]}),h.watch(()=>y.value,()=>{G()}),h.watch(()=>b.value,T=>{f(M.value,T)}),EM(()=>v.value,async T=>{p(M.value,T),await z(!0,!0)},{debounce:300});const Q=T=>{T&&L.value?b.value=[T]:T&&!b.value.includes(T)&&(b.value=[...b.value,T]),xe(),i("filter-selection-changed")},ye=T=>{b.value=b.value.filter(X=>X!==T),xe(),i("filter-selection-changed"),C(T)&&w(T)},Fe=()=>{b.value=[],xe(),i("filter-selection-changed")},Re=(T,X)=>{T.target.checked?Q(X):ye(X)},xe=()=>{const T=b.value.length>0?b.value:null;r.value.setColumnFilterModel(M.value,{values:T}).then(()=>{o.filterStyle==="horizontal"?r.value.onFilterChanged():a.value+=1})},he=T=>{m(M.value,T),T&&!b.value.includes(T)&&Q(T)},Ue=()=>{v.value="",i("filter-closed")};return h.onMounted(()=>{F()}),(T,X)=>(h.openBlock(),h.createElementBlock(h.Fragment,null,[h.createElementVNode("div",LH,[(h.openBlock(),h.createBlock(h.resolveDynamicComponent(T.filterStyle==="vertical"?"ul":"div"),{role:"list",class:"pv-flex",style:{"--flex-wrap":"wrap"}},{default:h.withCtx(()=>[T.filterStyle==="vertical"?(h.openBlock(!0),h.createElementBlock(h.Fragment,{key:0},h.renderList(b.value,J=>(h.openBlock(),h.createElementBlock("li",{key:`${P.value}-${J}`},[h.createVNode(kP,{label:H(J)||"",showClear:!0,onHandleClose:Oe=>ye(J)},null,8,["label","onHandleClose"])]))),128)):h.createCommentVNode("",!0)]),_:1})),h.createElementVNode("div",null,[h.createVNode(lg,h.mergeProps({isList:!0,icon:T.filterStyle==="vertical",class:"pv-flex",popoverCssProperties:{width:"auto",maxWidth:T.filterStyle==="vertical"?"300px":"400px",overflowX:"auto"},isLoading:k.value,onDropdownOpen:X[3]||(X[3]=J=>z(!0)),onDropdownClosed:Ue},T.filterStyle==="horizontal"?{"data-horizontal-filter-field":M.value}:{}),h.createSlots({default:h.withCtx(()=>[K.value?(h.openBlock(),h.createBlock(GP,{key:0,modelValue:v.value,"onUpdate:modelValue":X[0]||(X[0]=J=>v.value=J),size:"sm",style:{"min-width":"200px"}},null,8,["modelValue"])):h.createCommentVNode("",!0),de.value.length===0?(h.openBlock(),h.createElementBlock("li",BH,[!k.value&&W.value?(h.openBlock(),h.createBlock(h.resolveDynamicComponent(W.value),{key:0,"search-text":v.value},null,8,["search-text"])):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createTextVNode(h.toDisplayString(k.value?"Loading...":"No results found"),1)],64))])):(h.openBlock(),h.createElementBlock(h.Fragment,{key:2},[ne.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createElementVNode("li",OH,[X[4]||(X[4]=h.createElementVNode("span",{class:"pv-text-subdued pv-text-body-xxs"},"Your Preferences",-1)),T.displayPreferencesIcon?(h.openBlock(),h.createBlock(kt,{key:0,size:"md",variant:"ghost",onClick:X[1]||(X[1]=J=>T.$emit("handle-settings-icon",P.value)),"right-icon":"sliders-horizontal"})):h.createCommentVNode("",!0)]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(be.value,(J,Oe)=>(h.openBlock(),h.createElementBlock("li",{key:J,class:h.normalizeClass({"pv-border-bottom":Oe===be.value.length-1})},[h.createVNode(Vg,{option:J,"enable-focus-view":T.enableFocusView,"filter-field":M.value,"filter-options-renderer":Y.value,"force-check-selection":Se.value,"format-display-value":H,"handle-input-change":Re,"is-single-select":L.value,"selected-values":b.value,"selection-disabled":le,onFocusUpdate:he},null,8,["option","enable-focus-view","filter-field","filter-options-renderer","force-check-selection","is-single-select","selected-values"])],2))),128)),N.value?(h.openBlock(),h.createElementBlock("li",NH,[N.value?(h.openBlock(),h.createElementBlock("span",HH,[h.createElementVNode("dfn",null,[h.createVNode(mt,{name:"ai",size:12})]),h.createElementVNode("span",{role:I.value?"tooltip":void 0,id:"description","data-position":"center-right",style:{"max-width":"175px"}},[h.createElementVNode("span",null,h.toDisplayString(I.value),1)],8,VH)])):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(N.value),1)])):h.createCommentVNode("",!0)],64)):h.createCommentVNode("",!0),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(de.value,J=>(h.openBlock(),h.createElementBlock("li",{key:J},[h.createVNode(Vg,{option:J,"enable-focus-view":T.enableFocusView,"filter-field":M.value,"filter-options-renderer":Y.value,"force-check-selection":Se.value,"format-display-value":H,"handle-input-change":Re,"is-single-select":L.value,"selected-values":b.value,"selection-disabled":le,onFocusUpdate:he},null,8,["option","enable-focus-view","filter-field","filter-options-renderer","force-check-selection","is-single-select","selected-values"])]))),128))],64)),se.value?(h.openBlock(),h.createElementBlock("p",_H," Max of "+h.toDisplayString(O.value)+" allowed ",1)):h.createCommentVNode("",!0),!k.value&&de.value.length!=0&&$.value?(h.openBlock(),h.createBlock(h.resolveDynamicComponent($.value),{key:4})):h.createCommentVNode("",!0),h.createElementVNode("div",zH,[h.createVNode(kt,{variant:"ghost",size:"md",disabled:b.value.length===0,onClick:X[2]||(X[2]=J=>Fe()),label:"Clear All"},null,8,["disabled"])])]),_:2},[T.filterStyle==="horizontal"?{name:"trigger",fn:h.withCtx(()=>[h.createElementVNode("div",GH,[b.value.length>0?(h.openBlock(),h.createBlock(h.unref(pl),{key:0,value:b.value.length,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0),h.createElementVNode("p",{class:h.normalizeClass(["pv-text-body-md pv-truncate",{"pv-shimmer":k.value}])},h.toDisplayString(P.value),3)])]),key:"0"}:{name:"trigger",fn:h.withCtx(()=>[h.createVNode(mt,{class:"pv-text-subdued",name:"add-circle"})]),key:"1"}]),1040,["icon","popoverCssProperties","isLoading"])])]),T.filterStyle=="vertical"?(h.openBlock(),h.createElementBlock("div",WH,[h.createElementVNode("div",$H,[h.createElementVNode("ul",UH,[X[5]||(X[5]=h.createElementVNode("li",null,[h.createElementVNode("p",{class:"pv-text-subdued pv-text-body-md"},"Suggested:")],-1)),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(fe.value.filter(J=>J!==""&&J!=null).slice(0,jH),J=>(h.openBlock(),h.createElementBlock("li",{key:`${P.value}-${J}-suggest`},[h.createVNode(h.unref(AP),{label:H(J)||"",onHandleClick:Oe=>Q(J)},null,8,["label","onHandleClick"])]))),128))])])])):h.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-3e72521a"]]),KH={class:"pv-flex"},YH={class:"pv-flex"},qH={class:"pv-flex-vertical pv-space-between pv-full-width",style:{height:"100%","overflow-x":"hidden"}},XH={class:"pv-flex-vertical pv-full-width"},QH={class:"pv-flex pv-inset-squish pv-full-width pv-space-between"},ZH={class:"pv-text-title-lg"},JH={class:"pv-full-width pv-inset-inline-24"},eV={class:"pv-details",open:""},tV={class:"pv-flex pv-stack-8",style:{width:"fit-content"}},oV={class:"pv-text-title-lg"},iV={class:"pv-inset-block-8"},rV={class:"pv-sticky pv-border-top pv-full-width pv-inset-squish pv-flex pv-space-between pv-surface",style:{"--top":"unset",bottom:"0"}},sV={class:"pv-flex"},zg=5,nV=h.defineComponent({__name:"FilterPanel",props:{enableFocusView:{type:Boolean,default:!1},enableVerticalPanel:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1}},emits:["handle-settings-icon"],setup(e){const t=h.inject("gridApi"),o=h.inject("availableFilterColumns"),i=h.inject("currentlyActiveFilter"),{filterModelCleared:r,prevFilterModel:s,filterModel:n}=Dl(),a=h.ref(null),l=h.computed(()=>{const w=[...o.value].slice(0,zg);return i.value?[...w.slice(0,zg-1),i.value]:w}),d=h.computed(()=>{const w=n.value||{};return Object.keys(w).length}),c=h.ref(!1),u=()=>{c.value=!0},g=()=>{c.value=!1,s.value=t.value.getFilterModel(),a.value?.showModal()},{clearAllFocuses:p}=on(),f=()=>{s.value=null,t.value.setFilterModel(null),t.value.onFilterChanged(),r.value+=1,p()},m=()=>{s.value&&t.value.setFilterModel(s.value),s.value=null,a.value?.close()},C=()=>{t.value.onFilterChanged(),a.value?.close(),r.value+=1};return(w,y)=>(h.openBlock(),h.createElementBlock("div",KH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(l.value,b=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:b.field},[h.unref(t)?(h.openBlock(),h.createBlock(_g,{key:0,"enable-focus-view":w.enableFocusView,"display-preferences-icon":w.displayPreferencesIcon,filterColDef:b,onHandleSettingsIcon:y[0]||(y[0]=x=>w.$emit("handle-settings-icon",x))},null,8,["enable-focus-view","display-preferences-icon","filterColDef"])):h.createCommentVNode("",!0)],64))),128)),h.createElementVNode("div",YH,[w.enableVerticalPanel?(h.openBlock(),h.createBlock(h.unref(kt),{key:0,class:"pv-button-ghost pv-stack-8 pv-inset-block",label:"All Filters",onClick:g,variant:"ghost","left-icon":"filter"})):h.createCommentVNode("",!0),d.value>0?(h.openBlock(),h.createElementBlock("button",{key:1,class:"pv-button-ghost pv-stack-8 pv-inset-block",onClick:y[1]||(y[1]=b=>f()),style:{"--inset-size":"6px"}},[h.createVNode(h.unref(mt),{name:"close"}),y[8]||(y[8]=h.createTextVNode(" Clear All Filters ")),d.value>0?(h.openBlock(),h.createBlock(h.unref(pl),{key:0,value:d.value,variant:"tertiary"},null,8,["value"])):h.createCommentVNode("",!0)])):h.createCommentVNode("",!0)]),w.enableVerticalPanel?(h.openBlock(),h.createElementBlock("dialog",{key:0,ref_key:"filterDrawer",ref:a,id:"filter-vertical-drawer",class:"pv-drawer pv-surface",onClick:y[7]||(y[7]=h.withModifiers(b=>m(),["self"])),style:{"max-width":"450px"}},[h.createElementVNode("div",qH,[h.createElementVNode("div",XH,[h.createElementVNode("div",QH,[h.createElementVNode("p",ZH," All Filters ("+h.toDisplayString(h.unref(o).length)+") ",1),h.createElementVNode("button",{class:"pv-button-ghost",onClick:y[2]||(y[2]=b=>m())},[h.createVNode(h.unref(mt),{name:"close"})])]),h.createElementVNode("div",JH,[(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(h.unref(o),(b,x)=>(h.openBlock(),h.createElementBlock("div",{key:b.field,class:h.normalizeClass([{"pv-border-bottom":x<h.unref(o).length-1},"pv-stack-12"])},[h.createElementVNode("details",eV,[h.createElementVNode("summary",tV,[h.createElementVNode("span",oV,h.toDisplayString(b.headerName),1)]),h.createElementVNode("div",iV,[h.unref(t)?(h.openBlock(),h.createBlock(_g,{key:0,"filter-style":"vertical","enable-focus-view":w.enableFocusView,filterColDef:b,"display-preferences-icon":w.displayPreferencesIcon,onFilterSelectionChanged:u,onHandleSettingsIcon:y[3]||(y[3]=M=>w.$emit("handle-settings-icon",M))},null,8,["enable-focus-view","filterColDef","display-preferences-icon"])):h.createCommentVNode("",!0)])])],2))),128))])]),h.createElementVNode("div",rV,[h.createElementVNode("button",{class:"pv-button-ghost",onClick:y[4]||(y[4]=b=>f())}," Clear All "),h.createElementVNode("div",sV,[h.createVNode(h.unref(kt),{variant:"ghost",label:"Cancel",onClick:y[5]||(y[5]=b=>m())}),c.value?(h.openBlock(),h.createBlock(h.unref(kt),{key:0,variant:"primary",label:"Apply",onClick:y[6]||(y[6]=b=>C())})):(h.openBlock(),h.createBlock(h.unref(kt),{key:1,variant:"primary",label:"No Changes",disabled:""}))])])])],512)):h.createCommentVNode("",!0)]))}});function kl(e){const t=e.value?.value!=null?e.value.value:e.value;return t==null||t===""?"":t}function Ml(e,t){return e.toLocaleString(void 0,{minimumFractionDigits:0,maximumFractionDigits:t})}function Wg(e){return typeof e!="number"?2:Math.min(Math.max(0,e),20)}function aV(e,t){const o=kl(e);return o===""?"":"$"+Ml(o,Wg(t))}function lV(e,t){return kl(e)===""?"":Ml(e.value*100,Wg(t))+"%"}function dV(e){const t=kl(e);return t===""?"":Ml(t,0)}function cV(e,t){return e.value}const uV={class:"pv-flex"},hV={key:0,class:"pv-flex ag-header-actions"},$g=go(h.defineComponent({__name:"HeaderCellRenderer",props:{params:{}},setup(e,{expose:t}){const o=e,i=h.ref(!1),r=h.ref(!1),s=h.ref(null),n=h.ref(null),a=h.ref(null),l=h.ref(!1),d=h.computed(()=>{const b=o.params.column.getColDef();return b.sortable||b.filter||b.enableRowGroup}),c=h.inject("sortState"),u=h.computed(()=>{if(!c.value||c.value.length===0)return"";const b=c.value.find(M=>M.colId===o.params.column.getColId()),x=b?b.sort:"";return x==="asc"?"arrow-up":x==="desc"?"arrow-down":""}),g=h.computed(()=>r.value?{cursor:"pointer"}:{}),p=h.computed(()=>l.value?{opacity:1}:{}),f=()=>{l.value=!1},m=()=>{l.value=!0,a.value&&o.params.showColumnMenu(a.value,f)},C=b=>{i.value=b.enableFilterButton,r.value=b.enableSorting||!1,s.value=b.displayName,n.value=CH(b.column.getColDef().context?.dataType),s.value=vH(s.value,b.column.getColDef().context?.dataType)},w=()=>{r.value&&o.params.progressSort(!1)};h.onBeforeMount(()=>{C(o.params)});function y(b){return C(b),!0}return t({refresh:y}),(b,x)=>(h.openBlock(),h.createElementBlock("div",{class:"ag-custom-header-cell pv-flex pv-full-width pv-space-between",style:h.normalizeStyle(g.value),onClick:w},[h.createElementVNode("div",uV,[n.value?(h.openBlock(),h.createBlock(mt,{key:0,name:n.value,class:"pv-text-subdued"},null,8,["name"])):h.createCommentVNode("",!0),h.createElementVNode("p",null,h.toDisplayString(s.value),1),r.value&&u.value!==""?(h.openBlock(),h.createBlock(mt,{key:1,name:u.value},null,8,["name"])):h.createCommentVNode("",!0)]),d.value?(h.openBlock(),h.createElementBlock("div",hV,[h.createElementVNode("div",{ref_key:"menuButton",ref:a,class:"ag-header-cell-menu-button",style:h.normalizeStyle(p.value)},[h.createVNode(kt,{size:"xl",variant:"ghost","left-icon":"menu",onClick:h.withModifiers(m,["stop","prevent"])})],4)])):h.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-054d9038"]]),gV=Fa.withParams({headerHeight:"30px",headerBackgroundColor:"#F7F8F8",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),pV=Fa.withParams({headerHeight:"30px",headerBackgroundColor:"white",headerCellHoverBackgroundColor:"#F7F8F8",headerColumnResizeHandleHeight:"50%",headerColumnResizeHandleWidth:"3px",headerColumnBorder:"none",headerFontWeight:"bold",headerFontSize:"12px",fontFamily:"Inter, sans-serif",fontSize:12,headerRowBorder:!0,rowHoverColor:"#F7F8F8",rangeSelectionBorderColor:"#36C5BA",rangeSelectionBorderStyle:"solid",wrapperBorder:"none",wrapperBorderRadius:"0px",menuBackgroundColor:"white",accentColor:"#36C5BA"}),fV={class:"pv-popover-menu"},mV={class:"pv-popover",style:{"--height":"auto"}},CV=["disabled"],vV=h.defineComponent({__name:"ExportMenu",props:{getCsvData:{type:Function}},setup(e){const t=e,o=h.ref(!1);async function i(){o.value=!0;const r=await t.getCsvData();if(!r){o.value=!1;return}const s=new Blob([r],{type:"text/csv;charset=utf-8;"}),n=document.createElement("a");n.href=URL.createObjectURL(s),n.setAttribute("download","datatable_export.csv"),n.click(),o.value=!1}return(r,s)=>(h.openBlock(),h.createElementBlock("nav",fV,[s[0]||(s[0]=h.createElementVNode("button",{type:"button",class:"pv-button-icon"},[h.createElementVNode("svg",{"aria-hidden":"true",class:"pv-icon-24"},[h.createElementVNode("title",null,"ellipsis"),h.createElementVNode("use",{"xlink:href":"#ellipsis"})])],-1)),h.createElementVNode("div",mV,[h.createElementVNode("button",{class:"pv-button pv-text-body-sm pv-inset-square-8",onClick:h.withModifiers(i,["prevent"]),disabled:o.value},[o.value?(h.openBlock(),h.createElementBlock(h.Fragment,{key:0},[h.createTextVNode("Exporting...")],64)):(h.openBlock(),h.createElementBlock(h.Fragment,{key:1},[h.createTextVNode("Download CSV")],64))],8,CV)])]))}}),wV={key:1,class:""},bV=h.defineComponent({__name:"PaginationPanel",props:{panelSize:{default:"xl"}},setup(e){Xd.registerModules([Vx]);const t=h.inject("gridApi"),o=h.inject("currentPage"),i=h.inject("totalPages"),r=e,s=h.computed(()=>{const d=i.value,c=o.value;if(d<=7)return Array.from({length:d},(g,p)=>p+1);const u=[];return c<=4?u.push(1,2,3,4,5,"...",d):c>=d-3?u.push(1,"...",d-4,d-3,d-2,d-1,d):u.push(1,"...",c-1,c,c+1,"...",d),u}),n=()=>{o.value>0&&t?.value.paginationGoToPage(o.value-2)},a=()=>{o.value<i.value&&t?.value.paginationGoToPage(o.value)},l=d=>{d>=1&&d<=i.value&&t?.value.paginationGoToPage(d-1)};return(d,c)=>(h.openBlock(),h.createElementBlock("div",{class:h.normalizeClass(["pv-flex",{"pv-hide":h.unref(i)<=1}])},[h.createVNode(kt,{variant:"ghost",onClick:n,disabled:h.unref(o)===1,size:r.panelSize==="l"?"md":"lg","right-icon":"chevron-left"},null,8,["disabled","size"]),(h.openBlock(!0),h.createElementBlock(h.Fragment,null,h.renderList(s.value,u=>(h.openBlock(),h.createElementBlock(h.Fragment,{key:u},[typeof u=="number"?(h.openBlock(),h.createBlock(kt,{key:0,variant:u===h.unref(o)?"primary":"ghost",size:r.panelSize==="l"?"md":"lg",onClick:g=>l(u),label:u.toString()},null,8,["variant","size","onClick","label"])):(h.openBlock(),h.createElementBlock("span",wV,"..."))],64))),128)),h.createVNode(kt,{variant:"ghost",onClick:a,disabled:h.unref(o)===h.unref(i),size:r.panelSize==="l"?"md":"lg","right-icon":"chevron-right"},null,8,["disabled","size"])],2))}});function yV(){}function Ug(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function jg(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const SV="[object RegExp]",RV="[object String]",xV="[object Number]",FV="[object Boolean]",Kg="[object Arguments]",DV="[object Symbol]",kV="[object Date]",MV="[object Map]",PV="[object Set]",EV="[object Array]",AV="[object Function]",TV="[object ArrayBuffer]",Pl="[object Object]",IV="[object Error]",LV="[object DataView]",GV="[object Uint8Array]",BV="[object Uint8ClampedArray]",OV="[object Uint16Array]",NV="[object Uint32Array]",HV="[object BigUint64Array]",VV="[object Int8Array]",_V="[object Int16Array]",zV="[object Int32Array]",WV="[object BigInt64Array]",$V="[object Float32Array]",UV="[object Float64Array]";function Yg(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype||Object.getPrototypeOf(t)===null?Object.prototype.toString.call(e)==="[object Object]":!1}function jV(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function KV(e,t,o){return Dr(e,t,void 0,void 0,void 0,void 0,o)}function Dr(e,t,o,i,r,s,n){const a=n(e,t,o,i,r,s);if(a!==void 0)return a;if(typeof e==typeof t)switch(typeof e){case"bigint":case"string":case"boolean":case"symbol":case"undefined":return e===t;case"number":return e===t||Object.is(e,t);case"function":return e===t;case"object":return kr(e,t,s,n)}return kr(e,t,s,n)}function kr(e,t,o,i){if(Object.is(e,t))return!0;let r=jg(e),s=jg(t);if(r===Kg&&(r=Pl),s===Kg&&(s=Pl),r!==s)return!1;switch(r){case RV:return e.toString()===t.toString();case xV:{const l=e.valueOf(),d=t.valueOf();return jV(l,d)}case FV:case kV:case DV:return Object.is(e.valueOf(),t.valueOf());case SV:return e.source===t.source&&e.flags===t.flags;case AV:return e===t}o=o??new Map;const n=o.get(e),a=o.get(t);if(n!=null&&a!=null)return n===t;o.set(e,t),o.set(t,e);try{switch(r){case MV:{if(e.size!==t.size)return!1;for(const[l,d]of e.entries())if(!t.has(l)||!Dr(d,t.get(l),l,e,t,o,i))return!1;return!0}case PV:{if(e.size!==t.size)return!1;const l=Array.from(e.values()),d=Array.from(t.values());for(let c=0;c<l.length;c++){const u=l[c],g=d.findIndex(p=>Dr(u,p,void 0,e,t,o,i));if(g===-1)return!1;d.splice(g,1)}return!0}case EV:case GV:case BV:case OV:case NV:case HV:case VV:case _V:case zV:case WV:case $V:case UV:{if(typeof Buffer<"u"&&Buffer.isBuffer(e)!==Buffer.isBuffer(t)||e.length!==t.length)return!1;for(let l=0;l<e.length;l++)if(!Dr(e[l],t[l],l,e,t,o,i))return!1;return!0}case TV:return e.byteLength!==t.byteLength?!1:kr(new Uint8Array(e),new Uint8Array(t),o,i);case LV:return e.byteLength!==t.byteLength||e.byteOffset!==t.byteOffset?!1:kr(new Uint8Array(e),new Uint8Array(t),o,i);case IV:return e.name===t.name&&e.message===t.message;case Pl:{if(!(kr(e.constructor,t.constructor,o,i)||Yg(e)&&Yg(t)))return!1;const d=[...Object.keys(e),...Ug(e)],c=[...Object.keys(t),...Ug(t)];if(d.length!==c.length)return!1;for(let u=0;u<d.length;u++){const g=d[u],p=e[g];if(!Object.hasOwn(t,g))return!1;const f=t[g];if(!Dr(p,f,g,e,t,o,i))return!1}return!0}default:return!1}}finally{o.delete(e),o.delete(t)}}function nn(e,t){return KV(e,t,yV)}const YV={key:0,class:"pv-tag"},qV=h.defineComponent({__name:"TagCellRenderer",props:{params:{}},setup(e){const t=e,o=h.computed(()=>{const i=t.params.valueFormatted||t.params.value||"";return i.trim()===""?null:i});return(i,r)=>o.value?(h.openBlock(),h.createElementBlock("div",YV,h.toDisplayString(o.value),1)):h.createCommentVNode("",!0)}}),XV={key:0,class:"pv-table-row-number"},QV=go(h.defineComponent({__name:"RowCountCellRenderer",props:{params:{}},setup(e){const t=e,o=h.computed(()=>(t.params.node?.rowIndex||0)+1),i=h.computed(()=>{const s=t.params.column?.getColDef()?.context,n=t.params.valueFormatted||t.params.value;return s&&s.dataType&&[vt.Currency,vt.Percent,vt.Number,vt.Integer].includes(s.dataType)?n.toLocaleString():n});return(r,s)=>(h.openBlock(),h.createElementBlock("div",null,[h.createElementVNode("p",null,[o.value?(h.openBlock(),h.createElementBlock("span",XV,h.toDisplayString(o.value),1)):h.createCommentVNode("",!0),h.createTextVNode(" "+h.toDisplayString(i.value),1)])]))}}),[["__scopeId","data-v-ae67b797"]]),ZV={style:{"background-color":"white"},class:"pv-inset-square-8 pv-bordered-md pv-text-md"},JV={style:{color:"black"}},e_=h.defineComponent({__name:"TableTooltip",props:{params:{}},setup(e){return(t,o)=>(h.openBlock(),h.createElementBlock("div",ZV,[h.createElementVNode("p",JV,h.toDisplayString(t.params.value),1)]))}}),t_={class:"pv-stack-8"},o_={class:"pv-flex pv-space-between"},i_={class:"pv-flex"},r_={key:0,class:"pv-table-overlay"},s_={class:"pv-text-body-xs pv-text-center",style:{"padding-top":"50px"}},n_=h.defineComponent({__name:"PvDataTable",props:{colDefs:{},rowData:{},serverSideRowHandler:{},filterValuesSetHandler:{},initialGridState:{},initialFilterValueMap:{},theme:{},displayBaseAggregationsOnly:{type:Boolean,default:!1},displayRowNumber:{type:Boolean,default:!1},displayGroupCount:{type:Boolean,default:!0},displayPreferencesIcon:{type:Boolean,default:!1},enableColumnVisibilitySelector:{type:Boolean,default:!1},enableFocusView:{type:Boolean,default:!1},enableGroupBySelector:{type:Boolean,default:!1},enableVerticalFilterPanel:{type:Boolean,default:!0},rowGroupLimit:{},groupDefaultExpanded:{default:1},isClientSideGroupOpenByDefault:{},enableCsvExport:{type:Boolean,default:!1},csvRowLimit:{default:2e4},serverSideCsvHandler:{},uniqueRowIdField:{},requireFiltersToShowData:{type:Boolean,default:!1},isLoading:{type:Boolean},containerHeight:{default:500},containerMinHeight:{default:200},debugMode:{type:Boolean,default:!1},pagination:{type:Boolean,default:!1},paginationPageSize:{default:50},rowHeight:{},tooltipShowDelay:{default:1e3},tooltipHideDelay:{},hideTable:{type:Boolean}},emits:["column-moved","column-resized","column-row-group-changed","grid-ready","filter-changed","sort-changed","filter-opened","first-data-rendered","handle-settings-icon"],setup(e,{expose:t,emit:o}){const i=[UR,$R,wb,lD,ZR,rx,hM,gM,RD,pk,Lx,Rx,Wx];Ku.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-065231}_in_excess_of_the_licence_granted_is_not_permitted___Please_report_misuse_to_legal@ag-grid.com___For_help_with_changing_this_key_please_contact_info@ag-grid.com___{Turquoise_Health}_is_granted_a_{Multiple_Applications}_Developer_License_for_{3}_Front-End_JavaScript_developers___All_Front-End_JavaScript_developers_need_to_be_licensed_in_addition_to_the_ones_working_with_{AG_Grid}_Enterprise___This_key_has_been_granted_a_Deployment_License_Add-on_for_{2}_Production_Environments___This_key_works_with_{AG_Grid}_Enterprise_versions_released_before_{16_August_2025}____[v3]_[01]_MTc1NTI5ODgwMDAwMA==c042c2db0e82c322692ccb41e7b58f3e");const s=e;s.debugMode&&i.push(G0);const n=h.computed(()=>({height:`${s.containerHeight}px`,minHeight:`${s.containerMinHeight}px`})),a=h.computed(()=>s.theme?s.theme:y.value.length>0?pV:gV),l=o,d="serverSideRowHandler"in s&&s.serverSideRowHandler?{getRows:A=>{if(!M.value){A.success({rowData:[]});return}s.serverSideRowHandler?.(A)}}:null,c="filterValuesSetHandler"in s&&s.filterValuesSetHandler?async A=>{let U={...v.value};!b.value&&s.initialGridState&&(U=s.initialGridState.filter?.filterModel||{});const ee=await z(A.api,A.colDef,A.column,U);A.success([...ee,""])}:null,u=A=>{const U=A.node,ee=A.column?.getColId();return!U.group||!ee?!1:N.value.some(me=>{if(me.field===ee)return!0})},g=(()=>{const A={suppressHeaderFilterButton:!0,editable:!1,sortable:!0,suppressHeaderMenuButton:!0,suppressColumnsToolPanel:!0,minWidth:200,flex:1,headerComponent:$g,cellDataType:!1,tooltipComponent:e_,cellRendererSelector:U=>{if(u(U))return{component:yH,params:U};if(!U.column?.getColDef().cellRenderer&&s.displayRowNumber&&y.value.length===0){const ee=U.api.getAllDisplayedColumns()||[],me=U.column;if(ee.findIndex(Je=>Je===me)===0)return{component:QV,params:U}}}};return d&&c&&(A.filterParams={values:c}),A})(),p=h.ref(void 0),f={name:"Column Filter",icon:'<span class="ag-icon ag-icon-filter"></span>',action:function(A){let U=A.column?.getColId();if(A.column&&Se(A.column)&&(U=I.value?.getColId()||""),!he(U)){const me=A.api.getColumn(U)?.getColDef();me&&(w.value=me,h.nextTick(()=>{he(U)}))}}},m=(A,U)=>{const ee={...A};return U.isArrayField&&!A.valueFormatter?ee.valueFormatter=me=>cV(me,U.dataType):U.dataType===vt.Percent&&!A.valueFormatter?ee.valueFormatter=me=>lV(me,U.valueDecimals||0):U.dataType===vt.Currency&&!A.valueFormatter?ee.valueFormatter=me=>aV(me,U.valueDecimals||0):U.dataType===vt.Integer&&!A.valueFormatter?ee.valueFormatter=dV:U.dataType===vt.Tag&&!A.cellRenderer&&(ee.cellRenderer=qV),ee},C=h.computed(()=>!s.colDefs||s.colDefs.length===0?[]:s.colDefs.map(A=>{const U=A.context;return U?m(A,U):A})),w=h.ref(null),y=h.ref([]),b=h.ref(!1),x=h.computed(()=>{if(y.value.length>0){const A=y.value[0],U=C.value.find(me=>me.field===A);if((!v.value||!v.value[A])&&U?.context?.filterRequiredToGroup)return U.headerName}return null}),M=h.computed(()=>(!v.value||Object.keys(v.value).length===0)&&s.requireFiltersToShowData?!1:x.value===null),P=h.computed(()=>x.value?`Select at least one value for "${x.value}" to view data.`:"Select a filter to view data."),k=h.shallowRef(null),S=h.ref([]),{filterModel:v,filterValuesLoadingStatus:R,filterValueMap:F,filterValueSelectedMetadataMap:G,fetchFilterValues:z,filterStoreHandler:B}=Dl();B.value=s.filterValuesSetHandler,F.value=s.initialFilterValueMap||{};const H=h.ref(null),O=h.computed(()=>C.value.filter(A=>A.filter)),L=h.computed(()=>C.value.filter(A=>A.enableRowGroup)),N=h.computed(()=>C.value.filter(A=>A.aggFunc)),I=h.ref(null),K=h.ref({}),W=h.ref(1),Y=h.ref(0);h.provide("filterModel",v),h.provide("sortState",S),h.provide("gridApi",k),h.provide("columnDisplayOrder",H),h.provide("currentlyActiveFilter",w),h.provide("availableFilterColumns",O),h.provide("availableRowGroupColumns",L),h.provide("rowGroupColumnFields",y),h.provide("groupColumnCellValueColumn",I),h.provide("expandedRows",K),h.provide("firstDataRendered",b),h.provide("filterValuesLoadingStatus",R),h.provide("displayUnfilteredTableData",M),h.provide("currentPage",W),h.provide("totalPages",Y),h.provide(Bg,{focuses:h.ref([]),focusType:h.ref(null)});const $=A=>{if(k.value=A.api,s.initialGridState){const U=s.initialGridState.filter?.filterModel||null;U&&k.value.setFilterModel(U)}if(y.value.length>0){const U=y.value[0];I.value=A.api.getColumn(U),A.api.setColumnsVisible([U],!1)}H.value=A.api.getAllGridColumns(),W.value=A.api.paginationGetCurrentPage()+1,Y.value=A.api.paginationGetTotalPages(),l("grid-ready",A)},se=A=>{if(k.value){const U=A.api.getFilterModel();nn(v.value,U)||(v.value=U,l("filter-changed",A))}},fe=A=>{S.value=A.api?.getState()?.sort?.sortModel||[],l("sort-changed",A)},Se=A=>A.getColId()&&A.getColId().includes("ag-Grid-AutoColumn"),be=h.ref(!1),ne=async A=>{if(!k.value){console.error("Grid API not available");return}const U=A||{route:[],purge:!0};k.value.refreshServerSide(U)},le=()=>G.value,de=async()=>{if(be.value=!0,!k.value)return console.error("Grid API not available"),be.value=!1,null;try{const A=s.serverSideCsvHandler,U=k.value?.getState(),ee={rowGroupCols:[],valueCols:k.value?.getValueColumns().map(Me=>({id:Me.getId(),field:Me.getColDef().field,aggFunc:typeof Me.getColDef().aggFunc=="string"?Me.getColDef().aggFunc:void 0,displayName:Me.getColDef().headerName||Me.getColDef().field||""}))||[],filterModel:U?.filter?.filterModel||{},sortModel:U?.sort?.sortModel||[],pivotCols:[],pivotMode:!1,groupKeys:[],startRow:0,endRow:s.csvRowLimit};if(A){const Me={request:ee,parentNode:{},api:k.value,context:void 0,success:()=>{},fail:()=>{}};return await s.serverSideCsvHandler(Me),be.value=!1,null}const me=s.serverSideRowHandler;return me?await new Promise((Me,Je)=>{const at=k.value?.getState(),ei={request:ee,parentNode:{},api:k.value,context:void 0,success:an=>{const a_=k.value?.getRowGroupColumns().map(wt=>wt.getColDef().field).filter(wt=>!!wt)||[],l_=k.value?.getAllDisplayedColumns().map(wt=>wt.getColDef().field).filter(wt=>!!wt)||[],d_=k.value?.getValueColumns().map(wt=>wt.getColDef().field).filter(wt=>!!wt)||[],c_=Array.from(new Set([...a_,...l_,...d_])),u_=an.rowData.map(wt=>{const qg={};return c_.forEach(Xg=>{const Qg=wt[Xg];qg[Xg]=Qg!=null?String(Qg):null}),qg}),h_=yM.unparse(u_);be.value=!1,Me(h_)},fail:()=>{be.value=!1,Je("CSV export failed.")}};me(ei,!0)}):(console.warn("Client-side export does not return CSV string"),be.value=!1,k.value.exportDataAsCsv(),null)}catch(A){return console.error("CSV export failed",A),be.value=!1,null}},Q=A=>{const U=I.value,ee=A.api.getRowGroupColumns();y.value=[...ee].map(Je=>Je.getColId());const me=ee.length>0?ee[0]:null;me?(I.value=me,X.value.headerName=me.getColDef().headerName,X.value.headerComponent=$g,X.value.context={dataType:I.value?.getColDef().context?.dataType||null},A.api.setColumnsVisible([me.getColId()],!1)):(I.value=null,X.value.headerName="",X.value.headerComponent=void 0,X.value.context=null);const Me=U?.getColId();(!me||Me!==me.getColId())&&A.api.setColumnsVisible([Me||""],!0),l("column-row-group-changed",A)},ye=A=>{const U=A.column?.getColId()||"";if(U===I.value?.getColId()){A.api.setColumnsVisible([U],!1);return}},Fe=A=>{A.finished&&(H.value=A.api.getAllGridColumns()),l("column-moved",A)},Re=A=>{A.api&&(W.value=A.api.paginationGetCurrentPage()+1,Y.value=A.api.paginationGetTotalPages())},xe=A=>"allChildrenRowCount"in A&&A.allChildrenRowCount||0,he=A=>{const U=document.querySelector(`[data-horizontal-filter-field="${A}"]`);if(U){const ee=U.querySelector("button");if(ee)return ee.click(),!0}return!1},Ue=h.ref(dH),T=h.ref({loadingMessage:"One moment please..."}),X=h.ref({headerName:"",minWidth:200,suppressMovable:!0,sortable:!1,pinned:"left",headerComponent:void 0,cellRendererParams:{suppressCount:!0,innerRenderer:mH,innerRendererParams:A=>({displayBaseAggregationsOnly:s.displayBaseAggregationsOnly,displayRowNumber:s.displayRowNumber,displayCount:s.displayGroupCount,formattedValue:A.valueFormatted,rowNode:A.node,api:k.value})}}),J=A=>{if(A.node.group)return{backgroundColor:"#F7F8F8"}},Oe={Median:A=>{const U=A.values;if(A.rowNode.leafGroup){const Me=Og(U);return{values:U,value:Me}}const ee=A.values.flatMap(Me=>Me.values||[]),me=Og(ee);return{values:ee,value:me}}};h.onBeforeMount(()=>{const A=Array.isArray(s.rowData)&&s.rowData.length>0,U=typeof s.serverSideRowHandler=="function",ee=typeof s.filterValuesSetHandler=="function";(A&&U||A&&ee)&&console.warn("Only one of `rowData` or `serverSideRowHandler + hasFilterValuesSetHandler` params should be provided to PvDataTable, not both."),p.value=me=>{const Me=["sortAscending","sortDescending","sortUnSort","rowUnGroup","valueAggSubMenu"],Je=me.column&&Se(me.column)?I.value:me.column;return Je&&Je.getColDef().filter&&Me.splice(2,0,f),Me.filter(at=>typeof at=="string"?me.defaultItems.includes(at):!0)}});const je=A=>{const U=k.value;if(!U)return;const ee=A.filter?.filterModel||null,me=A.rowGroup?.groupColIds||null,Me=A.columnVisibility||null;ee&&!nn(ee,ee.value)&&U.setFilterModel(ee),me&&!nn(me,y.value)&&U.setRowGroupColumns(me),Me&&!nn(Me,H.value)&&U.setColumnsVisible(Me.hiddenColIds,!1)};h.watch(()=>s.initialGridState,()=>{s.initialGridState&&je(s.initialGridState)},{deep:!0}),h.onMounted(()=>{s.initialGridState&&(v.value=s.initialGridState.filter?.filterModel||null,y.value=s.initialGridState.rowGroup?.groupColIds||[])});const fo=A=>{b.value=!0,l("first-data-rendered",A)};t({getCsvData:de,refreshData:ne,getFilterValueSelectedMetadataMap:le});const Ve=A=>d?A.rowNode.level===y.value.length-2:!1,Mt=h.computed(()=>{if(!d)return s.groupDefaultExpanded});return(A,U)=>(h.openBlock(),h.createElementBlock("div",{class:"pv-full-width",style:h.normalizeStyle(n.value)},[h.createElementVNode("div",t_,[h.createElementVNode("div",o_,[O.value.length>0?(h.openBlock(),h.createBlock(nV,{key:0,"enable-focus-view":A.enableFocusView,"enable-vertical-panel":A.enableVerticalFilterPanel,"display-preferences-icon":A.displayPreferencesIcon,onHandleSettingsIcon:U[0]||(U[0]=ee=>A.$emit("handle-settings-icon",ee))},null,8,["enable-focus-view","enable-vertical-panel","display-preferences-icon"])):h.createCommentVNode("",!0),h.createElementVNode("div",i_,[A.enableGroupBySelector&&A.rowGroupLimit!==0?(h.openBlock(),h.createBlock(sH,{key:0,rowGroupLimit:A.rowGroupLimit,enableFocusView:A.enableFocusView},null,8,["rowGroupLimit","enableFocusView"])):h.createCommentVNode("",!0),A.enableCsvExport?(h.openBlock(),h.createBlock(vV,{key:1,getCsvData:de})):h.createCommentVNode("",!0)])])]),h.createElementVNode("div",{class:h.normalizeClass(["pv-relative pv-stack-8",A.hideTable?"pv-hide":""]),style:{width:"100%",height:"90%","border-bottom":"1px solid #d2d7db"}},[h.createVNode(h.unref(Jx),h.mergeProps({ref:"gridRef",style:{width:"100%",height:"100%"}},h.unref(d)?{serverSideDatasource:h.unref(d)}:{},{onColumnMoved:Fe,onColumnRowGroupChanged:Q,onColumnVisible:ye,onFilterChanged:se,onFilterOpened:U[1]||(U[1]=ee=>l("filter-opened",ee)),onFirstDataRendered:fo,onGridReady:$,onPaginationChanged:Re,onSortChanged:fe,aggFuncs:Oe,autoGroupColumnDef:X.value,columnDefs:C.value,debug:A.debugMode,defaultColDef:h.unref(g),getChildCount:xe,getMainMenuItems:p.value,getRowStyle:J,groupDefaultExpanded:Mt.value,groupDisplayType:"singleColumn",initialState:A.initialGridState,isGroupOpenByDefault:h.unref(d)?void 0:s.isClientSideGroupOpenByDefault,isServerSideGroupOpenByDefault:Ve,loading:h.unref(d)?!1:A.isLoading,loadingCellRenderer:Ue.value,loadingCellRendererParams:T.value,maxConcurrentDatasourceRequests:h.unref(d)?10:void 0,modules:i,rowData:A.rowData,rowHeight:A.rowHeight,rowModelType:h.unref(d)?"serverSide":"clientSide",serverSideInitialRowCount:h.unref(d)?1:void 0,showOpenedGroup:!0,suppressAggFuncInHeader:!0,suppressColumnMoveAnimation:!0,suppressDragLeaveHidesColumns:!0,serverSideSortAllLevels:!1,serverSideEnableClientSideSort:!1,theme:a.value,pagination:A.pagination,suppressPaginationPanel:!0,paginationPageSize:A.paginationPageSize,suppressScrollOnNewData:!0,"tooltip-show-delay":A.tooltipShowDelay,"tooltip-hide-delay":A.tooltipHideDelay}),null,16,["autoGroupColumnDef","columnDefs","debug","defaultColDef","getMainMenuItems","groupDefaultExpanded","initialState","isGroupOpenByDefault","loading","loadingCellRenderer","loadingCellRendererParams","maxConcurrentDatasourceRequests","rowData","rowHeight","rowModelType","serverSideInitialRowCount","theme","pagination","paginationPageSize","tooltip-show-delay","tooltip-hide-delay"]),M.value?h.createCommentVNode("",!0):(h.openBlock(),h.createElementBlock("div",r_,[h.createElementVNode("p",s_,h.toDisplayString(P.value),1)]))],2),A.pagination?(h.openBlock(),h.createBlock(bV,{key:0})):h.createCommentVNode("",!0)],4))}});Ao.PvDataTable=n_,Object.defineProperty(Ao,Symbol.toStringTag,{value:"Module"})});