From 3cd2ff775e5a490e28f146dfca3ba8acb63babb2 Mon Sep 17 00:00:00 2001 From: Naman Jain Date: Wed, 13 Mar 2024 16:49:13 -0700 Subject: [PATCH] nit --- build/asset-manifest.json | 6 +++--- build/leaderboard.html | 2 +- build/static/js/{main.3e1eccc3.js => main.32895ddd.js} | 6 +++--- ...3e1eccc3.js.LICENSE.txt => main.32895ddd.js.LICENSE.txt} | 0 .../js/{main.3e1eccc3.js.map => main.32895ddd.js.map} | 2 +- src/LeaderboardComp.tsx | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) rename build/static/js/{main.3e1eccc3.js => main.32895ddd.js} (59%) rename build/static/js/{main.3e1eccc3.js.LICENSE.txt => main.32895ddd.js.LICENSE.txt} (100%) rename build/static/js/{main.3e1eccc3.js.map => main.32895ddd.js.map} (96%) diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 1390e12..5be9234 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "./static/css/main.10eb9168.css", - "main.js": "./static/js/main.3e1eccc3.js", + "main.js": "./static/js/main.32895ddd.js", "index.html": "./index.html", "main.10eb9168.css.map": "./static/css/main.10eb9168.css.map", - "main.3e1eccc3.js.map": "./static/js/main.3e1eccc3.js.map" + "main.32895ddd.js.map": "./static/js/main.32895ddd.js.map" }, "entrypoints": [ "static/css/main.10eb9168.css", - "static/js/main.3e1eccc3.js" + "static/js/main.32895ddd.js" ] } \ No newline at end of file diff --git a/build/leaderboard.html b/build/leaderboard.html index e32e236..22ee8a0 100644 --- a/build/leaderboard.html +++ b/build/leaderboard.html @@ -1 +1 @@ -LiveCodeBench Leaderboard
\ No newline at end of file +LiveCodeBench Leaderboard
\ No newline at end of file diff --git a/build/static/js/main.3e1eccc3.js b/build/static/js/main.32895ddd.js similarity index 59% rename from build/static/js/main.3e1eccc3.js rename to build/static/js/main.32895ddd.js index 1ce62f0..e32c6f2 100644 --- a/build/static/js/main.3e1eccc3.js +++ b/build/static/js/main.32895ddd.js @@ -1,3 +1,3 @@ -/*! For license information please see main.3e1eccc3.js.LICENSE.txt */ -(()=>{"use strict";var e={520:(e,t,d)=>{function a(e){return null==e||""===e?null:e}function s(e,t){return void 0===t&&(t=!1),null!=e&&(""!==e||t)}function o(e){return!s(e)}function i(e){return null==e||0===e.length}function l(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function r(e){if(void 0!==e){if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;var t=parseInt(e,10);return isNaN(t)?void 0:t}}function m(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"===typeof e?e:/true/i.test(e))}function n(e,t){return(e?JSON.stringify(e):null)===(t?JSON.stringify(t):null)}function u(e){if(e instanceof Set||e instanceof Map){var t=[];return e.forEach((function(e){return t.push(e)})),t}return Object.values(e)}d.r(t),d.d(t,{AbstractHeaderCellCtrl:()=>eu,AgAbstractField:()=>Ks,AgAbstractLabel:()=>zs,AgAutocomplete:()=>fc,AgCheckbox:()=>ro,AgDialog:()=>Xf,AgGroupComponent:()=>Ef,AgInputDateField:()=>rf,AgInputNumberField:()=>Ro,AgInputRange:()=>nf,AgInputTextArea:()=>of,AgInputTextField:()=>Eo,AgMenuItemComponent:()=>jf,AgMenuList:()=>xf,AgMenuPanel:()=>Nf,AgPanel:()=>Kf,AgPickerField:()=>$s,AgPromise:()=>us,AgPromiseStatus:()=>ss,AgRadioButton:()=>no,AgRichSelect:()=>Df,AgSelect:()=>ao,AgSlider:()=>Mf,AgStackComponentsRegistry:()=>Rt,AgToggleButton:()=>af,AlignedGridsService:()=>Oc,AllCommunityModules:()=>sq,AnimateShowChangeCellRenderer:()=>Di,AnimateSlideCellRenderer:()=>Mi,AnimationFrameService:()=>_p,AutoScrollService:()=>or,AutoWidthCalculator:()=>Tp,Autowired:()=>de,BarColumnLabelPlacement:()=>HC,BaseComponentWrapper:()=>KC,BaseCreator:()=>Nb,BaseGridSerializingSession:()=>kb,Bean:()=>te,BeanStub:()=>ze,Beans:()=>sm,BodyDropPivotTarget:()=>Ln,BodyDropTarget:()=>Fn,CHART_TOOLBAR_ALLOW_LIST:()=>$C,CHART_TOOL_PANEL_ALLOW_LIST:()=>QC,CHART_TOOL_PANEL_MENU_OPTIONS:()=>XC,CellComp:()=>Sn,CellCtrl:()=>bm,CellNavigationService:()=>hc,CellPositionUtils:()=>dy,CellRangeType:()=>zr,ChangedPath:()=>Hp,CheckboxCellEditor:()=>Il,CheckboxCellRenderer:()=>Sl,CheckboxSelectionComponent:()=>Ai,ClientSideRowModelModule:()=>Bb,ClientSideRowModelSteps:()=>Ku,ColDefUtil:()=>er,Column:()=>ce,ColumnApi:()=>Lc,ColumnFactory:()=>Qe,ColumnGroup:()=>Xe,ColumnKeyCreator:()=>f,ColumnModel:()=>qt,ColumnUtils:()=>Tt,Component:()=>hs,ComponentUtil:()=>Lt,Context:()=>X,CssClassApplier:()=>cm,CssClassManager:()=>Cs,CsvCreator:()=>Yb,CsvExportModule:()=>Jb,CtrlsService:()=>Oy,CustomTooltipFeature:()=>ys,DEFAULT_CHART_GROUPS:()=>YC,DataTypeService:()=>pC,DateCellEditor:()=>Cl,DateFilter:()=>go,DateStringCellEditor:()=>hl,DisplayedGroupCreator:()=>Ot,Downloader:()=>Hb,DragAndDropService:()=>Hi,DragService:()=>sr,DragSourceType:()=>xi,Environment:()=>A_,EventService:()=>me,Events:()=>Je,ExcelFactoryMode:()=>ki,ExpansionService:()=>qp,ExpressionService:()=>Fc,FilterManager:()=>Pr,FloatingFilterMapper:()=>$l,FocusService:()=>m_,GROUP_AUTO_COLUMN_ID:()=>dt,Grid:()=>jC,GridApi:()=>fr,GridBodyComp:()=>mn,GridBodyCtrl:()=>Kr,GridComp:()=>e_,GridCoreCreator:()=>UC,GridCtrl:()=>Xc,GridHeaderComp:()=>ep,GridHeaderCtrl:()=>Xu,GridOptionsService:()=>Jy,GridSerializer:()=>Xb,GroupCellRenderer:()=>dl,GroupCellRendererCtrl:()=>Zi,GroupInstanceIdCreator:()=>Ze,HeaderCellCtrl:()=>Pu,HeaderFilterCellComp:()=>Or,HeaderFilterCellCtrl:()=>mu,HeaderGroupCellCtrl:()=>Gu,HeaderNavigationDirection:()=>Qn,HeaderNavigationService:()=>Yu,HeaderPositionUtils:()=>_y,HeaderRowComp:()=>$n,HeaderRowContainerComp:()=>ju,HeaderRowContainerCtrl:()=>Nu,HeaderRowCtrl:()=>Ru,HeaderRowType:()=>Gn,HorizontalDirection:()=>No,HorizontalResizeService:()=>ap,InfiniteRowModelModule:()=>Fb,KeyCode:()=>Ka,LargeTextCellEditor:()=>yi,LayoutCssClasses:()=>pr,LocaleService:()=>tC,Logger:()=>Yc,LoggerFactory:()=>Kc,ManagedFocusFeature:()=>Es,ModuleNames:()=>j,ModuleRegistry:()=>Y,MouseEventService:()=>_n,MoveColumnFeature:()=>An,NavigationService:()=>qn,NumberCellEditor:()=>cl,NumberFilter:()=>ko,NumberSequence:()=>rs,Optional:()=>ae,PaginationProxy:()=>Jp,PinnedRowModel:()=>Np,PopupComponent:()=>fi,PopupEditorWrapper:()=>Tn,PopupService:()=>oc,PositionableFeature:()=>Ws,PostConstruct:()=>Z,PreConstruct:()=>J,PreDestroy:()=>ee,PropertyKeys:()=>Bt,ProvidedColumnGroup:()=>ye,ProvidedFilter:()=>ks,Qualifier:()=>oe,QuerySelector:()=>Ts,RefSelector:()=>gs,ResizeObserverService:()=>pp,RowAnimationCssClasses:()=>Er,RowContainerComp:()=>Mn,RowContainerCtrl:()=>sn,RowContainerName:()=>gm,RowContainerType:()=>Sm,RowCtrl:()=>vm,RowHighlightPosition:()=>tr,RowNode:()=>Li,RowNodeBlock:()=>zp,RowNodeBlockLoader:()=>Qp,RowNodeSorter:()=>Ty,RowPositionUtils:()=>Z_,RowRenderer:()=>Ep,RowType:()=>rb,ScalarFilter:()=>Co,ScrollVisibleService:()=>pn,SelectCellEditor:()=>qi,SelectableService:()=>j_,SelectionHandleType:()=>jr,ServerSideTransactionResultStatus:()=>yp,SetLeftFeature:()=>au,SimpleFilter:()=>_o,SortController:()=>o_,SortIndicatorComp:()=>oi,StandardMenuFactory:()=>ip,StylingService:()=>tf,TabGuardClassNames:()=>kp,TabGuardComp:()=>hf,TabGuardCtrl:()=>Cf,TabbedLayout:()=>mp,TemplateService:()=>Hc,TextCellEditor:()=>Oi,TextFilter:()=>Uo,TextFloatingFilter:()=>ti,Timer:()=>ps,TooltipFeature:()=>dm,TouchListener:()=>di,UserComponentFactory:()=>Zl,UserComponentRegistry:()=>wl,ValueCache:()=>h_,ValueFormatterService:()=>xp,ValueParserService:()=>_C,ValueService:()=>Rc,VanillaFrameworkOverrides:()=>yc,VerticalDirection:()=>Fo,VirtualList:()=>Sf,VirtualListDragFeature:()=>mr,XmlFactory:()=>eq,ZipContainer:()=>aq,_:()=>ls,__FORCE_MODULE_DETECTION:()=>JC,createGrid:()=>kC,getRowContainerTypeForName:()=>tn});var p=Object.freeze({__proto__:null,makeNull:a,exists:s,missing:o,missingOrEmpty:i,toStringOrNull:l,attrToNumber:r,attrToBoolean:m,attrToString:function(e){if(null!=e&&""!==e)return e},jsonEquals:n,defaultComparator:function(e,t,d){void 0===d&&(d=!1);var a=null==e,s=null==t;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),a&&s)return 0;if(a)return-1;if(s)return 1;function o(e,t){return e>t?1:e=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i};function y(e,t){var d,a;if(null!=e)if(Array.isArray(e))for(var s=0;s=0)){var s=d[e],o=I(s)&&s.constructor===Object;a[e]=o?b(s):s}})),a}}function q(e,t){return e[t]}function P(e,t,d){e[t]=d}function h(e,t,d,a){var s=q(e,d);void 0!==s&&P(t,d,a?a(s):s)}function T(e){var t={};return e.filter((function(e){return null!=e})).forEach((function(e){Object.keys(e).forEach((function(e){return t[e]=null}))})),Object.keys(t)}function g(e){if(!e)return[];var t=Object;if("function"===typeof t.values)return t.values(e);var d=[];for(var a in e)e.hasOwnProperty(a)&&e.propertyIsEnumerable(a)&&d.push(e[a]);return d}function S(e,t,d,a){void 0===d&&(d=!0),void 0===a&&(a=!1),s(t)&&y(t,(function(t,s){var o=e[t];if(o!==s){if(a)if(null==o&&null!=s)"object"===typeof s&&s.constructor===Object&&(o={},e[t]=o);I(s)&&I(o)&&!Array.isArray(o)?S(o,s,d,a):(d||void 0!==s)&&(e[t]=s)}}))}function O(e,t,d){if(t&&e){if(!d)return e[t];for(var a=t.split("."),s=e,o=0;o1;)if(null==(s=s[a.shift()]))return d;var o=s[a[0]];return null!=o?o:d},set:function(e,t,d){if(null!=e){var a=t.split("."),s=e;a.forEach((function(e,t){s[e]||(s[e]={}),t0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),t)}function F(e,t){var d;return function(){for(var a=[],s=0;sd;(e()||l)&&(t(),i=!0,null!=o&&(window.clearInterval(o),o=null),l&&a&&console.warn(a))};l(),i||(o=window.setInterval(l,10))}function H(e){e&&e()}var j,z=Object.freeze({__proto__:null,doOnce:G,warnOnce:M,errorOnce:w,getFunctionName:L,isFunction:E,executeInAWhile:V,executeNextVMTurn:x,executeAfter:W,debounce:F,throttle:N,waitUntil:k,compose:function(){for(var e=[],t=0;t0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},K=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s<\/script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise");else if(e.moduleBased||void 0===e.moduleBased){var l=null===(s=Object.entries(j).find((function(e){var d=U(e,2);return d[0],d[1]===t})))||void 0===s?void 0:s[0];o="AG Grid: unable to use ".concat(d," as the ").concat(l," is not registered").concat(e.areGridScopedModules?" for gridId: ".concat(a):"",". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ").concat(l," } from '").concat(t,"';\n \n ModuleRegistry.registerModules([ ").concat(l," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else o="AG Grid: unable to use ".concat(d," as package 'ag-grid-enterprise' has not been imported. Check that you have imported the package:\n \n import 'ag-grid-enterprise';\n \nFor more info see: https://www.ag-grid.com/javascript-grid/packages/");return G((function(){console.warn(o)}),i),!1},e.__isRegistered=function(t,d){var a;return!!e.globalModulesMap[t]||!!(null===(a=e.gridModulesMap[d])||void 0===a?void 0:a[t])},e.__getRegisteredModules=function(t){return K(K([],U(u(e.globalModulesMap)),!1),U(u(e.gridModulesMap[t]||{})),!1)},e.__getGridRegisteredModules=function(t){var d;return u(null!==(d=e.gridModulesMap[t])&&void 0!==d?d:{})||[]},e.__isPackageBased=function(){return!e.moduleBased},e.globalModulesMap={},e.gridModulesMap={},e.areGridScopedModules=!1,e}(),Q=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},$=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s> creating ag-Application Context"),this.createBeans();var d=this.getBeanInstances();this.wireBeans(d),this.logger.log(">> ag-Application Context ready - component is alive")}}return e.prototype.getBeanInstances=function(){return u(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,t){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],t),e},e.prototype.wireBeans=function(e,t){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),s(t)&&e.forEach(t),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),y(this.beanWrappers,(function(t,d){var a;d.bean.__agBeanMetaData&&d.bean.__agBeanMetaData.autowireMethods&&d.bean.__agBeanMetaData.autowireMethods.agConstructor&&(a=d.bean.__agBeanMetaData.autowireMethods.agConstructor);var s=e.getBeansForParameters(a,d.bean.name),o=new(d.bean.bind.apply(d.bean,$([null],Q(s),!1)));d.beanInstance=o}));var t=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(t))},e.prototype.createBeanWrapper=function(e){var t=e.__agBeanMetaData;if(!t){var d=void 0;return d=e.prototype.constructor?L(e.prototype.constructor):""+e,void console.error("Context item ".concat(d," is not a bean"))}var a={bean:e,beanInstance:null,beanName:t.beanName};this.beanWrappers[t.beanName]=a},e.prototype.autoWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(d,a){var s=d.agClassAttributes;s&&s.forEach((function(d){var s=t.lookupBeanInstance(a,d.beanName,d.optional);e[d.attributeName]=s}))}))}))},e.prototype.methodWireBeans=function(e){var t=this;e.forEach((function(e){t.forEachMetaDataInHierarchy(e,(function(d,a){y(d.autowireMethods,(function(d,s){if("agConstructor"!==d){var o=t.getBeansForParameters(s,a);e[d].apply(e,o)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,t){for(var d=Object.getPrototypeOf(e);null!=d;){var a=d.constructor;if(a.hasOwnProperty("__agBeanMetaData"))t(a.__agBeanMetaData,this.getBeanName(a));d=Object.getPrototypeOf(d)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var t=e.toString();return t.substring(9,t.indexOf("("))},e.prototype.getBeansForParameters=function(e,t){var d=this,a=[];return e&&y(e,(function(e,s){var o=d.lookupBeanInstance(t,s);a[Number(e)]=o})),a},e.prototype.lookupBeanInstance=function(e,t,d){if(void 0===d&&(d=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(t," is used after the grid is destroyed!")),null;if("context"===t)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(t))return this.contextParams.providedBeanInstances[t];var a=this.beanWrappers[t];return a?a.beanInstance:(d||console.error("AG Grid: unable to find bean reference ".concat(t," while initialising ").concat(e)),null)},e.prototype.callLifeCycleMethods=function(e,t){var d=this;e.forEach((function(e){return d.callLifeCycleMethodsOnBean(e,t)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,t,d){var a={};this.forEachMetaDataInHierarchy(e,(function(e){var s=e[t];s&&s.forEach((function(e){e!=d&&(a[e]=!0)}))})),Object.keys(a).forEach((function(t){return e[t]()}))},e.prototype.getBean=function(e){return this.lookupBeanInstance("getBean",e,!0)},e.prototype.destroy=function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var e=this.getBeanInstances();this.destroyBeans(e),this.contextParams.providedBeanInstances=null,Y.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}},e.prototype.destroyBean=function(e){e&&this.destroyBeans([e])},e.prototype.destroyBeans=function(e){var t=this;return e?(e.forEach((function(e){t.callLifeCycleMethodsOnBean(e,"preDestroyMethods","destroy");var d=e;"function"===typeof d.destroy&&d.destroy()})),[]):[]},e.prototype.isDestroyed=function(){return this.destroyed},e.prototype.getGridId=function(){return this.contextParams.gridId},e}();function J(e,t,d){var a=ie(e.constructor);a.preConstructMethods||(a.preConstructMethods=[]),a.preConstructMethods.push(t)}function Z(e,t,d){var a=ie(e.constructor);a.postConstructMethods||(a.postConstructMethods=[]),a.postConstructMethods.push(t)}function ee(e,t,d){var a=ie(e.constructor);a.preDestroyMethods||(a.preDestroyMethods=[]),a.preDestroyMethods.push(t)}function te(e){return function(t){ie(t).beanName=e}}function de(e){return function(t,d,a){se(t,e,!1,t,d,null)}}function ae(e){return function(t,d,a){se(t,e,!0,t,d,null)}}function se(e,t,d,a,s,o){if(null!==t)if("number"!==typeof o){var i=ie(e.constructor);i.agClassAttributes||(i.agClassAttributes=[]),i.agClassAttributes.push({attributeName:s,beanName:t,optional:d})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function oe(e){return function(t,d,a){var s,o="function"==typeof t?t:t.constructor;if("number"===typeof a){var i=void 0;d?(s=ie(o),i=d):(s=ie(o),i="agConstructor"),s.autowireMethods||(s.autowireMethods={}),s.autowireMethods[i]||(s.autowireMethods[i]={}),s.autowireMethods[i][a]=e}}}function ie(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var le=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},re=function(e,t){return function(d,a){t(d,a,e)}},me=function(){function e(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return e.prototype.setBeans=function(e,t,d,a,s){if(void 0===a&&(a=null),void 0===s&&(s=null),this.frameworkOverrides=d,this.gridOptionsService=t,a){var o=t.useAsyncEvents();this.addGlobalListener(a,o)}s&&this.addGlobalListener(s,!1)},e.prototype.getListeners=function(e,t,d){var a=t?this.allAsyncListeners:this.allSyncListeners,s=a.get(e);return!s&&d&&(s=new Set,a.set(e,s)),s},e.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},e.prototype.addEventListener=function(e,t,d){void 0===d&&(d=!1),this.getListeners(e,d,!0).add(t)},e.prototype.removeEventListener=function(e,t,d){void 0===d&&(d=!1);var a=this.getListeners(e,d,!1);a&&(a.delete(t),0===a.size&&(d?this.allAsyncListeners:this.allSyncListeners).delete(e))},e.prototype.addGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,t){void 0===t&&(t=!1),(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){var t=e;if(this.gridOptionsService){var d=this.gridOptionsService,a=d.api,s=d.columnApi,o=d.context;t.api=a,t.columnApi=s,t.context=o}this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,t){var d,a=this,s=e.type;if(t&&"event"in e){var o=e.event;o instanceof Event&&(e.eventPath=o.composedPath())}var i=null!==(d=this.getListeners(s,t,!1))&&void 0!==d?d:new Set,l=new Set(i);l.size>0&&function(d,s){d.forEach((function(d){s.has(d)&&(t?a.dispatchAsync((function(){return d(e)})):d(e))}))}(l,i),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(d){t?a.dispatchAsync((function(){return a.frameworkOverrides.dispatchEvent(s,(function(){return d(s,e)}),!0)})):a.frameworkOverrides.dispatchEvent(s,(function(){return d(s,e)}),!0)}))},e.prototype.dispatchAsync=function(e){this.asyncFunctionsQueue.push(e),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},e.prototype.flushAsyncQueue=function(){this.scheduled=!1;var e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach((function(e){return e()}))},le([re(0,oe("loggerFactory")),re(1,oe("gridOptionsService")),re(2,oe("frameworkOverrides")),re(3,oe("globalEventListener")),re(4,oe("globalSyncEventListener"))],e.prototype,"setBeans",null),e=le([te("eventService")],e)}(),ne=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ue={resizable:!0,sortable:!0},pe=0;function fe(){return pe++}var ce=function(){function e(e,t,d,a){this.instanceId=fe(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new me,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=t,this.colId=d,this.primary=a,this.setState(e)}return e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setState=function(e){void 0!==e.sort?"asc"!==e.sort&&"desc"!==e.sort||(this.sort=e.sort):"asc"!==e.initialSort&&"desc"!==e.initialSort||(this.sort=e.initialSort);var t=e.sortIndex,d=e.initialSortIndex;void 0!==t?null!==t&&(this.sortIndex=t):null!==d&&(this.sortIndex=d);var a=e.hide,s=e.initialHide;this.visible=void 0!==a?!a:!s,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var o=e.flex,i=e.initialFlex;void 0!==o?this.flex=o:void 0!==i&&(this.flex=i)},e.prototype.setColDef=function(e,t,d){void 0===d&&(d="api"),this.colDef=e,this.userProvidedColDef=t,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",d))},e.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},e.prototype.setParent=function(e){this.parent=e},e.prototype.getParent=function(){return this.parent},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip()},e.prototype.initDotNotation=function(){var e=this.gridOptionsService.get("suppressFieldDotNotation");this.fieldContainsDots=s(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=s(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!e},e.prototype.initMinAndMaxWidths=function(){var e=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(e),this.maxWidth=this.columnUtils.calculateColMaxWidth(e)},e.prototype.initTooltip=function(){this.tooltipEnabled=s(this.colDef.tooltipField)||s(this.colDef.tooltipValueGetter)||s(this.colDef.tooltipComponent)},e.prototype.resetActualWidth=function(e){void 0===e&&(e="api");var t=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(o(this.colDef)||o(this.colDef.showRowGroup))return!1;var t=!0===this.colDef.showRowGroup,d=this.colDef.showRowGroup===e;return t||d},e.prototype.isPrimary=function(){return this.primary},e.prototype.isFilterAllowed=function(){return!!this.colDef.filter},e.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},e.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},e.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},e.prototype.addEventListener=function(e,t){this.eventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventService.removeEventListener(e,t)},e.prototype.createColumnFunctionCallbackParams=function(e){return{node:e,data:e.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},e.prototype.isSuppressNavigable=function(e){if("boolean"===typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"===typeof this.colDef.suppressNavigable){var t=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(t)}return!1},e.prototype.isCellEditable=function(e){return!(e.group&&!this.gridOptionsService.get("enableGroupEdit"))&&this.isColumnFunc(e,this.colDef.editable)},e.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},e.prototype.isAutoHeight=function(){return!!this.colDef.autoHeight},e.prototype.isAutoHeaderHeight=function(){return!!this.colDef.autoHeaderHeight},e.prototype.isRowDrag=function(e){return this.isColumnFunc(e,this.colDef.rowDrag)},e.prototype.isDndSource=function(e){return this.isColumnFunc(e,this.colDef.dndSource)},e.prototype.isCellCheckboxSelection=function(e){return this.isColumnFunc(e,this.colDef.checkboxSelection)},e.prototype.isSuppressPaste=function(e){return this.isColumnFunc(e,this.colDef?this.colDef.suppressPaste:null)},e.prototype.isResizable=function(){return!!this.getColDefValue("resizable")},e.prototype.getColDefValue=function(e){var t;return null!==(t=this.colDef[e])&&void 0!==t?t:ue[e]},e.prototype.isColumnFunc=function(e,t){return"boolean"===typeof t?t:"function"===typeof t&&t(this.createColumnFunctionCallbackParams(e))},e.prototype.setMoving=function(e,t){void 0===t&&(t="api"),this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",t))},e.prototype.createColumnEvent=function(e,t){return{type:e,column:this,columns:[this],source:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},e.prototype.isMoving=function(){return this.moving},e.prototype.getSort=function(){return this.sort},e.prototype.setSort=function(e,t){void 0===t&&(t="api"),this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",t))),this.dispatchStateUpdatedEvent("sort")},e.prototype.setMenuVisible=function(e,t){void 0===t&&(t="api"),this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",t)))},e.prototype.isMenuVisible=function(){return this.menuVisible},e.prototype.isSortable=function(){return!!this.getColDefValue("sortable")},e.prototype.isSortAscending=function(){return"asc"===this.sort},e.prototype.isSortDescending=function(){return"desc"===this.sort},e.prototype.isSortNone=function(){return o(this.sort)},e.prototype.isSorting=function(){return s(this.sort)},e.prototype.getSortIndex=function(){return this.sortIndex},e.prototype.setSortIndex=function(e){this.sortIndex=e,this.dispatchStateUpdatedEvent("sortIndex")},e.prototype.setAggFunc=function(e){this.aggFunc=e,this.dispatchStateUpdatedEvent("aggFunc")},e.prototype.getAggFunc=function(){return this.aggFunc},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.getRight=function(){return this.left+this.actualWidth},e.prototype.setLeft=function(e,t){void 0===t&&(t="api"),this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",t)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(e,t,d){void 0===t&&(t="api"),this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",t)));var a=this.createColumnEvent("filterChanged",t);d&&S(a,d),this.eventService.dispatchEvent(a)},e.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},e.prototype.setPinned=function(e){this.pinned=!0===e||"left"===e?"left":"right"===e?"right":null,this.dispatchStateUpdatedEvent("pinned")},e.prototype.setFirstRightPinned=function(e,t){void 0===t&&(t="api"),this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",t)))},e.prototype.setLastLeftPinned=function(e,t){void 0===t&&(t="api"),this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",t)))},e.prototype.isFirstRightPinned=function(){return this.firstRightPinned},e.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},e.prototype.isPinned=function(){return"left"===this.pinned||"right"===this.pinned},e.prototype.isPinnedLeft=function(){return"left"===this.pinned},e.prototype.isPinnedRight=function(){return"right"===this.pinned},e.prototype.getPinned=function(){return this.pinned},e.prototype.setVisible=function(e,t){void 0===t&&(t="api");var d=!0===e;this.visible!==d&&(this.visible=d,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",t))),this.dispatchStateUpdatedEvent("hide")},e.prototype.isVisible=function(){return this.visible},e.prototype.isSpanHeaderHeight=function(){var e=this.getColDef();return!e.suppressSpanHeaderHeight&&!e.autoHeaderHeight},e.prototype.getColDef=function(){return this.colDef},e.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},e.prototype.getColId=function(){return this.colId},e.prototype.getId=function(){return this.colId},e.prototype.getUniqueId=function(){return this.colId},e.prototype.getDefinition=function(){return this.colDef},e.prototype.getActualWidth=function(){return this.actualWidth},e.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},e.prototype.setAutoHeaderHeight=function(e){var t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t},e.prototype.createBaseColDefParams=function(e){return{node:e,data:e.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},e.prototype.getColSpan=function(e){if(o(this.colDef.colSpan))return 1;var t=this.createBaseColDefParams(e),d=this.colDef.colSpan(t);return Math.max(d,1)},e.prototype.getRowSpan=function(e){if(o(this.colDef.rowSpan))return 1;var t=this.createBaseColDefParams(e),d=this.colDef.rowSpan(t);return Math.max(d,1)},e.prototype.setActualWidth=function(e,t,d){void 0===t&&(t="api"),void 0===d&&(d=!1),null!=this.minWidth&&(e=Math.max(e,this.minWidth)),null!=this.maxWidth&&(e=Math.min(e,this.maxWidth)),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&"flex"!==t&&"gridInitializing"!==t&&(this.flex=null),d||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")},e.prototype.fireColumnWidthChangedEvent=function(e){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",e))},e.prototype.isGreaterThanMax=function(e){return null!=this.maxWidth&&e>this.maxWidth},e.prototype.getMinWidth=function(){return this.minWidth},e.prototype.getMaxWidth=function(){return this.maxWidth},e.prototype.getFlex=function(){return this.flex||0},e.prototype.setFlex=function(e){this.flex!==e&&(this.flex=e),this.dispatchStateUpdatedEvent("flex")},e.prototype.setMinimum=function(e){void 0===e&&(e="api"),s(this.minWidth)&&this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(e,t){void 0===t&&(t="api"),this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",t))),this.dispatchStateUpdatedEvent("rowGroup")},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(e,t){void 0===t&&(t="api"),this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",t))),this.dispatchStateUpdatedEvent("pivot")},e.prototype.isPivotActive=function(){return this.pivotActive},e.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},e.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},e.prototype.setValueActive=function(e,t){void 0===t&&(t="api"),this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",t)))},e.prototype.isValueActive=function(){return this.aggregationActive},e.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},e.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},e.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},e.prototype.getMenuTabs=function(e){var t=this.getColDef().menuTabs;return null==t&&(t=e),t},e.prototype.dispatchStateUpdatedEvent=function(t){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:t})},e.EVENT_MOVING_CHANGED="movingChanged",e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_WIDTH_CHANGED="widthChanged",e.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",e.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",e.EVENT_VISIBLE_CHANGED="visibleChanged",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_COL_DEF_CHANGED="colDefChanged",e.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",e.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_PIVOT_CHANGED="columnPivotChanged",e.EVENT_VALUE_CHANGED="columnValueChanged",e.EVENT_STATE_UPDATED="columnStateUpdated",ne([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),ne([de("columnUtils")],e.prototype,"columnUtils",void 0),ne([de("columnHoverService")],e.prototype,"columnHoverService",void 0),ne([Z],e.prototype,"initialise",null),e}(),_e=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ye=function(){function e(e,t,d,a){this.localEventService=new me,this.expandable=!1,this.instanceId=fe(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=t,this.expanded=!!e&&!!e.openByDefault,this.padding=d,this.level=a}return e.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},e.prototype.reset=function(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},e.prototype.getInstanceId=function(){return this.instanceId},e.prototype.setOriginalParent=function(e){this.originalParent=e},e.prototype.getOriginalParent=function(){return this.originalParent},e.prototype.getLevel=function(){return this.level},e.prototype.isVisible=function(){return!!this.children&&this.children.some((function(e){return e.isVisible()}))},e.prototype.isPadding=function(){return this.padding},e.prototype.setExpanded=function(t){this.expanded=void 0!==t&&t;var d={type:e.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(d)},e.prototype.isExpandable=function(){return this.expandable},e.prototype.isExpanded=function(){return this.expanded},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getId=function(){return this.getGroupId()},e.prototype.setChildren=function(e){this.children=e},e.prototype.getChildren=function(){return this.children},e.prototype.getColGroupDef=function(){return this.colGroupDef},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.addLeafColumns=function(t){this.children&&this.children.forEach((function(d){d instanceof ce?t.push(d):d instanceof e&&d.addLeafColumns(t)}))},e.prototype.getColumnGroupShow=function(){var e=this.colGroupDef;if(e)return e.columnGroupShow},e.prototype.setupExpandable=function(){var e=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var t=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(e){return e.addEventListener("visibleChanged",t)})),this.expandableListenerRemoveCallback=function(){e.getLeafColumns().forEach((function(e){return e.removeEventListener("visibleChanged",t)})),e.expandableListenerRemoveCallback=null}},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var t=!1,d=!1,a=!1,s=this.findChildrenRemovingPadding(),o=0,i=s.length;o=0&&(e[d]=e[e.length-1],e.pop())}function ge(e,t){var d=e.indexOf(t);d>=0&&e.splice(d,1)}function Se(e,t){for(var d=0;d-1}function Be(e){return[].concat.apply([],e)}function Ge(e,t){null!=t&&null!=e&&t.forEach((function(t){return e.push(t)}))}var Me=Object.freeze({__proto__:null,firstExistingValue:be,existsAndNotEmpty:function(e){return null!=e&&e.length>0},last:qe,areEqual:Pe,shallowCompare:function(e,t){return Pe(e,t)},sortNumerically:he,removeRepeatsFromArray:function(e,t){if(e)for(var d=e.length-2;d>=0;d--){var a=e[d]===t,s=e[d+1]===t;a&&s&&e.splice(d+1,1)}},removeFromUnorderedArray:Te,removeFromArray:ge,removeAllFromUnorderedArray:Se,removeAllFromArray:Oe,insertIntoArray:ve,insertArrayIntoArray:function(e,t,d){if(null!=e&&null!=t)for(var a=t.length-1;a>=0;a--){ve(e,t[a],d)}},moveInArray:Ie,includes:De,flatten:Be,pushAll:Ge,toStrings:function(e){return e.map(l)},forEachReverse:function(e,t){if(null!=e)for(var d=e.length-1;d>=0;d--)t(e[d],d)}}),we="__ag_Grid_Stop_Propagation",Le=["touchstart","touchend","touchmove","touchcancel","scroll"],Ee={};function Ve(e){e[we]=!0}function Re(e){return!0===e[we]}var Ae=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(t){if("boolean"===typeof Ee[t])return Ee[t];var d=document.createElement(e[t]||"div");return Ee[t="on"+t]=t in d}}();function xe(e,t,d){for(var a=t;a;){var s=e.getDomData(a,d);if(s)return s;a=a.parentElement}return null}function We(e,t){return!(!t||!e)&&Ne(t).indexOf(e)>=0}function Fe(e){for(var t=[],d=e.target;d;)t.push(d),d=d.parentElement;return t}function Ne(e){var t=e;return t.path?t.path:t.composedPath?t.composedPath():Fe(t)}function ke(e,t,d,a){var s=De(Le,d)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(t,d,a,s)}var He=Object.freeze({__proto__:null,stopPropagationForAgGrid:Ve,isStopPropagationForAgGrid:Re,isEventSupported:Ae,getCtrlForEventTarget:xe,isElementInEventPath:We,createEventPath:Fe,getEventPath:Ne,addSafePassiveEventListener:ke}),je=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ze=function(){function e(){var e=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!e.destroyed}}return e.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},e.prototype.getContext=function(){return this.context},e.prototype.destroy=function(){this.destroyFunctions.forEach((function(e){return e()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:e.EVENT_DESTROYED})},e.prototype.addEventListener=function(e,t){this.localEventService||(this.localEventService=new me),this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService&&this.localEventService.removeEventListener(e,t)},e.prototype.dispatchEventAsync=function(e){var t=this;window.setTimeout((function(){return t.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addManagedListener=function(e,t,d){var a=this;if(!this.destroyed){e instanceof HTMLElement?ke(this.getFrameworkOverrides(),e,t,d):e.addEventListener(t,d);var s=function(){return e.removeEventListener(t,d),a.destroyFunctions=a.destroyFunctions.filter((function(e){return e!==s})),null};return this.destroyFunctions.push(s),s}},e.prototype.setupGridOptionListener=function(e,t){var d=this;this.gridOptionsService.addEventListener(e,t);var a=function(){return d.gridOptionsService.removeEventListener(e,t),d.destroyFunctions=d.destroyFunctions.filter((function(e){return e!==a})),null};this.destroyFunctions.push(a)},e.prototype.addManagedPropertyListener=function(e,t){this.destroyed||this.setupGridOptionListener(e,t)},e.prototype.addManagedPropertyListeners=function(e,t){var d=this;if(!this.destroyed){var a=e.join("-")+this.propertyListenerId++,s=function(e){if(e.changeSet){if(e.changeSet&&e.changeSet.id===d.lastChangeSetIdLookup[a])return;d.lastChangeSetIdLookup[a]=e.changeSet.id}var s={type:"gridPropertyChanged",changeSet:e.changeSet};t(s)};e.forEach((function(e){return d.setupGridOptionListener(e,s)}))}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,t){var d=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),d},e.prototype.createBean=function(e,t,d){return(t||this.getContext()).createBean(e,d)},e.prototype.destroyBean=function(e,t){return(t||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,t){var d=this;return e&&e.forEach((function(e){return d.destroyBean(e,t)})),[]},e.EVENT_DESTROYED="destroyed",je([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),je([de("context")],e.prototype,"context",void 0),je([de("eventService")],e.prototype,"eventService",void 0),je([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),je([de("localeService")],e.prototype,"localeService",void 0),je([de("environment")],e.prototype,"environment",void 0),je([ee],e.prototype,"destroy",null),e}(),Ue=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ke=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ye=function(e,t){return function(d,a){t(d,a,e)}},Qe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ue(t,e),t.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},t.prototype.createColumnTree=function(e,t,d){var a=new f,s=this.extractExistingTreeData(d),o=s.existingCols,i=s.existingGroups,l=s.existingColKeys;a.addExistingKeys(l);var r=this.recursivelyCreateColumns(e,0,t,o,a,i),m=this.findMaxDept(r,0);this.logger.log("Number of levels for grouped columns is "+m);var n=this.balanceColumnTree(r,0,m,a);return this.columnUtils.depthFirstOriginalTreeSearch(null,n,(function(e,t){e instanceof ye&&e.setupExpandable(),e.setOriginalParent(t)})),{columnTree:n,treeDept:m}},t.prototype.extractExistingTreeData=function(e){var t=[],d=[],a=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof ye){var s=e;d.push(s)}else{var o=e;a.push(o.getId()),t.push(o)}})),{existingCols:t,existingGroups:d,existingColKeys:a}},t.prototype.createForAutoGroups=function(e,t){var d=this;return e.map((function(e){return d.createAutoGroupTreeItem(t,e)}))},t.prototype.createAutoGroupTreeItem=function(e,t){for(var d=this.findDepth(e),a=t,s=d-1;s>=0;s--){var o=new ye(null,"FAKE_PATH_".concat(t.getId(),"}_").concat(s),!0,s);this.createBean(o),o.setChildren([a]),a.setOriginalParent(o),a=o}return 0===d&&t.setOriginalParent(null),a},t.prototype.findDepth=function(e){for(var t=0,d=e;d&&d[0]&&d[0]instanceof ye;)t++,d=d[0].getChildren();return t},t.prototype.balanceColumnTree=function(e,t,d,a){for(var s=[],o=0;o=t;u--){var p=a.getUniqueKey(null,null),f=this.createMergedColGroupDef(null),c=new ye(f,p,!0,t);this.createBean(c),n&&n.setChildren([c]),n=c,m||(m=n)}if(m&&n){if(s.push(m),e.some((function(e){return e instanceof ye}))){n.setChildren([i]);continue}n.setChildren(e);break}s.push(i)}}return s},t.prototype.findMaxDept=function(e,t){for(var d=t,a=0;a=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Xe=function(){function e(e,t,d,a){this.displayedChildren=[],this.localEventService=new me,this.groupId=t,this.partId=d,this.providedColumnGroup=e,this.pinned=a}return e.createUniqueId=function(e,t){return e+"_"+t},e.prototype.reset=function(){this.parent=null,this.children=null,this.displayedChildren=null},e.prototype.getParent=function(){return this.parent},e.prototype.setParent=function(e){this.parent=e},e.prototype.getUniqueId=function(){return e.createUniqueId(this.groupId,this.partId)},e.prototype.isEmptyGroup=function(){return 0===this.displayedChildren.length},e.prototype.isMoving=function(){var e=this.getProvidedColumnGroup().getLeafColumns();return!(!e||0===e.length)&&e.every((function(e){return e.isMoving()}))},e.prototype.checkLeft=function(){if(this.displayedChildren.forEach((function(t){t instanceof e&&t.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsService.get("enableRtl")){var t=qe(this.displayedChildren).getLeft();this.setLeft(t)}else{var d=this.displayedChildren[0].getLeft();this.setLeft(d)}else this.setLeft(null)},e.prototype.getLeft=function(){return this.left},e.prototype.getOldLeft=function(){return this.oldLeft},e.prototype.setLeft=function(t){this.oldLeft=t,this.left!==t&&(this.left=t,this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_LEFT_CHANGED)))},e.prototype.getPinned=function(){return this.pinned},e.prototype.createAgEvent=function(e){return{type:e}},e.prototype.addEventListener=function(e,t){this.localEventService.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.localEventService.removeEventListener(e,t)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getPartId=function(){return this.partId},e.prototype.isChildInThisGroupDeepSearch=function(t){var d=!1;return this.children.forEach((function(a){t===a&&(d=!0),a instanceof e&&a.isChildInThisGroupDeepSearch(t)&&(d=!0)})),d},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(t){e+=t.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(t){t.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(t){e+=t.getMinWidth()||0})),e},e.prototype.addChild=function(e){this.children||(this.children=[]),this.children.push(e)},e.prototype.getDisplayedChildren=function(){return this.displayedChildren},e.prototype.getLeafColumns=function(){var e=[];return this.addLeafColumns(e),e},e.prototype.getDisplayedLeafColumns=function(){var e=[];return this.addDisplayedLeafColumns(e),e},e.prototype.getDefinition=function(){return this.providedColumnGroup.getColGroupDef()},e.prototype.getColGroupDef=function(){return this.providedColumnGroup.getColGroupDef()},e.prototype.isPadding=function(){return this.providedColumnGroup.isPadding()},e.prototype.isExpandable=function(){return this.providedColumnGroup.isExpandable()},e.prototype.isExpanded=function(){return this.providedColumnGroup.isExpanded()},e.prototype.setExpanded=function(e){this.providedColumnGroup.setExpanded(e)},e.prototype.addDisplayedLeafColumns=function(t){this.displayedChildren.forEach((function(d){d instanceof ce?t.push(d):d instanceof e&&d.addDisplayedLeafColumns(t)}))},e.prototype.addLeafColumns=function(t){this.children.forEach((function(d){d instanceof ce?t.push(d):d instanceof e&&d.addLeafColumns(t)}))},e.prototype.getChildren=function(){return this.children},e.prototype.getColumnGroupShow=function(){return this.providedColumnGroup.getColumnGroupShow()},e.prototype.getProvidedColumnGroup=function(){return this.providedColumnGroup},e.prototype.getPaddingLevel=function(){var e=this.getParent();return this.isPadding()&&e&&e.isPadding()?1+e.getPaddingLevel():0},e.prototype.calculateDisplayedColumns=function(){var t=this;this.displayedChildren=[];for(var d=this;null!=d&&d.isPadding();)d=d.getParent();if(!(!!d&&d.providedColumnGroup.isExpandable()))return this.displayedChildren=this.children,void this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED));this.children.forEach((function(a){if(!(a instanceof e&&(!a.displayedChildren||!a.displayedChildren.length)))switch(a.getColumnGroupShow()){case"open":d.providedColumnGroup.isExpanded()&&t.displayedChildren.push(a);break;case"closed":d.providedColumnGroup.isExpanded()||t.displayedChildren.push(a);break;default:t.displayedChildren.push(a)}})),this.localEventService.dispatchEvent(this.createAgEvent(e.EVENT_DISPLAYED_CHILDREN_CHANGED))},e.EVENT_LEFT_CHANGED="leftChanged",e.EVENT_DISPLAYED_CHILDREN_CHANGED="displayedChildrenChanged",$e([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e}(),Je=function(){function e(){}return e.EVENT_COLUMN_EVERYTHING_CHANGED="columnEverythingChanged",e.EVENT_NEW_COLUMNS_LOADED="newColumnsLoaded",e.EVENT_COLUMN_PIVOT_MODE_CHANGED="columnPivotModeChanged",e.EVENT_COLUMN_ROW_GROUP_CHANGED="columnRowGroupChanged",e.EVENT_EXPAND_COLLAPSE_ALL="expandOrCollapseAll",e.EVENT_COLUMN_PIVOT_CHANGED="columnPivotChanged",e.EVENT_GRID_COLUMNS_CHANGED="gridColumnsChanged",e.EVENT_COLUMN_VALUE_CHANGED="columnValueChanged",e.EVENT_COLUMN_MOVED="columnMoved",e.EVENT_COLUMN_VISIBLE="columnVisible",e.EVENT_COLUMN_PINNED="columnPinned",e.EVENT_COLUMN_GROUP_OPENED="columnGroupOpened",e.EVENT_COLUMN_RESIZED="columnResized",e.EVENT_DISPLAYED_COLUMNS_CHANGED="displayedColumnsChanged",e.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED="suppressMovableColumns",e.EVENT_SUPPRESS_MENU_HIDE_CHANGED="suppressMenuHide",e.EVENT_SUPPRESS_FIELD_DOT_NOTATION="suppressFieldDotNotation",e.EVENT_VIRTUAL_COLUMNS_CHANGED="virtualColumnsChanged",e.EVENT_ASYNC_TRANSACTIONS_FLUSHED="asyncTransactionsFlushed",e.EVENT_ROW_GROUP_OPENED="rowGroupOpened",e.EVENT_ROW_DATA_UPDATED="rowDataUpdated",e.EVENT_PINNED_ROW_DATA_CHANGED="pinnedRowDataChanged",e.EVENT_RANGE_SELECTION_CHANGED="rangeSelectionChanged",e.EVENT_CHART_CREATED="chartCreated",e.EVENT_CHART_RANGE_SELECTION_CHANGED="chartRangeSelectionChanged",e.EVENT_CHART_OPTIONS_CHANGED="chartOptionsChanged",e.EVENT_CHART_DESTROYED="chartDestroyed",e.EVENT_TOOL_PANEL_VISIBLE_CHANGED="toolPanelVisibleChanged",e.EVENT_TOOL_PANEL_SIZE_CHANGED="toolPanelSizeChanged",e.EVENT_COLUMN_PANEL_ITEM_DRAG_START="columnPanelItemDragStart",e.EVENT_COLUMN_PANEL_ITEM_DRAG_END="columnPanelItemDragEnd",e.EVENT_MODEL_UPDATED="modelUpdated",e.EVENT_CUT_START="cutStart",e.EVENT_CUT_END="cutEnd",e.EVENT_PASTE_START="pasteStart",e.EVENT_PASTE_END="pasteEnd",e.EVENT_FILL_START="fillStart",e.EVENT_FILL_END="fillEnd",e.EVENT_RANGE_DELETE_START="rangeDeleteStart",e.EVENT_RANGE_DELETE_END="rangeDeleteEnd",e.EVENT_UNDO_STARTED="undoStarted",e.EVENT_UNDO_ENDED="undoEnded",e.EVENT_REDO_STARTED="redoStarted",e.EVENT_REDO_ENDED="redoEnded",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_START="keyShortcutChangedCellStart",e.EVENT_KEY_SHORTCUT_CHANGED_CELL_END="keyShortcutChangedCellEnd",e.EVENT_CELL_CLICKED="cellClicked",e.EVENT_CELL_DOUBLE_CLICKED="cellDoubleClicked",e.EVENT_CELL_MOUSE_DOWN="cellMouseDown",e.EVENT_CELL_CONTEXT_MENU="cellContextMenu",e.EVENT_CELL_VALUE_CHANGED="cellValueChanged",e.EVENT_CELL_EDIT_REQUEST="cellEditRequest",e.EVENT_ROW_VALUE_CHANGED="rowValueChanged",e.EVENT_CELL_FOCUSED="cellFocused",e.EVENT_CELL_FOCUS_CLEARED="cellFocusCleared",e.EVENT_FULL_WIDTH_ROW_FOCUSED="fullWidthRowFocused",e.EVENT_ROW_SELECTED="rowSelected",e.EVENT_SELECTION_CHANGED="selectionChanged",e.EVENT_TOOLTIP_SHOW="tooltipShow",e.EVENT_TOOLTIP_HIDE="tooltipHide",e.EVENT_CELL_KEY_DOWN="cellKeyDown",e.EVENT_CELL_MOUSE_OVER="cellMouseOver",e.EVENT_CELL_MOUSE_OUT="cellMouseOut",e.EVENT_FILTER_CHANGED="filterChanged",e.EVENT_FILTER_MODIFIED="filterModified",e.EVENT_FILTER_OPENED="filterOpened",e.EVENT_ADVANCED_FILTER_BUILDER_VISIBLE_CHANGED="advancedFilterBuilderVisibleChanged",e.EVENT_SORT_CHANGED="sortChanged",e.EVENT_VIRTUAL_ROW_REMOVED="virtualRowRemoved",e.EVENT_ROW_CLICKED="rowClicked",e.EVENT_ROW_DOUBLE_CLICKED="rowDoubleClicked",e.EVENT_GRID_READY="gridReady",e.EVENT_GRID_PRE_DESTROYED="gridPreDestroyed",e.EVENT_GRID_SIZE_CHANGED="gridSizeChanged",e.EVENT_VIEWPORT_CHANGED="viewportChanged",e.EVENT_SCROLLBAR_WIDTH_CHANGED="scrollbarWidthChanged",e.EVENT_FIRST_DATA_RENDERED="firstDataRendered",e.EVENT_DRAG_STARTED="dragStarted",e.EVENT_DRAG_STOPPED="dragStopped",e.EVENT_CHECKBOX_CHANGED="checkboxChanged",e.EVENT_ROW_EDITING_STARTED="rowEditingStarted",e.EVENT_ROW_EDITING_STOPPED="rowEditingStopped",e.EVENT_CELL_EDITING_STARTED="cellEditingStarted",e.EVENT_CELL_EDITING_STOPPED="cellEditingStopped",e.EVENT_BODY_SCROLL="bodyScroll",e.EVENT_BODY_SCROLL_END="bodyScrollEnd",e.EVENT_HEIGHT_SCALE_CHANGED="heightScaleChanged",e.EVENT_PAGINATION_CHANGED="paginationChanged",e.EVENT_COMPONENT_STATE_CHANGED="componentStateChanged",e.EVENT_STORE_REFRESHED="storeRefreshed",e.EVENT_STATE_UPDATED="stateUpdated",e.EVENT_BODY_HEIGHT_CHANGED="bodyHeightChanged",e.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED="displayedColumnsWidthChanged",e.EVENT_SCROLL_VISIBILITY_CHANGED="scrollVisibilityChanged",e.EVENT_COLUMN_HOVER_CHANGED="columnHoverChanged",e.EVENT_FLASH_CELLS="flashCells",e.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED="paginationPixelOffsetChanged",e.EVENT_DISPLAYED_ROWS_CHANGED="displayedRowsChanged",e.EVENT_LEFT_PINNED_WIDTH_CHANGED="leftPinnedWidthChanged",e.EVENT_RIGHT_PINNED_WIDTH_CHANGED="rightPinnedWidthChanged",e.EVENT_ROW_CONTAINER_HEIGHT_CHANGED="rowContainerHeightChanged",e.EVENT_HEADER_HEIGHT_CHANGED="headerHeightChanged",e.EVENT_COLUMN_HEADER_HEIGHT_CHANGED="columnHeaderHeightChanged",e.EVENT_ROW_DRAG_ENTER="rowDragEnter",e.EVENT_ROW_DRAG_MOVE="rowDragMove",e.EVENT_ROW_DRAG_LEAVE="rowDragLeave",e.EVENT_ROW_DRAG_END="rowDragEnd",e.EVENT_GRID_STYLES_CHANGED="gridStylesChanged",e.EVENT_POPUP_TO_FRONT="popupToFront",e.EVENT_COLUMN_ROW_GROUP_CHANGE_REQUEST="columnRowGroupChangeRequest",e.EVENT_COLUMN_PIVOT_CHANGE_REQUEST="columnPivotChangeRequest",e.EVENT_COLUMN_VALUE_CHANGE_REQUEST="columnValueChangeRequest",e.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST="columnAggFuncChangeRequest",e.EVENT_STORE_UPDATED="storeUpdated",e.EVENT_FILTER_DESTROYED="filterDestroyed",e.EVENT_ROW_DATA_UPDATE_STARTED="rowDataUpdateStarted",e.EVENT_ROW_COUNT_READY="rowCountReady",e.EVENT_ADVANCED_FILTER_ENABLED_CHANGED="advancedFilterEnabledChanged",e.EVENT_DATA_TYPES_INFERRED="dataTypesInferred",e.EVENT_FIELD_VALUE_CHANGED="fieldValueChanged",e.EVENT_FIELD_PICKER_VALUE_SELECTED="fieldPickerValueSelected",e.EVENT_SIDE_BAR_UPDATED="sideBarUpdated",e}(),Ze=function(){function e(){this.existingIds={}}return e.prototype.getInstanceIdForKey=function(e){var t,d=this.existingIds[e];return t="number"!==typeof d?0:d+1,this.existingIds[e]=t,t},e}(),et=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),tt=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},dt="ag-Grid-AutoColumn",at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return et(t,e),t.prototype.createAutoGroupColumns=function(e){var t=this,d=[],a=this.gridOptionsService.get("treeData"),s=this.gridOptionsService.isGroupMultiAutoColumn();return a&&s&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),s=!1),s?e.forEach((function(e,a){d.push(t.createOneAutoGroupColumn(e,a))})):d.push(this.createOneAutoGroupColumn()),d},t.prototype.updateAutoGroupColumns=function(e){var t=this;e.forEach((function(e,d){return t.updateOneAutoGroupColumn(e,d)}))},t.prototype.createOneAutoGroupColumn=function(e,t){var d;d=e?"".concat(dt,"-").concat(e.getId()):dt;var a=this.createAutoGroupColDef(d,e,t);a.colId=d;var s=new ce(a,null,d,!0);return this.context.createBean(s),s},t.prototype.updateOneAutoGroupColumn=function(e,t){var d=e.getColDef(),a="string"==typeof d.showRowGroup?d.showRowGroup:void 0,s=null!=a?this.columnModel.getPrimaryColumn(a):void 0,o=this.createAutoGroupColDef(e.getId(),null!==s&&void 0!==s?s:void 0,t);e.setColDef(o,null),this.columnFactory.applyColumnState(e,o)},t.prototype.createAutoGroupColDef=function(e,t,d){var a=this.createBaseColDef(t);(S(a,this.gridOptionsService.get("autoGroupColumnDef")),a=this.columnFactory.addColumnDefaultAndTypes(a,e),this.gridOptionsService.get("treeData"))||o(a.field)&&o(a.valueGetter)&&o(a.filterValueGetter)&&"agGroupColumnFilter"!==a.filter&&(a.filter=!1);d&&d>0&&(a.headerCheckboxSelection=!1);var s=this.gridOptionsService.isColumnsSortingCoupledToGroup(),i=a.valueGetter||null!=a.field;return s&&!i&&(a.sortIndex=void 0,a.initialSort=void 0),a},t.prototype.createBaseColDef=function(e){var t=this.gridOptionsService.get("autoGroupColumnDef"),d={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(t&&(t.cellRenderer||t.cellRendererSelector)||(d.cellRenderer="agGroupCellRenderer"),e){var a=e.getColDef();Object.assign(d,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:a.headerValueGetter}),a.cellRenderer&&Object.assign(d,{cellRendererParams:{innerRenderer:a.cellRenderer,innerRendererParams:a.cellRendererParams}}),d.showRowGroup=e.getColId()}else d.showRowGroup=!0;return d},tt([de("columnModel")],t.prototype,"columnModel",void 0),tt([de("columnFactory")],t.prototype,"columnFactory",void 0),t=tt([te("autoGroupColService")],t)}(ze),st=/[&<>"']/g,ot={"&":"&","<":"<",">":">",'"':""","'":"'"};function it(e,t){if(null==e)return null;var d=e.toString().toString();return t?d:d.replace(st,(function(e){return ot[e]}))}function lt(e){if(!e||null==e)return null;return e.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z])([a-z])/g,"$1 $2$3").replace(/\./g," ").split(" ").map((function(e){return e.substring(0,1).toUpperCase()+(e.length>1?e.substring(1,e.length):"")})).join(" ")}function rt(e){return e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLocaleLowerCase())}))}var mt=Object.freeze({__proto__:null,utf8_encode:function(e){var t=String.fromCharCode;function d(e,d){return t(e>>d&63|128)}function a(e){if(e>=0&&e<=31&&10!==e){var a=e.toString(16).toUpperCase().padStart(4,"0");return"_x".concat(a,"_")}if(0==(4294967168&e))return t(e);var s="";return 0==(4294965248&e)?s=t(e>>6&31|192):0==(4294901760&e)?(!function(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}(e),s=t(e>>12&15|224),s+=d(e,6)):0==(4292870144&e)&&(s=t(e>>18&7|240),s+=d(e,12),s+=d(e,6)),s+=t(63&e|128)}for(var s=function(e){var t=[];if(!e)return[];for(var d,a,s=e.length,o=0;o=55296&&d<=56319&&o=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ct=function(e,t){return function(d,a){t(d,a,e)}},_t=function(e,t){var d={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(d[a]=e[a]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var s=0;for(a=Object.getOwnPropertySymbols(e);s0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Ct=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.primaryHeaderRowCount=0,t.secondaryHeaderRowCount=0,t.gridHeaderRowCount=0,t.displayedColumnsLeft=[],t.displayedColumnsRight=[],t.displayedColumnsCenter=[],t.displayedColumns=[],t.displayedColumnsAndGroupsMap={},t.viewportColumns=[],t.viewportColumnsHash="",t.headerViewportColumns=[],t.viewportColumnsCenter=[],t.headerViewportColumnsCenter=[],t.autoHeightActiveAtLeastOnce=!1,t.rowGroupColumns=[],t.valueColumns=[],t.pivotColumns=[],t.ready=!1,t.autoGroupsNeedBuilding=!1,t.forceRecreateAutoGroups=!1,t.pivotMode=!1,t.bodyWidth=0,t.leftWidth=0,t.rightWidth=0,t.bodyWidthDirty=!0,t.shouldQueueResizeOperations=!1,t.resizeOperationQueue=[],t}return pt(t,e),t.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.get("suppressColumnVirtualisation");var t=this.gridOptionsService.get("pivotMode");this.isPivotSettingAllowed(t)&&(this.pivotMode=t),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],(function(){return e.buildAutoGroupColumns()})),this.addManagedPropertyListener("autoGroupColumnDef",(function(){return e.onAutoGroupColumnDefChanged()})),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],(function(t){return e.onSharedColDefChanged(t.source)})),this.addManagedPropertyListener("pivotMode",(function(t){return e.setPivotMode(e.gridOptionsService.get("pivotMode"),t.source)})),this.addManagedListener(this.eventService,Je.EVENT_FIRST_DATA_RENDERED,(function(){return e.onFirstDataRendered()}))},t.prototype.buildAutoGroupColumns=function(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))},t.prototype.onAutoGroupColumnDefChanged=function(){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)},t.prototype.onSharedColDefChanged=function(e){void 0===e&&(e="api"),this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns),this.createColumnsFromColumnDefs(!0,e))},t.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api");var d=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(d,t)},t.prototype.recreateColumnDefs=function(e){void 0===e&&(e="api"),this.onSharedColDefChanged(e)},t.prototype.destroyOldColumns=function(e,t){var d={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){d[e.getInstanceId()]=e})),t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(e){d[e.getInstanceId()]=null}));var a=Object.values(d).filter((function(e){return null!=e}));this.destroyBeans(a)}},t.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)},t.prototype.createColumnsFromColumnDefs=function(e,t){var d=this;void 0===t&&(t="api");var a=e?this.compareColumnStatesAndDispatchEvents(t):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var s=this.primaryColumns,o=this.primaryColumnTree,i=this.columnFactory.createColumnTree(this.columnDefs,!0,o);this.destroyOldColumns(this.primaryColumnTree,i.columnTree),this.primaryColumnTree=i.columnTree,this.primaryHeaderRowCount=i.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return d.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(t,s),this.extractPivotColumns(t,s),this.extractValueColumns(t,s),this.ready=!0;var l=void 0===this.gridColsArePrimary;(this.gridColsArePrimary||l||this.autoGroupsNeedBuilding)&&(this.updateGridColumns(),e&&this.gridColsArePrimary&&!this.gridOptionsService.get("maintainColumnOrder")&&this.orderGridColumnsLikePrimary(),this.updateDisplayedColumns(t),this.checkViewportColumns()),this.dispatchEverythingChanged(t),a&&a(),this.dispatchNewColumnsLoaded(t)},t.prototype.dispatchNewColumnsLoaded=function(e){var t={type:Je.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(t),"gridInitializing"===e&&this.onColumnsReady()},t.prototype.dispatchEverythingChanged=function(e){void 0===e&&(e="api");var t={type:Je.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(t)},t.prototype.orderGridColumnsLikePrimary=function(){var e=this,t=this.primaryColumns;if(t){var d=t.filter((function(t){return e.gridColumns.indexOf(t)>=0})),a=this.gridColumns.filter((function(e){return d.indexOf(e)<0}));this.gridColumns=Ct(Ct([],yt(a),!1),yt(d),!1),this.gridColumns=this.placeLockedColumns(this.gridColumns)}},t.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},t.prototype.setViewport=function(){this.gridOptionsService.get("enableRtl")?(this.viewportLeft=this.bodyWidth-this.scrollPosition-this.scrollWidth,this.viewportRight=this.bodyWidth-this.scrollPosition):(this.viewportLeft=this.scrollPosition,this.viewportRight=this.scrollWidth+this.scrollPosition)},t.prototype.getDisplayedColumnsStartingAt=function(e){for(var t=e,d=[];null!=t;)d.push(t),t=this.getDisplayedColAfter(t);return d},t.prototype.checkViewportColumns=function(e){if((void 0===e&&(e=!1),null!=this.displayedColumnsCenter)&&this.extractViewport()){var t={type:Je.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(t)}},t.prototype.setViewportPosition=function(e,t,d){void 0===d&&(d=!1),(e!==this.scrollWidth||t!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=t,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(d))},t.prototype.isPivotMode=function(){return this.pivotMode},t.prototype.isPivotSettingAllowed=function(e){return!e||!this.gridOptionsService.get("treeData")||(console.warn("AG Grid: Pivot mode not available in conjunction Tree Data i.e. 'gridOptions.treeData: true'"),!1)},t.prototype.setPivotMode=function(e,t){if(void 0===t&&(t="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)){this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(t);var d={type:Je.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(d)}},t.prototype.getSecondaryPivotColumn=function(e,t){if(o(this.secondaryColumns))return null;var d=this.getPrimaryColumn(t),a=null;return this.secondaryColumns.forEach((function(t){var s=t.getColDef().pivotKeys,o=t.getColDef().pivotValueColumn;Pe(s,e)&&o===d&&(a=t)})),a},t.prototype.setBeans=function(e){this.logger=e.create("columnModel")},t.prototype.setFirstRightAndLastLeftPinned=function(e){var t,d;this.gridOptionsService.get("enableRtl")?(t=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,d=this.displayedColumnsRight?qe(this.displayedColumnsRight):null):(t=this.displayedColumnsLeft?qe(this.displayedColumnsLeft):null,d=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(a){a.setLastLeftPinned(a===t,e),a.setFirstRightPinned(a===d,e)}))},t.prototype.autoSizeColumns=function(e){var t=this;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return t.autoSizeColumns(e)}));else{var d=e.columns,a=e.skipHeader,s=e.skipHeaderGroups,o=e.stopAtGroup,i=e.source,l=void 0===i?"api":i;this.animationFrameService.flushAllFrames();for(var r=[],m=-1,n=null!=a?a:this.gridOptionsService.get("skipHeaderOnAutoSize"),u=null!=s?s:n;0!==m;)m=0,this.actionOnGridColumns(d,(function(e){if(r.indexOf(e)>=0)return!1;var d=t.autoWidthCalculator.getPreferredWidthForColumn(e,n);if(d>0){var a=t.normaliseColumnWidth(e,d);e.setActualWidth(a,l),r.push(e),m++}return!0}),l);u||this.autoSizeColumnGroupsByColumns(d,l,o),this.dispatchColumnResizedEvent(r,!0,"autosizeColumns")}},t.prototype.dispatchColumnResizedEvent=function(e,t,d,a){if(void 0===a&&(a=null),e&&e.length){var s={type:Je.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:a,finished:t,source:d};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnChangedEvent=function(e,t,d){var a={type:e,columns:t,column:t&&1==t.length?t[0]:null,source:d};this.eventService.dispatchEvent(a)},t.prototype.dispatchColumnMovedEvent=function(e){var t=e.movedColumns,d=e.source,a=e.toIndex,s=e.finished,o={type:Je.EVENT_COLUMN_MOVED,columns:t,column:t&&1===t.length?t[0]:null,toIndex:a,finished:s,source:d};this.eventService.dispatchEvent(o)},t.prototype.dispatchColumnPinnedEvent=function(e,t){if(e.length){var d=1===e.length?e[0]:null,a=this.getCommonValue(e,(function(e){return e.getPinned()})),s={type:Je.EVENT_COLUMN_PINNED,pinned:null!=a?a:null,columns:e,column:d,source:t};this.eventService.dispatchEvent(s)}},t.prototype.dispatchColumnVisibleEvent=function(e,t){if(e.length){var d=1===e.length?e[0]:null,a=this.getCommonValue(e,(function(e){return e.isVisible()})),s={type:Je.EVENT_COLUMN_VISIBLE,visible:a,columns:e,column:d,source:t};this.eventService.dispatchEvent(s)}},t.prototype.autoSizeColumn=function(e,t,d){void 0===d&&(d="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:t,skipHeaderGroups:!0,source:d})},t.prototype.autoSizeColumnGroupsByColumns=function(e,t,d){var a,s,o,i,l,r=new Set;this.getGridColumns(e).forEach((function(e){for(var t=e.getParent();t&&t!=d;)t.isPadding()||r.add(t),t=t.getParent()}));try{for(var m=bt(r),n=m.next();!n.done;n=m.next()){var u=n.value;try{for(var p=(o=void 0,bt(this.ctrlsService.getHeaderRowContainerCtrls())),f=p.next();!f.done;f=p.next()){if(l=f.value.getHeaderCtrlForColumn(u))break}}catch(c){o={error:c}}finally{try{f&&!f.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}l&&l.resizeLeafColumnsToFit(t)}}catch(_){a={error:_}}finally{try{n&&!n.done&&(s=m.return)&&s.call(m)}finally{if(a)throw a.error}}return[]},t.prototype.autoSizeAllColumns=function(e,t){var d=this;if(void 0===t&&(t="api"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return d.autoSizeAllColumns(e,t)}));else{var a=this.getAllDisplayedColumns();this.autoSizeColumns({columns:a,skipHeader:e,source:t})}},t.prototype.getColumnsFromTree=function(e){var t=[],d=function(e){for(var a=0;a=0},t.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},t.prototype.getViewportColumns=function(){return this.viewportColumns},t.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},t.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},t.prototype.isColSpanActive=function(){return this.colSpanActive},t.prototype.getDisplayedColumnsForRow=function(e,t,d,a){for(var s,o=[],i=null,l=function(l){var r,m=t[l],n=t.length-l,u=Math.min(m.getColSpan(e),n),p=[m];if(u>1){for(var f=u-1,c=1;c<=f;c++)p.push(t[l+c]);l+=f}if(d?(r=!1,p.forEach((function(e){d(e)&&(r=!0)}))):r=!0,r){if(0===o.length&&i)!!a&&a(m)&&o.push(i);o.push(m)}i=m,s=l},r=0;rt.viewportLeft}))},t.prototype.isColumnAtEdge=function(e,t){var d=this.getAllDisplayedColumns();if(!d.length)return!1;var a,s="first"===t;if(e instanceof Xe){var o=e.getDisplayedLeafColumns();if(!o.length)return!1;a=s?o[0]:qe(o)}else a=e;return(s?d[0]:qe(d))===a},t.prototype.getAriaColumnIndex=function(e){var t;return t=e instanceof Xe?e.getLeafColumns()[0]:e,this.getAllGridColumns().indexOf(t)+1},t.prototype.isColumnInHeaderViewport=function(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)},t.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var t=e.getLeft()||0,d=t+e.getActualWidth(),a=this.viewportLeft-200,s=this.viewportRight+200;return!(ts&&d>s)},t.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},t.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},t.prototype.updatePrimaryColumnList=function(e,t,d,a,s,o){var l=this;if(void 0===o&&(o="api"),e&&!i(e)){var r=!1;if(e.forEach((function(e){var s=l.getPrimaryColumn(e);if(s){if(d){if(t.indexOf(s)>=0)return;t.push(s)}else{if(t.indexOf(s)<0)return;ge(t,s)}a(s),r=!0}})),r){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o);var m={type:s,columns:t,column:1===t.length?t[0]:null,source:o};this.eventService.dispatchEvent(m)}}},t.prototype.setRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),t)},t.prototype.setRowGroupActive=function(e,t,d){e!==t.isRowGroupActive()&&(t.setRowGroupActive(e,d),e&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&this.setColumnVisible(t,!1,d),e||this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnVisible(t,!0,d))},t.prototype.addRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.addRowGroupColumns([e],t)},t.prototype.addRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),Je.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumns=function(e,t){void 0===t&&(t="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),Je.EVENT_COLUMN_ROW_GROUP_CHANGED,t)},t.prototype.removeRowGroupColumn=function(e,t){void 0===t&&(t="api"),e&&this.removeRowGroupColumns([e],t)},t.prototype.addPivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,t)}),Je.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.setPivotColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.pivotColumns,Je.EVENT_COLUMN_PIVOT_CHANGED,!0,(function(e,d){d.setPivotActive(e,t)}),t)},t.prototype.addPivotColumn=function(e,t){void 0===t&&(t="api"),this.addPivotColumns([e],t)},t.prototype.removePivotColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,t)}),Je.EVENT_COLUMN_PIVOT_CHANGED,t)},t.prototype.removePivotColumn=function(e,t){void 0===t&&(t="api"),this.removePivotColumns([e],t)},t.prototype.setPrimaryColumnList=function(e,t,d,a,o,i){var l=this;if(this.gridColumns){var r=new Map;t.forEach((function(e,t){return r.set(e,t)})),t.length=0,s(e)&&e.forEach((function(e){var d=l.getPrimaryColumn(e);d&&t.push(d)})),t.forEach((function(e,t){var d=r.get(e);void 0!==d?a&&d!==t||r.delete(e):r.set(e,0)})),(this.primaryColumns||[]).forEach((function(e){var d=t.indexOf(e)>=0;o(d,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(i),this.dispatchColumnChangedEvent(d,Ct([],yt(r.keys()),!1),i)}},t.prototype.setValueColumns=function(e,t){void 0===t&&(t="api"),this.setPrimaryColumnList(e,this.valueColumns,Je.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),t)},t.prototype.setValueActive=function(e,t,d){if(e!==t.isValueActive()&&(t.setValueActive(e,d),e&&!t.getAggFunc())){var a=this.aggFuncService.getDefaultAggFunc(t);t.setAggFunc(a)}},t.prototype.addValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),Je.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.addValueColumn=function(e,t){void 0===t&&(t="api"),e&&this.addValueColumns([e],t)},t.prototype.removeValueColumn=function(e,t){void 0===t&&(t="api"),this.removeValueColumns([e],t)},t.prototype.removeValueColumns=function(e,t){void 0===t&&(t="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),Je.EVENT_COLUMN_VALUE_CHANGED,t)},t.prototype.normaliseColumnWidth=function(e,t){var d=e.getMinWidth();s(d)&&t0?o+=d:i=!1})),d>=a&&(!i||d<=o)},t.prototype.resizeColumnSets=function(e){var t=this,d=e.resizeSets,a=e.finished,o=e.source;if(!d||d.every((function(e){return t.checkMinAndMaxWidthsForSet(e)}))){var i=[],l=[];d.forEach((function(e){var t=e.width,d=e.columns,a=e.ratios,r={},m={};d.forEach((function(e){return l.push(e)}));for(var n=!0,u=0,p=function(){if(++u>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";n=!1;var e=[],o=0,i=t;d.forEach((function(t,d){if(m[t.getId()])i-=r[t.getId()];else{e.push(t);var s=a[d];o+=s}}));var l=1/o;e.forEach((function(d,o){var u;o===e.length-1?u=i:(u=Math.round(a[o]*t*l),i-=u);var p=d.getMinWidth(),f=d.getMaxWidth();s(p)&&u0&&u>f&&(u=f,m[d.getId()]=!0,n=!0),r[d.getId()]=u}))};n;){if("break"===p())break}d.forEach((function(e){var t=r[e.getId()];e.getActualWidth()!==t&&(e.setActualWidth(t,o),i.push(e))}))}));var r=i.length>0,m=[];r&&(m=this.refreshFlexedColumns({resizingCols:l,skipSetLeft:!0}),this.setLeftValues(o),this.updateBodyWidths(),this.checkViewportColumns());var n=l.concat(m);(r||a)&&this.dispatchColumnResizedEvent(n,a,o,m)}else if(a){var u=d&&d.length>0?d[0].columns:null;this.dispatchColumnResizedEvent(u,a,o)}},t.prototype.setColumnAggFunc=function(e,t,d){if(void 0===d&&(d="api"),e){var a=this.getPrimaryColumn(e);a&&(a.setAggFunc(t),this.dispatchColumnChangedEvent(Je.EVENT_COLUMN_VALUE_CHANGED,[a],d))}},t.prototype.moveRowGroupColumn=function(e,t,d){if(void 0===d&&(d="api"),!this.isRowGroupEmpty()){var a=this.rowGroupColumns[e],s=this.rowGroupColumns.slice(e,t);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(t,0,a);var o={type:Je.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:s,column:1===s.length?s[0]:null,source:d};this.eventService.dispatchEvent(o)}},t.prototype.moveColumns=function(e,t,d,a){if(void 0===d&&(d="api"),void 0===a&&(a=!0),this.gridColumns){if(this.columnAnimationService.start(),t>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+t),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");var s=this.getGridColumns(e);!this.doesMovePassRules(s,t)||(Ie(this.gridColumns,s,t),this.updateDisplayedColumns(d),this.dispatchColumnMovedEvent({movedColumns:s,source:d,toIndex:t,finished:a}),this.columnAnimationService.finish())}},t.prototype.doesMovePassRules=function(e,t){var d=this.getProposedColumnOrder(e,t);return this.doesOrderPassRules(d)},t.prototype.doesOrderPassRules=function(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)},t.prototype.getProposedColumnOrder=function(e,t){var d=this.gridColumns.slice();return Ie(d,e,t),d},t.prototype.sortColumnsLikeGridColumns=function(e){var t=this;!e||e.length<=1||(e.filter((function(e){return t.gridColumns.indexOf(e)<0})).length>0||e.sort((function(e,d){return t.gridColumns.indexOf(e)-t.gridColumns.indexOf(d)})))},t.prototype.doesMovePassLockedPositions=function(e){var t=0,d=!0;return e.forEach((function(e){var a,s=(a=e.getColDef().lockPosition)?!0===a||"left"===a?0:2:1;sa.getLeafColumns().length-1&&(t=!1)}}})),t},t.prototype.moveColumn=function(e,t,d){void 0===d&&(d="api"),this.moveColumns([e],t,d)},t.prototype.moveColumnByIndex=function(e,t,d){if(void 0===d&&(d="api"),this.gridColumns){var a=this.gridColumns[e];this.moveColumn(a,t,d)}},t.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var t=this.primaryColumns.slice();return this.gridColsArePrimary?t.sort((function(t,d){return e.gridColumns.indexOf(t)-e.gridColumns.indexOf(d)})):this.lastPrimaryOrder&&t.sort((function(t,d){return e.lastPrimaryOrder.indexOf(t)-e.lastPrimaryOrder.indexOf(d)})),this.columnDefFactory.buildColumnDefs(t,this.rowGroupColumns,this.pivotColumns)}},t.prototype.getBodyContainerWidth=function(){return this.bodyWidth},t.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},t.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),t=this.getWidthOfColsInList(this.displayedColumnsLeft),d=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==t||this.rightWidth!==d){this.bodyWidth=e,this.leftWidth=t,this.rightWidth=d;var a={type:Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(a)}},t.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},t.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},t.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},t.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},t.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},t.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},t.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},t.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},t.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},t.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},t.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},t.prototype.getAllGridColumns=function(){var e;return null!==(e=this.gridColumns)&&void 0!==e?e:[]},t.prototype.isEmpty=function(){return i(this.gridColumns)},t.prototype.isRowGroupEmpty=function(){return i(this.rowGroupColumns)},t.prototype.setColumnVisible=function(e,t,d){void 0===d&&(d="api"),this.setColumnsVisible([e],t,d)},t.prototype.setColumnsVisible=function(e,t,d){void 0===t&&(t=!1),void 0===d&&(d="api"),this.applyColumnState({state:e.map((function(e){return{colId:"string"===typeof e?e:e.getColId(),hide:!t}}))},d)},t.prototype.setColumnPinned=function(e,t,d){void 0===d&&(d="api"),e&&this.setColumnsPinned([e],t,d)},t.prototype.setColumnsPinned=function(e,t,d){var a;(void 0===d&&(d="api"),this.gridColumns)&&(this.gridOptionsService.isDomLayout("print")?console.warn("AG Grid: Changing the column pinning status is not allowed with domLayout='print'"):(this.columnAnimationService.start(),a=!0===t||"left"===t?"left":"right"===t?"right":null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==a&&(e.setPinned(a),!0)}),d,(function(){return{type:Je.EVENT_COLUMN_PINNED,pinned:a,column:null,columns:null,source:d}})),this.columnAnimationService.finish()))},t.prototype.actionOnGridColumns=function(e,t,d,a){var o=this;if(!i(e)){var l=[];if(e.forEach((function(e){var d=o.getGridColumn(e);d&&(!1!==t(d)&&l.push(d))})),l.length&&(this.updateDisplayedColumns(d),s(a)&&a)){var r=a();r.columns=l,r.column=1===l.length?l[0]:null,this.eventService.dispatchEvent(r)}}},t.prototype.getDisplayedColBefore=function(e){var t=this.getAllDisplayedColumns(),d=t.indexOf(e);return d>0?t[d-1]:null},t.prototype.getDisplayedColAfter=function(e){var t=this.getAllDisplayedColumns(),d=t.indexOf(e);return d0},t.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},t.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},t.prototype.createStateItemFromColumn=function(e){var t=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,d=e.isPivotActive()?this.pivotColumns.indexOf(e):null,a=e.isValueActive()?e.getAggFunc():null,s=null!=e.getSort()?e.getSort():null,o=null!=e.getSortIndex()?e.getSortIndex():null,i=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:s,sortIndex:o,aggFunc:a,rowGroup:e.isRowGroupActive(),rowGroupIndex:t,pivot:e.isPivotActive(),pivotIndex:d,flex:i}},t.prototype.getColumnState=function(){if(o(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e},t.prototype.orderColumnStateList=function(e){var t=nt(this.gridColumns.map((function(e,t){return[e.getColId(),t]})));e.sort((function(e,d){return(t.has(e.colId)?t.get(e.colId):-1)-(t.has(d.colId)?t.get(d.colId):-1)}))},t.prototype.resetColumnState=function(e){var t=this;if(void 0===e&&(e="api"),!i(this.primaryColumns)){var d=this.getColumnsFromTree(this.primaryColumnTree),a=[],s=1e3,l=1e3,r=[];this.groupAutoColumns&&(r=r.concat(this.groupAutoColumns)),d&&(r=r.concat(d)),r.forEach((function(e){var d=t.getColumnStateFromColDef(e);o(d.rowGroupIndex)&&d.rowGroup&&(d.rowGroupIndex=s++),o(d.pivotIndex)&&d.pivot&&(d.pivotIndex=l++),a.push(d)})),this.applyColumnState({state:a,applyOrder:!0},e)}},t.prototype.getColumnStateFromColDef=function(e){var t=function(e,t){return null!=e?e:null!=t?t:null},d=e.getColDef(),a=t(d.sort,d.initialSort),s=t(d.sortIndex,d.initialSortIndex),o=t(d.hide,d.initialHide),i=t(d.pinned,d.initialPinned),l=t(d.width,d.initialWidth),r=t(d.flex,d.initialFlex),m=t(d.rowGroupIndex,d.initialRowGroupIndex),n=t(d.rowGroup,d.initialRowGroup);null!=m||null!=n&&0!=n||(m=null,n=null);var u=t(d.pivotIndex,d.initialPivotIndex),p=t(d.pivot,d.initialPivot);null!=u||null!=p&&0!=p||(u=null,p=null);var f=t(d.aggFunc,d.initialAggFunc);return{colId:e.getColId(),sort:a,sortIndex:s,hide:o,pinned:i,width:l,flex:r,rowGroup:n,rowGroupIndex:m,pivot:p,pivotIndex:u,aggFunc:f}},t.prototype.applyColumnState=function(e,t){var d=this;if(i(this.primaryColumns))return!1;if(e&&e.state&&!e.state.forEach)return console.warn("AG Grid: applyColumnState() - the state attribute should be an array, however an array was not found. Please provide an array of items (one for each col you want to change) for state."),!1;var a=function(a,s,o){var i=d.compareColumnStatesAndDispatchEvents(t);d.autoGroupsNeedBuilding=!0;var l=s.slice(),r={},m={},n=[],u=[],p=0,f=d.rowGroupColumns.slice(),c=d.pivotColumns.slice();a.forEach((function(a){var s=a.colId||"";if(s.startsWith(dt))return n.push(a),void u.push(a);var i=o(s);i?(d.syncColumnWithStateItem(i,a,e.defaultState,r,m,!1,t),ge(l,i)):(u.push(a),p+=1)}));var _=function(a){return d.syncColumnWithStateItem(a,null,e.defaultState,r,m,!1,t)};l.forEach(_);var y=function(e,t,d,a){var s=e[d.getId()],o=e[a.getId()],i=null!=s,l=null!=o;if(i&&l)return s-o;if(i)return-1;if(l)return 1;var r=t.indexOf(d),m=t.indexOf(a),n=r>=0;return n&&m>=0?r-m:n?-1:1};d.rowGroupColumns.sort(y.bind(d,r,f)),d.pivotColumns.sort(y.bind(d,m,c)),d.updateGridColumns();var C=d.groupAutoColumns?d.groupAutoColumns.slice():[];return n.forEach((function(a){var s=d.getAutoColumn(a.colId);ge(C,s),d.syncColumnWithStateItem(s,a,e.defaultState,null,null,!0,t)})),C.forEach(_),d.applyOrderAfterApplyState(e),d.updateDisplayedColumns(t),d.dispatchEverythingChanged(t),i(),{unmatchedAndAutoStates:u,unmatchedCount:p}};this.columnAnimationService.start();var o=a(e.state||[],this.primaryColumns||[],(function(e){return d.getPrimaryColumn(e)})),l=o.unmatchedAndAutoStates,r=o.unmatchedCount;return(l.length>0||s(e.defaultState))&&(r=a(l,this.secondaryColumns||[],(function(e){return d.getSecondaryColumn(e)})).unmatchedCount),this.columnAnimationService.finish(),0===r},t.prototype.applyOrderAfterApplyState=function(e){var t=this;if(e.applyOrder&&e.state){var d=[],a={};e.state.forEach((function(e){if(e.colId&&!a[e.colId]){var s=t.gridColumnsMap[e.colId];s&&(d.push(s),a[e.colId]=!0)}}));var s=0;this.gridColumns.forEach((function(e){var t=e.getColId();null!=a[t]||(t.startsWith(dt)?ve(d,e,s++):d.push(e))})),d=this.placeLockedColumns(d),this.doesMovePassMarryChildren(d)?this.gridColumns=d:console.warn("AG Grid: Applying column order broke a group where columns should be married together. Applying new order has been discarded.")}},t.prototype.compareColumnStatesAndDispatchEvents=function(e){var t=this,d={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},a=this.getColumnState(),s={};return a.forEach((function(e){s[e.colId]=e})),function(){var o=t.getPrimaryAndSecondaryAndAutoColumns(),i=function(d,a,s,o){if(!Pe(a.map(o),s.map(o))){var i=new Set(a);s.forEach((function(e){i.delete(e)||i.add(e)}));var l=Ct([],yt(i),!1),r={type:d,columns:l,column:1===l.length?l[0]:null,source:e};t.eventService.dispatchEvent(r)}},l=function(e){var t=[];return o.forEach((function(d){var a=s[d.getColId()];a&&e(a,d)&&t.push(d)})),t},r=function(e){return e.getColId()};i(Je.EVENT_COLUMN_ROW_GROUP_CHANGED,d.rowGroupColumns,t.rowGroupColumns,r),i(Je.EVENT_COLUMN_PIVOT_CHANGED,d.pivotColumns,t.pivotColumns,r);var m=l((function(e,t){var d=null!=e.aggFunc,a=d!=t.isValueActive(),s=d&&e.aggFunc!=t.getAggFunc();return a||s}));m.length>0&&t.dispatchColumnChangedEvent(Je.EVENT_COLUMN_VALUE_CHANGED,m,e);t.dispatchColumnResizedEvent(l((function(e,t){return e.width!=t.getActualWidth()})),!0,e);t.dispatchColumnPinnedEvent(l((function(e,t){return e.pinned!=t.getPinned()})),e);t.dispatchColumnVisibleEvent(l((function(e,t){return e.hide==t.isVisible()})),e);l((function(e,t){return e.sort!=t.getSort()||e.sortIndex!=t.getSortIndex()})).length>0&&t.sortController.dispatchSortChangedEvents(e),t.normaliseColumnMovedEventForColumnState(a,e)}},t.prototype.getCommonValue=function(e,t){if(e&&0!=e.length){for(var d=t(e[0]),a=1;a=u&&e.setActualWidth(f,l)}var c=r("sort").value1;void 0!==c&&("desc"===c||"asc"===c?e.setSort(c,l):e.setSort(void 0,l));var _=r("sortIndex").value1;if(void 0!==_&&e.setSortIndex(_),!i&&e.isPrimary()){var y=r("aggFunc").value1;void 0!==y&&("string"===typeof y?(e.setAggFunc(y),e.isValueActive()||(e.setValueActive(!0,l),this.valueColumns.push(e))):(s(y)&&console.warn("AG Grid: stateItem.aggFunc must be a string. if using your own aggregation functions, register the functions first before using them in get/set state. This is because it is intended for the column state to be stored and retrieved as simple JSON."),e.isValueActive()&&(e.setValueActive(!1,l),ge(this.valueColumns,e))));var C=r("rowGroup","rowGroupIndex"),b=C.value1,q=C.value2;void 0===b&&void 0===q||("number"===typeof q||b?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),a&&"number"===typeof q&&(a[e.getId()]=q)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),ge(this.rowGroupColumns,e)));var P=r("pivot","pivotIndex"),h=P.value1,T=P.value2;void 0===h&&void 0===T||("number"===typeof T||h?(e.isPivotActive()||(e.setPivotActive(!0,l),this.pivotColumns.push(e)),o&&"number"===typeof T&&(o[e.getId()]=T)):e.isPivotActive()&&(e.setPivotActive(!1,l),ge(this.pivotColumns,e)))}}},t.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},t.prototype.getColumns=function(e,t){var d=[];return e&&e.forEach((function(e){var a=t(e);a&&d.push(a)})),d},t.prototype.getColumnWithValidation=function(e){if(null==e)return null;var t=this.getGridColumn(e);return t||console.warn("AG Grid: could not find column "+e),t},t.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},t.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},t.prototype.lookupGridColumn=function(e){return this.gridColumnsMap[e]},t.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},t.prototype.getColumn=function(e,t,d){if(!e||!d)return null;if("string"==typeof e&&d[e])return d[e];for(var a=0;a=0:u?void 0!==c?c:!!(void 0!==y)&&(null!=y&&y>=0):t.indexOf(d)>=0)&&((u?null!=_||null!=y:null!=_)?l.push(d):n.push(d))}));var u=function(e){var t=a(e.getColDef()),d=s(e.getColDef());return null!=t?t:d};l.sort((function(e,t){var d=u(e),a=u(t);return d===a?0:d=0&&p.push(e)})),n.forEach((function(e){p.indexOf(e)<0&&p.push(e)})),t.forEach((function(e){p.indexOf(e)<0&&d(e,!1)})),p.forEach((function(e){t.indexOf(e)<0&&d(e,!0)})),p},t.prototype.extractPivotColumns=function(e,t){this.pivotColumns=this.extractColumns(t,this.pivotColumns,(function(t,d){return t.setPivotActive(d,e)}),(function(e){return e.pivotIndex}),(function(e){return e.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))},t.prototype.resetColumnGroupState=function(e){if(void 0===e&&(e="api"),this.primaryColumnTree){var t=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof ye){var d=e.getColGroupDef(),a={groupId:e.getGroupId(),open:d?d.openByDefault:void 0};t.push(a)}})),this.setColumnGroupState(t,e)}},t.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(t){t instanceof ye&&e.push({groupId:t.getGroupId(),open:t.isExpanded()})})),e},t.prototype.setColumnGroupState=function(e,t){var d=this;if(void 0===t&&(t="api"),this.gridBalancedTree){this.columnAnimationService.start();var a=[];if(e.forEach((function(e){var t=e.groupId,s=e.open,o=d.getProvidedColumnGroup(t);o&&o.isExpanded()!==s&&(d.logger.log("columnGroupOpened("+o.getGroupId()+","+s+")"),o.setExpanded(s),a.push(o))})),this.updateGroupsAndDisplayedColumns(t),this.setFirstRightAndLastLeftPinned(t),a.length){var s={type:Je.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===ye.length?a[0]:void 0,columnGroups:a};this.eventService.dispatchEvent(s)}this.columnAnimationService.finish()}},t.prototype.setColumnGroupOpened=function(e,t,d){var a;void 0===d&&(d="api"),a=e instanceof ye?e.getId():e||"",this.setColumnGroupState([{groupId:a,open:t}],d)},t.prototype.getProvidedColumnGroup=function(e){"string"!==typeof e&&console.error("AG Grid: group key must be a string");var t=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(d){d instanceof ye&&d.getId()===e&&(t=d)})),t},t.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&o(this.secondaryColumns)?this.gridColumns.filter((function(t){var d=e.groupAutoColumns&&De(e.groupAutoColumns,t),a=e.valueColumns&&De(e.valueColumns,t);return d||a})):this.gridColumns.filter((function(t){return e.groupAutoColumns&&De(e.groupAutoColumns,t)||t.isVisible()}))},t.prototype.checkColSpanActiveInCols=function(e){var t=!1;return e.forEach((function(e){s(e.getColDef().colSpan)&&(t=!0)})),t},t.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};this.gridColumns.forEach((function(t){var d=t.getColDef(),a=d.showRowGroup;d&&s(a)&&(e.groupDisplayColumns.push(t),"string"===typeof a?e.groupDisplayColumnsMap[a]=t:!0===a&&e.getRowGroupColumns().forEach((function(d){e.groupDisplayColumnsMap[d.getId()]=t})))}))},t.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},t.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},t.prototype.updateDisplayedColumns=function(e){var t=this.calculateColumnsForDisplay();this.buildDisplayedTrees(t),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},t.prototype.isSecondaryColumnsPresent=function(){return s(this.secondaryColumns)},t.prototype.setSecondaryColumns=function(e,t){var d=this;if(void 0===t&&(t="api"),this.gridColumns){var a=e&&e.length>0;if(a||!o(this.secondaryColumns)){if(a){this.processSecondaryColumnDefinitions(e);var s=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,s.columnTree),this.secondaryBalancedTree=s.columnTree,this.secondaryHeaderRowCount=s.treeDept+1,this.secondaryColumns=this.getColumnsFromTree(this.secondaryBalancedTree),this.secondaryColumnsMap={},this.secondaryColumns.forEach((function(e){return d.secondaryColumnsMap[e.getId()]=e})),this.previousSecondaryColumns=null}else this.previousSecondaryColumns=this.secondaryBalancedTree,this.secondaryBalancedTree=null,this.secondaryHeaderRowCount=-1,this.secondaryColumns=null,this.secondaryColumnsMap={};this.updateGridColumns(),this.updateDisplayedColumns(t)}}},t.prototype.processSecondaryColumnDefinitions=function(e){var t=this.gridOptionsService.get("processPivotResultColDef"),d=this.gridOptionsService.get("processPivotResultColGroupDef");if(t||d){var a=function(e){e.forEach((function(e){if(s(e.children)){var o=e;d&&d(o),a(o.children)}else{t&&t(e)}}))};e&&a(e)}},t.prototype.updateGridColumns=function(){var e,t=this,d=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.secondaryColumns&&this.secondaryBalancedTree){var a=this.secondaryColumns.every((function(e){return void 0!==t.gridColumnsMap[e.getColId()]}));this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,a&&(e=this.lastSecondaryOrder)}else this.primaryColumns&&(this.gridBalancedTree=this.primaryColumnTree.slice(),this.gridHeaderRowCount=this.primaryHeaderRowCount,this.gridColumns=this.primaryColumns.slice(),this.gridColsArePrimary=!0,e=this.lastPrimaryOrder);if(this.createGroupAutoColumnsIfNeeded()&&e){var s=nt(this.groupAutoColumns.map((function(e){return[e,!0]})));e=e.filter((function(e){return!s.has(e)})),e=Ct(Ct([],yt(this.groupAutoColumns),!1),yt(e),!1)}if(this.addAutoGroupToGridColumns(),this.orderGridColsLike(e),this.gridColumns=this.placeLockedColumns(this.gridColumns),this.calculateColumnsForGroupDisplay(),this.refreshQuickFilterColumns(),this.clearDisplayedAndViewportColumns(),this.colSpanActive=this.checkColSpanActiveInCols(this.gridColumns),this.gridColumnsMap={},this.gridColumns.forEach((function(e){return t.gridColumnsMap[e.getId()]=e})),this.setAutoHeightActive(),!Pe(d,this.gridBalancedTree)){var o={type:Je.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(o)}},t.prototype.setAutoHeightActive=function(){(this.autoHeightActive=this.gridColumns.filter((function(e){return e.isAutoHeight()})).length>0,this.autoHeightActive)&&(this.autoHeightActiveAtLeastOnce=!0,this.gridOptionsService.isRowModelType("clientSide")||this.gridOptionsService.isRowModelType("serverSide")||M("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))},t.prototype.orderGridColsLike=function(e){if(!o(e)){var t=nt(e.map((function(e,t){return[e,t]}))),d=!0;if(this.gridColumns.forEach((function(e){t.has(e)&&(d=!1)})),!d){var a=nt(this.gridColumns.map((function(e){return[e,!0]}))),s=e.filter((function(e){return a.has(e)})),i=nt(s.map((function(e){return[e,!0]}))),l=this.gridColumns.filter((function(e){return!i.has(e)})),r=s.slice();l.forEach((function(e){var t=e.getOriginalParent();if(t){for(var d=[];!d.length&&t;){t.getLeafColumns().forEach((function(e){var t=r.indexOf(e)>=0,a=d.indexOf(e)<0;t&&a&&d.push(e)})),t=t.getOriginalParent()}if(d.length){var a=d.map((function(e){return r.indexOf(e)})),s=Math.max.apply(Math,Ct([],yt(a),!1));ve(r,e,s+1)}else r.push(e)}else r.push(e)})),this.gridColumns=r}}},t.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},t.prototype.refreshQuickFilterColumns=function(){var e,t=null!==(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)&&void 0!==e?e:[];this.groupAutoColumns&&(t=t.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.get("includeHiddenColumnsInQuickFilter")?t:t.filter((function(e){return e.isVisible()||e.isRowGroupActive()}))},t.prototype.placeLockedColumns=function(e){var t=[],d=[],a=[];return e.forEach((function(e){var s=e.getColDef().lockPosition;"right"===s?a.push(e):"left"===s||!0===s?t.push(e):d.push(e)})),Ct(Ct(Ct([],yt(t),!1),yt(d),!1),yt(a),!1)},t.prototype.addAutoGroupToGridColumns=function(){if(o(this.groupAutoColumns))return this.destroyOldColumns(this.groupAutoColsBalancedTree),void(this.groupAutoColsBalancedTree=null);this.gridColumns=this.groupAutoColumns?this.groupAutoColumns.concat(this.gridColumns):this.gridColumns;var e=this.columnFactory.createForAutoGroups(this.groupAutoColumns,this.gridBalancedTree);this.destroyOldColumns(this.groupAutoColsBalancedTree,e),this.groupAutoColsBalancedTree=e,this.gridBalancedTree=e.concat(this.gridBalancedTree)},t.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},t.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var t={type:Je.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(t)},t.prototype.deriveDisplayedColumns=function(e){this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeLeft,this.displayedColumnsLeft),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeCentre,this.displayedColumnsCenter),this.derivedDisplayedColumnsFromDisplayedTree(this.displayedTreeRight,this.displayedColumnsRight),this.joinDisplayedColumns(),this.setLeftValues(e),this.displayedAutoHeightCols=this.displayedColumns.filter((function(e){return e.isAutoHeight()}))},t.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},t.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},t.prototype.joinDisplayedColumns=function(){this.gridOptionsService.get("enableRtl")?this.displayedColumns=this.displayedColumnsRight.concat(this.displayedColumnsCenter).concat(this.displayedColumnsLeft):this.displayedColumns=this.displayedColumnsLeft.concat(this.displayedColumnsCenter).concat(this.displayedColumnsRight)},t.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},t.prototype.setLeftValuesOfColumns=function(e){var t=this;if(this.primaryColumns){var d=this.primaryColumns.slice(0),a=this.gridOptionsService.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(s){if(a){var o=t.getWidthOfColsInList(s);s.forEach((function(t){o-=t.getActualWidth(),t.setLeft(o,e)}))}else{var i=0;s.forEach((function(t){t.setLeft(i,e),i+=t.getActualWidth()}))}Se(d,s)})),d.forEach((function(t){t.setLeft(null,e)}))}},t.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){e instanceof Xe&&e.checkLeft()}))}))},t.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,t){t.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof ce&&t.push(e)}))},t.prototype.extractViewportColumns=function(){this.suppressColumnVirtualisation?(this.viewportColumnsCenter=this.displayedColumnsCenter,this.headerViewportColumnsCenter=this.displayedColumnsCenter):(this.viewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInRowViewport.bind(this)),this.headerViewportColumnsCenter=this.displayedColumnsCenter.filter(this.isColumnInHeaderViewport.bind(this))),this.viewportColumns=this.viewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight),this.headerViewportColumns=this.headerViewportColumnsCenter.concat(this.displayedColumnsLeft).concat(this.displayedColumnsRight)},t.prototype.getVirtualHeaderGroupRow=function(e,t){var d;switch(e){case"left":d=this.viewportRowLeft[t];break;case"right":d=this.viewportRowRight[t];break;default:d=this.viewportRowCenter[t]}return o(d)&&(d=[]),d},t.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach((function(t){return e[t.getId()]=!0}));var t=function(d,a,s){for(var o=!1,i=0;i=0;l--)if(o.has(i[l])){a=l;break}var r=0,m=[],n=0,u=0;for(l=0;la?(m.push(this.displayedColumnsCenter[l]),u+=this.displayedColumnsCenter[l].getFlex(),n+=null!==(t=this.displayedColumnsCenter[l].getMinWidth())&&void 0!==t?t:0):r+=this.displayedColumnsCenter[l].getActualWidth()}if(!m.length)return[];var p=[];r+n>this.flexViewportWidth&&(m.forEach((function(e){var t;return e.setActualWidth(null!==(t=e.getMinWidth())&&void 0!==t?t:0,d)})),p=m,m=[]);var f,c=[];e:for(;;){var _=(f=this.flexViewportWidth-r)/u;for(l=0;lP&&(b=P),b){y.setActualWidth(b,d),Te(m,y),u-=y.getFlex(),p.push(y),r+=y.getActualWidth();continue e}c[l]=Math.round(C)}break}var h=f;return m.forEach((function(e,t){e.setActualWidth(Math.min(c[t],h),d),p.push(e),h-=c[t]})),e.skipSetLeft||this.setLeftValues(d),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(p,!0,d,m),m},t.prototype.sizeColumnsToFit=function(e,t,d,a){var o,i,l,r,m,n=this;if(void 0===t&&(t="sizeColumnsToFit"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return n.sizeColumnsToFit(e,t,d,a)}));else{var u={};a&&(null===(o=null===a||void 0===a?void 0:a.columnLimits)||void 0===o||o.forEach((function(e){var t=e.key,d=_t(e,["key"]);u["string"===typeof t?t:t.getColId()]=d})));var p=this.getAllDisplayedColumns(),f=e===this.getWidthOfColsInList(p);if(!(e<=0||!p.length||f)){var c=[],_=[];p.forEach((function(e){!0===e.getColDef().suppressSizeToFit?_.push(e):c.push(e)}));var y=c.slice(0),C=!1,b=function(e){ge(c,e),_.push(e)};for(c.forEach((function(e){var d,s;e.resetActualWidth(t);var o=null===u||void 0===u?void 0:u[e.getId()],i=null!==(d=null===o||void 0===o?void 0:o.minWidth)&&void 0!==d?d:null===a||void 0===a?void 0:a.defaultMinWidth,l=null!==(s=null===o||void 0===o?void 0:o.maxWidth)&&void 0!==s?s:null===a||void 0===a?void 0:a.defaultMaxWidth,r=e.getActualWidth();"number"===typeof i&&rl&&e.setActualWidth(l,t,!0)}));!C;){C=!0;var q=e-this.getWidthOfColsInList(_);if(q<=0)c.forEach((function(e){var d,s,o=null!==(s=null===(d=null===u||void 0===u?void 0:u[e.getId()])||void 0===d?void 0:d.minWidth)&&void 0!==s?s:null===a||void 0===a?void 0:a.defaultMinWidth;"number"!==typeof o?e.setMinimum(t):e.setActualWidth(o,t,!0)}));else for(var P=q/this.getWidthOfColsInList(c),h=q,T=c.length-1;T>=0;T--){var g=c[T],S=null===u||void 0===u?void 0:u[g.getId()],O=null!==(i=null===S||void 0===S?void 0:S.minWidth)&&void 0!==i?i:null===a||void 0===a?void 0:a.defaultMinWidth,v=null!==(l=null===S||void 0===S?void 0:S.maxWidth)&&void 0!==l?l:null===a||void 0===a?void 0:a.defaultMaxWidth,I=null!==(r=g.getMinWidth())&&void 0!==r?r:0,D=null!==(m=g.getMaxWidth())&&void 0!==m?m:Number.MAX_VALUE,B="number"===typeof O&&O>I?O:g.getMinWidth(),G="number"===typeof v&&vG?(M=G,b(g),C=!1):0===T&&(M=h),g.setActualWidth(M,t,!0),h-=M}}y.forEach((function(e){e.fireColumnWidthChangedEvent(t)})),this.setLeftValues(t),this.updateBodyWidths(),d||this.dispatchColumnResizedEvent(y,!0,t)}}},t.prototype.buildDisplayedTrees=function(e){var t=[],d=[],a=[];e.forEach((function(e){switch(e.getPinned()){case"left":t.push(e);break;case"right":d.push(e);break;default:a.push(e)}}));var s=new Ze;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(t,s,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(d,s,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(a,s,null,this.displayedTreeCentre),this.updateDisplayedMap()},t.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var t=function(t){e.displayedColumnsAndGroupsMap[t.getUniqueId()]=t};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,t),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,t)},t.prototype.isDisplayed=function(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e},t.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof Xe&&e.calculateDisplayedColumns()}))},t.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},t.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var t=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),d=this.pivotMode?this.gridOptionsService.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.gridOptionsService.get("treeData"))&&!d&&!t){var a=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(a,this.groupAutoColumns)||e)return this.groupAutoColumns=a,!0}else this.groupAutoColumns=null;return!1},t.prototype.isGroupSuppressAutoColumn=function(){return"custom"===this.gridOptionsService.get("groupDisplayType")||"custom"===this.gridOptionsService.get("treeDataDisplayType")},t.prototype.autoColsEqual=function(e,t){return Pe(e,t,(function(e,t){return e.getColId()===t.getColId()}))},t.prototype.getWidthOfColsInList=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.get("enableRtl"),t=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&t.reverse();for(var d=0;dthis.rowGroupColumns.findIndex((function(t){return t.getColId()===e.getColId()})))},t.prototype.generateColumnStateForRowGroupAndPivotIndexes=function(e,t){var d=this,a={},s=function(e,t,s,o,i,l){if(!t.length||!d.primaryColumns)return[];for(var r=Object.keys(e),m=new Set(r),n=new Set(r),u=new Set(t.map((function(e){var t=e.getColId();return n.delete(t),t})).concat(r)),p=[],f={},c=0,_=0;_=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Tt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Pt(t,e),t.prototype.calculateColMinWidth=function(e){return null!=e.minWidth?e.minWidth:this.environment.getMinColWidth()},t.prototype.calculateColMaxWidth=function(e){return null!=e.maxWidth?e.maxWidth:Number.MAX_SAFE_INTEGER},t.prototype.calculateColInitialWidth=function(e){var t,d=this.calculateColMinWidth(e),a=this.calculateColMaxWidth(e),s=r(e.width),o=r(e.initialWidth);return t=null!=s?s:null!=o?o:200,Math.max(Math.min(t,a),d)},t.prototype.getOriginalPathForColumn=function(e,t){var d=[],a=!1,s=function(t,o){for(var i=0;i=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return gt(t,e),t.prototype.createDisplayedGroups=function(e,t,d,a){for(var s=this,o=this.mapOldGroupsById(a),i=[],l=e,r=function(){var e=l;l=[];for(var a=0,r=function(r){var m=a;a=r;var n=e[m],u=(n instanceof Xe?n.getProvidedColumnGroup():n).getOriginalParent();if(null!=u){var p=s.createColumnGroup(u,t,o,d);for(f=m;f0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},It=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},wt=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Rt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.componentsMappedByName={},t}return Et(t,e),t.prototype.setupComponents=function(e){var t=this;e&&e.forEach((function(e){return t.addComponent(e)}))},t.prototype.addComponent=function(e){var t=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[t]=e.componentClass},t.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},t=Vt([te("agStackComponentsRegistry")],t)}(ze);function At(e,t,d){null==d||"string"===typeof d&&""==d?Wt(e,t):xt(e,t,d)}function xt(e,t,d){e.setAttribute(Ft(t),d.toString())}function Wt(e,t){e.removeAttribute(Ft(t))}function Ft(e){return"aria-".concat(e)}function Nt(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function kt(e){return"asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none"}function Ht(e){return parseInt(e.getAttribute("aria-level"),10)}function jt(e){return parseInt(e.getAttribute("aria-posinset"),10)}function zt(e){return e.getAttribute("aria-label")}function Ut(e,t){At(e,"label",t)}function Kt(e,t){At(e,"labelledby",t)}function Yt(e,t){At(e,"description",t)}function Qt(e,t){At(e,"live",t)}function $t(e,t){At(e,"level",t)}function Xt(e,t){At(e,"disabled",t)}function Jt(e,t){At(e,"hidden",t)}function Zt(e,t){At(e,"activedescendant",t)}function ed(e,t){xt(e,"expanded",t)}function td(e){Wt(e,"expanded")}function dd(e,t){xt(e,"setsize",t)}function ad(e,t){xt(e,"posinset",t)}function sd(e,t){xt(e,"multiselectable",t)}function od(e,t){xt(e,"rowcount",t)}function id(e,t){xt(e,"rowindex",t)}function ld(e,t){xt(e,"colcount",t)}function rd(e,t){xt(e,"colindex",t)}function md(e,t){xt(e,"colspan",t)}function nd(e,t){xt(e,"sort",t)}function ud(e){Wt(e,"sort")}function pd(e,t){At(e,"selected",t)}function fd(e,t){At(e,"controls",t.id),Kt(t,e.id)}function cd(e,t){return void 0===t?e("ariaIndeterminate","indeterminate"):!0===t?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var _d,yd,Cd,bd,qd,Pd,hd,Td,gd=Object.freeze({__proto__:null,setAriaRole:Nt,getAriaSortState:kt,getAriaLevel:Ht,getAriaPosInSet:jt,getAriaLabel:zt,setAriaLabel:Ut,setAriaLabelledBy:Kt,setAriaDescription:Yt,setAriaDescribedBy:function(e,t){At(e,"describedby",t)},setAriaLive:Qt,setAriaAtomic:function(e,t){At(e,"atomic",t)},setAriaRelevant:function(e,t){At(e,"relevant",t)},setAriaLevel:$t,setAriaDisabled:Xt,setAriaHidden:Jt,setAriaActiveDescendant:Zt,setAriaExpanded:ed,removeAriaExpanded:td,setAriaSetSize:dd,setAriaPosInSet:ad,setAriaMultiSelectable:sd,setAriaRowCount:od,setAriaRowIndex:id,setAriaColCount:ld,setAriaColIndex:rd,setAriaColSpan:md,setAriaSort:nd,removeAriaSort:ud,setAriaSelected:pd,setAriaChecked:function(e,t){xt(e,"checked",void 0===t?"mixed":t)},setAriaControls:fd,getAriaCheckboxStateName:cd});function Sd(){return void 0===_d&&(_d=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_d}function Od(){if(void 0===yd)if(Sd()){var e=navigator.userAgent.match(/version\/(\d+)/i);e&&(yd=null!=e[1]?parseFloat(e[1]):0)}else yd=0;return yd}function vd(){if(void 0===Cd){var e=window;Cd=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return Cd}function Id(){return void 0===bd&&(bd=/(firefox)/i.test(navigator.userAgent)),bd}function Dd(){return void 0===qd&&(qd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),qd}function Bd(){return void 0===Pd&&(Pd=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Pd}function Gd(){return!Sd()||Od()>=15}function Md(e){if(!e)return null;var t=e.tabIndex,d=e.getAttribute("tabIndex");return-1!==t||null!==d&&(""!==d||Id())?t.toString():null}function wd(){if(!document.body)return-1;var e=1e6,t=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,d=document.createElement("div");for(document.body.appendChild(d);;){var a=2*e;if(d.style.height=a+"px",a>t||d.clientHeight!==a)break;e=a}return document.body.removeChild(d),e}function Ld(){var e,t,d;return null!==(t=null===(e=document.body)||void 0===e?void 0:e.clientWidth)&&void 0!==t?t:window.innerHeight||(null===(d=document.documentElement)||void 0===d?void 0:d.clientWidth)||-1}function Ed(){var e,t,d;return null!==(t=null===(e=document.body)||void 0===e?void 0:e.clientHeight)&&void 0!==t?t:window.innerHeight||(null===(d=document.documentElement)||void 0===d?void 0:d.clientHeight)||-1}function Vd(){return null==Td&&Rd(),Td}function Rd(){var 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);var d=t.offsetWidth-t.clientWidth;0===d&&0===t.clientWidth&&(d=null),t.parentNode&&t.parentNode.removeChild(t),null!=d&&(Td=d,hd=0===d)}function Ad(){return null==hd&&Rd(),hd}var xd=Object.freeze({__proto__:null,isBrowserSafari:Sd,getSafariVersion:Od,isBrowserChrome:vd,isBrowserFirefox:Id,isMacOsUserAgent:Dd,isIOSUserAgent:Bd,browserSupportsPreventScroll:Gd,getTabIndex:Md,getMaxDivHeight:wd,getBodyWidth:Ld,getBodyHeight:Ed,getScrollbarWidth:Vd,isInvisibleScrollbar:Ad});function Wd(e,t){return e.toString().padStart(t,"0")}function Fd(e,t){for(var d=[],a=e;a<=t;a++)d.push(a);return d}function Nd(e,t,d){return"number"!==typeof e?"":e.toString().replace(".",d).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1".concat(t))}var kd=Object.freeze({__proto__:null,padStartWidthZeros:Wd,createArrayOfNumbers:Fd,cleanNumber:function(e){return"string"===typeof e&&(e=parseInt(e,10)),"number"===typeof e?Math.floor(e):null},decToHex:function(e,t){for(var d="",a=0;a>>=8;return d},formatNumberTwoDecimalPlacesAndCommas:function(e,t,d){return"number"!==typeof e?"":Nd(Math.round(100*e)/100,t,d)},formatNumberCommas:Nd,sum:function(e){return null==e?null:e.reduce((function(e,t){return e+t}),0)}}),Hd=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i};function jd(e,t,d){if(void 0===t&&(t=!0),void 0===d&&(d="-"),!e)return null;var a=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return Wd(e,2)})).join(d);return t&&(a+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return Wd(e,2)})).join(":")),a}var zd=function(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function Ud(e,t){void 0===t&&(t="YYYY-MM-DD");var d=Wd(e.getFullYear(),4),a=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o={YYYY:function(){return d.slice(d.length-4,d.length)},YY:function(){return d.slice(d.length-2,d.length)},Y:function(){return"".concat(e.getFullYear())},MMMM:function(){return a[e.getMonth()]},MMM:function(){return a[e.getMonth()].slice(0,3)},MM:function(){return Wd(e.getMonth()+1,2)},Mo:function(){return"".concat(e.getMonth()+1).concat(zd(e.getMonth()+1))},M:function(){return"".concat(e.getMonth()+1)},Do:function(){return"".concat(e.getDate()).concat(zd(e.getDate()))},DD:function(){return Wd(e.getDate(),2)},D:function(){return"".concat(e.getDate())},dddd:function(){return s[e.getDay()]},ddd:function(){return s[e.getDay()].slice(0,3)},dd:function(){return s[e.getDay()].slice(0,2)},do:function(){return"".concat(e.getDay()).concat(zd(e.getDay()))},d:function(){return"".concat(e.getDay())}},i=new RegExp(Object.keys(o).join("|"),"g");return t.replace(i,(function(e){return e in o?o[e]():e}))}function Kd(e){if(!e)return null;var t=Hd(e.split(" "),2),d=t[0],a=t[1];if(!d)return null;var s=d.split("-").map((function(e){return parseInt(e,10)}));if(3!==s.filter((function(e){return!isNaN(e)})).length)return null;var o=Hd(s,3),i=o[0],l=o[1],r=o[2],m=new Date(i,l-1,r);if(m.getFullYear()!==i||m.getMonth()!==l-1||m.getDate()!==r)return null;if(!a||"00:00:00"===a)return m;var n=Hd(a.split(":").map((function(e){return parseInt(e,10)})),3),u=n[0],p=n[1],f=n[2];return u>=0&&u<24&&m.setHours(u),p>=0&&p<60&&m.setMinutes(p),f>=0&&f<60&&m.setSeconds(f),m}var Yd,Qd=Object.freeze({__proto__:null,serialiseDate:jd,dateToFormattedString:Ud,parseDateTimeFromString:Kd}),$d=function(e){var t="function"===typeof Symbol&&Symbol.iterator,d=t&&e[t],a=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Xd=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i};function Jd(e,t,d){for(var a=e.parentElement,s=a&&a.firstChild;s;)t&&s.classList.toggle(t,s===e),d&&s.classList.toggle(d,s!==e),s=s.nextSibling}var Zd="[tabindex], input, select, button, textarea, [href]",ea="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function ta(e){var t=Element.prototype.matches||Element.prototype.msMatchesSelector,d=t.call(e,"input, select, button, textarea"),a=t.call(e,ea),s=Ca(e);return d&&!a&&s}function da(e,t,d){void 0===d&&(d={});var a=d.skipAriaHidden;e.classList.toggle("ag-hidden",!t),a||Jt(e,!t)}function aa(e,t,d){void 0===d&&(d={});var a=d.skipAriaHidden;e.classList.toggle("ag-invisible",!t),a||Jt(e,!t)}function sa(e,t){var d="disabled",a=t?function(e){return e.setAttribute(d,"")}:function(e){return e.removeAttribute(d)};a(e),Va(e.querySelectorAll("input"),(function(e){return a(e)}))}function oa(e,t,d){for(var a=0;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,"number"==typeof d){if(++a>d)break}else if(e===d)break}return!1}function ia(e){var t=window.getComputedStyle(e),d=t.height,a=t.width,s=t.borderTopWidth,o=t.borderRightWidth,i=t.borderBottomWidth,l=t.borderLeftWidth,r=t.paddingTop,m=t.paddingRight,n=t.paddingBottom,u=t.paddingLeft,p=t.marginTop,f=t.marginRight,c=t.marginBottom,_=t.marginLeft,y=t.boxSizing;return{height:parseFloat(d),width:parseFloat(a),borderTopWidth:parseFloat(s),borderRightWidth:parseFloat(o),borderBottomWidth:parseFloat(i),borderLeftWidth:parseFloat(l),paddingTop:parseFloat(r),paddingRight:parseFloat(m),paddingBottom:parseFloat(n),paddingLeft:parseFloat(u),marginTop:parseFloat(p),marginRight:parseFloat(f),marginBottom:parseFloat(c),marginLeft:parseFloat(_),boxSizing:y}}function la(e){var t=ia(e);return"border-box"===t.boxSizing?t.height-t.paddingTop-t.paddingBottom:t.height}function ra(e){var t=ia(e);return"border-box"===t.boxSizing?t.width-t.paddingLeft-t.paddingRight:t.width}function ma(e){var t=ia(e),d=t.marginBottom+t.marginTop;return Math.ceil(e.offsetHeight+d)}function na(e){var t=ia(e),d=t.marginLeft+t.marginRight;return Math.ceil(e.offsetWidth+d)}function ua(e){var t=e.getBoundingClientRect(),d=ia(e),a=d.borderTopWidth,s=d.borderLeftWidth,o=d.borderRightWidth,i=d.borderBottomWidth;return{top:t.top+(a||0),left:t.left+(s||0),right:t.right+(o||0),bottom:t.bottom+(i||0)}}function pa(){if("boolean"===typeof Yd)return Yd;var e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML='
\n \n \n
',document.body.appendChild(e),e.scrollLeft=1,Yd=0===Math.floor(e.scrollLeft),document.body.removeChild(e),Yd}function fa(e,t){var d=e.scrollLeft;return t&&(d=Math.abs(d),vd()&&!pa()&&(d=e.scrollWidth-e.clientWidth-d)),d}function ca(e,t,d){d&&(pa()?t*=-1:(Sd()||vd())&&(t=e.scrollWidth-e.clientWidth-t)),e.scrollLeft=t}function _a(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function ya(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Ca(e){var t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!e.offsetParent||"visible"!==window.getComputedStyle(e).visibility)}function ba(e){var t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function qa(e){return e&&e.clientHeight?e.clientHeight:0}function Pa(e){return e&&e.clientWidth?e.clientWidth:0}function ha(e,t,d){if(!d||d.nextSibling!==t){var a=document.activeElement,s=t.contains(a);d?d.nextSibling?e.insertBefore(t,d.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t),s&&a&&Gd()&&a.focus({preventScroll:!0})}}function Ta(e,t){for(var d=0;d=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function Wa(e,t,d){var a={},s=e.filter((function(e){return!t.some((function(t){return t===e}))}));return s.length>0&&s.forEach((function(e){return a[e]=Fa(e,d).values})),a}function Fa(e,t,d,a){var s,o,i=t.map((function(t,d){return{value:t,relevance:Na(e.toLowerCase(),t.toLocaleLowerCase()),idx:d}}));if(i.sort((function(e,t){return t.relevance-e.relevance})),d&&(i=i.filter((function(e){return 0!==e.relevance}))),i.length>0&&a&&a>0){var l=i[0].relevance*a;i=i.filter((function(e){return l-e.relevance<0}))}var r=[],m=[];try{for(var n=xa(i),u=n.next();!u.done;u=n.next()){var p=u.value;r.push(p.value),m.push(p.idx)}}catch(f){s={error:f}}finally{try{u&&!u.done&&(o=n.return)&&o.call(n)}finally{if(s)throw s.error}}return{values:r,indices:m}}function Na(e,t){for(var d=e.replace(/\s/g,""),a=t.replace(/\s/g,""),s=0,o=-1,i=0;i-1||"object"===typeof s&&s["ag-icon"])return a}var o=document.createElement("span");return o.appendChild(a),o}function za(e,t,d,a){var s=null,o=d&&d.getColDef().icons;if(o&&(s=o[e]),t&&!s){var i=t.get("icons");i&&(s=i[e])}if(!s){var l=document.createElement("span"),r=Ha[e];return r||(a?r=e:(console.warn("AG Grid: Did not find icon ".concat(e)),r="")),l.setAttribute("class","ag-icon ag-icon-".concat(r)),l.setAttribute("unselectable","on"),Nt(l,"presentation"),l}var m=void 0;if("function"===typeof s)m=s();else{if("string"!==typeof s)throw new Error("icon from grid options needs to be a string or a function");m=s}return"string"===typeof m?ba(m):Ma(m)?m:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var Ua=Object.freeze({__proto__:null,iconNameClassMap:Ha,createIcon:ja,createIconNoSpan:za}),Ka=function(){function e(){}return e.BACKSPACE="Backspace",e.TAB="Tab",e.ENTER="Enter",e.ESCAPE="Escape",e.SPACE=" ",e.LEFT="ArrowLeft",e.UP="ArrowUp",e.RIGHT="ArrowRight",e.DOWN="ArrowDown",e.DELETE="Delete",e.F2="F2",e.PAGE_UP="PageUp",e.PAGE_DOWN="PageDown",e.PAGE_HOME="Home",e.PAGE_END="End",e.A="KeyA",e.C="KeyC",e.D="KeyD",e.V="KeyV",e.X="KeyX",e.Y="KeyY",e.Z="KeyZ",e}();function Ya(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function Qa(e,t,d,a,s){var o=a?a.getColDef().suppressKeyboardEvent:void 0;if(!o)return!1;var i={event:t,editing:s,column:a,api:e.api,node:d,data:d.data,colDef:a.getColDef(),context:e.context,columnApi:e.columnApi};if(o&&o(i))return!0;return!1}function $a(e,t,d,a){var o=a.getDefinition(),i=o&&o.suppressHeaderKeyboardEvent;return!!s(i)&&!!i({api:e.api,columnApi:e.columnApi,context:e.context,colDef:o,column:a,headerRowIndex:d,event:t})}function Xa(e){var t;switch(e.keyCode){case 65:t=Ka.A;break;case 67:t=Ka.C;break;case 86:t=Ka.V;break;case 68:t=Ka.D;break;case 90:t=Ka.Z;break;case 89:t=Ka.Y;break;default:t=e.code}return t}function Ja(e,t){return void 0===t&&(t=!1),e===Ka.DELETE||!t&&e===Ka.BACKSPACE&&Dd()}var Za=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Ya,isUserSuppressingKeyboardEvent:Qa,isUserSuppressingHeaderKeyboardEvent:$a,normaliseQwertyAzerty:Xa,isDeleteKey:Ja});function es(e,t,d){if(0===d)return!1;var a=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(a,s)<=d}var ts=Object.freeze({__proto__:null,areEventsNear:es});var ds=Object.freeze({__proto__:null,sortRowNodesByOrder:function(e,t){if(!e)return!1;for(var d=function(e,d){var a=t[e.id],s=t[d.id],o=void 0!==a,i=void 0!==s;return o&&i?a-s:!o&&!i?e.__objectId-d.__objectId:o?1:-1},a=!1,s=0;s0){a=!0;break}return!!a&&(e.sort(d),!0)}});function as(e){var t=new Set;return e.forEach((function(e){return t.add(e)})),t}var ss,os=Object.freeze({__proto__:null,convertToSet:as}),is=function(){return is=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e[e.NOTHING=0]="NOTHING",e[e.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",e[e.SHOWING=2]="SHOWING"}(ms||(ms={})),function(e){e[e.HOVER=0]="HOVER",e[e.FOCUS=1]="FOCUS"}(ns||(ns={}));var ys=function(e){function t(t,d,a){var s=e.call(this)||this;return s.parentComp=t,s.tooltipShowDelayOverride=d,s.tooltipHideDelayOverride=a,s.SHOW_QUICK_TOOLTIP_DIFF=1e3,s.FADE_OUT_TOOLTIP_TIMEOUT=1e3,s.INTERACTIVE_HIDE_DELAY=100,s.interactionEnabled=!1,s.isInteractingWithTooltip=!1,s.state=ms.NOTHING,s.tooltipInstanceCount=0,s.tooltipMouseTrack=!1,s}return fs(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gridOptionsService.get("tooltipMouseTrack");var e=this.parentComp.getGui();this.tooltipTrigger===ns.HOVER&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===ns.FOCUS&&(this.addManagedListener(e,"focusin",this.onFocusIn.bind(this)),this.addManagedListener(e,"focusout",this.onFocusOut.bind(this))),this.addManagedListener(e,"mousemove",this.onMouseMove.bind(this)),this.interactionEnabled||(this.addManagedListener(e,"mousedown",this.onMouseDown.bind(this)),this.addManagedListener(e,"keydown",this.onKeyDown.bind(this)))},t.prototype.getGridOptionsTooltipDelay=function(e){var t=this.gridOptionsService.get(e);return t<0&&M("".concat(e," should not be lower than 0")),Math.max(200,t)},t.prototype.getTooltipDelay=function(e){var t,d;return"show"===e?null!==(t=this.tooltipShowDelayOverride)&&void 0!==t?t:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!==(d=this.tooltipHideDelayOverride)&&void 0!==d?d:this.getGridOptionsTooltipDelay("tooltipHideDelay")},t.prototype.destroy=function(){this.setToDoNothing(),e.prototype.destroy.call(this)},t.prototype.getTooltipTrigger=function(){var e=this.gridOptionsService.get("tooltipTrigger");return e&&"hover"!==e?ns.FOCUS:ns.HOVER},t.prototype.onMouseEnter=function(e){var d=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),Bd()||(t.isLocked?this.showTooltipTimeoutId=window.setTimeout((function(){d.prepareToShowTooltip(e)}),this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))},t.prototype.onMouseMove=function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===ms.SHOWING&&this.tooltipComp&&this.positionTooltip()},t.prototype.onMouseDown=function(){this.setToDoNothing()},t.prototype.onMouseLeave=function(){this.interactionEnabled?this.lockService():this.setToDoNothing()},t.prototype.onFocusIn=function(){this.prepareToShowTooltip()},t.prototype.onFocusOut=function(e){var t,d=e.relatedTarget,a=this.parentComp.getGui(),s=null===(t=this.tooltipComp)||void 0===t?void 0:t.getGui();this.isInteractingWithTooltip||a.contains(d)||this.interactionEnabled&&(null===s||void 0===s?void 0:s.contains(d))||this.setToDoNothing()},t.prototype.onKeyDown=function(){this.setToDoNothing()},t.prototype.prepareToShowTooltip=function(e){if(this.state!=ms.NOTHING||t.isLocked)return!1;var d=0;return e&&(d=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),d),this.state=ms.WAITING_TO_SHOW,!0},t.prototype.isLastTooltipHiddenRecently=function(){return(new Date).getTime()-t.lastTooltipHideTime1)d.forEach((function(e){return t.addCssClass(e)}));else if(!0!==this.cssClassStates[e]&&e.length){var a=this.getGui();a&&a.classList.add(e),this.cssClassStates[e]=!0}},e.prototype.removeCssClass=function(e){var t=this,d=(e||"").split(" ");if(d.length>1)d.forEach((function(e){return t.removeCssClass(e)}));else if(!1!==this.cssClassStates[e]&&e.length){var a=this.getGui();a&&a.classList.remove(e),this.cssClassStates[e]=!1}},e.prototype.containsCssClass=function(e){var t=this.getGui();return!!t&&t.classList.contains(e)},e.prototype.addOrRemoveCssClass=function(e,t){var d=this;if(e){if(e.indexOf(" ")>=0){var a=(e||"").split(" ");if(a.length>1)return void a.forEach((function(e){return d.addOrRemoveCssClass(e,t)}))}if(this.cssClassStates[e]!==t&&e.length){var s=this.getGui();s&&s.classList.toggle(e,t),this.cssClassStates[e]=t}}},e}(),bs=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),qs=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ps=new rs,hs=function(e){function t(t){var d=e.call(this)||this;return d.displayed=!0,d.visible=!0,d.compId=Ps.next(),d.cssClassManager=new Cs((function(){return d.eGui})),t&&d.setTemplate(t),d}return bs(t,e),t.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.get("enableBrowserTooltips")},t.prototype.getCompId=function(){return this.compId},t.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},t.prototype.setTooltip=function(e,t,d){var a=this;this.tooltipText!=e&&(this.tooltipText&&(a.usingBrowserTooltips?a.getGui().removeAttribute("title"):a.tooltipFeature=a.destroyBean(a.tooltipFeature)),null!=e&&(this.tooltipText=e,this.tooltipText&&(a.usingBrowserTooltips?a.getGui().setAttribute("title",a.tooltipText):a.tooltipFeature=a.createBean(new ys(a,t,d)))))},t.prototype.createChildComponentsFromTags=function(e,t){var d=this;wa(e.childNodes).forEach((function(a){if(a instanceof HTMLElement){var s=d.createComponentFromElement(a,(function(e){e.getGui()&&d.copyAttributesFromNode(a,e.getGui())}),t);if(s){if(s.addItems&&a.children.length){d.createChildComponentsFromTags(a,t);var o=Array.prototype.slice.call(a.children);s.addItems(o)}d.swapComponentForNode(s,e,a)}else a.childNodes&&d.createChildComponentsFromTags(a,t)}}))},t.prototype.createComponentFromElement=function(e,d,a){var s=e.nodeName,o=a?a[e.getAttribute("ref")]:void 0,i=this.agStackComponentsRegistry.getComponentClass(s);if(i){t.elementGettingCreated=e;var l=new i(o);return l.setParentComponent(this),this.createBean(l,null,d),l}return null},t.prototype.copyAttributesFromNode=function(e,t){La(e.attributes,(function(e,d){return t.setAttribute(e,d)}))},t.prototype.swapComponentForNode=function(e,t,d){var a=e.getGui();t.replaceChild(a,d),t.insertBefore(document.createComment(d.nodeName),a),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,d)},t.prototype.swapInComponentForQuerySelectors=function(e,t){var d=this;this.iterateOverQuerySelectors((function(a){d[a.attributeName]===t&&(d[a.attributeName]=e)}))},t.prototype.iterateOverQuerySelectors=function(e){for(var t=Object.getPrototypeOf(this);null!=t;){var d=t.__agComponentMetaData,a=L(t.constructor);d&&d[a]&&d[a].querySelectors&&d[a].querySelectors.forEach((function(t){return e(t)})),t=Object.getPrototypeOf(t)}},t.prototype.activateTabIndex=function(e){var t=this.gridOptionsService.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach((function(e){return e.setAttribute("tabindex",t.toString())}))},t.prototype.setTemplate=function(e,t){var d=ba(e);this.setTemplateFromElement(d,t)},t.prototype.setTemplateFromElement=function(e,t){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),t)},t.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},t.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var t=this;this.iterateOverQuerySelectors((function(d){var a=function(e){return t[d.attributeName]=e};if(d.refSelector&&e.getAttribute("ref")===d.refSelector)a(e.eGui);else{var s=e.eGui.querySelector(d.querySelector);s&&a(s.__agComponent||s)}}))}},t.prototype.getGui=function(){return this.eGui},t.prototype.getFocusableElement=function(){return this.eGui},t.prototype.getAriaElement=function(){return this.getFocusableElement()},t.prototype.setParentComponent=function(e){this.parentComponent=e},t.prototype.getParentComponent=function(){return this.parentComponent},t.prototype.setGui=function(e){this.eGui=e},t.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},t.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},t.prototype.appendChild=function(e,t){if(null!=e)if(t||(t=this.eGui),Ma(e))t.appendChild(e);else{var d=e;t.appendChild(d.getGui())}},t.prototype.isDisplayed=function(){return this.displayed},t.prototype.setVisible=function(e,t){if(void 0===t&&(t={}),e!==this.visible){this.visible=e;var d=t.skipAriaHidden;aa(this.eGui,e,{skipAriaHidden:d})}},t.prototype.setDisplayed=function(e,d){if(void 0===d&&(d={}),e!==this.displayed){this.displayed=e;var a=d.skipAriaHidden;da(this.eGui,e,{skipAriaHidden:a});var s={type:t.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(s)}},t.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var t=this.eGui;t&&t.__agComponent&&(t.__agComponent=void 0),e.prototype.destroy.call(this)},t.prototype.addGuiEventListener=function(e,t,d){var a=this;this.eGui.addEventListener(e,t,d),this.addDestroyFunc((function(){return a.eGui.removeEventListener(e,t)}))},t.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},t.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},t.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},t.prototype.addOrRemoveCssClass=function(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)},t.prototype.getAttribute=function(e){var t=this.eGui;return t?t.getAttribute(e):null},t.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'.concat(e,'"]'))},t.EVENT_DISPLAYED_CHANGED="displayedChanged",qs([de("agStackComponentsRegistry")],t.prototype,"agStackComponentsRegistry",void 0),qs([J],t.prototype,"preConstructOnComponent",null),qs([J],t.prototype,"createChildComponentsPreConstruct",null),t}(ze);function Ts(e){return Ss.bind(this,e,void 0)}function gs(e){return Ss.bind(this,"[ref=".concat(e,"]"),e)}function Ss(e,t,d,a,s){null!==e?"number"!==typeof s?function(e,t,d){var a=function(e,t){e.__agComponentMetaData||(e.__agComponentMetaData={});e.__agComponentMetaData[t]||(e.__agComponentMetaData[t]={});return e.__agComponentMetaData[t]}(e,L(e.constructor));a[t]||(a[t]=[]);a[t].push(d)}(d,"querySelectors",{attributeName:a,querySelector:e,refSelector:t}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var Os=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),vs=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Is=function(e){function t(){return e.call(this,'\n ')||this}return Os(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e;var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),d=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel("".concat(t," ").concat(d("ariaFilterInput","Filter Input")))},t.prototype.onParentModelChanged=function(e){var t=this;e?this.params.parentFilterInstance((function(d){if(d.getModelAsString){var a=d.getModelAsString(e);t.eFloatingFilterText.setValue(a)}})):this.eFloatingFilterText.setValue("")},t.prototype.onParamsUpdated=function(e){this.init(e)},vs([gs("eFloatingFilterText")],t.prototype,"eFloatingFilterText",void 0),vs([de("columnModel")],t.prototype,"columnModel",void 0),t}(hs),Ds=function(){function e(e,t,d,a){var s=this;this.alive=!0,this.context=e,this.eParent=a,t.getDateCompDetails(d).newAgStackInstance().then((function(t){s.alive?(s.dateComp=t,t&&(a.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached(),s.tempValue&&t.setDate(s.tempValue),null!=s.disabled&&s.setDateCompDisabled(s.disabled))):e.destroyBean(t)}))}return e.prototype.destroy=function(){this.alive=!1,this.dateComp=this.context.destroyBean(this.dateComp)},e.prototype.getDate=function(){return this.dateComp?this.dateComp.getDate():this.tempValue},e.prototype.setDate=function(e){this.dateComp?this.dateComp.setDate(e):this.tempValue=e},e.prototype.setDisabled=function(e){this.dateComp?this.setDateCompDisabled(e):this.disabled=e},e.prototype.setDisplayed=function(e){da(this.eParent,e)},e.prototype.setInputPlaceholder=function(e){this.dateComp&&this.dateComp.setInputPlaceholder&&this.dateComp.setInputPlaceholder(e)},e.prototype.setInputAriaLabel=function(e){this.dateComp&&this.dateComp.setInputAriaLabel&&this.dateComp.setInputAriaLabel(e)},e.prototype.afterGuiAttached=function(e){this.dateComp&&"function"===typeof this.dateComp.afterGuiAttached&&this.dateComp.afterGuiAttached(e)},e.prototype.updateParams=function(e){var t;(null===(t=this.dateComp)||void 0===t?void 0:t.onParamsUpdated)&&"function"===typeof this.dateComp.onParamsUpdated&&this.dateComp.onParamsUpdated(e)},e.prototype.setDateCompDisabled=function(e){null!=this.dateComp&&null!=this.dateComp.setDisabled&&this.dateComp.setDisabled(e)},e}(),Bs=function(){function e(){this.customFilterOptions={}}return e.prototype.init=function(e,t){this.filterOptions=e.filterOptions||t,this.mapCustomOptions(),this.selectDefaultItem(e)},e.prototype.getFilterOptions=function(){return this.filterOptions},e.prototype.mapCustomOptions=function(){var e=this;this.filterOptions&&this.filterOptions.forEach((function(t){if("string"!==typeof t){[["displayKey"],["displayName"],["predicate","test"]].every((function(e){return!!e.some((function(e){return null!=t[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '".concat(e,"'")),!1)}))?e.customFilterOptions[t.displayKey]=t:e.filterOptions=e.filterOptions.filter((function(e){return e===t}))||[]}}))},e.prototype.selectDefaultItem=function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var t=this.filterOptions[0];"string"===typeof t?this.defaultOption=t:t.displayKey?this.defaultOption=t.displayKey:console.warn("AG Grid: invalid FilterOptionDef supplied as it doesn't contain a 'displayKey'")}else console.warn("AG Grid: no filter options for filter")},e.prototype.getDefaultOption=function(){return this.defaultOption},e.prototype.getCustomOption=function(e){return this.customFilterOptions[e]},e}(),Gs={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"},Ms=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ws=function(){return ws=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Es=function(e){function t(t,d){void 0===d&&(d={});var a=e.call(this)||this;return a.eFocusableElement=t,a.callbacks=d,a.callbacks=ws({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var t=a.focusService.findNextFocusableElement(a.eFocusableElement,!1,e.shiftKey);t&&(t.focus(),e.preventDefault())}}},d),a}return Ms(t,e),t.prototype.postConstruct=function(){this.eFocusableElement.classList.add(t.FOCUS_MANAGED_CLASS),this.addKeyDownListeners(this.eFocusableElement),this.callbacks.onFocusIn&&this.addManagedListener(this.eFocusableElement,"focusin",this.callbacks.onFocusIn),this.callbacks.onFocusOut&&this.addManagedListener(this.eFocusableElement,"focusout",this.callbacks.onFocusOut)},t.prototype.addKeyDownListeners=function(e){var t=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||Re(e)||(t.callbacks.shouldStopEventPropagation(e)?Ve(e):e.key===Ka.TAB?t.callbacks.onTabKeyDown(e):t.callbacks.handleKeyDown&&t.callbacks.handleKeyDown(e))}))},t.FOCUS_MANAGED_CLASS="ag-focus-managed",Ls([de("focusService")],t.prototype,"focusService",void 0),Ls([Z],t.prototype,"postConstruct",null),t}(ze),Vs=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Rs=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},As="ag-resizer-wrapper",xs='
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),Ws=function(e){function t(t,d){var a=e.call(this)||this;return a.element=t,a.dragStartPosition={x:0,y:0},a.position={x:0,y:0},a.lastSize={width:-1,height:-1},a.positioned=!1,a.resizersAdded=!1,a.resizeListeners=[],a.boundaryEl=null,a.isResizing=!1,a.isMoving=!1,a.resizable={},a.movable=!1,a.currentResizer=null,a.config=Object.assign({},{popup:!1},d),a}return Vs(t,e),t.prototype.center=function(){var e=this.offsetParent,t=e.clientHeight,d=e.clientWidth/2-this.getWidth()/2,a=t/2-this.getHeight()/2;this.offsetElement(d,a)},t.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,t=e.centered,d=e.forcePopupParentAsOffsetParent,a=e.minWidth,s=e.width,o=e.minHeight,i=e.height,l=e.x,r=e.y;this.offsetParent||this.setOffsetParent();var m=0,n=0,u=Ca(this.element);if(u){var p=this.findBoundaryElement(),f=window.getComputedStyle(p);if(null!=f.minWidth){var c=p.offsetWidth-this.element.offsetWidth;n=parseInt(f.minWidth,10)-c}if(null!=f.minHeight){var _=p.offsetHeight-this.element.offsetHeight;m=parseInt(f.minHeight,10)-_}}if(this.minHeight=o||m,this.minWidth=a||n,s&&this.setWidth(s),i&&this.setHeight(i),s&&i||this.refreshSize(),t)this.center();else if(l||r)this.offsetElement(l,r);else if(u&&d){var y=!0;if((p=this.boundaryEl)||(p=this.findBoundaryElement(),y=!1),p){var C=parseFloat(p.style.top),b=parseFloat(p.style.left);y?this.offsetElement(isNaN(b)?0:b,isNaN(C)?0:C):this.setPosition(b,C)}}this.positioned=!!this.offsetParent}},t.prototype.isPositioned=function(){return this.positioned},t.prototype.getPosition=function(){return this.position},t.prototype.setMovable=function(e,t){if(this.config.popup&&e!==this.movable){this.movable=e;var d=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?(this.dragService.addDragSource(d),this.moveElementDragListener=d):(this.dragService.removeDragSource(d),this.moveElementDragListener=void 0)}},t.prototype.setResizable=function(e){var t=this;if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),"boolean"===typeof e){if(!1===e)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach((function(d){var a=!!e[d],s=t.getResizerElement(d),o={dragStartPixels:0,eElement:s,onDragStart:function(e){return t.onResizeStart(e,d)},onDragging:t.onResize.bind(t),onDragStop:function(e){return t.onResizeEnd(e,d)}};(a||!t.isAlive()&&!a)&&(a?(t.dragService.addDragSource(o),t.resizeListeners.push(o),s.style.pointerEvents="all"):s.style.pointerEvents="none",t.resizable[d]=a)}))},t.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},t.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,t=e.height,d=e.width;-1!==d&&(this.element.style.width="".concat(d,"px")),-1!==t&&(this.element.style.height="".concat(t,"px"))},t.prototype.getHeight=function(){return this.element.offsetHeight},t.prototype.setHeight=function(e){var t=this.config.popup,d=this.element,a=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Ba(d,e),e=ma(d),a=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(a?(d.style.maxHeight="unset",d.style.minHeight="unset"):t?Ba(d,e):(d.style.height="".concat(e,"px"),d.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))},t.prototype.getAvailableHeight=function(){var e=this.config,t=e.popup,d=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var a=this.offsetParent.clientHeight;if(!a)return null;var s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),i=t?this.position.y:s.top,l=t?0:o.top,r=0;if(d){var m=this.element.parentElement;if(m)r=m.getBoundingClientRect().bottom-s.bottom}return a+l-i-r},t.prototype.getWidth=function(){return this.element.offsetWidth},t.prototype.setWidth=function(e){var t=this.element,d=this.config.popup,a=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Da(t,e),e=na(t),a=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var s=this.offsetParent.clientWidth,o=d?this.position.x:this.element.getBoundingClientRect().left;s&&e+o>s&&(e=s-o)}this.getWidth()!==e&&(a?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Da(t,e):(t.style.width="".concat(e,"px"),t.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))},t.prototype.offsetElement=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0);var d=this.config.forcePopupParentAsOffsetParent?this.boundaryEl:this.element;d&&(this.popupService.positionPopup({ePopup:d,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:function(){return{x:e,y:t}}}),this.setPosition(parseFloat(d.style.left),parseFloat(d.style.top)))},t.prototype.constrainSizeToAvailableHeight=function(e){var t=this;if(this.config.forcePopupParentAsOffsetParent){e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),(function(){var e=t.getAvailableHeight();t.element.style.setProperty("max-height","".concat(e,"px"))})):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},t.prototype.setPosition=function(e,t){this.position.x=e,this.position.y=t},t.prototype.updateDragStartPosition=function(e,t){this.dragStartPosition={x:e,y:t}},t.prototype.calculateMouseMovement=function(e){var t=e.e,d=e.isLeft,a=e.isTop,s=e.anywhereWithin,o=e.topBuffer,i=t.clientX-this.dragStartPosition.x,l=t.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(t,!!d,!!s,i)?0:i,movementY:this.shouldSkipY(t,!!a,o,l)?0:l}},t.prototype.shouldSkipX=function(e,t,d,a){var s=this.element.getBoundingClientRect(),o=this.offsetParent.getBoundingClientRect(),i=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:s.left,r=l<=0&&o.left>=e.clientX||o.right<=e.clientX&&o.right<=i.right;return!!r||(r=t?a<0&&e.clientX>l+o.left||a>0&&e.clientXi.right||a>0&&e.clientXi.right||a>0&&e.clientX=e.clientY||o.bottom<=e.clientY&&o.bottom<=i.bottom;return!!r||(r=t?a<0&&e.clientY>l+o.top+d||a>0&&e.clientYi.bottom||a>0&&e.clientYthis.element.parentElement.offsetHeight&&(S=!0),S||this.setHeight(g)}this.updateDragStartPosition(e.clientX,e.clientY),((d||a)&&y||C)&&this.offsetElement(c+y,_+C)}},t.prototype.onResizeEnd=function(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null;var d={type:"resize",api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi};this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchEvent(d)},t.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},t.prototype.onMoveStart=function(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)},t.prototype.onMove=function(e){if(this.isMoving){var t,d=this.position,a=d.x,s=d.y;this.config.calculateTopBuffer&&(t=this.config.calculateTopBuffer());var o=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:t}),i=o.movementX,l=o.movementY;this.offsetElement(a+i,s+l),this.updateDragStartPosition(e.clientX,e.clientY)}},t.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},t.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},t.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element},t.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},Rs([de("popupService")],t.prototype,"popupService",void 0),Rs([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Rs([de("dragService")],t.prototype,"dragService",void 0),t}(ze),Fs=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ns=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ks=function(e){function t(t){var d=e.call(this)||this;return d.filterNameKey=t,d.applyActive=!1,d.hidePopup=null,d.debouncePending=!1,d.appliedModel=null,d.buttonListeners=[],d}return Fs(t,e),t.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new Es(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ws(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},t.prototype.handleKeyDown=function(e){},t.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},t.prototype.isFilterActive=function(){return!!this.appliedModel},t.prototype.resetTemplate=function(e){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);var d='\n
\n
\n ').concat(this.createBodyTemplate(),"\n
\n
");this.setTemplate(d,e),(t=this.getGui())&&t.addEventListener("submit",this.onFormSubmit)},t.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},t.prototype.init=function(e){var t=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){t.updateUiVisibility(),t.setupOnBtApplyDebounce()}))},t.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetButtonsPanel()},t.prototype.updateParams=function(e){var d=this;this.providedFilterParams=e,this.applyActive=t.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),(function(){d.updateUiVisibility(),d.setupOnBtApplyDebounce()}))},t.prototype.resetButtonsPanel=function(){var e=this,t=this.providedFilterParams.buttons,d=t&&t.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(_a(this.eButtonsPanel),this.buttonListeners.forEach((function(e){return null===e||void 0===e?void 0:e()})),this.buttonListeners=[]):d&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),d){var a=document.createDocumentFragment();as(t).forEach((function(t){return function(t){var d,s;switch(t){case"apply":d=e.translate("applyFilter"),s=function(t){return e.onBtApply(!1,!1,t)};break;case"clear":d=e.translate("clearFilter"),s=function(){return e.onBtClear()};break;case"reset":d=e.translate("resetFilter"),s=function(){return e.onBtReset()};break;case"cancel":d=e.translate("cancelFilter"),s=function(t){e.onBtCancel(t)};break;default:return void console.warn("AG Grid: Unknown button type specified")}var o=ba('').concat(d,"\n "));e.buttonListeners.push(e.addManagedListener(o,"click",s)),a.append(o)}(t)})),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}else this.eButtonsPanel&&ya(this.eButtonsPanel)},t.prototype.getDefaultDebounceMs=function(){return 0},t.prototype.setupOnBtApplyDebounce=function(){var e=this,d=t.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),a=F(this.checkApplyDebounce.bind(this),d);this.onBtApplyDebounce=function(){e.debouncePending=!0,a()}},t.prototype.checkApplyDebounce=function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())},t.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},t.prototype.setModel=function(e){var t=this;return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((function(){t.updateUiVisibility(),t.applyModel("api")}))},t.prototype.onBtCancel=function(e){var t=this;this.resetUiToActiveModel(this.getModel(),(function(){t.handleCancelEnd(e)}))},t.prototype.handleCancelEnd=function(e){this.providedFilterParams.closeOnApply&&this.close(e)},t.prototype.resetUiToActiveModel=function(e,t){var d=this,a=function(){d.onUiChanged(!1,"prevent"),null===t||void 0===t||t()};null!=e?this.setModelIntoUi(e).then(a):this.resetUiToDefaults().then(a)},t.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))},t.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},t.prototype.applyModel=function(e){var t=this.getModelFromUi();if(!this.isModelValid(t))return!1;var d=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(d,t)},t.prototype.isModelValid=function(e){return!0},t.prototype.onFormSubmit=function(e){e.preventDefault()},t.prototype.onBtApply=function(e,t,d){if(void 0===e&&(e=!1),void 0===t&&(t=!1),d&&d.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")){this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"})}this.providedFilterParams.closeOnApply&&this.applyActive&&!e&&!t&&this.close(d)},t.prototype.onNewRowsLoaded=function(){},t.prototype.close=function(e){if(this.hidePopup){var t,d=e,a=d&&d.key;"Enter"!==a&&"Space"!==a||(t={keyboardEvent:d}),this.hidePopup(t),this.hidePopup=null}},t.prototype.onUiChanged=function(e,t){if(void 0===e&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){var d=this.isModelValid(this.getModelFromUi()),a=this.getRefElement("applyFilterButton");a&&sa(a,!d)}e&&!t||"immediately"===t?this.onBtApply(e):(this.applyActive||t)&&"debounce"!==t||this.onBtApplyDebounce()},t.prototype.afterGuiAttached=function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null===e||void 0===e?void 0:e.container)},t.prototype.refreshFilterResizer=function(e){if(this.positionableFeature&&"toolPanel"!==e){var t="floatingFilter"===e,d=this.positionableFeature,a=this.gridOptionsService;t?(d.restoreLastSize(),d.setResizable(a.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(this.positionableFeature.removeSizeFromEl(),this.positionableFeature.setResizable(!1)),this.positionableFeature.constrainSizeToAvailableHeight(!0)}},t.prototype.afterGuiDetached=function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)},t.getDebounceMs=function(e,d){return t.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:d},t.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},t.prototype.refresh=function(e){return this.providedFilterParams=e,!0},t.prototype.destroy=function(){var t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),e.prototype.destroy.call(this)},t.prototype.translate=function(e){return this.localeService.getLocaleTextFunc()(e,Gs[e])},t.prototype.getCellValue=function(e){return this.providedFilterParams.getValue(e)},t.prototype.getPositionableElement=function(){return this.eFilterBody},Ns([de("rowModel")],t.prototype,"rowModel",void 0),Ns([gs("eFilterBody")],t.prototype,"eFilterBody",void 0),Ns([Z],t.prototype,"postConstruct",null),t}(hs),Hs=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),js=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},zs=function(e){function t(t,d){var a=e.call(this,d)||this;return a.labelSeparator="",a.labelAlignment="left",a.disabled=!1,a.label="",a.config=t||{},a}return Hs(t,e),t.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,t=e.labelSeparator,d=e.label,a=e.labelWidth,s=e.labelAlignment;null!=t&&this.setLabelSeparator(t),null!=d&&this.setLabel(d),null!=a&&this.setLabelWidth(a),this.setLabelAlignment(s||this.labelAlignment),this.refreshLabel()},t.prototype.refreshLabel=function(){_a(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(da(this.eLabel,!1),Nt(this.eLabel,"presentation")):(da(this.eLabel,!0),Nt(this.eLabel,null))},t.prototype.setLabelSeparator=function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this},t.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-".concat(this.getCompId(),"-label"),this.eLabel.id},t.prototype.getLabel=function(){return this.label},t.prototype.setLabel=function(e){return this.label===e||(this.label=e,this.refreshLabel()),this},t.prototype.setLabelAlignment=function(e){var t=this.getGui().classList;return t.toggle("ag-label-align-left","left"===e),t.toggle("ag-label-align-right","right"===e),t.toggle("ag-label-align-top","top"===e),this},t.prototype.setLabelEllipsis=function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this},t.prototype.setLabelWidth=function(e){return null==this.label||Ia(this.eLabel,e),this},t.prototype.setDisabled=function(e){e=!!e;var t=this.getGui();return sa(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this},t.prototype.isDisabled=function(){return!!this.disabled},js([Z],t.prototype,"postConstruct",null),t}(hs),Us=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ks=function(e){function t(t,d,a){var s=e.call(this,t,d)||this;return s.className=a,s}return Us(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()},t.prototype.refreshAriaLabelledBy=function(){var e=this.getAriaElement(),t=this.getLabelId();null!==zt(e)?Kt(e,""):Kt(e,null!==t&&void 0!==t?t:"")},t.prototype.setAriaLabel=function(e){return Ut(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this},t.prototype.onValueChange=function(e){var t=this;return this.addManagedListener(this,Je.EVENT_FIELD_VALUE_CHANGED,(function(){return e(t.getValue())})),this},t.prototype.getWidth=function(){return this.getGui().clientWidth},t.prototype.setWidth=function(e){return Da(this.getGui(),e),this},t.prototype.getPreviousValue=function(){return this.previousValue},t.prototype.getValue=function(){return this.value},t.prototype.setValue=function(e,t){return this.value===e||(this.previousValue=this.value,this.value=e,t||this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED})),this},t}(zs),Ys=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Qs=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},$s=function(e){function t(t){var d=e.call(this,t,(null===t||void 0===t?void 0:t.template)||'\n ',null===t||void 0===t?void 0:t.className)||this;if(d.isPickerDisplayed=!1,d.skipClick=!1,d.pickerGap=4,d.hideCurrentPicker=null,d.ariaRole=null===t||void 0===t?void 0:t.ariaRole,d.onPickerFocusIn=d.onPickerFocusIn.bind(d),d.onPickerFocusOut=d.onPickerFocusOut.bind(d),!t)return d;var a=t.pickerGap,s=t.maxPickerHeight,o=t.variableWidth,i=t.minPickerWidth,l=t.maxPickerWidth;return null!=a&&(d.pickerGap=a),d.variableWidth=!!o,null!=s&&d.setPickerMaxHeight(s),null!=i&&d.setPickerMinWidth(i),null!=l&&d.setPickerMaxWidth(l),d}return Ys(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setupAria();var t="ag-".concat(this.getCompId(),"-display");this.eDisplayField.setAttribute("id",t);var d=this.getAriaElement();this.addManagedListener(d,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(this.eLabel,"mousedown",this.onLabelOrWrapperMouseDown.bind(this)),this.addManagedListener(this.eWrapper,"mousedown",this.onLabelOrWrapperMouseDown.bind(this));var a=this.config.pickerIcon;if(a){var s=za(a,this.gridOptionsService);s&&this.eIcon.appendChild(s)}},t.prototype.setupAria=function(){var e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),ed(e,!1),this.ariaRole&&Nt(e,this.ariaRole)},t.prototype.onLabelOrWrapperMouseDown=function(e){if(e){var t=this.getFocusableElement();if(t!==this.eWrapper&&(null===e||void 0===e?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())},t.prototype.onKeyDown=function(e){switch(e.key){case Ka.UP:case Ka.DOWN:case Ka.ENTER:case Ka.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case Ka.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}},t.prototype.showPicker=function(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());var e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)},t.prototype.renderAndPositionPicker=function(){var e=this,t=this.gridOptionsService.getDocument(),d=this.pickerComponent.getGui();this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")||(this.destroyMouseWheelFunc=this.addManagedListener(this.eventService,Je.EVENT_BODY_SCROLL,(function(){e.hidePicker()})));var a=this.localeService.getLocaleTextFunc(),s=this.config,o=s.pickerAriaLabelKey,i=s.pickerAriaLabelValue,l=s.modalPicker,r={modal:void 0===l||l,eChild:d,closeOnEsc:!0,closedCallback:function(){var d=t.activeElement===t.body;e.beforeHidePicker(),d&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:a(o,i)},m=this.popupService.addPopup(r),n=this,u=n.maxPickerHeight,p=n.minPickerWidth,f=n.maxPickerWidth;n.variableWidth?(p&&(d.style.minWidth=p),d.style.width=Ga(na(this.eWrapper)),f&&(d.style.maxWidth=f)):Ia(d,null!==f&&void 0!==f?f:na(this.eWrapper));var c=null!==u&&void 0!==u?u:"".concat(la(this.popupService.getPopupParent()),"px");return d.style.setProperty("max-height",c),d.style.position="absolute",this.alignPickerToComponent(),m.hideFunc},t.prototype.alignPickerToComponent=function(){if(this.pickerComponent){var e=this.config.pickerType,t=this.pickerGap,d=this.gridOptionsService.get("enableRtl")?"right":"left";this.popupService.positionPopupByComponent({type:e,eventSource:this.eWrapper,ePopup:this.pickerComponent.getGui(),position:"under",alignSide:d,keepWithinBounds:!0,nudgeY:t})}},t.prototype.beforeHidePicker=function(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);var e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null},t.prototype.toggleExpandedStyles=function(e){this.isAlive()&&(ed(this.getAriaElement(),e),this.eWrapper.classList.toggle("ag-picker-expanded",e),this.eWrapper.classList.toggle("ag-picker-collapsed",!e))},t.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(!0)},t.prototype.onPickerFocusOut=function(e){var t;(null===(t=this.pickerComponent)||void 0===t?void 0:t.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)},t.prototype.togglePickerHasFocus=function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)},t.prototype.hidePicker=function(){this.hideCurrentPicker&&this.hideCurrentPicker()},t.prototype.setInputWidth=function(e){return Ia(this.eWrapper,e),this},t.prototype.getFocusableElement=function(){return this.eWrapper},t.prototype.setPickerGap=function(e){return this.pickerGap=e,this},t.prototype.setPickerMinWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.minPickerWidth=null==e?void 0:e,this},t.prototype.setPickerMaxWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerWidth=null==e?void 0:e,this},t.prototype.setPickerMaxHeight=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerHeight=null==e?void 0:e,this},t.prototype.destroy=function(){this.hidePicker(),e.prototype.destroy.call(this)},Qs([de("popupService")],t.prototype,"popupService",void 0),Qs([gs("eLabel")],t.prototype,"eLabel",void 0),Qs([gs("eWrapper")],t.prototype,"eWrapper",void 0),Qs([gs("eDisplayField")],t.prototype,"eDisplayField",void 0),Qs([gs("eIcon")],t.prototype,"eIcon",void 0),t}(Ks),Xs=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Js=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Zs=function(e){function t(t){void 0===t&&(t="default");var d=e.call(this,'
'))||this;return d.cssIdentifier=t,d.options=[],d.itemEls=[],d}return Xs(t,e),t.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},t.prototype.handleKeyDown=function(e){var t=e.key;switch(t){case Ka.ENTER:if(this.highlightedEl){var d=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(d)}else this.setValue(this.getValue());break;case Ka.DOWN:case Ka.UP:var a=t===Ka.DOWN,s=void 0;if(e.preventDefault(),this.highlightedEl){var o=this.itemEls.indexOf(this.highlightedEl)+(a?1:-1);o=Math.min(Math.max(o,0),this.itemEls.length-1),s=this.itemEls[o]}else s=this.itemEls[a?0:this.itemEls.length-1];this.highlightItem(s)}},t.prototype.addOptions=function(e){var t=this;return e.forEach((function(e){return t.addOption(e)})),this},t.prototype.addOption=function(e){var t=e.value,d=it(e.text||t);return this.options.push({value:t,text:d}),this.renderOption(t,d),this.updateIndices(),this},t.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((function(t,d){ad(t,d+1),dd(t,e.length)}))},t.prototype.renderOption=function(e,t){var d=this,a=document.createElement("div");Nt(a,"option"),a.classList.add("ag-list-item","ag-".concat(this.cssIdentifier,"-list-item")),a.innerHTML="".concat(t,""),a.tabIndex=-1,this.itemEls.push(a),this.addManagedListener(a,"mouseover",(function(){return d.highlightItem(a)})),this.addManagedListener(a,"mouseleave",(function(){return d.clearHighlighted()})),this.addManagedListener(a,"click",(function(){return d.setValue(e)})),this.getGui().appendChild(a)},t.prototype.setValue=function(e,t){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(),this;var d=this.options.findIndex((function(t){return t.value===e}));if(-1!==d){var a=this.options[d];this.value=a.value,this.displayValue=null!=a.text?a.text:a.value,this.highlightItem(this.itemEls[d]),t||this.fireChangeEvent()}return this},t.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},t.prototype.getValue=function(){return this.value},t.prototype.getDisplayValue=function(){return this.displayValue},t.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var t=this.options.findIndex((function(t){return t.value===e.value}));-1!==t&&this.highlightItem(this.itemEls[t])},t.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},t.prototype.highlightItem=function(e){Ca(e)&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(t.ACTIVE_CLASS),pd(this.highlightedEl,!0),this.highlightedEl.focus())},t.prototype.clearHighlighted=function(){this.highlightedEl&&Ca(this.highlightedEl)&&(this.highlightedEl.classList.remove(t.ACTIVE_CLASS),pd(this.highlightedEl,!1),this.highlightedEl=null)},t.prototype.fireChangeEvent=function(){this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()},t.prototype.fireItemSelected=function(){this.dispatchEvent({type:t.EVENT_ITEM_SELECTED})},t.EVENT_ITEM_SELECTED="selectedItem",t.ACTIVE_CLASS="ag-active-item",Js([Z],t.prototype,"init",null),t}(hs),eo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),to=function(){return to=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},io=function(e){function t(t,d,a,s){void 0===a&&(a="text"),void 0===s&&(s="input");var o=e.call(this,t,'\n
\n
\n \n
"),d)||this;return o.inputType=a,o.displayFieldTag=s,o}return so(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setInputType(),this.eLabel.classList.add("".concat(this.className,"-label")),this.eWrapper.classList.add("".concat(this.className,"-input-wrapper")),this.eInput.classList.add("".concat(this.className,"-input")),this.addCssClass("ag-input-field"),this.eInput.id=this.eInput.id||"ag-".concat(this.getCompId(),"-input");var t=this.config,d=t.width,a=t.value;null!=d&&this.setWidth(d),null!=a&&this.setValue(a),this.addInputListeners(),this.activateTabIndex([this.eInput])},t.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(t){return e.setValue(t.target.value)}))},t.prototype.setInputType=function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)},t.prototype.getInputElement=function(){return this.eInput},t.prototype.setInputWidth=function(e){return Ia(this.eWrapper,e),this},t.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},t.prototype.getFocusableElement=function(){return this.eInput},t.prototype.setMaxLength=function(e){return this.eInput.maxLength=e,this},t.prototype.setInputPlaceholder=function(e){return Ea(this.eInput,"placeholder",e),this},t.prototype.setInputAriaLabel=function(e){return Ut(this.eInput,e),this.refreshAriaLabelledBy(),this},t.prototype.setDisabled=function(t){return sa(this.eInput,t),e.prototype.setDisabled.call(this,t)},t.prototype.setAutoComplete=function(e){if(!0===e)Ea(this.eInput,"autocomplete",null);else{var t="string"===typeof e?e:"off";Ea(this.eInput,"autocomplete",t)}return this},oo([gs("eLabel")],t.prototype,"eLabel",void 0),oo([gs("eWrapper")],t.prototype,"eWrapper",void 0),oo([gs("eInput")],t.prototype,"eInput",void 0),t}(Ks),lo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ro=function(e){function t(t,d,a){void 0===d&&(d="ag-checkbox"),void 0===a&&(a="checkbox");var s=e.call(this,t,d,a)||this;return s.labelAlignment="right",s.selected=!1,s.readOnly=!1,s.passive=!1,s}return lo(t,e),t.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},t.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},t.prototype.setPassive=function(e){this.passive=e},t.prototype.isReadOnly=function(){return this.readOnly},t.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},t.prototype.setDisabled=function(t){return this.eWrapper.classList.toggle("ag-disabled",t),e.prototype.setDisabled.call(this,t)},t.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}},t.prototype.getValue=function(){return this.isSelected()},t.prototype.setValue=function(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this},t.prototype.setName=function(e){return this.getInputElement().name=e,this},t.prototype.isSelected=function(){return this.selected},t.prototype.setSelected=function(e,t){this.isSelected()!==e&&(this.previousValue=this.isSelected(),e=this.selected="boolean"===typeof e?e:void 0,this.eInput.checked=e,this.eInput.indeterminate=void 0===e,t||this.dispatchChange(this.selected,this.previousValue))},t.prototype.dispatchChange=function(e,t,d){this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:t,event:d});var a=this.getInputElement(),s={type:Je.EVENT_CHECKBOX_CHANGED,id:a.id,name:a.name,selected:e,previousValue:t};this.eventService.dispatchEvent(s)},t.prototype.onCheckboxClick=function(e){if(!this.passive&&!this.eInput.disabled){var t=this.isSelected(),d=this.selected=e.target.checked;this.refreshSelectedClass(d),this.dispatchChange(d,t,e)}},t.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)},t}(io),mo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),no=function(e){function t(t){return e.call(this,t,"ag-radio-button","radio")||this}return mo(t,e),t.prototype.isSelected=function(){return this.eInput.checked},t.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},t.prototype.addInputListeners=function(){e.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,Je.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},t.prototype.onChange=function(e){e.selected&&e.name&&this.eInput.name&&this.eInput.name===e.name&&e.id&&this.eInput.id!==e.id&&this.setValue(!1,!0)},t}(ro),uo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),po=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},fo=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=0?0:e===t.IN_RANGE?2:1},t.prototype.onFloatingFilterChanged=function(e,t){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(t),this.onUiChanged(!0)},t.prototype.setTypeFromFloatingFilter=function(e){var t=this;this.eTypes.forEach((function(d,a){0===a?d.setValue(e,!0):d.setValue(t.optionsFactory.getDefaultOption(),!0)}))},t.prototype.getModelFromUi=function(){var e=this.getUiCompleteConditions();return 0===e.length?null:this.maxNumConditions>1&&e.length>1?{filterType:this.getFilterType(),operator:this.getJoinOperator(),condition1:e[0],condition2:e[1],conditions:e}:e[0]},t.prototype.getConditionTypes=function(){return this.eTypes.map((function(e){return e.getValue()}))},t.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},t.prototype.getJoinOperator=function(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"},t.prototype.areModelsEqual=function(e,t){var d=this;if(!e&&!t)return!0;if(!e&&t||e&&!t)return!1;var a,s=!e.operator,o=!t.operator;if(!s&&o||s&&!o)return!1;if(s){var i=e,l=t;a=this.areSimpleModelsEqual(i,l)}else{var r=e,m=t;a=r.operator===m.operator&&Pe(r.conditions,m.conditions,(function(e,t){return d.areSimpleModelsEqual(e,t)}))}return a},t.prototype.shouldRefresh=function(e){var t,d,a,s=this.getModel(),o=s?null!==(t=s.conditions)&&void 0!==t?t:[s]:null,i=null!==(a=null===(d=e.filterOptions)||void 0===d?void 0:d.map((function(e){return"string"===typeof e?e:e.displayKey})))&&void 0!==a?a:this.getDefaultFilterOptions();return!(o&&!o.every((function(e){return void 0!==i.find((function(t){return t===e.type}))})))&&!("number"===typeof e.maxNumConditions&&o&&o.length>e.maxNumConditions)},t.prototype.refresh=function(t){return!!this.shouldRefresh(t)&&(!!e.prototype.refresh.call(this,t)&&(this.setParams(t),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0))},t.prototype.setModelIntoUi=function(e){var t=this;if(e.operator){var d=e;d.conditions||(d.conditions=[d.condition1,d.condition2]);var a=this.validateAndUpdateConditions(d.conditions),s=this.getNumConditions();if(as)for(var o=s;o1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(l.type,!0),this.setConditionIntoUi(l,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),us.resolve()},t.prototype.validateAndUpdateConditions=function(e){var t=e.length;return t>this.maxNumConditions&&(e.splice(this.maxNumConditions),M('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),t=this.maxNumConditions),t},t.prototype.doesFilterPass=function(e){var t,d=this,a=this.getModel();if(null==a)return!0;var s=a.operator,o=[];if(s){var i=a;o.push.apply(o,fo([],po(null!==(t=i.conditions)&&void 0!==t?t:[]),!1))}else o.push(a);return o[s&&"OR"===s?"some":"every"]((function(t){return d.individualConditionPasses(e,t)}))},t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.setNumConditions(t),this.defaultJoinOperator=this.getDefaultJoinOperator(t.defaultJoinOperator),this.filterPlaceholder=t.filterPlaceholder,this.optionsFactory=new Bs,this.optionsFactory.init(t,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")},t.prototype.setNumConditions=function(e){var t,d;null!=e.suppressAndOrCondition&&M('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&M('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!==(t=e.maxNumConditions)&&void 0!==t?t:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(M('"filterParams.maxNumConditions" must be greater than or equal to zero.'),this.maxNumConditions=1),this.numAlwaysVisibleConditions=null!==(d=e.numAlwaysVisibleConditions)&&void 0!==d?d:e.alwaysShowBothConditions?2:1,this.numAlwaysVisibleConditions<1&&(M('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(M('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)},t.prototype.createOption=function(){var e=this,t=this.createManagedBean(new ao);this.eTypes.push(t),t.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(t.getGui());var d=this.createValueElement();this.eConditionBodies.push(d),this.eFilterBody.appendChild(d),this.putOptionsIntoDropdown(t),this.resetType(t);var a=this.getNumConditions()-1;this.forEachPositionInput(a,(function(t){return e.resetInput(t)})),this.addChangedListeners(t,a)},t.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var t=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),d=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var a=this.eJoinOperatorPanels.length-1,s=this.joinOperatorId++;this.resetJoinOperatorAnd(t,a,s),this.resetJoinOperatorOr(d,a,s),this.isReadOnly()||(t.onValueChange(this.listener),d.onValueChange(this.listener))},t.prototype.createJoinOperator=function(e,t,d){var a=this.createManagedBean(new no);return e.push(a),a.addCssClass("ag-filter-condition-operator"),a.addCssClass("ag-filter-condition-operator-".concat(d)),t.appendChild(a.getGui()),a},t.prototype.getDefaultJoinOperator=function(e){return"AND"===e||"OR"===e?e:"AND"},t.prototype.createFilterListOptions=function(){var e=this,t=this.optionsFactory.getFilterOptions();this.filterListOptions=t.map((function(t){return"string"===typeof t?e.createBoilerplateListOption(t):e.createCustomListOption(t)}))},t.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach((function(t){e.addOption(t)})),e.setDisabled(this.filterListOptions.length<=1)},t.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},t.prototype.createCustomListOption=function(e){var t=e.displayKey,d=this.optionsFactory.getCustomOption(e.displayKey);return{value:t,text:d?this.localeService.getLocaleTextFunc()(d.displayKey,d.displayName):this.translate(t)}},t.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},t.prototype.createBodyTemplate=function(){return""},t.prototype.getCssIdentifier=function(){return"simple-filter"},t.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},t.prototype.updateNumConditions=function(){for(var e,t=-1,d=!0,a=0;a0&&this.removeConditionsAndOperators(o,i),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=t},t.prototype.updateConditionStatusesAndValues=function(e,t){var d=this;this.eTypes.forEach((function(t,a){var s=d.isConditionDisabled(a,e);t.setDisabled(s||d.filterListOptions.length<=1),1===a&&(sa(d.eJoinOperatorPanels[0],s),d.eJoinOperatorsAnd[0].setDisabled(s),d.eJoinOperatorsOr[0].setDisabled(s))})),this.eConditionBodies.forEach((function(e,t){da(e,d.isConditionBodyVisible(t))}));var a="OR"===(null!==t&&void 0!==t?t:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((function(e,t){e.setValue(!a,!0)})),this.eJoinOperatorsOr.forEach((function(e,t){e.setValue(a,!0)})),this.forEachInput((function(t,a,s,o){d.setElementDisplayed(t,a=this.getNumConditions())){this.removeComponents(this.eTypes,e,t),this.removeElements(this.eConditionBodies,e,t),this.removeValueElements(e,t);var d=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,d,t),this.removeComponents(this.eJoinOperatorsAnd,d,t),this.removeComponents(this.eJoinOperatorsOr,d,t)}},t.prototype.removeElements=function(e,t,d){this.removeItems(e,t,d).forEach((function(e){return ya(e)}))},t.prototype.removeComponents=function(e,t,d){var a=this;this.removeItems(e,t,d).forEach((function(e){ya(e.getGui()),a.destroyBean(e)}))},t.prototype.removeItems=function(e,t,d){return null==d?e.splice(t):e.splice(t,d)},t.prototype.afterGuiAttached=function(t){if(e.prototype.afterGuiAttached.call(this,t),this.resetPlaceholder(),!(null===t||void 0===t?void 0:t.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{var d=this.getInputs(0)[0];if(!d)return;d instanceof io&&d.getInputElement().focus()}},t.prototype.afterGuiDetached=function(){e.prototype.afterGuiDetached.call(this);var t=this.getModel();this.resetUiToActiveModel(t);for(var d=-1,a=-1,s=!1,o=this.getJoinOperator(),i=this.getNumConditions()-1;i>=0;i--)if(this.isConditionUiComplete(i))-1===d&&(d=i,a=i);else{var l=i=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(i-1)||l)&&(this.removeConditionsAndOperators(i,1),s=!0,l&&a--)}var r=!1;this.getNumConditions()1?"inRangeStart":0===a?"filterOoo":"inRangeEnd",l=0===a&&o>1?t("ariaFilterFromValue","Filter from value"):0===a?t("ariaFilterValue","Filter Value"):t("ariaFilterToValue","Filter to Value");d.setInputPlaceholder(e.getPlaceholderText(i,s)),d.setInputAriaLabel(l)}}))},t.prototype.setElementValue=function(e,t,d){e instanceof io&&e.setValue(null!=t?String(t):null,!0)},t.prototype.setElementDisplayed=function(e,t){e instanceof hs&&da(e.getGui(),t)},t.prototype.setElementDisabled=function(e,t){e instanceof hs&&sa(e.getGui(),t)},t.prototype.attachElementOnChange=function(e,t){e instanceof io&&e.onValueChange(t)},t.prototype.forEachInput=function(e){var t=this;this.getConditionTypes().forEach((function(d,a){t.forEachPositionTypeInput(a,d,e)}))},t.prototype.forEachPositionInput=function(e,t){var d=this.getConditionType(e);this.forEachPositionTypeInput(e,d,t)},t.prototype.forEachPositionTypeInput=function(e,t,d){for(var a=this.getNumberOfInputs(t),s=this.getInputs(e),o=0;ot+1},t.prototype.isConditionBodyVisible=function(e){var t=this.getConditionType(e);return this.getNumberOfInputs(t)>0},t.prototype.isConditionUiComplete=function(e){return!(e>=this.getNumConditions())&&(this.getConditionType(e)!==t.EMPTY&&!this.getValues(e).some((function(e){return null==e})))},t.prototype.getNumConditions=function(){return this.eTypes.length},t.prototype.getUiCompleteConditions=function(){for(var e=[],t=0;t0)},t.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},t.prototype.setConditionIntoUi=function(e,t){var d=this,a=this.mapValuesFromModel(e);this.forEachInput((function(e,s,o,i){o===t&&d.setElementValue(e,null!=a[s]?a[s]:null)}))},t.prototype.setValueFromFloatingFilter=function(e){var t=this;this.forEachInput((function(d,a,s,o){t.setElementValue(d,0===a&&0===s?e:null,!0)}))},t.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},t.prototype.addChangedListeners=function(e,t){var d=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(t,(function(e){d.attachElementOnChange(e,d.listener)})))},t.prototype.individualConditionPasses=function(e,t){var d=this.getCellValue(e.node),a=this.mapValuesFromModel(t),s=this.optionsFactory.getCustomOption(t.type),o=this.evaluateCustomFilter(s,a,d);return null!=o?o:null==d?this.evaluateNullValue(t.type):this.evaluateNonNullValue(a,d,t,e)},t.prototype.evaluateCustomFilter=function(e,t,d){if(null!=e){var a=e.predicate;return null==a||t.some((function(e){return null==e}))?void 0:a(t,d)}},t.prototype.isBlank=function(e){return null==e||"string"===typeof e&&0===e.trim().length},t.prototype.hasInvalidInputs=function(){return!1},t.EMPTY="empty",t.BLANK="blank",t.NOT_BLANK="notBlank",t.EQUALS="equals",t.NOT_EQUAL="notEqual",t.LESS_THAN="lessThan",t.LESS_THAN_OR_EQUAL="lessThanOrEqual",t.GREATER_THAN="greaterThan",t.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",t.IN_RANGE="inRange",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.STARTS_WITH="startsWith",t.ENDS_WITH="endsWith",t}(ks),yo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Co=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return yo(t,e),t.prototype.setParams=function(t){e.prototype.setParams.call(this,t),this.scalarFilterParams=t},t.prototype.evaluateNullValue=function(e){switch(e){case t.EQUALS:case t.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case t.GREATER_THAN:case t.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case t.LESS_THAN:case t.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case t.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case t.BLANK:return!0;case t.NOT_BLANK:return!1}return!1},t.prototype.evaluateNonNullValue=function(e,d,a){var s=this.comparator(),o=null!=e[0]?s(e[0],d):0;switch(a.type){case t.EQUALS:return 0===o;case t.NOT_EQUAL:return 0!==o;case t.GREATER_THAN:return o>0;case t.GREATER_THAN_OR_EQUAL:return o>=0;case t.LESS_THAN:return o<0;case t.LESS_THAN_OR_EQUAL:return o<=0;case t.IN_RANGE:var i=s(e[1],d);return this.scalarFilterParams.inRangeInclusive?o>=0&&i<=0:o>0&&i<0;case t.BLANK:return this.isBlank(d);case t.NOT_BLANK:return!this.isBlank(d);default:return console.warn('AG Grid: Unexpected type of filter "'+a.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},t}(_o),bo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),qo=function(){return qo=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ho=1/0,To=function(e){function t(t,d,a){var s=e.call(this,d,a)||this;return s.dateFilterParams=t,s}return bo(t,e),t.prototype.conditionToString=function(e,t){var d=e.type,a=(t||{}).numberOfInputs,s=d==_o.IN_RANGE||2===a,o=Kd(e.dateFrom),i=Kd(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(s){var r=null!==o?Ud(o,l):"null",m=null!==i?Ud(i,l):"null";return"".concat(r,"-").concat(m)}return null!=o?Ud(o,l):"".concat(d)},t.prototype.updateParams=function(t){e.prototype.updateParams.call(this,t),this.dateFilterParams=t.dateFilterParams},t}(co),go=function(e){function t(){var t=e.call(this,"dateFilter")||this;return t.eConditionPanelsFrom=[],t.eConditionPanelsTo=[],t.dateConditionFromComps=[],t.dateConditionToComps=[],t.minValidYear=1e3,t.maxValidYear=ho,t.minValidDate=null,t.maxValidDate=null,t}return bo(t,e),t.prototype.afterGuiAttached=function(t){e.prototype.afterGuiAttached.call(this,t),this.dateConditionFromComps[0].afterGuiAttached(t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},d=t.dateFrom,a=t.dateTo,s=t.type;return[d&&Kd(d)||null,a&&Kd(a)||null].slice(0,this.getNumberOfInputs(s))},t.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},t.prototype.defaultComparator=function(e,t){return null==t||te?1:0},t.prototype.setParams=function(t){this.dateFilterParams=t,e.prototype.setParams.call(this,t);var d=function(e,d){if(null!=t[e]){if(!isNaN(t[e]))return null==t[e]?d:Number(t[e]);console.warn("AG Grid: DateFilter ".concat(e," is not a number"))}return d};this.minValidYear=d("minValidYear",1e3),this.maxValidYear=d("maxValidYear",ho),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),t.minValidDate?this.minValidDate=t.minValidDate instanceof Date?t.minValidDate:Kd(t.minValidDate):this.minValidDate=null,t.maxValidDate?this.maxValidDate=t.maxValidDate instanceof Date?t.maxValidDate:Kd(t.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new To(this.dateFilterParams,this.localeService,this.optionsFactory)},t.prototype.createDateCompWrapper=function(e){var t=this,d=new Ds(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return t.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc((function(){return d.destroy()})),d},t.prototype.setElementValue=function(e,t){e.setDate(t)},t.prototype.setElementDisplayed=function(e,t){e.setDisplayed(t)},t.prototype.setElementDisabled=function(e,t){e.setDisabled(t)},t.prototype.getDefaultFilterOptions=function(){return t.DEFAULT_FILTER_OPTIONS},t.prototype.createValueElement=function(){var e=document.createElement("div");return e.classList.add("ag-filter-body"),this.createFromToElement(e,this.eConditionPanelsFrom,this.dateConditionFromComps,"from"),this.createFromToElement(e,this.eConditionPanelsTo,this.dateConditionToComps,"to"),e},t.prototype.createFromToElement=function(e,t,d,a){var s=document.createElement("div");s.classList.add("ag-filter-".concat(a)),s.classList.add("ag-filter-date-".concat(a)),t.push(s),e.appendChild(s),d.push(this.createDateCompWrapper(s))},t.prototype.removeValueElements=function(e,t){this.removeDateComps(this.dateConditionFromComps,e,t),this.removeDateComps(this.dateConditionToComps,e,t),this.removeItems(this.eConditionPanelsFrom,e,t),this.removeItems(this.eConditionPanelsTo,e,t)},t.prototype.removeDateComps=function(e,t,d){this.removeItems(e,t,d).forEach((function(e){return e.destroy()}))},t.prototype.isValidDateValue=function(e){if(null===e)return!1;if(this.minValidDate){if(ethis.maxValidDate)return!1}else if(e.getUTCFullYear()>this.maxValidYear)return!1;return!0},t.prototype.isConditionUiComplete=function(t){var d=this;if(!e.prototype.isConditionUiComplete.call(this,t))return!1;var a=!0;return this.forEachInput((function(e,s,o,i){o!==t||!a||s>=i||(a=a&&d.isValidDateValue(e.getDate()))})),a},t.prototype.areSimpleModelsEqual=function(e,t){return e.dateFrom===t.dateFrom&&e.dateTo===t.dateTo&&e.type===t.type},t.prototype.getFilterType=function(){return"date"},t.prototype.createCondition=function(e){var t=this.getConditionType(e),d={},a=this.getValues(e);return a.length>0&&(d.dateFrom=jd(a[0])),a.length>1&&(d.dateTo=jd(a[1])),qo({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:t},d)},t.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),t=this.translate("dateFormatOoo"),d=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(t),e.setInputAriaLabel(d)}))},t.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},t.prototype.getValues=function(e){var t=[];return this.forEachPositionInput(e,(function(e,d,a,s){d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Do=function(e){function t(){return e.call(this,'\n ')||this}return vo(t,e),t.prototype.getDefaultFilterOptions=function(){return go.DEFAULT_FILTER_OPTIONS},t.prototype.init=function(t){e.prototype.init.call(this,t),this.params=t,this.filterParams=t.filterParams,this.createDateComponent(),this.filterModelFormatter=new To(this.filterParams,this.localeService,this.optionsFactory);var d=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(d("ariaDateFilterInput","Date Filter Input"))},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.params=t,this.filterParams=t.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(t.currentParentModel())},t.prototype.updateCompOnModelChange=function(e){var t=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(t),t){if(e){var d=e;this.dateComp.setDate(Kd(d.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)},t.prototype.setEditable=function(e){da(this.eDateWrapper,e),da(this.eReadOnlyText.getGui(),!e)},t.prototype.onParentModelChanged=function(t,d){this.isEventFromFloatingFilter(d)||this.isEventFromDataChange(d)||(e.prototype.setLastTypeFromModel.call(this,t),this.updateCompOnModelChange(t))},t.prototype.onDateChanged=function(){var e=this,t=jd(this.dateComp.getDate());this.params.parentFilterInstance((function(d){if(d){var a=Kd(t);d.onFloatingFilterChanged(e.getLastType()||null,a)}}))},t.prototype.getDateComponentParams=function(){var e=ks.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:F(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}},t.prototype.createDateComponent=function(){var e=this;this.dateComp=new Ds(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))},t.prototype.updateDateComponent=function(){var e=this.getDateComponentParams(),t=this.gridOptionsService,d=t.api,a=t.columnApi,s=t.context;e.api=d,e.columnApi=a,e.context=s,this.dateComp.updateParams(e)},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},Io([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Io([gs("eReadOnlyText")],t.prototype,"eReadOnlyText",void 0),Io([gs("eDateWrapper")],t.prototype,"eDateWrapper",void 0),t}(Oo),Bo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Go=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Mo=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},wo=function(e){function t(){return e.call(this,'\n
\n \n
')||this}return Bo(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var t=this;this.params=e,this.setParams(e);var d=this.gridOptionsService.getDocument(),a=this.eDateInput.getInputElement();this.addManagedListener(a,"mousedown",(function(){t.eDateInput.isDisabled()||t.usingSafariDatePicker||a.focus()})),this.addManagedListener(a,"input",(function(e){e.target===d.activeElement&&(t.eDateInput.isDisabled()||t.params.onDateChanged())}))},t.prototype.setParams=function(e){var t=this.eDateInput.getInputElement(),d=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=d&&Sd(),t.type=d?"date":"text";var a=e.filterParams||{},s=a.minValidYear,o=a.maxValidYear,i=a.minValidDate,l=a.maxValidDate;if(i&&s&&M("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),l&&o&&M("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),i&&l){var r=Mo([i,l].map((function(e){return e instanceof Date?e:Kd(e)})),2),m=r[0],n=r[1];m&&n&&m.getTime()>n.getTime()&&M("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}i?i instanceof Date?t.min=Ud(i):t.min=i:s&&(t.min="".concat(s,"-01-01")),l?l instanceof Date?t.max=Ud(l):t.max=l:o&&(t.max="".concat(o,"-12-31"))},t.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},t.prototype.getDate=function(){return Kd(this.eDateInput.getValue())},t.prototype.setDate=function(e){this.eDateInput.setValue(jd(e,!1))},t.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},t.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},t.prototype.afterGuiAttached=function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()},t.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:vd()||Id()||Sd()&&Od()>=14.1},Go([gs("eDateInput")],t.prototype,"eDateInput",void 0),t}(hs),Lo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Eo=function(e){function t(t,d,a){return void 0===d&&(d="ag-text-field"),void 0===a&&(a="text"),e.call(this,t,d,a)||this}return Lo(t,e),t.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},t.prototype.setValue=function(t,d){return this.eInput.value!==t&&(this.eInput.value=s(t)?t:""),e.prototype.setValue.call(this,t,d)},t.prototype.setStartValue=function(e){this.setValue(e,!0)},t.prototype.preventDisallowedCharacters=function(){var e=new RegExp("[".concat(this.config.allowedCharPattern,"]"));this.addManagedListener(this.eInput,"keydown",(function(t){Ya(t)&&t.key&&!e.test(t.key)&&t.preventDefault()})),this.addManagedListener(this.eInput,"paste",(function(t){var d,a=null===(d=t.clipboardData)||void 0===d?void 0:d.getData("text");a&&a.split("").some((function(t){return!e.test(t)}))&&t.preventDefault()}))},t}(io),Vo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ro=function(e){function t(t){return e.call(this,t,"ag-number-field","number")||this}return Vo(t,e),t.prototype.postConstruct=function(){var t=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",(function(){var e=parseFloat(t.eInput.value),d=isNaN(e)?"":t.normalizeValue(e.toString());t.value!==d&&t.setValue(d)})),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},t.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},t.prototype.normalizeValue=function(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));var t=parseFloat(e);return null!=this.min&&tthis.max&&(e=this.max.toString()),e},t.prototype.adjustPrecision=function(e,t){if(null==this.precision)return e;if(t){var d=parseFloat(e).toFixed(this.precision);return parseFloat(d).toString()}var a=String(e).split(".");if(a.length>1){if(a[1].length<=this.precision)return e;if(this.precision>0)return"".concat(a[0],".").concat(a[1].slice(0,this.precision))}return a[0]},t.prototype.setMin=function(e){return this.min===e||(this.min=e,Ea(this.eInput,"min",e)),this},t.prototype.setMax=function(e){return this.max===e||(this.max=e,Ea(this.eInput,"max",e)),this},t.prototype.setPrecision=function(e){return this.precision=e,this},t.prototype.setStep=function(e){return this.step===e||(this.step=e,Ea(this.eInput,"step",e)),this},t.prototype.setValue=function(t,d){var a=this;return this.setValueOrInputValue((function(t){return e.prototype.setValue.call(a,t,d)}),(function(){return a}),t)},t.prototype.setStartValue=function(t){var d=this;return this.setValueOrInputValue((function(t){return e.prototype.setValue.call(d,t,!0)}),(function(e){d.eInput.value=e}),t)},t.prototype.setValueOrInputValue=function(e,t,d){if(s(d)){var a=this.isScientificNotation(d);if(a&&this.eInput.validity.valid)return e(d);if(!a)a=(d=this.adjustPrecision(d))!=this.normalizeValue(d);if(a)return t(d)}return e(d)},t.prototype.getValue=function(){if(this.eInput.validity.valid){var t=this.eInput.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):e.prototype.getValue.call(this)}},t.prototype.isScientificNotation=function(e){return"string"===typeof e&&e.includes("e")},t}(Eo),Ao=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),xo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ao(t,e),t.prototype.conditionToString=function(e,t){var d=(t||{}).numberOfInputs;return e.type==_o.IN_RANGE||2===d?"".concat(this.formatValue(e.filter),"-").concat(this.formatValue(e.filterTo)):null!=e.filter?this.formatValue(e.filter):"".concat(e.type)},t}(co);function Wo(e){var t=(null!==e&&void 0!==e?e:{}).allowedCharPattern;return null!==t&&void 0!==t?t:null}var Fo,No,ko=function(e){function t(){var t=e.call(this,"numberFilter")||this;return t.eValuesFrom=[],t.eValuesTo=[],t}return Ao(t,e),t.prototype.refresh=function(t){return this.numberFilterParams.allowedCharPattern===t.allowedCharPattern&&e.prototype.refresh.call(this,t)},t.prototype.mapValuesFromModel=function(e){var t=e||{},d=t.filter,a=t.filterTo,s=t.type;return[this.processValue(d),this.processValue(a)].slice(0,this.getNumberOfInputs(s))},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.comparator=function(){return function(e,t){return e===t?0:e0&&(d.filter=a[0]),a.length>1&&(d.filterTo=a[1]),d},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getModelAsString=function(e){var t;return null!==(t=this.filterModelFormatter.getModelAsString(e))&&void 0!==t?t:""},t.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput((function(t){t.getInputElement().validity.valid||(e=!0)})),e},t.DEFAULT_FILTER_OPTIONS=[Co.EQUALS,Co.NOT_EQUAL,Co.GREATER_THAN,Co.GREATER_THAN_OR_EQUAL,Co.LESS_THAN,Co.LESS_THAN_OR_EQUAL,Co.IN_RANGE,Co.BLANK,Co.NOT_BLANK],t}(Co),Ho=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),jo=function(){return jo=Object.assign||function(e){for(var t,d=1,a=arguments.length;d0&&(d.filter=a[0]),a.length>1&&(d.filterTo=a[1]),d},t.prototype.getFilterType=function(){return"text"},t.prototype.areSimpleModelsEqual=function(e,t){return e.filter===t.filter&&e.filterTo===t.filterTo&&e.type===t.type},t.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},t.prototype.getValues=function(e){return this.getValuesWithSideEffects(e,!1)},t.prototype.getValuesWithSideEffects=function(e,d){var s=this,o=[];return this.forEachPositionInput(e,(function(e,i,l,r){var m;if(i=0},t.prototype.evaluateNonNullValue=function(e,t,d,a){var s=this,o=e.map((function(e){return s.formatter(e)}))||[],i=this.formatter(t),l=this.textFilterParams,r=l.api,m=l.colDef,n=l.column,u=l.columnApi,p=l.context,f=l.textFormatter;if(d.type===_o.BLANK)return this.isBlank(t);if(d.type===_o.NOT_BLANK)return!this.isBlank(t);var c={api:r,colDef:m,column:n,columnApi:u,context:p,node:a.node,data:a.data,filterOption:d.type,value:i,textFormatter:f};return o.some((function(e){return s.matcher(jo(jo({},c),{filterText:e}))}))},t.prototype.getModelAsString=function(e){var t;return null!==(t=this.filterModelFormatter.getModelAsString(e))&&void 0!==t?t:""},t.DEFAULT_FILTER_OPTIONS=[_o.CONTAINS,_o.NOT_CONTAINS,_o.EQUALS,_o.NOT_EQUAL,_o.STARTS_WITH,_o.ENDS_WITH,_o.BLANK,_o.NOT_BLANK],t.DEFAULT_FORMATTER=function(e){return e},t.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},t.DEFAULT_MATCHER=function(e){var d=e.filterOption,a=e.value,s=e.filterText;if(null==s)return!1;switch(d){case t.CONTAINS:return a.indexOf(s)>=0;case t.NOT_CONTAINS:return a.indexOf(s)<0;case t.EQUALS:return a===s;case t.NOT_EQUAL:return a!=s;case t.STARTS_WITH:return 0===a.indexOf(s);case t.ENDS_WITH:var o=a.lastIndexOf(s);return o>=0&&o===a.length-s.length;default:return!1}},t}(_o),Ko=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Yo=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Qo=function(e){function t(t){var d=e.call(this)||this;return d.params=t,d.valueChangedListener=function(){},d}return Ko(t,e),t.prototype.setupGui=function(e){var t,d=this;this.eFloatingFilterTextInput=this.createManagedBean(new Eo(null===(t=this.params)||void 0===t?void 0:t.config));var a=this.eFloatingFilterTextInput.getGui();e.appendChild(a),this.addManagedListener(a,"input",(function(e){return d.valueChangedListener(e)})),this.addManagedListener(a,"keydown",(function(e){return d.valueChangedListener(e)}))},t.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},t.prototype.setValue=function(e,t){this.eFloatingFilterTextInput.setValue(e,t)},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(ze),$o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ko(t,e),t.prototype.postConstruct=function(){this.setTemplate('\n \n ')},t.prototype.getDefaultDebounceMs=function(){return 500},t.prototype.onParentModelChanged=function(e,t){this.isEventFromFloatingFilter(t)||this.isEventFromDataChange(t)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))},t.prototype.init=function(t){this.setupFloatingFilterInputService(t),e.prototype.init.call(this,t),this.setTextInputParams(t)},t.prototype.setupFloatingFilterInputService=function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)},t.prototype.setTextInputParams=function(e){var t;this.params=e;var d=null!==(t=e.browserAutoComplete)&&void 0!==t&&t;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:d}),this.applyActive=ks.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var a=ks.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),s=F(this.syncUpWithParentFilter.bind(this),a);this.floatingFilterInputService.setValueChangedListener(s)}},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.setTextInputParams(t)},t.prototype.recreateFloatingFilterInputService=function(e){var t=this.floatingFilterInputService.getValue();_a(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(t,!0)},t.prototype.getAriaLabel=function(e){var t=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),d=this.localeService.getLocaleTextFunc();return"".concat(t," ").concat(d("ariaFilterInput","Filter Input"))},t.prototype.syncUpWithParentFilter=function(e){var t=this,d=e.key===Ka.ENTER;if(!this.applyActive||d){var a=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(a=Uo.trimInput(a),this.floatingFilterInputService.setValue(a,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(t.getLastType()||null,a||null)}))}},t.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},Yo([de("columnModel")],t.prototype,"columnModel",void 0),Yo([gs("eFloatingFilterInputContainer")],t.prototype,"eFloatingFilterInputContainer",void 0),Yo([Z],t.prototype,"postConstruct",null),t}(Oo),Xo=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Jo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valueChangedListener=function(){},t.numberInputActive=!0,t}return Xo(t,e),t.prototype.setupGui=function(e){var t=this;this.eFloatingFilterNumberInput=this.createManagedBean(new Ro),this.eFloatingFilterTextInput=this.createManagedBean(new Eo),this.eFloatingFilterTextInput.setDisabled(!0);var d=this.eFloatingFilterNumberInput.getGui(),a=this.eFloatingFilterTextInput.getGui();e.appendChild(d),e.appendChild(a),this.setupListeners(d,(function(e){return t.valueChangedListener(e)})),this.setupListeners(a,(function(e){return t.valueChangedListener(e)}))},t.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},t.prototype.setAutoComplete=function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)},t.prototype.getValue=function(){return this.getActiveInputElement().getValue()},t.prototype.setValue=function(e,t){this.getActiveInputElement().setValue(e,t)},t.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput},t.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},t.prototype.setupListeners=function(e,t){this.addManagedListener(e,"input",t),this.addManagedListener(e,"keydown",t)},t.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},t.prototype.setAriaLabel=function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)},t}(ze),Zo=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xo(t,e),t.prototype.init=function(t){var d;e.prototype.init.call(this,t),this.filterModelFormatter=new xo(this.localeService,this.optionsFactory,null===(d=t.filterParams)||void 0===d?void 0:d.numberFormatter)},t.prototype.onParamsUpdated=function(t){Wo(t.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(t),e.prototype.onParamsUpdated.call(this,t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return ko.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(e){return this.allowedCharPattern=Wo(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Qo({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Jo)},t}($o),ei=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ti=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ei(t,e),t.prototype.init=function(t){e.prototype.init.call(this,t),this.filterModelFormatter=new zo(this.localeService,this.optionsFactory)},t.prototype.onParamsUpdated=function(t){e.prototype.onParamsUpdated.call(this,t),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},t.prototype.getDefaultFilterOptions=function(){return Uo.DEFAULT_FILTER_OPTIONS},t.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},t.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new Qo)},t}($o),di=function(){function e(e,t){void 0===t&&(t=!1);var d=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new me,this.eElement=e,this.preventMouseClick=t;var a=this.onTouchStart.bind(this),s=this.onTouchMove.bind(this),o=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",a,{passive:!0}),this.eElement.addEventListener("touchmove",s,{passive:!0}),this.eElement.addEventListener("touchend",o,{passive:!1}),this.destroyFuncs.push((function(){d.eElement.removeEventListener("touchstart",a,{passive:!0}),d.eElement.removeEventListener("touchmove",s,{passive:!0}),d.eElement.removeEventListener("touchend",o,{passive:!1})}))}return e.prototype.getActiveTouch=function(e){for(var t=0;t0)if(t-this.lastTapTime>e.DOUBLE_TAP_MILLIS){var d={type:e.EVENT_DOUBLE_TAP,touchStart:this.touchStart};this.eventService.dispatchEvent(d),this.lastTapTime=null}else this.lastTapTime=t;else this.lastTapTime=t},e.prototype.destroy=function(){this.destroyFuncs.forEach((function(e){return e()}))},e.EVENT_TAP="tap",e.EVENT_DOUBLE_TAP="doubleTap",e.EVENT_LONG_TAP="longTap",e.DOUBLE_TAP_MILLIS=500,e}(),ai=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),si=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},oi=function(e){function t(d){var a=e.call(this)||this;return d||a.setTemplate(t.TEMPLATE),a}return ai(t,e),t.prototype.attachCustomElements=function(e,t,d,a,s){this.eSortOrder=e,this.eSortAsc=t,this.eSortDesc=d,this.eSortMixed=a,this.eSortNone=s},t.prototype.setupSort=function(e,t){var d=this;void 0===t&&(t=!1),this.column=e,this.suppressOrder=t,this.setupMultiSortIndicator(),this.column.isSortable()&&(this.addInIcon("sortAscending",this.eSortAsc,e),this.addInIcon("sortDescending",this.eSortDesc,e),this.addInIcon("sortUnSort",this.eSortNone,e),this.addManagedPropertyListener("unSortIcon",(function(){return d.updateIcons()})),this.addManagedListener(this.eventService,Je.EVENT_NEW_COLUMNS_LOADED,(function(){return d.updateIcons()})),this.addManagedListener(this.eventService,Je.EVENT_SORT_CHANGED,(function(){return d.onSortChanged()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return d.onSortChanged()})),this.onSortChanged())},t.prototype.addInIcon=function(e,t,d){if(null!=t){var a=za(e,this.gridOptionsService,d);a&&t.appendChild(a)}},t.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},t.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var t="asc"===e;da(this.eSortAsc,t,{skipAriaHidden:!0})}if(this.eSortDesc){var d="desc"===e;da(this.eSortDesc,d,{skipAriaHidden:!0})}if(this.eSortNone){var a=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.get("unSortIcon"),s=null===e||void 0===e;da(this.eSortNone,!a&&s,{skipAriaHidden:!0})}},t.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var t=this.column.getColDef().showRowGroup;this.gridOptionsService.isColumnsSortingCoupledToGroup()&&t&&(this.addManagedListener(this.eventService,Je.EVENT_SORT_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.updateMultiSortIndicator()})),this.updateMultiSortIndicator())},t.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e="mixed"===this.sortController.getDisplaySortForColumn(this.column);da(this.eSortMixed,e,{skipAriaHidden:!0})}},t.prototype.updateSortOrder=function(){var e,t=this;if(this.eSortOrder){var d=this.sortController.getColumnsWithSortingOrdered(),a=null!==(e=this.sortController.getDisplaySortIndexForColumn(this.column))&&void 0!==e?e:-1,s=d.some((function(e){var d;return null!==(d=t.sortController.getDisplaySortIndexForColumn(e))&&void 0!==d&&d})),o=a>=0&&s;da(this.eSortOrder,o,{skipAriaHidden:!0}),a>=0?this.eSortOrder.innerHTML=(a+1).toString():_a(this.eSortOrder)}},t.TEMPLATE='\n \n \n \n \n \n ',si([gs("eSortOrder")],t.prototype,"eSortOrder",void 0),si([gs("eSortAsc")],t.prototype,"eSortAsc",void 0),si([gs("eSortDesc")],t.prototype,"eSortDesc",void 0),si([gs("eSortMixed")],t.prototype,"eSortMixed",void 0),si([gs("eSortNone")],t.prototype,"eSortNone",void 0),si([de("columnModel")],t.prototype,"columnModel",void 0),si([de("sortController")],t.prototype,"sortController",void 0),t}(hs),ii=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),li=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.lastMovingChanged=0,t}return ii(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.refresh=function(e){return this.params=e,this.workOutTemplate()==this.currentTemplate&&(this.workOutShowMenu()==this.currentShowMenu&&(this.workOutSort()==this.currentSort&&(this.shouldSuppressMenuHide()==this.currentSuppressMenuHide&&(this.setDisplayName(e),!0))))},t.prototype.workOutTemplate=function(){var e=be(this.params.template,t.TEMPLATE);return e=e&&e.trim?e.trim():e},t.prototype.init=function(e){this.params=e,this.currentTemplate=this.workOutTemplate(),this.setTemplate(this.currentTemplate),this.setupTap(),this.setupIcons(e.column),this.setMenu(),this.setupSort(),this.setupFilterIcon(),this.setDisplayName(e)},t.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var t=it(this.currentDisplayName);this.eText&&(this.eText.innerHTML=t)}},t.prototype.setupIcons=function(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},t.prototype.addInIcon=function(e,t,d){if(null!=t){var a=za(e,this.gridOptionsService,d);a&&t.appendChild(a)}},t.prototype.setupTap=function(){var e=this,t=this.gridOptionsService;if(!t.get("suppressTouch")){var d=new di(this.getGui(),!0),a=t.get("suppressMenuHide"),o=a&&s(this.eMenu),i=o?new di(this.eMenu,!0):d;if(this.params.enableMenu){var l=o?"EVENT_TAP":"EVENT_LONG_TAP";this.addManagedListener(i,di[l],(function(d){t.api.showColumnMenuAfterMouseClick(e.params.column,d.touchStart)}))}if(this.params.enableSorting){this.addManagedListener(d,di.EVENT_TAP,(function(t){var d=t.touchStart.target;a&&e.eMenu.contains(d)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")}))}this.addDestroyFunc((function(){return d.destroy()})),o&&this.addDestroyFunc((function(){return i.destroy()}))}},t.prototype.workOutShowMenu=function(){var e=!this.gridOptionsService.get("suppressMenuHide"),t=Bd()&&e;return this.params.enableMenu&&!t},t.prototype.shouldSuppressMenuHide=function(){return this.gridOptionsService.get("suppressMenuHide")},t.prototype.setMenu=function(){var e=this;this.eMenu&&(this.currentShowMenu=this.workOutShowMenu(),this.currentShowMenu?(this.currentSuppressMenuHide=this.shouldSuppressMenuHide(),this.addManagedListener(this.eMenu,"click",(function(){return e.showMenu(e.eMenu)})),this.eMenu.classList.toggle("ag-header-menu-always-show",this.currentSuppressMenuHide)):ya(this.eMenu))},t.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},t.prototype.workOutSort=function(){return this.params.enableSorting},t.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new oi(!0)),this.eSortIndicator.attachCustomElements(this.eSortOrder,this.eSortAsc,this.eSortDesc,this.eSortMixed,this.eSortNone)),this.eSortIndicator.setupSort(this.params.column),this.currentSort){this.addManagedListener(this.params.column,ce.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(t){var d=e.params.column.isMoving(),a=(new Date).getTime()-e.lastMovingChanged<50;if(!(d||a)){var s="ctrl"===e.gridOptionsService.get("multiSortKey")?t.ctrlKey||t.metaKey:t.shiftKey;e.params.progressSort(s)}}));var t=function(){if(e.addOrRemoveCssClass("ag-header-cell-sorted-asc",e.params.column.isSortAscending()),e.addOrRemoveCssClass("ag-header-cell-sorted-desc",e.params.column.isSortDescending()),e.addOrRemoveCssClass("ag-header-cell-sorted-none",e.params.column.isSortNone()),e.params.column.getColDef().showRowGroup){var t=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),d=!(null===t||void 0===t?void 0:t.every((function(t){return e.params.column.getSort()==t.getSort()})));e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",d)}};this.addManagedListener(this.eventService,Je.EVENT_SORT_CHANGED,t),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,t)}},t.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,ce.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},t.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();da(this.eFilter,e,{skipAriaHidden:!0})},t.TEMPLATE='',li([de("sortController")],t.prototype,"sortController",void 0),li([de("menuFactory")],t.prototype,"menuFactory",void 0),li([de("columnModel")],t.prototype,"columnModel",void 0),li([gs("eFilter")],t.prototype,"eFilter",void 0),li([gs("eSortIndicator")],t.prototype,"eSortIndicator",void 0),li([gs("eMenu")],t.prototype,"eMenu",void 0),li([gs("eLabel")],t.prototype,"eLabel",void 0),li([gs("eText")],t.prototype,"eText",void 0),li([gs("eSortOrder")],t.prototype,"eSortOrder",void 0),li([gs("eSortAsc")],t.prototype,"eSortAsc",void 0),li([gs("eSortDesc")],t.prototype,"eSortDesc",void 0),li([gs("eSortMixed")],t.prototype,"eSortMixed",void 0),li([gs("eSortNone")],t.prototype,"eSortNone",void 0),t}(hs),mi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ni=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ui=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return mi(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},t.prototype.checkWarnings=function(){this.params.template&&M("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")},t.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var t=function(t){if(!Re(t)){var d=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),d,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,t),this.addTouchAndClickListeners(this.eOpenIcon,t);var d=function(e){Ve(e)};this.addManagedListener(this.eCloseIcon,"dblclick",d),this.addManagedListener(this.eOpenIcon,"dblclick",d),this.addManagedListener(this.getGui(),"dblclick",t),this.updateIconVisibility();var a=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(a,ye.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(a,ye.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},t.prototype.addTouchAndClickListeners=function(e,t){var d=new di(e,!0);this.addManagedListener(d,di.EVENT_TAP,t),this.addDestroyFunc((function(){return d.destroy()})),this.addManagedListener(e,"click",t)},t.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();da(this.eOpenIcon,e),da(this.eCloseIcon,!e)}else da(this.eOpenIcon,!1),da(this.eCloseIcon,!1)},t.prototype.addInIcon=function(e,t){var d=za(e,this.gridOptionsService,null);d&&this.getRefElement(t).appendChild(d)},t.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return da(this.eOpenIcon,!1),void da(this.eCloseIcon,!1)},t.prototype.setupLabel=function(){var e,t=this.params,d=t.displayName,a=t.columnGroup;if(s(d)){var o=it(d);this.getRefElement("agLabel").innerHTML=o}this.addOrRemoveCssClass("ag-sticky-label",!(null===(e=a.getColGroupDef())||void 0===e?void 0:e.suppressStickyLabel))},t.TEMPLATE='',ni([de("columnModel")],t.prototype,"columnModel",void 0),ni([gs("agOpened")],t.prototype,"eOpenIcon",void 0),ni([gs("agClosed")],t.prototype,"eCloseIcon",void 0),t}(hs),pi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),fi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pi(t,e),t.prototype.isPopup=function(){return!0},t.prototype.setParentComponent=function(t){t.addCssClass("ag-has-popup"),e.prototype.setParentComponent.call(this,t)},t.prototype.destroy=function(){var t=this.parentComponent;t&&t.isAlive()&&t.getGui().classList.remove("ag-has-popup"),e.prototype.destroy.call(this)},t}(hs),ci=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),_i=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},yi=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return ci(t,e),t.prototype.init=function(e){this.params=e,this.focusAfterAttached=e.cellStartedEdit,this.eTextArea.setMaxLength(e.maxLength||200).setCols(e.cols||60).setRows(e.rows||10),s(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()},t.prototype.onKeyDown=function(e){var t=e.key;(t===Ka.LEFT||t===Ka.UP||t===Ka.RIGHT||t===Ka.DOWN||e.shiftKey&&t===Ka.ENTER)&&e.stopPropagation()},t.prototype.afterGuiAttached=function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},t.prototype.getValue=function(){var e=this.eTextArea.getValue();return s(e)||s(this.params.value)?this.params.parseValue(e):this.params.value},t.TEMPLATE='
\n \n
',_i([gs("eTextArea")],t.prototype,"eTextArea",void 0),t}(fi),Ci=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),bi=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},qi=function(e){function t(){var t=e.call(this,'
\n \n
')||this;return t.startedByEnter=!1,t}return Ci(t,e),t.prototype.init=function(e){this.focusAfterAttached=e.cellStartedEdit;var t=this,d=t.eSelect,a=t.valueFormatterService,s=t.gridOptionsService,i=e.values,l=e.value,r=e.eventKey;if(o(i))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=null!=r&&r===Ka.ENTER;var m=!1;i.forEach((function(t){var s={value:t},o=a.formatValue(e.column,null,t),i=null!==o&&void 0!==o;s.text=i?o:t,d.addOption(s),m=m||l===t})),m?d.setValue(e.value,!0):e.values.length&&d.setValue(e.values[0],!0);var n=e.valueListGap,u=e.valueListMaxWidth,p=e.valueListMaxHeight;null!=n&&d.setPickerGap(n),null!=p&&d.setPickerMaxHeight(p),null!=u&&d.setPickerMaxWidth(u),"fullRow"!==s.get("editType")&&this.addManagedListener(this.eSelect,ao.EVENT_ITEM_SELECTED,(function(){return e.stopEditing()}))}},t.prototype.afterGuiAttached=function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout((function(){e.isAlive()&&e.eSelect.showPicker()}))},t.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},t.prototype.getValue=function(){return this.eSelect.getValue()},t.prototype.isPopup=function(){return!1},bi([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),bi([gs("eSelect")],t.prototype,"eSelect",void 0),t}(fi),Pi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),hi=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ti=function(e){function t(t){var d=e.call(this,'\n
\n '.concat(t.getTemplate(),"\n
"))||this;return d.cellEditorInput=t,d}return Pi(t,e),t.prototype.init=function(e){this.params=e;var t,d=this.eInput;if(this.cellEditorInput.init(d,e),e.cellStartedEdit){this.focusAfterAttached=!0;var a=e.eventKey;a===Ka.BACKSPACE||e.eventKey===Ka.DELETE?t="":a&&1===a.length?t=a:(t=this.cellEditorInput.getStartValue(),a!==Ka.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,t=this.cellEditorInput.getStartValue();null!=t&&d.setStartValue(t),this.addManagedListener(d.getGui(),"keydown",(function(e){var t=e.key;t!==Ka.PAGE_UP&&t!==Ka.PAGE_DOWN||e.preventDefault()}))},t.prototype.afterGuiAttached=function(){var e,t,d=this.localeService.getLocaleTextFunc(),a=this.eInput;if(a.setInputAriaLabel(d("ariaInputEditor","Input Editor")),this.focusAfterAttached){Sd()||a.getFocusableElement().focus();var s=a.getInputElement();this.highlightAllOnFocus?s.select():null===(t=(e=this.cellEditorInput).setCaret)||void 0===t||t.call(e)}},t.prototype.focusIn=function(){var e=this.eInput,t=e.getFocusableElement(),d=e.getInputElement();t.focus(),d.select()},t.prototype.getValue=function(){return this.cellEditorInput.getValue()},t.prototype.isPopup=function(){return!1},hi([gs("eInput")],t.prototype,"eInput",void 0),t}(fi),gi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Si=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,t){this.eInput=e,this.params=t,null!=t.maxLength&&e.setMaxLength(t.maxLength)},e.prototype.getValue=function(){var e=this.eInput.getValue();return s(e)||s(this.params.value)?this.params.parseValue(e):this.params.value},e.prototype.getStartValue=function(){return this.params.useFormatter||this.params.column.getColDef().refData?this.params.formatValue(this.params.value):this.params.value},e.prototype.setCaret=function(){var e=this.eInput.getValue(),t=s(e)&&e.length||0;t&&this.eInput.getInputElement().setSelectionRange(t,t)},e}(),Oi=function(e){function t(){return e.call(this,new Si)||this}return gi(t,e),t}(Ti),vi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ii=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Di=function(e){function t(){var d=e.call(this,t.TEMPLATE)||this;return d.refreshCount=0,d}return vi(t,e),t.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},t.prototype.showDelta=function(e,t){var d=Math.abs(t),a=e.formatValue(d),o=s(a)?a:d,i=t>=0;this.eDelta.innerHTML=i?"\u2191"+o:"\u2193"+o,this.eDelta.classList.toggle("ag-value-change-delta-up",i),this.eDelta.classList.toggle("ag-value-change-delta-down",!i)},t.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var t=this.refreshCount;window.setTimeout((function(){t===e.refreshCount&&e.hideDeltaValue()}),2e3)},t.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),_a(this.eDelta)},t.prototype.refresh=function(e){var t=e.value;if(t===this.lastValue)return!1;if(s(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:s(e.value)?this.eValue.innerHTML=t:_a(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof t&&"number"===typeof this.lastValue){var d=t-this.lastValue;this.showDelta(e,d)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=t,!0},t.TEMPLATE='',Ii([de("filterManager")],t.prototype,"filterManager",void 0),t}(hs),Bi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Gi=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Mi=function(e){function t(){var d=e.call(this,t.TEMPLATE)||this;return d.refreshCount=0,d.eCurrent=d.queryForHtmlElement(".ag-value-slide-current"),d}return Bi(t,e),t.prototype.init=function(e){this.refresh(e)},t.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var t=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=ba(''),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){t===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((function(){t===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},t.prototype.refresh=function(e){var t=e.value;return o(t)&&(t=""),t!==this.lastValue&&(!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(this.addSlideAnimation(),this.lastValue=t,s(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:s(e.value)?this.eCurrent.innerHTML=t:_a(this.eCurrent),!0))},t.TEMPLATE='\n \n ',Gi([de("filterManager")],t.prototype,"filterManager",void 0),t}(hs),wi=function(){return wi=Object.assign||function(e){for(var t,d=1,a=arguments.length;d0?a:void 0,level:this.level}),null!==this.id&&"string"===typeof this.id&&this.id.startsWith(e.ID_PREFIX_ROW_GROUP)&&console.error("AG Grid: Row IDs cannot start with ".concat(e.ID_PREFIX_ROW_GROUP,", this is a reserved prefix for AG Grid's row grouping feature.")),null!==this.id&&"string"!==typeof this.id&&(this.id=""+this.id)}else this.id=void 0;else this.id=t},e.prototype.getGroupKeys=function(e){void 0===e&&(e=!1);var t=[],d=this;for(e&&(d=d.parent);d&&d.level>=0;)t.push(d.key),d=d.parent;return t.reverse(),t},e.prototype.isPixelInRange=function(e){return!(!s(this.rowTop)||!s(this.rowHeight))&&(e>=this.rowTop&&ea&&(a=i)})),!t&&((d||a<10)&&(a=this.beans.gridOptionsService.getRowHeightForNode(this).height),a!=this.rowHeight))){this.setRowHeight(a);var o=this.beans.rowModel;o.onRowHeightChangedDebounced&&o.onRowHeightChangedDebounced()}},e.prototype.setRowIndex=function(t){this.rowIndex!==t&&(this.rowIndex=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))},e.prototype.setUiLevel=function(t){this.uiLevel!==t&&(this.uiLevel=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(t,d){if(this.expanded!==t){this.expanded=t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var a=Object.assign({},this.createGlobalRowEvent(Je.EVENT_ROW_GROUP_OPENED),{expanded:t,event:d||null});this.beans.rowNodeEventThrottle.dispatchExpanded(a),this.sibling&&this.beans.rowRenderer.refreshCells({rowNodes:[this]})}},e.prototype.createGlobalRowEvent=function(e){return{type:e,node:this,data:this.data,rowIndex:this.rowIndex,rowPinned:this.rowPinned,context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi}},e.prototype.dispatchLocalEvent=function(e){this.eventService&&this.eventService.dispatchEvent(e)},e.prototype.setDataValue=function(e,t,d){var a=this,s=function(){var t;return"string"!==typeof e?e:null!==(t=a.beans.columnModel.getGridColumn(e))&&void 0!==t?t:a.beans.columnModel.getPrimaryColumn(e)}(),o=this.getValueFromValueService(s);if(this.beans.gridOptionsService.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(s,o,t,d),!1;var i=this.beans.valueService.setValue(this,s,t,d);return this.dispatchCellChangedEvent(s,t,o),this.checkRowSelectable(),i},e.prototype.getValueFromValueService=function(e){var t=this.leafGroup&&this.beans.columnModel.isPivotMode(),d=this.group&&this.expanded&&!this.footer&&!t,a=this.beans.gridOptionsService.getGroupIncludeFooter()({node:this}),s=this.beans.gridOptionsService.get("groupSuppressBlankHeader"),o=d&&a&&!s;return this.beans.valueService.getValue(e,this,!1,o)},e.prototype.dispatchEventForSaveValueReadOnly=function(e,t,d,a){var s={type:Je.EVENT_CELL_EDIT_REQUEST,event:null,rowIndex:this.rowIndex,rowPinned:this.rowPinned,column:e,colDef:e.getColDef(),context:this.beans.gridOptionsService.context,api:this.beans.gridOptionsService.api,columnApi:this.beans.gridOptionsService.columnApi,data:this.data,node:this,oldValue:t,newValue:d,value:d,source:a};this.beans.eventService.dispatchEvent(s)},e.prototype.setGroupValue=function(e,t){var d=this.beans.columnModel.getGridColumn(e);o(this.groupData)&&(this.groupData={});var a=d.getColId(),s=this.groupData[a];s!==t&&(this.groupData[a]=t,this.dispatchCellChangedEvent(d,t,s))},e.prototype.setAggData=function(e){var t=this,d=T([this.aggData,e]),a=this.aggData;this.aggData=e,this.eventService&&d.forEach((function(e){var d=t.aggData?t.aggData[e]:void 0,s=a?a[e]:void 0;if(d!==s){var o=t.beans.columnModel.lookupGridColumn(e);o&&t.dispatchCellChangedEvent(o,d,s)}}))},e.prototype.updateHasChildren=function(){var t=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gridOptionsService.isRowModelType("serverSide")){var d=this.beans.gridOptionsService.get("treeData"),a=this.beans.gridOptionsService.get("isServerSideGroup");t=!this.stub&&!this.footer&&(d?!!a&&a(this.data):!!this.group)}t!==this.__hasChildren&&(this.__hasChildren=!!t,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_HAS_CHILDREN_CHANGED)))},e.prototype.hasChildren=function(){return null==this.__hasChildren&&this.updateHasChildren(),this.__hasChildren},e.prototype.isEmptyRowGroupNode=function(){return this.group&&i(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(t,d,a){var s={type:e.EVENT_CELL_CHANGED,node:this,column:t,newValue:d,oldValue:a};this.dispatchLocalEvent(s)},e.prototype.resetQuickFilterAggregateText=function(){this.quickFilterAggregateText=null},e.prototype.isExpandable=function(){return!this.footer&&(this.beans.columnModel.isPivotMode()?this.hasChildren()&&!this.leafGroup:this.hasChildren()||!!this.master)},e.prototype.isSelected=function(){return this.footer?this.sibling.isSelected():this.selected},e.prototype.depthFirstSearch=function(e){this.childrenAfterGroup&&this.childrenAfterGroup.forEach((function(t){return t.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,t=!1,d=!1,a=!1;if(!(null===(e=this.childrenAfterGroup)||void 0===e?void 0:e.length))return this.selectable?this.selected:null;for(var s=0;s=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ai=function(e){function t(){return e.call(this,'\n ')||this}return Ei(t,e),t.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),Qt(this.eCheckbox.getInputElement(),"polite")},t.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},t.prototype.onDataChanged=function(){this.onSelectionChanged()},t.prototype.onSelectableChanged=function(){this.showOrHideSelect()},t.prototype.onSelectionChanged=function(){var e=this.localeService.getLocaleTextFunc(),t=this.rowNode.isSelected(),d=cd(e,t),a=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(t,!0),this.eCheckbox.setInputAriaLabel("".concat(a," (").concat(d,")"))},t.prototype.onClicked=function(e,t,d){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:d.shiftKey,groupSelectsFiltered:t,event:d,source:"checkboxSelected"})},t.prototype.init=function(e){var t=this;if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(e){Ve(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){Ve(e);var d=t.gridOptionsService.get("groupSelectsFiltered"),a=t.eCheckbox.getValue();t.shouldHandleIndeterminateState(a,d)?0===t.onClicked(!0,d,e||{})&&t.onClicked(!1,d,e):a?t.onClicked(!1,d,e):t.onClicked(!0,d,e||{})})),this.addManagedListener(this.rowNode,Li.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_SELECTABLE_CHANGED,this.onSelectableChanged.bind(this)),this.gridOptionsService.get("isRowSelectable")||"function"===typeof this.getIsVisible()){var d=this.showOrHideSelect.bind(this);this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,d),this.addManagedListener(this.rowNode,Li.EVENT_DATA_CHANGED,d),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,d),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},t.prototype.shouldHandleIndeterminateState=function(e,t){return t&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gridOptionsService.isRowModelType("clientSide")},t.prototype.showOrHideSelect=function(){var e,t,d,a,s=this.rowNode.selectable,o=this.getIsVisible();if(s)if("function"===typeof o){var i=null===(e=this.overrides)||void 0===e?void 0:e.callbackParams,l=null===(t=this.column)||void 0===t?void 0:t.createColumnFunctionCallbackParams(this.rowNode);s=!!l&&o(Vi(Vi({},i),l))}else s=null!==o&&void 0!==o&&o;if(null===(d=this.column)||void 0===d?void 0:d.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!s),this.setVisible(!0),void this.setDisplayed(!0);(null===(a=this.overrides)||void 0===a?void 0:a.removeHidden)?this.setDisplayed(s):this.setVisible(s)},t.prototype.getIsVisible=function(){var e,t;return this.overrides?this.overrides.isVisible:null===(t=null===(e=this.column)||void 0===e?void 0:e.getColDef())||void 0===t?void 0:t.checkboxSelection},Ri([gs("eCheckbox")],t.prototype,"eCheckbox",void 0),Ri([Z],t.prototype,"postConstruct",null),t}(hs);!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(Fo||(Fo={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(No||(No={}));var xi,Wi=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Fi=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ni=function(e){var t="function"===typeof Symbol&&Symbol.iterator,d=t&&e[t],a=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};!function(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"}(xi||(xi={}));var ki,Hi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragSourceAndParamsList=[],t.dropTargets=[],t}var d;return Wi(t,e),d=t,t.prototype.init=function(){this.ePinnedIcon=ja("columnMovePin",this.gridOptionsService,null),this.eHideIcon=ja("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=ja("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=ja("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=ja("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=ja("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=ja("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=ja("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=ja("dropNotAllowed",this.gridOptionsService,null)},t.prototype.addDragSource=function(e,t){void 0===t&&(t=!1);var d={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:d,dragSource:e}),this.dragService.addDragSource(d)},t.prototype.removeDragSource=function(e){var t=this.dragSourceAndParamsList.find((function(t){return t.dragSource===e}));t&&(this.dragService.removeDragSource(t.params),ge(this.dragSourceAndParamsList,t))},t.prototype.clearDragSourceParamsList=function(){var e=this;this.dragSourceAndParamsList.forEach((function(t){return e.dragService.removeDragSource(t.params)})),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0},t.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},t.prototype.onDragStart=function(e,t){this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},t.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var t=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(t)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},t.prototype.onDragging=function(e,t){var d,a,s,o,i=this,l=this.getHorizontalDirection(e),r=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var m=this.dropTargets.filter((function(t){return i.isMouseOnDropTarget(e,t)})),n=this.findCurrentDropTarget(e,m);if(n!==this.lastDropTarget)this.leaveLastTargetIfExists(e,l,r,t),null!==this.lastDropTarget&&null===n&&(null===(a=(d=this.dragSource).onGridExit)||void 0===a||a.call(d,this.dragItem)),null===this.lastDropTarget&&null!==n&&(null===(o=(s=this.dragSource).onGridEnter)||void 0===o||o.call(s,this.dragItem)),this.enterDragTargetIfExists(n,e,l,r,t),this.lastDropTarget=n;else if(n&&n.onDragging){var u=this.createDropTargetEvent(n,e,l,r,t);n.onDragging(u)}},t.prototype.getAllContainersFromDropTarget=function(e){var t=e.getSecondaryContainers?e.getSecondaryContainers():null,d=[[e.getContainer()]];return t?d.concat(t):d},t.prototype.allContainersIntersect=function(e,t){var d,a;try{for(var s=Ni(t),o=s.next();!o.done;o=s.next()){var i=o.value.getBoundingClientRect();if(0===i.width||0===i.height)return!1;var l=e.clientX>=i.left&&e.clientX=i.top&&e.clientYd?No.Left:No.Right},t.prototype.getVerticalDirection=function(e){var t=this.eventLastTime&&this.eventLastTime.clientY,d=e.clientY;return t===d?null:t>d?Fo.Up:Fo.Down},t.prototype.createDropTargetEvent=function(e,t,d,a,s){var o=e.getContainer(),i=o.getBoundingClientRect(),l=this,r=l.gridApi,m=l.columnApi,n=l.dragItem,u=l.dragSource;return{event:t,x:t.clientX-i.left,y:t.clientY-i.top,vDirection:a,hDirection:d,dragSource:u,fromNudge:s,dragItem:n,api:r,columnApi:m,dropZoneTarget:o}},t.prototype.positionGhost=function(e){var t=this.eGhost;if(t){var d=t.getBoundingClientRect().height,a=Ld()-2,s=Ed()-2,o=ua(t.offsetParent),i=e.clientY,l=e.clientX,r=i-o.top-d/2,m=l-o.left-10,n=this.gridOptionsService.getDocument(),u=n.defaultView||window,p=u.pageYOffset||n.documentElement.scrollTop,f=u.pageXOffset||n.documentElement.scrollLeft;a>0&&m+t.clientWidth>a+f&&(m=a+f-t.clientWidth),m<0&&(m=0),s>0&&r+t.clientHeight>s+p&&(r=s+p-t.clientHeight),r<0&&(r=0),t.style.left="".concat(m,"px"),t.style.top="".concat(r,"px")}},t.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},t.prototype.createGhost=function(){this.eGhost=ba(d.GHOST_TEMPLATE),this.mouseEventService.stampTopLevelGridCompWithGridInstance(this.eGhost);var e=this.environment.getTheme().theme;e&&this.eGhost.classList.add(e),this.eGhostIcon=this.eGhost.querySelector(".ag-dnd-ghost-icon"),this.setGhostIcon(null);var t=this.eGhost.querySelector(".ag-dnd-ghost-label"),a=this.dragSource.dragItemName;E(a)&&(a=a()),t.innerHTML=it(a)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var s=this.gridOptionsService.getDocument(),o=null,i=null;try{o=s.fullscreenElement}catch(r){}finally{o||(o=this.gridOptionsService.getRootNode());var l=o.querySelector("body");i=l||(o instanceof ShadowRoot?o:o instanceof Document?null===o||void 0===o?void 0:o.documentElement:o)}this.eGhostParent=i,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},t.prototype.setGhostIcon=function(e,t){void 0===t&&(t=!1),_a(this.eGhostIcon);var a=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():d.ICON_NOT_ALLOWED),e){case d.ICON_PINNED:a=this.ePinnedIcon;break;case d.ICON_MOVE:a=this.eMoveIcon;break;case d.ICON_LEFT:a=this.eLeftIcon;break;case d.ICON_RIGHT:a=this.eRightIcon;break;case d.ICON_GROUP:a=this.eGroupIcon;break;case d.ICON_AGGREGATE:a=this.eAggregateIcon;break;case d.ICON_PIVOT:a=this.ePivotIcon;break;case d.ICON_NOT_ALLOWED:a=this.eDropNotAllowedIcon;break;case d.ICON_HIDE:a=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",t),a===this.eHideIcon&&this.gridOptionsService.get("suppressDragLeaveHidesColumns")||a&&this.eGhostIcon.appendChild(a)},t.ICON_PINNED="pinned",t.ICON_MOVE="move",t.ICON_LEFT="left",t.ICON_RIGHT="right",t.ICON_GROUP="group",t.ICON_AGGREGATE="aggregate",t.ICON_PIVOT="pivot",t.ICON_NOT_ALLOWED="notAllowed",t.ICON_HIDE="hide",t.GHOST_TEMPLATE='
\n \n
\n
',Fi([de("dragService")],t.prototype,"dragService",void 0),Fi([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Fi([de("columnApi")],t.prototype,"columnApi",void 0),Fi([de("gridApi")],t.prototype,"gridApi",void 0),Fi([Z],t.prototype,"init",null),Fi([ee],t.prototype,"clearDragSourceParamsList",null),t=d=Fi([te("dragAndDropService")],t)}(ze),ji=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),zi=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ui=function(e){function t(t,d,a,s,o,i){var l=e.call(this)||this;return l.cellValueFn=t,l.rowNode=d,l.column=a,l.customGui=s,l.dragStartPixels=o,l.suppressVisibilityChange=i,l.dragSource=null,l}return ji(t,e),t.prototype.isCustomGui=function(){return null!=this.customGui},t.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(''),this.getGui().appendChild(za("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.get("rowDragManaged")?new Qi(this,this.beans,this.rowNode,this.column):new Yi(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},t.prototype.setDragElement=function(e,t){this.setTemplateFromElement(e),this.addDragSource(t)},t.prototype.getSelectedNodes=function(){if(!this.gridOptionsService.get("rowDragMultiRow"))return[this.rowNode];var e=this.beans.selectionService.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e:[this.rowNode]},t.prototype.checkCompatibility=function(){var e=this.gridOptionsService.get("rowDragManaged");this.gridOptionsService.get("treeData")&&e&&M("If using row drag with tree data, you cannot have rowDragManaged=true")},t.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},t.prototype.getRowDragText=function(e){if(e){var t=e.getColDef();if(t.rowDragText)return t.rowDragText}return this.gridOptionsService.get("rowDragText")},t.prototype.addDragSource=function(e){var t=this;void 0===e&&(e=4),this.dragSource&&this.removeDragSource();var d=this.localeService.getLocaleTextFunc();this.dragSource={type:xi.RowDrag,eElement:this.getGui(),dragItemName:function(){var e,a=t.getDragItem(),s=(null===(e=a.rowNodes)||void 0===e?void 0:e.length)||1,o=t.getRowDragText(t.column);return o?o(a,s):1===s?t.cellValueFn():"".concat(s," ").concat(d("rowDragRows","rows"))},getDragItem:function(){return t.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},t.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},zi([de("beans")],t.prototype,"beans",void 0),zi([Z],t.prototype,"postConstruct",null),zi([ee],t.prototype,"removeDragSource",null),t}(hs),Ki=function(e){function t(t,d,a){var s=e.call(this)||this;return s.parent=t,s.rowNode=d,s.column=a,s}return ji(t,e),t.prototype.setDisplayedOrVisible=function(e){var t={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,t);else{var d=!0,a=!1;this.column&&(d=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),a=E(this.column.getColDef().rowDrag)),a?(this.parent.setDisplayed(!0,t),this.parent.setVisible(d,t)):(this.parent.setDisplayed(d,t),this.parent.setVisible(!0,t))}},t}(ze),Yi=function(e){function t(t,d,a,s){var o=e.call(this,t,a,s)||this;return o.beans=d,o}return ji(t,e),t.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Je.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.gridOptionsService.get("suppressRowDrag");this.setDisplayedOrVisible(e)},zi([Z],t.prototype,"postConstruct",null),t}(Ki),Qi=function(e){function t(t,d,a,s){var o=e.call(this,t,a,s)||this;return o.beans=d,o}return ji(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,Je.EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Je.EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Je.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},t.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},t.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),t=e&&e.shouldPreventRowMove(),d=this.gridOptionsService.get("suppressRowDrag"),a=this.beans.dragAndDropService.hasExternalDropZones(),s=t&&!a||d;this.setDisplayedOrVisible(s)},zi([Z],t.prototype,"postConstruct",null),t}(Ki),$i=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Xi=function(){return Xi=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Zi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $i(t,e),t.prototype.init=function(e,t,d,a,s,o,i){var l,r,m,n;this.params=i,this.eGui=t,this.eCheckbox=d,this.eExpanded=a,this.eContracted=s,this.comp=e,this.compClass=o;var u=i.node;i.value;var p=i.colDef,f=this.isTopLevelFooter();if(!f){if(this.isEmbeddedRowMismatch())return;if(u.footer&&this.gridOptionsService.get("groupHideOpenParents"))if((p&&p.showRowGroup)!==(u.rowGroupColumn&&u.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!f){var c=i.node.footer&&i.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null===(t=i.colDef)||void 0===t?void 0:t.showRowGroup)})),_="multipleColumns"!=this.gridOptionsService.get("groupDisplayType")||this.gridOptionsService.get("treeData")||this.gridOptionsService.get("showOpenedGroup")&&!i.node.footer&&(!i.node.group||null!=i.node.rowGroupIndex&&i.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex((function(e){var t;return e.getColId()===(null===(t=i.colDef)||void 0===t?void 0:t.showRowGroup)}))),y=!u.group&&((null===(l=this.params.colDef)||void 0===l?void 0:l.field)||(null===(r=this.params.colDef)||void 0===r?void 0:r.valueGetter)),C=this.isExpandable(),b=this.columnModel.isPivotMode()&&u.leafGroup&&(null===(m=u.rowGroupColumn)||void 0===m?void 0:m.getColId())===(null===(n=i.column)||void 0===n?void 0:n.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!C&&!y&&!_&&!c&&!b)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()},t.prototype.getCellAriaRole=function(){var e,t,d=null===(e=this.params.colDef)||void 0===e?void 0:e.cellAriaRole,a=null===(t=this.params.column)||void 0===t?void 0:t.getColDef().cellAriaRole;return d||a||"gridcell"},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.expandListener=null},t.prototype.refreshAriaExpanded=function(){var e=this.params,t=e.node,d=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),this.isExpandable()){var a=function(){ed(d,!!t.expanded)};this.expandListener=this.addManagedListener(t,Li.EVENT_EXPANDED_CHANGED,a)||null,a()}else td(d)},t.prototype.isTopLevelFooter=function(){if(!this.gridOptionsService.get("groupIncludeTotalFooter"))return!1;if(null!=this.params.value||-1!=this.params.node.level)return!1;var e=this.params.colDef;if(null==e)return!0;if(!0===e.showRowGroup)return!0;var t=this.columnModel.getRowGroupColumns();return!t||0===t.length||t[0].getId()===e.showRowGroup},t.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.get("embedFullWidthRows"))return!1;var e="left"===this.params.pinned,t="right"===this.params.pinned,d=!e&&!t;return this.gridOptionsService.get("enableRtl")?this.columnModel.isPinningLeft()?!t:!d:this.columnModel.isPinningLeft()?!e:!d},t.prototype.findDisplayedGroupNode=function(){var e=this.params.column,t=this.params.node;if(this.showingValueForOpenedParent)for(var d=t.parent;null!=d;){if(d.rowGroupColumn&&e.isRowGroupDisplayed(d.rowGroupColumn.getId())){this.displayedGroupNode=d;break}d=d.parent}o(this.displayedGroupNode)&&(this.displayedGroupNode=t)},t.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,t=this.params.column;if(this.gridOptionsService.get("groupHideOpenParents"))if(e.groupData){if(null!=e.rowGroupColumn){var d=e.rowGroupColumn.getId();if(t.isRowGroupDisplayed(d))return void(this.showingValueForOpenedParent=!1)}var a=null!=e.groupData[t.getId()];this.showingValueForOpenedParent=a}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1},t.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},t.prototype.addGroupValue=function(){var e,t=this.adjustParamsWithDetailsFromRelatedColumn(),d=this.getInnerCompDetails(t),a=t.valueFormatted,s=t.value,o=a;if(null==o){var i=this.displayedGroupNode.rowGroupColumn&&(null===(e=this.params.column)||void 0===e?void 0:e.isRowGroupDisplayed(this.displayedGroupNode.rowGroupColumn.getId()));if(""===this.displayedGroupNode.key&&this.displayedGroupNode.group&&i)o=this.localeService.getLocaleTextFunc()("blanks","(Blanks)");else o=null!==s&&void 0!==s?s:null}this.comp.setInnerRenderer(d,o)},t.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,t=this.params.column;if(!e)return this.params;if(null!=t&&!t.isRowGroupDisplayed(e.getId()))return this.params;var d=this.params,a=this.params,s=a.value,o=a.node,i=this.valueFormatterService.formatValue(e,o,s);return Xi(Xi({},d),{valueFormatted:i})},t.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,t="";if(e){var d=C(this.params);d.value=this.params.value,"function"===typeof e?t=e(d):"string"===typeof e?t=this.expressionService.evaluate(e,d):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else t="Total "+(null!=this.params.value?this.params.value:"");var a=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(a,t)},t.prototype.getInnerCompDetails=function(e){var t=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var d=this.userComponentFactory.getInnerRendererDetails(e,e),a=function(e){return e&&e.componentClass==t.compClass};if(d&&!a(d))return d;var s=this.displayedGroupNode.rowGroupColumn,o=s?s.getColDef():void 0;if(o){var i=this.userComponentFactory.getCellRendererDetails(o,e);if(i&&!a(i))return i;if(a(i)&&o.cellRendererParams&&o.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(o.cellRendererParams,e)}},t.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,Li.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},t.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,t=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?"(".concat(e,")"):"";this.comp.setChildCount(t)},t.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.get("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var t=this.params.column;return null==t||t.isRowGroupDisplayed(e.getId())},t.prototype.addExpandAndContract=function(){var e,t=this.params,d=za("groupExpanded",this.gridOptionsService,null),a=za("groupContracted",this.gridOptionsService,null);d&&this.eExpanded.appendChild(d),a&&this.eContracted.appendChild(a);var s=t.eGridCell;(null===(e=this.params.column)||void 0===e?void 0:e.isCellEditable(t.node))&&this.gridOptionsService.get("enableGroupEdit")||!this.isExpandable()||t.suppressDoubleClickExpand||this.addManagedListener(s,"dblclick",this.onCellDblClicked.bind(this)),this.addManagedListener(this.eExpanded,"click",this.onExpandClicked.bind(this)),this.addManagedListener(this.eContracted,"click",this.onExpandClicked.bind(this)),this.addManagedListener(s,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(t.node,Li.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var o=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,Li.EVENT_ALL_CHILDREN_COUNT_CHANGED,o),this.addManagedListener(this.displayedGroupNode,Li.EVENT_MASTER_CHANGED,o),this.addManagedListener(this.displayedGroupNode,Li.EVENT_GROUP_CHANGED,o),this.addManagedListener(this.displayedGroupNode,Li.EVENT_HAS_CHILDREN_CHANGED,o)},t.prototype.onExpandClicked=function(e){Re(e)||(Ve(e),this.onExpandOrContract(e))},t.prototype.onExpandOrContract=function(e){var t=this.displayedGroupNode,d=!t.expanded;!d&&t.sticky&&this.scrollToStickyNode(t),t.setExpanded(d,e)},t.prototype.scrollToStickyNode=function(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},t.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,t=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!t))return!1;var d=this.params.column;return null==d||"string"!==typeof d.getColDef().showRowGroup||this.isShowRowGroupForThisRow()},t.prototype.showExpandAndContractIcons=function(){var e=this,t=e.params,d=e.displayedGroupNode,a=e.columnModel,s=t.node,o=this.isExpandable();if(o){var i=!!this.showingValueForOpenedParent||s.expanded;this.comp.setExpandedDisplayed(i),this.comp.setContractedDisplayed(!i)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var l=a.isPivotMode(),r=l&&d.leafGroup,m=o&&!r,n=s.footer&&-1===s.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",m),this.comp.addOrRemoveCssClass("ag-row-group",m),l?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",r):n||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!m)},t.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},t.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,Li.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},t.prototype.setIndent=function(){if(!this.gridOptionsService.get("groupHideOpenParents")){var e=this.params,t=e.node,d=!!e.colDef,a=this.gridOptionsService.get("treeData"),s=!d||a||!0===e.colDef.showRowGroup?t.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+s,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},t.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var t=new Ui((function(){return e.params.value}),this.params.node);this.createManagedBean(t,this.context),this.eGui.insertAdjacentElement("afterbegin",t.getGui())}},t.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"===typeof e||!0===e},t.prototype.addCheckboxIfNeeded=function(){var e=this,t=this.displayedGroupNode,d=this.isUserWantsSelected()&&!t.footer&&!t.rowPinned&&!t.detail;if(d){var a=new Ai;this.getContext().createBean(a),a.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(a.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(a)}))}this.comp.setCheckboxVisible(d)},t.prototype.onKeyDown=function(e){e.key!==Ka.ENTER||this.params.suppressEnterExpand||(this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e))},t.prototype.onCellDblClicked=function(e){Re(e)||(We(this.eExpanded,e)||We(this.eContracted,e)||this.onExpandOrContract(e))},Ji([de("expressionService")],t.prototype,"expressionService",void 0),Ji([de("valueFormatterService")],t.prototype,"valueFormatterService",void 0),Ji([de("columnModel")],t.prototype,"columnModel",void 0),Ji([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Ji([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t}(ze),el=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),tl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},dl=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return el(t,e),t.prototype.init=function(e){var t=this,d={setInnerRenderer:function(e,d){return t.setRenderDetails(e,d)},setChildCount:function(e){return t.eChildCount.innerHTML=e},addOrRemoveCssClass:function(e,d){return t.addOrRemoveCssClass(e,d)},setContractedDisplayed:function(e){return da(t.eContracted,e)},setExpandedDisplayed:function(e){return da(t.eExpanded,e)},setCheckboxVisible:function(e){return t.eCheckbox.classList.toggle("ag-invisible",!e)}},a=this.createManagedBean(new Zi),s=!e.colDef,o=this.getGui();a.init(d,o,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),s&&Nt(o,a.getCellAriaRole())},t.prototype.setRenderDetails=function(e,t){var d=this;if(e){var a=e.newAgStackInstance();if(!a)return;a.then((function(e){if(e){var t=function(){return d.context.destroyBean(e)};d.isAlive()?(d.eValue.appendChild(e.getGui()),d.addDestroyFunc(t)):t()}}))}else this.eValue.innerText=t},t.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),e.prototype.destroy.call(this)},t.prototype.refresh=function(){return!1},t.TEMPLATE='\n \n \n \n \n \n ',tl([gs("eExpanded")],t.prototype,"eExpanded",void 0),tl([gs("eContracted")],t.prototype,"eContracted",void 0),tl([gs("eCheckbox")],t.prototype,"eCheckbox",void 0),tl([gs("eValue")],t.prototype,"eValue",void 0),tl([gs("eChildCount")],t.prototype,"eChildCount",void 0),t}(hs),al=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),sl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ol=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return al(t,e),t.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},t.prototype.setupFailed=function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},t.prototype.setupLoading=function(){var e=za("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var t=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=t("loadingOoo","Loading")},t.prototype.refresh=function(e){return!1},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.TEMPLATE='
\n \n \n
',sl([gs("eLoadingIcon")],t.prototype,"eLoadingIcon",void 0),sl([gs("eLoadingText")],t.prototype,"eLoadingText",void 0),t}(hs),il=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ll=function(e){function t(){return e.call(this)||this}return il(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var d,a=null!==(d=this.gridOptionsService.get("overlayLoadingTemplate"))&&void 0!==d?d:t.DEFAULT_LOADING_OVERLAY_TEMPLATE,s=this.localeService.getLocaleTextFunc(),o=a.replace("[LOADING...]",s("loadingOoo","Loading..."));this.setTemplate(o)},t.DEFAULT_LOADING_OVERLAY_TEMPLATE='[LOADING...]',t}(hs),rl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ml=function(e){function t(){return e.call(this)||this}return rl(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this)},t.prototype.init=function(e){var d,a=null!==(d=this.gridOptionsService.get("overlayNoRowsTemplate"))&&void 0!==d?d:t.DEFAULT_NO_ROWS_TEMPLATE,s=this.localeService.getLocaleTextFunc(),o=a.replace("[NO_ROWS_TO_SHOW]",s("noRowsToShow","No Rows To Show"));this.setTemplate(o)},t.DEFAULT_NO_ROWS_TEMPLATE='[NO_ROWS_TO_SHOW]',t}(hs),nl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ul=function(e){function t(){return e.call(this,'
')||this}return nl(t,e),t.prototype.init=function(e){var t=e.value;this.getGui().innerHTML=it(t)},t}(fi),pl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),fl=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,t){this.eInput=e,this.params=t,null!=t.max&&e.setMax(t.max),null!=t.min&&e.setMin(t.min),null!=t.precision&&e.setPrecision(t.precision),null!=t.step&&e.setStep(t.step);var d=e.getInputElement();t.preventStepping?e.addManagedListener(d,"keydown",this.preventStepping):t.showStepperButtons&&d.classList.add("ag-number-field-input-stepper")},e.prototype.preventStepping=function(e){e.key!==Ka.UP&&e.key!==Ka.DOWN||e.preventDefault()},e.prototype.getValue=function(){var e=this.eInput.getValue();if(!s(e)&&!s(this.params.value))return this.params.value;var t=this.params.parseValue(e);if(null==t)return t;if("string"===typeof t){if(""===t)return null;t=Number(t)}return isNaN(t)?null:t},e.prototype.getStartValue=function(){return this.params.value},e}(),cl=function(e){function t(){return e.call(this,new fl)||this}return pl(t,e),t}(Ti),_l=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),yl=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)},e.prototype.getValue=function(){var e=this.eInput.getDate();return s(e)||s(this.params.value)?null!==e&&void 0!==e?e:null:this.params.value},e.prototype.getStartValue=function(){var e=this.params.value;if(e instanceof Date)return jd(e,!1)},e}(),Cl=function(e){function t(){return e.call(this,new yl)||this}return _l(t,e),t}(Ti),bl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ql=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Pl=function(){function e(e){this.getDataTypeService=e}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,t){this.eInput=e,this.params=t,null!=t.min&&e.setMin(t.min),null!=t.max&&e.setMax(t.max),null!=t.step&&e.setStep(t.step)},e.prototype.getValue=function(){var e=this.formatDate(this.eInput.getDate());return s(e)||s(this.params.value)?this.params.parseValue(null!==e&&void 0!==e?e:""):this.params.value},e.prototype.getStartValue=function(){var e,t;return jd(null!==(t=this.parseDate(null!==(e=this.params.value)&&void 0!==e?e:void 0))&&void 0!==t?t:null,!1)},e.prototype.parseDate=function(e){return this.getDataTypeService().getDateParserFunction()(e)},e.prototype.formatDate=function(e){return this.getDataTypeService().getDateFormatterFunction()(e)},e}(),hl=function(e){function t(){var t=e.call(this,new Pl((function(){return t.dataTypeService})))||this;return t}return bl(t,e),ql([de("dataTypeService")],t.prototype,"dataTypeService",void 0),t}(Ti),Tl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),gl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Sl=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Tl(t,e),t.prototype.init=function(e){var t=this;this.params=e,this.updateCheckbox(e);var d=this.eCheckbox.getInputElement();d.setAttribute("tabindex","-1"),Qt(d,"polite"),this.addManagedListener(d,"click",(function(e){if(Ve(e),!t.eCheckbox.isDisabled()){var d=t.eCheckbox.getValue();t.onCheckboxChanged(d)}})),this.addManagedListener(d,"dblclick",(function(e){Ve(e)}));var a=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",(function(e){if(e.key===Ka.SPACE&&!t.eCheckbox.isDisabled()){t.params.eGridCell===a.activeElement&&t.eCheckbox.toggle();var d=t.eCheckbox.getValue();t.onCheckboxChanged(d),e.preventDefault()}}))},t.prototype.refresh=function(e){return this.params=e,this.updateCheckbox(e),!0},t.prototype.updateCheckbox=function(e){var t,d,a,s,o=!0;if(e.node.group&&e.column){var i=e.column.getColId();i.startsWith(dt)?s=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[i]?s=null!==(t=e.value)&&void 0!==t?t:void 0:o=!1}else s=null!==(d=e.value)&&void 0!==d?d:void 0;if(o){this.eCheckbox.setValue(s);var l=null!=e.disabled?e.disabled:!(null===(a=e.column)||void 0===a?void 0:a.isCellEditable(e.node));this.eCheckbox.setDisabled(l);var r=this.localeService.getLocaleTextFunc(),m=cd(r,s),n=l?m:"".concat(r("ariaToggleCellValue","Press SPACE to toggle cell value")," (").concat(m,")");this.eCheckbox.setInputAriaLabel(n)}else this.eCheckbox.setDisplayed(!1)},t.prototype.onCheckboxChanged=function(e){var t=this.params,d=t.column,a=t.node,s=t.rowIndex,o=t.value,i={type:Je.EVENT_CELL_EDITING_STARTED,column:d,colDef:null===d||void 0===d?void 0:d.getColDef(),data:a.data,node:a,rowIndex:s,rowPinned:a.rowPinned,value:o};this.eventService.dispatchEvent(i);var l=this.params.node.setDataValue(this.params.column,e,"edit"),r={type:Je.EVENT_CELL_EDITING_STOPPED,column:d,colDef:null===d||void 0===d?void 0:d.getColDef(),data:a.data,node:a,rowIndex:s,rowPinned:a.rowPinned,value:o,oldValue:o,newValue:e,valueChanged:l};this.eventService.dispatchEvent(r)},t.TEMPLATE='\n ',gl([gs("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(hs),Ol=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),vl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Il=function(e){function t(){return e.call(this,'\n
\n \n
')||this}return Ol(t,e),t.prototype.init=function(e){var t,d=this;this.params=e;var a=null!==(t=e.value)&&void 0!==t?t:void 0;this.eCheckbox.setValue(a),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(a),this.addManagedListener(this.eCheckbox,Je.EVENT_FIELD_VALUE_CHANGED,(function(e){return d.setAriaLabel(e.selected)}))},t.prototype.getValue=function(){return this.eCheckbox.getValue()},t.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},t.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},t.prototype.isPopup=function(){return!1},t.prototype.setAriaLabel=function(e){var t=this.localeService.getLocaleTextFunc(),d=cd(t,e),a=t("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel("".concat(a," (").concat(d,")"))},vl([gs("eCheckbox")],t.prototype,"eCheckbox",void 0),t}(fi),Dl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Bl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Gl=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Ml=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s0&&console.warn(" Did you mean: [".concat(d.slice(0,3),"]?")),console.warn("If using a custom component check it has been registered as described in: ".concat(this.getFrameworkOverrides().getDocLink("components/")))},Bl([de("gridOptions")],t.prototype,"gridOptions",void 0),Bl([Z],t.prototype,"init",null),t=Bl([te("userComponentRegistry")],t)}(ze),Ll={propertyName:"dateComponent",cellRenderer:!1},El={propertyName:"headerComponent",cellRenderer:!1},Vl={propertyName:"headerGroupComponent",cellRenderer:!1},Rl={propertyName:"cellRenderer",cellRenderer:!0},Al={propertyName:"cellEditor",cellRenderer:!1},xl={propertyName:"innerRenderer",cellRenderer:!0},Wl={propertyName:"loadingOverlayComponent",cellRenderer:!1},Fl={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Nl={propertyName:"tooltipComponent",cellRenderer:!1},kl={propertyName:"filter",cellRenderer:!1},Hl={propertyName:"floatingFilterComponent",cellRenderer:!1},jl={propertyName:"toolPanel",cellRenderer:!1},zl={propertyName:"statusPanel",cellRenderer:!1},Ul={propertyName:"fullWidthCellRenderer",cellRenderer:!0},Kl={propertyName:"loadingCellRenderer",cellRenderer:!0},Yl={propertyName:"groupRowRenderer",cellRenderer:!0},Ql={propertyName:"detailCellRenderer",cellRenderer:!0},$l=function(){function e(){}return e.getFloatingFilterType=function(e){return this.filterToFloatingFilterMapping[e]},e.filterToFloatingFilterMapping={set:"agSetColumnFloatingFilter",agSetColumnFilter:"agSetColumnFloatingFilter",multi:"agMultiColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",group:"agGroupColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",number:"agNumberColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",date:"agDateColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",text:"agTextColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"},e}(),Xl=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Jl=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Zl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Xl(t,e),t.prototype.getHeaderCompDetails=function(e,t){return this.getCompDetails(e,El,"agColumnHeader",t)},t.prototype.getHeaderGroupCompDetails=function(e){var t=e.columnGroup.getColGroupDef();return this.getCompDetails(t,Vl,"agColumnGroupHeader",e)},t.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ul,null,e,!0)},t.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Kl,"agLoadingCellRenderer",e,!0)},t.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Yl,"agGroupRowRenderer",e,!0)},t.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ql,"agDetailCellRenderer",e,!0)},t.prototype.getInnerRendererDetails=function(e,t){return this.getCompDetails(e,xl,null,t)},t.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,t){return this.getCompDetails(e,xl,null,t)},t.prototype.getCellRendererDetails=function(e,t){return this.getCompDetails(e,Rl,null,t)},t.prototype.getCellEditorDetails=function(e,t){return this.getCompDetails(e,Al,"agCellEditor",t,!0)},t.prototype.getFilterDetails=function(e,t,d){return this.getCompDetails(e,kl,d,t,!0)},t.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ll,"agDateInput",e,!0)},t.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Wl,"agLoadingOverlay",e,!0)},t.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Fl,"agNoRowsOverlay",e,!0)},t.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,Nl,"agTooltipComponent",e,!0)},t.prototype.getSetFilterCellRendererDetails=function(e,t){return this.getCompDetails(e,Rl,null,t)},t.prototype.getFloatingFilterCompDetails=function(e,t,d){return this.getCompDetails(e,Hl,d,t)},t.prototype.getToolPanelCompDetails=function(e,t){return this.getCompDetails(e,jl,null,t,!0)},t.prototype.getStatusPanelCompDetails=function(e,t){return this.getCompDetails(e,zl,null,t,!0)},t.prototype.getCompDetails=function(e,t,d,a,s){var o=this;void 0===s&&(s=!1);var i=t.propertyName,l=t.cellRenderer,r=this.getCompKeys(e,t,a),m=r.compName,n=r.jsComp,u=r.fwComp,p=r.paramsFromSelector,f=r.popupFromSelector,c=r.popupPositionFromSelector,_=function(e){var t=o.userComponentRegistry.retrieve(i,e);t&&(n=t.componentFromFramework?void 0:t.component,u=t.componentFromFramework?t.component:void 0)};if(null!=m&&_(m),null==n&&null==u&&null!=d&&_(d),n&&l&&!this.agComponentUtils.doesImplementIComponent(n)&&(n=this.agComponentUtils.adaptFunction(i,n)),n||u){var y=this.mergeParamsWithApplicationProvidedParams(e,t,a,p),C=null==n,b=n||u;return{componentFromFramework:C,componentClass:b,params:y,type:t,popupFromSelector:f,popupPositionFromSelector:c,newAgStackInstance:function(){return o.newAgStackInstance(b,C,y,t)}}}s&&console.error("AG Grid: Could not find component ".concat(m,", did you forget to configure this component?"))},t.prototype.getCompKeys=function(e,t,d){var a,s,o,i,l,r,m=this,n=t.propertyName;if(e){var u=e,p=u[n+"Selector"],f=p?p(d):null,c=function(e){if("string"===typeof e)a=e;else if(null!=e&&!0!==e){m.getFrameworkOverrides().isFrameworkComponent(e)?o=e:s=e}};f?(c(f.component),i=f.params,l=f.popup,r=f.popupPosition):c(u[n])}return{compName:a,jsComp:s,fwComp:o,paramsFromSelector:i,popupFromSelector:l,popupPositionFromSelector:r}},t.prototype.newAgStackInstance=function(e,t,d,a){var s,o=a.propertyName;if(!t)s=new e;else{var i=this.componentMetadataProvider.retrieve(o);s=this.frameworkComponentWrapper.wrap(e,i.mandatoryMethodList,i.optionalMethodList,a)}var l=this.initComponent(s,d);return null==l?us.resolve(s):l.then((function(){return s}))},t.prototype.mergeParamsWithApplicationProvidedParams=function(e,t,d,a){void 0===a&&(a=null);var s={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};S(s,d);var o=e&&e[t.propertyName+"Params"];"function"===typeof o?S(s,o(d)):"object"===typeof o&&S(s,o);return S(s,a),s},t.prototype.initComponent=function(e,t){if(this.context.createBean(e),null!=e.init)return e.init(t)},t.prototype.getDefaultFloatingFilterType=function(e,t){if(null==e)return null;var d=null,a=this.getCompKeys(e,kl),s=a.compName,o=a.jsComp,i=a.fwComp;s?d=$l.getFloatingFilterType(s):null==o&&null==i&&!0===e.filter&&(d=t());return d},Jl([de("gridOptions")],t.prototype,"gridOptions",void 0),Jl([de("agComponentUtils")],t.prototype,"agComponentUtils",void 0),Jl([de("componentMetadataProvider")],t.prototype,"componentMetadataProvider",void 0),Jl([de("userComponentRegistry")],t.prototype,"userComponentRegistry",void 0),Jl([ae("frameworkComponentWrapper")],t.prototype,"frameworkComponentWrapper",void 0),t=Jl([te("userComponentFactory")],t)}(ze),er=function(){function e(){}return e.ColDefPropertyMap={headerName:void 0,columnGroupShow: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,columnsMenuParams: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,suppressCellFlash: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,suppressMenu: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,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},e.ALL_PROPERTIES=Object.keys(e.ColDefPropertyMap),e}();!function(e){e[e.SINGLE_SHEET=0]="SINGLE_SHEET",e[e.MULTI_SHEET=1]="MULTI_SHEET"}(ki||(ki={}));var tr,dr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ar=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},sr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.dragEndFunctions=[],t.dragSources=[],t}return dr(t,e),t.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},t.prototype.removeListener=function(e){var t=e.dragSource.eElement,d=e.mouseDownListener;if(t.removeEventListener("mousedown",d),e.touchEnabled){var a=e.touchStartListener;t.removeEventListener("touchstart",a,{passive:!0})}},t.prototype.removeDragSource=function(e){var t=this.dragSources.find((function(t){return t.dragSource===e}));t&&(this.removeListener(t),ge(this.dragSources,t))},t.prototype.isDragging=function(){return this.dragging},t.prototype.addDragSource=function(e){var t=this,d=this.onMouseDown.bind(this,e),a=e.eElement,s=e.includeTouch,o=e.stopPropagationForTouch;a.addEventListener("mousedown",d);var i=null,l=this.gridOptionsService.get("suppressTouch");s&&!l&&(i=function(d){ta(d.target)||(d.cancelable&&(d.preventDefault(),o&&d.stopPropagation()),t.onTouchStart(e,d))},a.addEventListener("touchstart",i,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:d,touchStartListener:i,touchEnabled:!!s})},t.prototype.getStartTarget=function(){return this.startTarget},t.prototype.onTouchStart=function(e,t){var d=this;this.currentDragParams=e,this.dragging=!1;var a=t.touches[0];this.touchLastTime=a,this.touchStart=a;var s=function(t){return d.onTouchUp(t,e.eElement)},o=t.target,i=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:function(e){e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:o,type:"touchmove",listener:function(t){return d.onTouchMove(t,e.eElement)},options:{passive:!0}},{target:o,type:"touchend",listener:s,options:{passive:!0}},{target:o,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(i),0===e.dragStartPixels&&this.onCommonMove(a,this.touchStart,e.eElement)},t.prototype.onMouseDown=function(e,t){var d=this,a=t;if((!e.skipMouseEvent||!e.skipMouseEvent(t))&&!a._alreadyProcessedByDragService&&(a._alreadyProcessedByDragService=!0,0===t.button)){this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;var s=this.gridOptionsService.getRootNode(),o=[{target:s,type:"mousemove",listener:function(t){return d.onMouseMove(t,e.eElement)}},{target:s,type:"mouseup",listener:function(t){return d.onMouseUp(t,e.eElement)}},{target:s,type:"contextmenu",listener:function(e){return e.preventDefault()}}];this.addTemporaryEvents(o),0===e.dragStartPixels&&this.onMouseMove(t,e.eElement)}},t.prototype.addTemporaryEvents=function(e){e.forEach((function(e){var t=e.target,d=e.type,a=e.listener,s=e.options;t.addEventListener(d,a,s)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var t=e.target,d=e.type,a=e.listener,s=e.options;t.removeEventListener(d,a,s)}))}))},t.prototype.isEventNearStartEvent=function(e,t){var d=this.currentDragParams.dragStartPixels;return es(e,t,s(d)?d:4)},t.prototype.getFirstActiveTouch=function(e){for(var t=0;ta.right-s,this.tickUp=e.clientYa.bottom-s&&!d,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}},e.prototype.ensureTickingStarted=function(){null===this.tickingInterval&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)},e.prototype.doTick=function(){var e;if(this.tickCount++,e=this.tickCount>20?200:this.tickCount>10?80:40,this.scrollVertically){var t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){var d=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(d-e),this.tickRight&&this.setHorizontalPosition(d+e)}this.onScrollCallback&&this.onScrollCallback()},e.prototype.ensureCleared=function(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)},e}(),ir=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),lr=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},rr="ag-list-item-hovered",mr=function(e){function t(t,d,a){var s=e.call(this)||this;return s.comp=t,s.virtualList=d,s.params=a,s.currentDragValue=null,s.lastHoveredListItem=null,s}return ir(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.params.eventSource,this.params.listItemDragStartEvent,this.listItemDragStart.bind(this)),this.addManagedListener(this.params.eventSource,this.params.listItemDragEndEvent,this.listItemDragEnd.bind(this)),this.createDropTarget(),this.createAutoScrollService()},t.prototype.listItemDragStart=function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)},t.prototype.listItemDragEnd=function(){var e=this;window.setTimeout((function(){e.currentDragValue=null,e.moveBlocked=!1}),10)},t.prototype.createDropTarget=function(){var e=this,t={isInterestedIn:function(t){return t===e.params.dragSourceType},getIconName:function(){return Hi[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(t){return e.onDragging(t)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(t)},t.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new or({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(t){return e.scrollTop=t}})},t.prototype.onDragging=function(e){if(this.currentDragValue&&!this.moveBlocked){var t=this.getListDragItem(e),d=this.virtualList.getComponentAt(t.rowIndex);if(d){var a=d.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===t.rowIndex&&this.lastHoveredListItem.position===t.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=t,Jd(a,rr),Jd(a,"ag-item-highlight-".concat(t.position)))}}},t.prototype.getListDragItem=function(e){var t=this.virtualList.getGui(),d=parseFloat(window.getComputedStyle(t).paddingTop),a=this.virtualList.getRowHeight(),s=this.virtualList.getScrollTop(),o=Math.max(0,(e.y-d+s)/a),i=this.params.getNumRows(this.comp)-1,l=0|Math.min(i,o);return{rowIndex:l,position:Math.round(o)>o||o>i?"bottom":"top",component:this.virtualList.getComponentAt(l)}},t.prototype.onDragStop=function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())},t.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},t.prototype.clearHoveredItems=function(){this.virtualList.getGui().querySelectorAll(".".concat(rr)).forEach((function(e){[rr,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(t){e.classList.remove(t)}))})),this.lastHoveredListItem=null},lr([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),lr([Z],t.prototype,"postConstruct",null),t}(ze);!function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(tr||(tr={}));var nr=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};function ur(e){var t=e;return null!=t&&null!=t.getFrameworkComponentInstance?t.getFrameworkComponentInstance():e}var pr,fr=function(){function e(){this.detailGridInfoMap={},this.destroyCalled=!1}return e.prototype.init=function(){var e=this;switch(this.rowModel.getType()){case"clientSide":this.clientSideRowModel=this.rowModel;break;case"infinite":this.infiniteRowModel=this.rowModel;break;case"serverSide":this.serverSideRowModel=this.rowModel}this.ctrlsService.whenReady((function(){e.gridBodyCtrl=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.__getAlignedGridService=function(){return this.alignedGridsService},e.prototype.__getContext=function(){return this.context},e.prototype.getGridId=function(){return this.context.getGridId()},e.prototype.addDetailGridInfo=function(e,t){this.detailGridInfoMap[e]=t},e.prototype.removeDetailGridInfo=function(e){this.detailGridInfoMap[e]=void 0},e.prototype.getDetailGridInfo=function(e){return this.detailGridInfoMap[e]},e.prototype.forEachDetailGridInfo=function(e){var t=0;y(this.detailGridInfoMap,(function(d,a){s(a)&&(e(a,t),t++)}))},e.prototype.getDataAsCsv=function(e){if(Y.__assertRegistered(j.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){Y.__assertRegistered(j.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)},e.prototype.assertNotExcelMultiSheet=function(e,t){return!!Y.__assertRegistered(j.ExcelExportModule,"api."+e,this.context.getGridId())&&(this.excelCreator.getFactoryMode()!==ki.MULTI_SHEET||(console.warn("AG Grid: The Excel Exporter is currently on Multi Sheet mode. End that operation by calling 'api.getMultipleSheetAsExcel()' or 'api.exportMultipleSheetsAsExcel()'"),!1))},e.prototype.getDataAsExcel=function(e){if(this.assertNotExcelMultiSheet("getDataAsExcel",e))return this.excelCreator.getDataAsExcel(e)},e.prototype.exportDataAsExcel=function(e){this.assertNotExcelMultiSheet("exportDataAsExcel",e)&&this.excelCreator.exportDataAsExcel(e)},e.prototype.getSheetDataForExcel=function(e){if(Y.__assertRegistered(j.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(ki.MULTI_SHEET),this.excelCreator.getSheetDataForExcel(e)},e.prototype.getMultipleSheetsAsExcel=function(e){if(Y.__assertRegistered(j.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)},e.prototype.exportMultipleSheetsAsExcel=function(e){if(Y.__assertRegistered(j.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(e)},e.prototype.setGridAriaProperty=function(e,t){if(e){var d=this.ctrlsService.getGridBodyCtrl().getGui(),a="aria-".concat(e);null===t?d.removeAttribute(a):d.setAttribute(a,t)}},e.prototype.logMissingRowModel=function(e){for(var t=[],d=1;d= 0")):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,a,s):this.logMissingRowModel("setServerSideDatasource","serverSide")},e.prototype.retryServerSideLoads=function(){this.serverSideRowModel?this.serverSideRowModel.retryLoads():this.logMissingRowModel("retryServerSideLoads","serverSide")},e.prototype.flushServerSideAsyncTransactions=function(){if(this.serverSideTransactionManager)return this.serverSideTransactionManager.flushAsyncTransactions();this.logMissingRowModel("flushServerSideAsyncTransactions","serverSide")},e.prototype.applyTransaction=function(e){if(this.clientSideRowModel)return this.clientSideRowModel.updateRowData(e);this.logMissingRowModel("applyTransaction","clientSide")},e.prototype.applyTransactionAsync=function(e,t){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,t):this.logMissingRowModel("applyTransactionAsync","clientSide")},e.prototype.flushAsyncTransactions=function(){this.clientSideRowModel?this.clientSideRowModel.flushAsyncTransactions():this.logMissingRowModel("flushAsyncTransactions","clientSide")},e.prototype.refreshInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.refreshCache():this.logMissingRowModel("refreshInfiniteCache","infinite")},e.prototype.purgeInfiniteCache=function(){this.infiniteRowModel?this.infiniteRowModel.purgeCache():this.logMissingRowModel("purgeInfiniteCache","infinite")},e.prototype.refreshServerSide=function(e){this.serverSideRowModel?this.serverSideRowModel.refreshStore(e):this.logMissingRowModel("refreshServerSide","serverSide")},e.prototype.getServerSideGroupLevelState=function(){return this.serverSideRowModel?this.serverSideRowModel.getStoreState():(this.logMissingRowModel("getServerSideGroupLevelState","serverSide"),[])},e.prototype.getInfiniteRowCount=function(){if(this.infiniteRowModel)return this.infiniteRowModel.getRowCount();this.logMissingRowModel("getInfiniteRowCount","infinite")},e.prototype.isLastRowIndexKnown=function(){if(this.infiniteRowModel)return this.infiniteRowModel.isLastRowIndexKnown();this.logMissingRowModel("isLastRowIndexKnown","infinite")},e.prototype.getCacheBlockState=function(){return this.rowNodeBlockLoader.getBlockState()},e.prototype.getFirstDisplayedRow=function(){return this.rowRenderer.getFirstVirtualRenderedRow()},e.prototype.getLastDisplayedRow=function(){return this.rowRenderer.getLastVirtualRenderedRow()},e.prototype.getDisplayedRowAtIndex=function(e){return this.rowModel.getRow(e)},e.prototype.getDisplayedRowCount=function(){return this.rowModel.getRowCount()},e.prototype.paginationIsLastPageFound=function(){return this.paginationProxy.isLastPageFound()},e.prototype.paginationGetPageSize=function(){return this.paginationProxy.getPageSize()},e.prototype.paginationGetCurrentPage=function(){return this.paginationProxy.getCurrentPage()},e.prototype.paginationGetTotalPages=function(){return this.paginationProxy.getTotalPages()},e.prototype.paginationGetRowCount=function(){return this.paginationProxy.getMasterRowCount()},e.prototype.paginationGoToNextPage=function(){this.paginationProxy.goToNextPage()},e.prototype.paginationGoToPreviousPage=function(){this.paginationProxy.goToPreviousPage()},e.prototype.paginationGoToFirstPage=function(){this.paginationProxy.goToFirstPage()},e.prototype.paginationGoToLastPage=function(){this.paginationProxy.goToLastPage()},e.prototype.paginationGoToPage=function(e){this.paginationProxy.goToPage(e)},e.prototype.sizeColumnsToFit=function(e){"number"===typeof e?this.columnModel.sizeColumnsToFit(e,"api"):this.gridBodyCtrl.sizeColumnsToFit(e)},e.prototype.setColumnGroupOpened=function(e,t){this.columnModel.setColumnGroupOpened(e,t,"api")},e.prototype.getColumnGroup=function(e,t){return this.columnModel.getColumnGroup(e,t)},e.prototype.getProvidedColumnGroup=function(e){return this.columnModel.getProvidedColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,t){return this.columnModel.getDisplayNameForColumn(e,t)||""},e.prototype.getDisplayNameForColumnGroup=function(e,t){return this.columnModel.getDisplayNameForColumnGroup(e,t)||""},e.prototype.getColumn=function(e){return this.columnModel.getPrimaryColumn(e)},e.prototype.getColumns=function(){return this.columnModel.getAllPrimaryColumns()},e.prototype.applyColumnState=function(e){return this.columnModel.applyColumnState(e,"api")},e.prototype.getColumnState=function(){return this.columnModel.getColumnState()},e.prototype.resetColumnState=function(){this.columnModel.resetColumnState("api")},e.prototype.getColumnGroupState=function(){return this.columnModel.getColumnGroupState()},e.prototype.setColumnGroupState=function(e){this.columnModel.setColumnGroupState(e,"api")},e.prototype.resetColumnGroupState=function(){this.columnModel.resetColumnGroupState("api")},e.prototype.isPinning=function(){return this.columnModel.isPinningLeft()||this.columnModel.isPinningRight()},e.prototype.isPinningLeft=function(){return this.columnModel.isPinningLeft()},e.prototype.isPinningRight=function(){return this.columnModel.isPinningRight()},e.prototype.getDisplayedColAfter=function(e){return this.columnModel.getDisplayedColAfter(e)},e.prototype.getDisplayedColBefore=function(e){return this.columnModel.getDisplayedColBefore(e)},e.prototype.setColumnVisible=function(e,t){this.columnModel.setColumnVisible(e,t,"api")},e.prototype.setColumnsVisible=function(e,t){this.columnModel.setColumnsVisible(e,t,"api")},e.prototype.setColumnPinned=function(e,t){this.columnModel.setColumnPinned(e,t,"api")},e.prototype.setColumnsPinned=function(e,t){this.columnModel.setColumnsPinned(e,t,"api")},e.prototype.getAllGridColumns=function(){return this.columnModel.getAllGridColumns()},e.prototype.getDisplayedLeftColumns=function(){return this.columnModel.getDisplayedLeftColumns()},e.prototype.getDisplayedCenterColumns=function(){return this.columnModel.getDisplayedCenterColumns()},e.prototype.getDisplayedRightColumns=function(){return this.columnModel.getDisplayedRightColumns()},e.prototype.getAllDisplayedColumns=function(){return this.columnModel.getAllDisplayedColumns()},e.prototype.getAllDisplayedVirtualColumns=function(){return this.columnModel.getViewportColumns()},e.prototype.moveColumn=function(e,t){this.columnModel.moveColumn(e,t,"api")},e.prototype.moveColumnByIndex=function(e,t){this.columnModel.moveColumnByIndex(e,t,"api")},e.prototype.moveColumns=function(e,t){this.columnModel.moveColumns(e,t,"api")},e.prototype.moveRowGroupColumn=function(e,t){this.columnModel.moveRowGroupColumn(e,t)},e.prototype.setColumnAggFunc=function(e,t){this.columnModel.setColumnAggFunc(e,t)},e.prototype.setColumnWidth=function(e,t,d,a){void 0===d&&(d=!0),this.columnModel.setColumnWidths([{key:e,newWidth:t}],!1,d,a)},e.prototype.setColumnWidths=function(e,t,d){void 0===t&&(t=!0),this.columnModel.setColumnWidths(e,!1,t,d)},e.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},e.prototype.getPivotResultColumn=function(e,t){return this.columnModel.getSecondaryPivotColumn(e,t)},e.prototype.setValueColumns=function(e){this.columnModel.setValueColumns(e,"api")},e.prototype.getValueColumns=function(){return this.columnModel.getValueColumns()},e.prototype.removeValueColumn=function(e){this.columnModel.removeValueColumn(e,"api")},e.prototype.removeValueColumns=function(e){this.columnModel.removeValueColumns(e,"api")},e.prototype.addValueColumn=function(e){this.columnModel.addValueColumn(e,"api")},e.prototype.addValueColumns=function(e){this.columnModel.addValueColumns(e,"api")},e.prototype.setRowGroupColumns=function(e){this.columnModel.setRowGroupColumns(e,"api")},e.prototype.removeRowGroupColumn=function(e){this.columnModel.removeRowGroupColumn(e,"api")},e.prototype.removeRowGroupColumns=function(e){this.columnModel.removeRowGroupColumns(e,"api")},e.prototype.addRowGroupColumn=function(e){this.columnModel.addRowGroupColumn(e,"api")},e.prototype.addRowGroupColumns=function(e){this.columnModel.addRowGroupColumns(e,"api")},e.prototype.getRowGroupColumns=function(){return this.columnModel.getRowGroupColumns()},e.prototype.setPivotColumns=function(e){this.columnModel.setPivotColumns(e,"api")},e.prototype.removePivotColumn=function(e){this.columnModel.removePivotColumn(e,"api")},e.prototype.removePivotColumns=function(e){this.columnModel.removePivotColumns(e,"api")},e.prototype.addPivotColumn=function(e){this.columnModel.addPivotColumn(e,"api")},e.prototype.addPivotColumns=function(e){this.columnModel.addPivotColumns(e,"api")},e.prototype.getPivotColumns=function(){return this.columnModel.getPivotColumns()},e.prototype.getLeftDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeLeft()},e.prototype.getCenterDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeCentre()},e.prototype.getRightDisplayedColumnGroups=function(){return this.columnModel.getDisplayedTreeRight()},e.prototype.getAllDisplayedColumnGroups=function(){return this.columnModel.getAllDisplayedTrees()},e.prototype.autoSizeColumn=function(e,t){return this.columnModel.autoSizeColumn(e,t,"api")},e.prototype.autoSizeColumns=function(e,t){this.columnModel.autoSizeColumns({columns:e,skipHeader:t})},e.prototype.autoSizeAllColumns=function(e){this.columnModel.autoSizeAllColumns(e,"api")},e.prototype.setPivotResultColumns=function(e){this.columnModel.setSecondaryColumns(e,"api")},e.prototype.getPivotResultColumns=function(){return this.columnModel.getSecondaryColumns()},e.prototype.getState=function(){return this.stateService.getState()},e.prototype.getGridOption=function(e){return this.gos.get(e)},e.prototype.setGridOption=function(e,t){var d;this.updateGridOptions(((d={})[e]=t,d))},e.prototype.updateGridOptions=function(e){this.gos.updateGridOptions({options:e})},e.prototype.__internalUpdateGridOptions=function(e){this.gos.updateGridOptions({options:e,source:"gridOptionsUpdated"})},e.prototype.deprecatedUpdateGridOption=function(e,t){M("set".concat(e.charAt(0).toUpperCase()).concat(e.slice(1,e.length)," is deprecated. Please use 'api.setGridOption('").concat(e,"', newValue)' or 'api.updateGridOptions({ ").concat(e,": newValue })' instead.")),this.setGridOption(e,t)},e.prototype.setPivotMode=function(e){this.deprecatedUpdateGridOption("pivotMode",e)},e.prototype.setPinnedTopRowData=function(e){this.deprecatedUpdateGridOption("pinnedTopRowData",e)},e.prototype.setPinnedBottomRowData=function(e){this.deprecatedUpdateGridOption("pinnedBottomRowData",e)},e.prototype.setPopupParent=function(e){this.deprecatedUpdateGridOption("popupParent",e)},e.prototype.setSuppressModelUpdateAfterUpdateTransaction=function(e){this.deprecatedUpdateGridOption("suppressModelUpdateAfterUpdateTransaction",e)},e.prototype.setDataTypeDefinitions=function(e){this.deprecatedUpdateGridOption("dataTypeDefinitions",e)},e.prototype.setPagination=function(e){this.deprecatedUpdateGridOption("pagination",e)},e.prototype.paginationSetPageSize=function(e){this.deprecatedUpdateGridOption("paginationPageSize",e)},e.prototype.setSideBar=function(e){this.deprecatedUpdateGridOption("sideBar",e)},e.prototype.setSuppressClipboardPaste=function(e){this.deprecatedUpdateGridOption("suppressClipboardPaste",e)},e.prototype.setGroupRemoveSingleChildren=function(e){this.deprecatedUpdateGridOption("groupRemoveSingleChildren",e)},e.prototype.setGroupRemoveLowestSingleChildren=function(e){this.deprecatedUpdateGridOption("groupRemoveLowestSingleChildren",e)},e.prototype.setGroupDisplayType=function(e){this.deprecatedUpdateGridOption("groupDisplayType",e)},e.prototype.setGroupIncludeFooter=function(e){this.deprecatedUpdateGridOption("groupIncludeFooter",e)},e.prototype.setGroupIncludeTotalFooter=function(e){this.deprecatedUpdateGridOption("groupIncludeTotalFooter",e)},e.prototype.setRowClass=function(e){this.deprecatedUpdateGridOption("rowClass",e)},e.prototype.setDeltaSort=function(e){this.deprecatedUpdateGridOption("deltaSort",e)},e.prototype.setSuppressRowDrag=function(e){this.deprecatedUpdateGridOption("suppressRowDrag",e)},e.prototype.setSuppressMoveWhenRowDragging=function(e){this.deprecatedUpdateGridOption("suppressMoveWhenRowDragging",e)},e.prototype.setSuppressRowClickSelection=function(e){this.deprecatedUpdateGridOption("suppressRowClickSelection",e)},e.prototype.setEnableAdvancedFilter=function(e){this.deprecatedUpdateGridOption("enableAdvancedFilter",e)},e.prototype.setIncludeHiddenColumnsInAdvancedFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInAdvancedFilter",e)},e.prototype.setAdvancedFilterParent=function(e){this.deprecatedUpdateGridOption("advancedFilterParent",e)},e.prototype.setAdvancedFilterBuilderParams=function(e){this.deprecatedUpdateGridOption("advancedFilterBuilderParams",e)},e.prototype.setQuickFilter=function(e){M("setQuickFilter is deprecated. Please use 'api.setGridOption('quickFilterText', newValue)' or 'api.updateGridOptions({ quickFilterText: newValue })' instead."),this.gos.updateGridOptions({options:{quickFilterText:e}})},e.prototype.setExcludeHiddenColumnsFromQuickFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",!e)},e.prototype.setIncludeHiddenColumnsInQuickFilter=function(e){this.deprecatedUpdateGridOption("includeHiddenColumnsInQuickFilter",e)},e.prototype.setQuickFilterParser=function(e){this.deprecatedUpdateGridOption("quickFilterParser",e)},e.prototype.setQuickFilterMatcher=function(e){this.deprecatedUpdateGridOption("quickFilterMatcher",e)},e.prototype.setAlwaysShowHorizontalScroll=function(e){this.deprecatedUpdateGridOption("alwaysShowHorizontalScroll",e)},e.prototype.setAlwaysShowVerticalScroll=function(e){this.deprecatedUpdateGridOption("alwaysShowVerticalScroll",e)},e.prototype.setFunctionsReadOnly=function(e){this.deprecatedUpdateGridOption("functionsReadOnly",e)},e.prototype.setColumnDefs=function(e,t){void 0===t&&(t="api"),M("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:t})},e.prototype.setAutoGroupColumnDef=function(e,t){void 0===t&&(t="api"),M("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:t})},e.prototype.setDefaultColDef=function(e,t){void 0===t&&(t="api"),M("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:t})},e.prototype.setColumnTypes=function(e,t){void 0===t&&(t="api"),M("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:t})},e.prototype.setTreeData=function(e){this.deprecatedUpdateGridOption("treeData",e)},e.prototype.setServerSideDatasource=function(e){this.deprecatedUpdateGridOption("serverSideDatasource",e)},e.prototype.setCacheBlockSize=function(e){this.deprecatedUpdateGridOption("cacheBlockSize",e)},e.prototype.setDatasource=function(e){this.deprecatedUpdateGridOption("datasource",e)},e.prototype.setViewportDatasource=function(e){this.deprecatedUpdateGridOption("viewportDatasource",e)},e.prototype.setRowData=function(e){this.deprecatedUpdateGridOption("rowData",e)},e.prototype.setEnableCellTextSelection=function(e){this.deprecatedUpdateGridOption("enableCellTextSelection",e)},e.prototype.setHeaderHeight=function(e){this.deprecatedUpdateGridOption("headerHeight",e)},e.prototype.setDomLayout=function(e){this.deprecatedUpdateGridOption("domLayout",e)},e.prototype.setFillHandleDirection=function(e){this.deprecatedUpdateGridOption("fillHandleDirection",e)},e.prototype.setGroupHeaderHeight=function(e){this.deprecatedUpdateGridOption("groupHeaderHeight",e)},e.prototype.setFloatingFiltersHeight=function(e){this.deprecatedUpdateGridOption("floatingFiltersHeight",e)},e.prototype.setPivotHeaderHeight=function(e){this.deprecatedUpdateGridOption("pivotHeaderHeight",e)},e.prototype.setPivotGroupHeaderHeight=function(e){this.deprecatedUpdateGridOption("pivotGroupHeaderHeight",e)},e.prototype.setAnimateRows=function(e){this.deprecatedUpdateGridOption("animateRows",e)},e.prototype.setIsExternalFilterPresent=function(e){this.deprecatedUpdateGridOption("isExternalFilterPresent",e)},e.prototype.setDoesExternalFilterPass=function(e){this.deprecatedUpdateGridOption("doesExternalFilterPass",e)},e.prototype.setNavigateToNextCell=function(e){this.deprecatedUpdateGridOption("navigateToNextCell",e)},e.prototype.setTabToNextCell=function(e){this.deprecatedUpdateGridOption("tabToNextCell",e)},e.prototype.setTabToNextHeader=function(e){this.deprecatedUpdateGridOption("tabToNextHeader",e)},e.prototype.setNavigateToNextHeader=function(e){this.deprecatedUpdateGridOption("navigateToNextHeader",e)},e.prototype.setRowGroupPanelShow=function(e){this.deprecatedUpdateGridOption("rowGroupPanelShow",e)},e.prototype.setGetGroupRowAgg=function(e){this.deprecatedUpdateGridOption("getGroupRowAgg",e)},e.prototype.setGetBusinessKeyForNode=function(e){this.deprecatedUpdateGridOption("getBusinessKeyForNode",e)},e.prototype.setGetChildCount=function(e){this.deprecatedUpdateGridOption("getChildCount",e)},e.prototype.setProcessRowPostCreate=function(e){this.deprecatedUpdateGridOption("processRowPostCreate",e)},e.prototype.setGetRowId=function(e){M("getRowId is a static property and can no longer be updated.")},e.prototype.setGetRowClass=function(e){this.deprecatedUpdateGridOption("getRowClass",e)},e.prototype.setIsFullWidthRow=function(e){this.deprecatedUpdateGridOption("isFullWidthRow",e)},e.prototype.setIsRowSelectable=function(e){this.deprecatedUpdateGridOption("isRowSelectable",e)},e.prototype.setIsRowMaster=function(e){this.deprecatedUpdateGridOption("isRowMaster",e)},e.prototype.setPostSortRows=function(e){this.deprecatedUpdateGridOption("postSortRows",e)},e.prototype.setGetDocument=function(e){this.deprecatedUpdateGridOption("getDocument",e)},e.prototype.setGetContextMenuItems=function(e){this.deprecatedUpdateGridOption("getContextMenuItems",e)},e.prototype.setGetMainMenuItems=function(e){this.deprecatedUpdateGridOption("getMainMenuItems",e)},e.prototype.setProcessCellForClipboard=function(e){this.deprecatedUpdateGridOption("processCellForClipboard",e)},e.prototype.setSendToClipboard=function(e){this.deprecatedUpdateGridOption("sendToClipboard",e)},e.prototype.setProcessCellFromClipboard=function(e){this.deprecatedUpdateGridOption("processCellFromClipboard",e)},e.prototype.setProcessPivotResultColDef=function(e){this.deprecatedUpdateGridOption("processPivotResultColDef",e)},e.prototype.setProcessPivotResultColGroupDef=function(e){this.deprecatedUpdateGridOption("processPivotResultColGroupDef",e)},e.prototype.setPostProcessPopup=function(e){this.deprecatedUpdateGridOption("postProcessPopup",e)},e.prototype.setInitialGroupOrderComparator=function(e){this.deprecatedUpdateGridOption("initialGroupOrderComparator",e)},e.prototype.setGetChartToolbarItems=function(e){this.deprecatedUpdateGridOption("getChartToolbarItems",e)},e.prototype.setPaginationNumberFormatter=function(e){this.deprecatedUpdateGridOption("paginationNumberFormatter",e)},e.prototype.setGetServerSideGroupLevelParams=function(e){this.deprecatedUpdateGridOption("getServerSideGroupLevelParams",e)},e.prototype.setIsServerSideGroupOpenByDefault=function(e){this.deprecatedUpdateGridOption("isServerSideGroupOpenByDefault",e)},e.prototype.setIsApplyServerSideTransaction=function(e){this.deprecatedUpdateGridOption("isApplyServerSideTransaction",e)},e.prototype.setIsServerSideGroup=function(e){this.deprecatedUpdateGridOption("isServerSideGroup",e)},e.prototype.setGetServerSideGroupKey=function(e){this.deprecatedUpdateGridOption("getServerSideGroupKey",e)},e.prototype.setGetRowStyle=function(e){this.deprecatedUpdateGridOption("getRowStyle",e)},e.prototype.setGetRowHeight=function(e){this.deprecatedUpdateGridOption("getRowHeight",e)},nr([ae("csvCreator")],e.prototype,"csvCreator",void 0),nr([ae("excelCreator")],e.prototype,"excelCreator",void 0),nr([de("rowRenderer")],e.prototype,"rowRenderer",void 0),nr([de("navigationService")],e.prototype,"navigationService",void 0),nr([de("filterManager")],e.prototype,"filterManager",void 0),nr([de("columnModel")],e.prototype,"columnModel",void 0),nr([de("selectionService")],e.prototype,"selectionService",void 0),nr([de("gridOptionsService")],e.prototype,"gos",void 0),nr([de("valueService")],e.prototype,"valueService",void 0),nr([de("alignedGridsService")],e.prototype,"alignedGridsService",void 0),nr([de("eventService")],e.prototype,"eventService",void 0),nr([de("pinnedRowModel")],e.prototype,"pinnedRowModel",void 0),nr([de("context")],e.prototype,"context",void 0),nr([de("rowModel")],e.prototype,"rowModel",void 0),nr([de("sortController")],e.prototype,"sortController",void 0),nr([de("paginationProxy")],e.prototype,"paginationProxy",void 0),nr([de("focusService")],e.prototype,"focusService",void 0),nr([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),nr([ae("rangeService")],e.prototype,"rangeService",void 0),nr([ae("clipboardService")],e.prototype,"clipboardService",void 0),nr([ae("aggFuncService")],e.prototype,"aggFuncService",void 0),nr([de("menuFactory")],e.prototype,"menuFactory",void 0),nr([ae("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),nr([de("valueCache")],e.prototype,"valueCache",void 0),nr([de("animationFrameService")],e.prototype,"animationFrameService",void 0),nr([ae("statusBarService")],e.prototype,"statusBarService",void 0),nr([ae("chartService")],e.prototype,"chartService",void 0),nr([ae("undoRedoService")],e.prototype,"undoRedoService",void 0),nr([ae("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),nr([ae("ssrmTransactionManager")],e.prototype,"serverSideTransactionManager",void 0),nr([de("ctrlsService")],e.prototype,"ctrlsService",void 0),nr([de("overlayService")],e.prototype,"overlayService",void 0),nr([ae("sideBarService")],e.prototype,"sideBarService",void 0),nr([de("stateService")],e.prototype,"stateService",void 0),nr([de("expansionService")],e.prototype,"expansionService",void 0),nr([de("apiEventService")],e.prototype,"apiEventService",void 0),nr([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),nr([Z],e.prototype,"init",null),e=nr([te("gridApi")],e)}(),cr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),_r=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},yr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.quickFilter=null,t.quickFilterParts=null,t}var d;return cr(t,e),d=t,t.prototype.postConstruct=function(){var e=this;this.addManagedListener(this.eventService,Je.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Je.EVENT_NEW_COLUMNS_LOADED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,(function(){return e.resetQuickFilterCache()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_VISIBLE,(function(){e.gridOptionsService.get("includeHiddenColumnsInQuickFilter")||e.resetQuickFilterCache()})),this.addManagedPropertyListener("quickFilterText",(function(t){return e.setQuickFilter(t.currentValue)})),this.addManagedPropertyListener("includeHiddenColumnsInQuickFilter",(function(){return e.onIncludeHiddenColumnsInQuickFilterChanged()})),this.quickFilter=this.parseQuickFilter(this.gridOptionsService.get("quickFilterText")),this.parser=this.gridOptionsService.get("quickFilterParser"),this.matcher=this.gridOptionsService.get("quickFilterMatcher"),this.setQuickFilterParts(),this.addManagedPropertyListeners(["quickFilterMatcher","quickFilterParser"],(function(){return e.setQuickFilterParserAndMatcher()}))},t.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},t.prototype.doesRowPassQuickFilter=function(e){var t=this,d=this.gridOptionsService.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(d,e):this.quickFilterParts.every((function(a){return d?t.doesRowPassQuickFilterCache(e,a):t.doesRowPassQuickFilterNoCache(e,a)}))},t.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},t.prototype.setQuickFilterParts=function(){var e=this.quickFilter,t=this.parser;this.quickFilterParts=e?t?t(e):e.split(" "):null},t.prototype.parseQuickFilter=function(e){return s(e)?this.gridOptionsService.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},t.prototype.setQuickFilter=function(e){if(null==e||"string"===typeof e){var t=this.parseQuickFilter(e);this.quickFilter!==t&&(this.quickFilter=t,this.setQuickFilterParts(),this.dispatchEvent({type:d.EVENT_QUICK_FILTER_CHANGED}))}else console.warn("AG Grid - Grid option quickFilterText only supports string inputs, received: ".concat(typeof e))},t.prototype.setQuickFilterParserAndMatcher=function(){var e=this.gridOptionsService.get("quickFilterParser"),t=this.gridOptionsService.get("quickFilterMatcher"),a=e!==this.parser||t!==this.matcher;this.parser=e,this.matcher=t,a&&(this.setQuickFilterParts(),this.dispatchEvent({type:d.EVENT_QUICK_FILTER_CHANGED}))},t.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:d.EVENT_QUICK_FILTER_CHANGED})},t.prototype.doesRowPassQuickFilterNoCache=function(e,t){var d=this;return this.columnModel.getAllColumnsForQuickFilter().some((function(a){var o=d.getQuickFilterTextForColumn(a,e);return s(o)&&o.indexOf(t)>=0}))},t.prototype.doesRowPassQuickFilterCache=function(e,t){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(t)>=0},t.prototype.doesRowPassQuickFilterMatcher=function(e,t){var d;e?(this.checkGenerateQuickFilterAggregateText(t),d=t.quickFilterAggregateText):d=this.getQuickFilterAggregateText(t);var a=this.quickFilterParts;return(0,this.matcher)(a,d)},t.prototype.checkGenerateQuickFilterAggregateText=function(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))},t.prototype.getQuickFilterTextForColumn=function(e,t){var d=this.valueService.getValue(e,t,!0),a=e.getColDef();if(a.getQuickFilterText){var o={value:d,node:t,data:t.data,column:e,colDef:a,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};d=a.getQuickFilterText(o)}return s(d)?d.toString().toUpperCase():null},t.prototype.getQuickFilterAggregateText=function(e){var t=this,a=[];return this.columnModel.getAllColumnsForQuickFilter().forEach((function(d){var o=t.getQuickFilterTextForColumn(d,e);s(o)&&a.push(o)})),a.join(d.QUICK_FILTER_SEPARATOR)},t.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",t.QUICK_FILTER_SEPARATOR="\n",_r([de("valueService")],t.prototype,"valueService",void 0),_r([de("columnModel")],t.prototype,"columnModel",void 0),_r([de("rowModel")],t.prototype,"rowModel",void 0),_r([Z],t.prototype,"postConstruct",null),t=d=_r([te("quickFilterService")],t)}(ze),Cr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),br=function(){return br=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Pr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allColumnFilters=new Map,t.allColumnListeners=new Map,t.activeAggregateFilters=[],t.activeColumnFilters=[],t.processingFilterChange=!1,t.filterModelUpdateQueue=[],t.advancedFilterModelUpdateQueue=[],t}return Cr(t,e),t.prototype.init=function(){var e=this;this.addManagedListener(this.eventService,Je.EVENT_GRID_COLUMNS_CHANGED,(function(){return e.onColumnsChanged()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_VALUE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_PIVOT_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_PIVOT_MODE_CHANGED,(function(){return e.refreshFiltersForAggregations()})),this.addManagedListener(this.eventService,Je.EVENT_NEW_COLUMNS_LOADED,(function(){return e.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_VISIBLE,(function(){return e.updateAdvancedFilterColumns()})),this.addManagedListener(this.eventService,Je.EVENT_ROW_DATA_UPDATED,(function(){return e.onNewRowsLoaded("rowDataUpdated")})),this.externalFilterPresent=this.isExternalFilterPresentCallback(),this.addManagedPropertyListeners(["isExternalFilterPresent","doesExternalFilterPass"],(function(){e.onFilterChanged({source:"api"})})),this.updateAggFiltering(),this.addManagedPropertyListener("groupAggFiltering",(function(){e.updateAggFiltering(),e.onFilterChanged()})),this.addManagedPropertyListener("advancedFilterModel",(function(t){return e.setAdvancedFilterModel(t.currentValue)})),this.addManagedListener(this.eventService,Je.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(t){var d=t.enabled;return e.onAdvancedFilterEnabledChanged(d)})),this.addManagedListener(this.eventService,Je.EVENT_DATA_TYPES_INFERRED,(function(){return e.processFilterModelUpdateQueue()})),this.addManagedListener(this.quickFilterService,yr.EVENT_QUICK_FILTER_CHANGED,(function(){return e.onFilterChanged({source:"quickFilter"})}))},t.prototype.isExternalFilterPresentCallback=function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return"function"===typeof e&&e({})},t.prototype.doesExternalFilterPass=function(e){var t=this.gridOptionsService.get("doesExternalFilterPass");return"function"===typeof t&&t(e)},t.prototype.setFilterModel=function(e,t){var d=this;if(void 0===t&&(t="api"),this.isAdvancedFilterEnabled())this.warnAdvancedFilters();else if(this.dataTypeService.isPendingInference())this.filterModelUpdateQueue.push({model:e,source:t});else{var a=[],s=this.getFilterModel();if(e){var o=as(Object.keys(e));this.allColumnFilters.forEach((function(t,s){var i=e[s];a.push(d.setModelOnFilterWrapper(t.filterPromise,i)),o.delete(s)})),o.forEach((function(t){var s=d.columnModel.getPrimaryColumn(t)||d.columnModel.getGridColumn(t);if(s)if(s.isFilterAllowed()){var o=d.getOrCreateFilterWrapper(s,"NO_UI");o?a.push(d.setModelOnFilterWrapper(o.filterPromise,e[t])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+t)}else console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+t);else console.warn("AG Grid: setFilterModel() - no column found for colId: "+t)}))}else this.allColumnFilters.forEach((function(e){a.push(d.setModelOnFilterWrapper(e.filterPromise,null))}));us.all(a).then((function(){var e=d.getFilterModel(),a=[];d.allColumnFilters.forEach((function(t,d){var o=s?s[d]:null,i=e?e[d]:null;ls.jsonEquals(o,i)||a.push(t.column)})),a.length>0&&d.onFilterChanged({columns:a,source:t})}))}},t.prototype.setModelOnFilterWrapper=function(e,t){return new us((function(d){e.then((function(e){"function"!==typeof e.setModel&&(console.warn("AG Grid: filter missing setModel method, which is needed for setFilterModel"),d()),(e.setModel(t)||us.resolve()).then((function(){return d()}))}))}))},t.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach((function(t,d){var a=t.filterPromise.resolveNow(null,(function(e){return e}));if(null==a)return null;if("function"===typeof a.getModel){var o=a.getModel();s(o)&&(e[d]=o)}else console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel")})),e},t.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},t.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},t.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},t.prototype.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()},t.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()},t.prototype.onAdvancedFilterEnabledChanged=function(e){var t,d=this;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach((function(e){return d.disposeFilterWrapper(e,"advancedFilterEnabled")})),this.onFilterChanged({source:"advancedFilter"})):(null===(t=this.advancedFilterService)||void 0===t?void 0:t.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))},t.prototype.isAdvancedFilterEnabled=function(){var e;return null===(e=this.advancedFilterService)||void 0===e?void 0:e.isEnabled()},t.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()},t.prototype.doAggregateFiltersPass=function(e,t){return this.doColumnFiltersPass(e,t,!0)},t.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var t=function(e){return!!e&&(e.isFilterActive?e.isFilterActive():(console.warn("AG Grid: Filter is missing isFilterActive() method"),!1))},d=!!this.gridOptionsService.getGroupAggFiltering();this.allColumnFilters.forEach((function(a){if(a.filterPromise.resolveNow(!1,t)){var s=a.filterPromise.resolveNow(null,(function(e){return e}));!function(t){if(!t.isPrimary())return!0;var a=!e.columnModel.isPivotActive();return!(!t.isValueActive()||!a)&&(!!e.columnModel.isPivotMode()||d)}(a.column)?e.activeColumnFilters.push(s):e.activeAggregateFilters.push(s)}}))},t.prototype.updateFilterFlagInColumns=function(e,t){this.allColumnFilters.forEach((function(d){var a=d.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));d.column.setFilterActive(a,e,t)}))},t.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},t.prototype.doColumnFiltersPass=function(e,t,d){for(var a=e.data,s=e.aggData,o=d?this.activeAggregateFilters:this.activeColumnFilters,i=d?s:a,l=0;l0?this.onFilterChanged({columns:t,source:"api"}):this.updateDependantFilters()},t.prototype.updateDependantFilters=function(){var e=this,t=this.columnModel.getGroupAutoColumns();null===t||void 0===t||t.forEach((function(t){"agGroupColumnFilter"===t.getColDef().filter&&e.getOrCreateFilterWrapper(t,"NO_UI")}))},t.prototype.isFilterAllowed=function(e){var t,d;if(this.isAdvancedFilterEnabled())return!1;if(!e.isFilterAllowed())return!1;var a=this.allColumnFilters.get(e.getColId());return null===(d=null===(t=null===a||void 0===a?void 0:a.filterPromise)||void 0===t?void 0:t.resolveNow(!0,(function(e){return"function"!==typeof(null===e||void 0===e?void 0:e.isFilterAllowed)||(null===e||void 0===e?void 0:e.isFilterAllowed())})))||void 0===d||d},t.prototype.getFloatingFilterCompDetails=function(e,t){var d=this,a=e.getColDef(),s=this.createFilterParams(e,a),o=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(a,kl,s),i=this.userComponentFactory.getDefaultFloatingFilterType(a,(function(){return d.getDefaultFloatingFilter(e)}));null==i&&(i="agReadOnlyFloatingFilter");var l={column:e,filterParams:o,currentParentModel:function(){return d.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:function(t){var a=d.getFilterComponent(e,"NO_UI");null!=a&&a.then((function(e){t(ur(e))}))},showParentFilter:t,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(a,l,i)},t.prototype.getCurrentFloatingFilterParentModel=function(e){var t=this.getFilterComponent(e,"NO_UI",!1);return t?t.resolveNow(null,(function(e){return e&&e.getModel()})):null},t.prototype.destroyFilter=function(e,t){void 0===t&&(t="api");var d=e.getColId(),a=this.allColumnFilters.get(d);this.disposeColumnListener(d),a&&(this.disposeFilterWrapper(a,t),this.onFilterChanged({columns:[e],source:"api"}))},t.prototype.disposeColumnListener=function(e){var t=this.allColumnListeners.get(e);t&&(this.allColumnListeners.delete(e),t())},t.prototype.disposeFilterWrapper=function(e,t){var d=this;e.filterPromise.then((function(a){d.getContext().destroyBean(a),e.column.setFilterActive(!1,"filterDestroyed"),d.allColumnFilters.delete(e.column.getColId());var s={type:Je.EVENT_FILTER_DESTROYED,source:t,column:e.column};d.eventService.dispatchEvent(s)}))},t.prototype.filterModifiedCallbackFactory=function(e,t){var d=this;return function(){var a={type:Je.EVENT_FILTER_MODIFIED,column:t,filterInstance:e};d.eventService.dispatchEvent(a)}},t.prototype.filterChangedCallbackFactory=function(e,t){var d=this;return function(a){var s,o=null!==(s=null===a||void 0===a?void 0:a.source)&&void 0!==s?s:"api",i={filter:e,additionalEventAttributes:a,columns:[t],source:o};d.callOnFilterChangedOutsideRenderCycle(i)}},t.prototype.checkDestroyFilter=function(e){var t=this,d=this.allColumnFilters.get(e);if(d){var a=d.column,s=(a.isFilterAllowed()?this.createFilterInstance(a):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(d.compDetails,s))this.destroyFilter(a,"columnChanged");else{var o=a.getColDef().filterParams;d.filterPromise?d.filterPromise.then((function(e){!(null===e||void 0===e?void 0:e.refresh)||e.refresh(br(br(br({},t.createFilterParams(a,a.getColDef())),{filterModifiedCallback:t.filterModifiedCallbackFactory(e,a),filterChangedCallback:t.filterChangedCallbackFactory(e,a),doesRowPassOtherFilter:function(d){return t.doesRowPassOtherFilters(e,d)}}),o))||t.destroyFilter(a,"columnChanged")})):this.destroyFilter(a,"columnChanged")}}},t.prototype.setColumnFilterWrapper=function(e,t){var d=this,a=e.getColId();this.allColumnFilters.set(a,t),this.allColumnListeners.set(a,this.addManagedListener(e,ce.EVENT_COL_DEF_CHANGED,(function(){return d.checkDestroyFilter(a)})))},t.prototype.areFilterCompsDifferent=function(e,t){if(!t||!e)return!0;var d=e.componentClass,a=t.componentClass;return!(d===a||(null===d||void 0===d?void 0:d.render)&&(null===a||void 0===a?void 0:a.render)&&d.render===a.render)},t.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null},t.prototype.setAdvancedFilterModel=function(e){this.isAdvancedFilterEnabled()&&(this.dataTypeService.isPendingInference()?this.advancedFilterModelUpdateQueue.push(e):(this.advancedFilterService.setModel(null!==e&&void 0!==e?e:null),this.onFilterChanged({source:"advancedFilter"})))},t.prototype.showAdvancedFilterBuilder=function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)},t.prototype.updateAdvancedFilterColumns=function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})},t.prototype.hasFloatingFilters=function(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some((function(e){return e.getColDef().floatingFilter}))},t.prototype.getFilterInstance=function(e,t){if(!this.isAdvancedFilterEnabled()){var d=this.getFilterInstanceImpl(e,(function(e){if(t){var d=ur(e);t(d)}}));return ur(d)}this.warnAdvancedFilters()},t.prototype.getFilterInstanceImpl=function(e,t){var d=this.columnModel.getPrimaryColumn(e);if(d){var a=this.getFilterComponent(d,"NO_UI"),s=a&&a.resolveNow(null,(function(e){return e}));return s?setTimeout(t,0,s):a&&a.then((function(e){t(e)})),s}},t.prototype.warnAdvancedFilters=function(){M("Column Filter API methods have been disabled as Advanced Filters are enabled.")},t.prototype.setupAdvancedFilterHeaderComp=function(e){var t;null===(t=this.advancedFilterService)||void 0===t||t.getCtrl().setupHeaderComp(e)},t.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0},t.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0},t.prototype.processFilterModelUpdateQueue=function(){var e=this;this.filterModelUpdateQueue.forEach((function(t){var d=t.model,a=t.source;return e.setFilterModel(d,a)})),this.filterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach((function(t){return e.setAdvancedFilterModel(t)})),this.advancedFilterModelUpdateQueue=[]},t.prototype.destroy=function(){var t=this;e.prototype.destroy.call(this),this.allColumnFilters.forEach((function(e){return t.disposeFilterWrapper(e,"gridDestroyed")})),this.allColumnListeners.clear()},qr([de("valueService")],t.prototype,"valueService",void 0),qr([de("columnModel")],t.prototype,"columnModel",void 0),qr([de("rowModel")],t.prototype,"rowModel",void 0),qr([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),qr([de("rowRenderer")],t.prototype,"rowRenderer",void 0),qr([de("dataTypeService")],t.prototype,"dataTypeService",void 0),qr([de("quickFilterService")],t.prototype,"quickFilterService",void 0),qr([ae("advancedFilterService")],t.prototype,"advancedFilterService",void 0),qr([Z],t.prototype,"init",null),t=qr([te("filterManager")],t)}(ze),hr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Tr=function(e){function t(t,d){var a=e.call(this,t)||this;return a.ctrl=d,a}return hr(t,e),t.prototype.getCtrl=function(){return this.ctrl},t}(hs),gr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Sr=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Or=function(e){function t(d){return e.call(this,t.TEMPLATE,d)||this}return gr(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui(),d={addOrRemoveCssClass:function(t,d){return e.addOrRemoveCssClass(t,d)},addOrRemoveBodyCssClass:function(t,d){return e.eFloatingFilterBody.classList.toggle(t,d)},setButtonWrapperDisplayed:function(t){return da(e.eButtonWrapper,t)},setCompDetails:function(t){return e.setCompDetails(t)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return t.style.width=e},setMenuIcon:function(t){return e.eButtonShowMainFilter.appendChild(t)}};this.ctrl.setComp(d,t,this.eButtonShowMainFilter,this.eFloatingFilterBody)},t.prototype.setCompDetails=function(e){var t=this;if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return t.afterCompCreated(e)}))},t.prototype.destroyFloatingFilterComp=function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))},t.prototype.afterCompCreated=function(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))},t.TEMPLATE='
\n
\n \n
',Sr([gs("eFloatingFilterBody")],t.prototype,"eFloatingFilterBody",void 0),Sr([gs("eButtonWrapper")],t.prototype,"eButtonWrapper",void 0),Sr([gs("eButtonShowMainFilter")],t.prototype,"eButtonShowMainFilter",void 0),Sr([Z],t.prototype,"postConstruct",null),Sr([ee],t.prototype,"destroyFloatingFilterComp",null),t}(Tr),vr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ir=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print"}(pr||(pr={}));var Dr,Br,Gr=function(e){function t(t){var d=e.call(this)||this;return d.view=t,d}return vr(t,e),t.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},t.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),t={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},d=t.autoHeight?pr.AUTO_HEIGHT:t.print?pr.PRINT:pr.NORMAL;this.view.updateLayoutClasses(d,t)},t.prototype.getDomLayout=function(){var e,t=null!==(e=this.gridOptionsService.get("domLayout"))&&void 0!==e?e:"normal";return-1===["normal","print","autoHeight"].indexOf(t)?(M("".concat(t," is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")),"normal"):t},Ir([Z],t.prototype,"postConstruct",null),t}(ze),Mr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),wr=function(){return wr=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"}(Dr||(Dr={})),function(e){e[e.Container=0]="Container",e[e.FakeContainer=1]="FakeContainer"}(Br||(Br={}));var Er,Vr=function(e){function t(t){var d=e.call(this)||this;return d.lastScrollSource=[null,null],d.scrollLeft=-1,d.nextScrollTop=-1,d.scrollTop=-1,d.eBodyViewport=t,d.resetLastHScrollDebounced=F((function(){return d.lastScrollSource[Dr.Horizontal]=null}),500),d.resetLastVScrollDebounced=F((function(){return d.lastScrollSource[Dr.Vertical]=null}),500),d}return Mr(t,e),t.prototype.postConstruct=function(){var e=this;this.enableRtl=this.gridOptionsService.get("enableRtl"),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this)),this.ctrlsService.whenReady((function(t){e.centerRowContainerCtrl=t.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))},t.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),t=this.ctrlsService.getFakeVScrollComp();this.addManagedListener(this.centerRowContainerCtrl.getViewportElement(),"scroll",this.onHScroll.bind(this)),e.onScrollCallback(this.onFakeHScroll.bind(this));var d=this.gridOptionsService.get("debounceVerticalScrollbar"),a=d?F(this.onVScroll.bind(this),100):this.onVScroll.bind(this),s=d?F(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",a),t.onScrollCallback(s)},t.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},t.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){if(!(null==this.centerRowContainerCtrl)){void 0===e&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var t=this.enableRtl?e:-e,d=this.ctrlsService.getTopCenterRowContainerCtrl(),a=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),s=this.ctrlsService.getBottomCenterRowContainerCtrl(),o=this.ctrlsService.getFakeHScrollComp();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(-t),s.setContainerTranslateX(t),d.setContainerTranslateX(t),a.setContainerTranslateX(t);var i=this.centerRowContainerCtrl.getViewportElement(),l=this.lastScrollSource[Dr.Horizontal]===Br.Container;e=Math.abs(e),l?o.setScrollPosition(e):ca(i,e,this.enableRtl)}},t.prototype.isControllingScroll=function(e,t){return null==this.lastScrollSource[t]?(this.lastScrollSource[t]=e,!0):this.lastScrollSource[t]===e},t.prototype.onFakeHScroll=function(){this.isControllingScroll(Br.FakeContainer,Dr.Horizontal)&&this.onHScrollCommon(Br.FakeContainer)},t.prototype.onHScroll=function(){this.isControllingScroll(Br.Container,Dr.Horizontal)&&this.onHScrollCommon(Br.Container)},t.prototype.onHScrollCommon=function(e){var t,d=this.centerRowContainerCtrl.getViewportElement(),a=d.scrollLeft;this.shouldBlockScrollUpdate(Dr.Horizontal,a,!0)||(t=e===Br.Container?fa(d,this.enableRtl):this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(t)),this.resetLastHScrollDebounced())},t.prototype.onFakeVScroll=function(){this.isControllingScroll(Br.FakeContainer,Dr.Vertical)&&this.onVScrollCommon(Br.FakeContainer)},t.prototype.onVScroll=function(){this.isControllingScroll(Br.Container,Dr.Vertical)&&this.onVScrollCommon(Br.Container)},t.prototype.onVScrollCommon=function(e){var t;t=e===Br.Container?this.eBodyViewport.scrollTop:this.ctrlsService.getFakeVScrollComp().getScrollPosition(),this.shouldBlockScrollUpdate(Dr.Vertical,t,!0)||(this.animationFrameService.setScrollTop(t),this.nextScrollTop=t,e===Br.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(t):this.eBodyViewport.scrollTop=t,this.gridOptionsService.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},t.prototype.doHorizontalScroll=function(e){var t=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(Dr.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))},t.prototype.fireScrollEvent=function(e){var t=this,d={type:Je.EVENT_BODY_SCROLL,direction:e===Dr.Horizontal?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventService.dispatchEvent(d),window.clearTimeout(this.scrollTimer),this.scrollTimer=void 0,this.scrollTimer=window.setTimeout((function(){var e=wr(wr({},d),{type:Je.EVENT_BODY_SCROLL_END});t.eventService.dispatchEvent(e)}),100)},t.prototype.shouldBlockScrollUpdate=function(e,t,d){return void 0===d&&(d=!1),!(d&&!Bd())&&(e===Dr.Vertical?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t))},t.prototype.shouldBlockVerticalScroll=function(e){var t=la(this.eBodyViewport),d=this.eBodyViewport.scrollHeight;return e<0||e+t>d},t.prototype.shouldBlockHorizontalScroll=function(e){var t=this.centerRowContainerCtrl.getCenterWidth(),d=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&pa()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>d},t.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(Dr.Vertical)},t.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(Br.Container)},t.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},t.prototype.setHorizontalScrollPosition=function(e,t){void 0===t&&(t=!1);var d=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(Dr.Horizontal,e)&&(e=this.enableRtl&&pa()?e>0?0:d:Math.min(Math.max(e,0),d)),ca(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},t.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},t.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},t.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},t.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},t.prototype.scrollHorizontally=function(e){var t=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-t},t.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},t.prototype.ensureNodeVisible=function(e,t){void 0===t&&(t=null);for(var d=this.rowModel.getRowCount(),a=-1,s=0;s=0&&this.ensureIndexVisible(a,t)},t.prototype.ensureIndexVisible=function(e,t){if(!this.gridOptionsService.isDomLayout("print")){var d=this.paginationProxy.getRowCount();if("number"!==typeof e||e<0||e>=d)console.warn("AG Grid: Invalid row index for ensureIndexVisible: "+e);else{this.gridOptionsService.get("pagination")&&!this.gridOptionsService.get("suppressPaginationPanel")||this.paginationProxy.goToPageWithIndex(e);var a,s=this.ctrlsService.getGridBodyCtrl().getStickyTopHeight(),o=this.paginationProxy.getRow(e);do{var i=o.rowTop,l=o.rowHeight,r=this.paginationProxy.getPixelOffset(),m=o.rowTop-r,n=m+o.rowHeight,u=this.getVScrollPosition(),p=this.heightScaler.getDivStretchOffset(),f=u.top+p,c=u.bottom+p,_=c-f,y=this.heightScaler.getScrollPositionForPixel(m),C=this.heightScaler.getScrollPositionForPixel(n-_),b=Math.min((y+C)/2,m),q=null;"top"===t?q=y:"bottom"===t?q=C:"middle"===t?q=b:f+s>m?q=y-s:ci:ao}},t.prototype.getColumnBounds=function(e){var t=this.enableRtl,d=this.columnModel.getBodyContainerWidth(),a=e.getActualWidth(),s=e.getLeft(),o=t?-1:1,i=t?d-s:s;return{colLeft:i,colMiddle:i+a/2*o,colRight:i+a*o}},t.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),t=this.centerRowContainerCtrl.getCenterViewportScrollLeft();return{start:t,end:e+t,width:e}},Lr([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Lr([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Lr([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Lr([de("rowModel")],t.prototype,"rowModel",void 0),Lr([de("rowContainerHeightService")],t.prototype,"heightScaler",void 0),Lr([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Lr([de("columnModel")],t.prototype,"columnModel",void 0),Lr([Z],t.prototype,"postConstruct",null),t}(ze),Rr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ar=function(){return Ar=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Wr=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Fr=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;sthis.paginationProxy.getCurrentPageHeight()||(o=this.rowModel.getRowIndexAtPixel(s),d=this.rowModel.getRow(o)),t.vDirection){case Fo.Down:a="down";break;case Fo.Up:a="up";break;default:a=null}return{type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:o,overNode:d,y:s,vDirection:a}},t.prototype.dispatchGridEvent=function(e,t){var d=this.draggingToRowDragEvent(e,t);this.eventService.dispatchEvent(d)},t.prototype.onDragLeave=function(e){this.dispatchGridEvent(Je.EVENT_ROW_DRAG_LEAVE,e),this.stopDragging(e),this.gridOptionsService.get("rowDragManaged")&&this.clearRowHighlight(),this.isFromThisGrid(e)&&(this.isMultiRowDrag=!1)},t.prototype.onDragStop=function(e){this.dispatchGridEvent(Je.EVENT_ROW_DRAG_END,e),this.stopDragging(e),!this.gridOptionsService.get("rowDragManaged")||!this.gridOptionsService.get("suppressMoveWhenRowDragging")&&this.isFromThisGrid(e)||this.isDropZoneWithinThisGrid(e)||this.moveRowAndClearHighlight(e)},t.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))},xr([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),xr([de("rowModel")],t.prototype,"rowModel",void 0),xr([de("paginationProxy")],t.prototype,"paginationProxy",void 0),xr([de("columnModel")],t.prototype,"columnModel",void 0),xr([de("focusService")],t.prototype,"focusService",void 0),xr([de("sortController")],t.prototype,"sortController",void 0),xr([de("filterManager")],t.prototype,"filterManager",void 0),xr([de("selectionService")],t.prototype,"selectionService",void 0),xr([de("mouseEventService")],t.prototype,"mouseEventService",void 0),xr([de("ctrlsService")],t.prototype,"ctrlsService",void 0),xr([ae("rangeService")],t.prototype,"rangeService",void 0),xr([Z],t.prototype,"postConstruct",null),t}(ze),kr=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Hr=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation"}(Er||(Er={}));var jr,zr,Ur="ag-force-vertical-scroll",Kr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.stickyTopHeight=0,t}return kr(t,e),t.prototype.getScrollFeature=function(){return this.bodyScrollFeature},t.prototype.getBodyViewportElement=function(){return this.eBodyViewport},t.prototype.setComp=function(e,t,d,a,s,o){var i=this;this.comp=e,this.eGridBody=t,this.eBodyViewport=d,this.eTop=a,this.eBottom=s,this.eStickyTop=o,this.setCellTextSelection(this.gridOptionsService.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(function(e){return i.setCellTextSelection(e.currentValue)})),this.createManagedBean(new Gr(this.comp)),this.bodyScrollFeature=this.createManagedBean(new Vr(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([a,d,s,o]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(a),this.ctrlsService.registerGridBodyCtrl(this)},t.prototype.getComp=function(){return this.comp},t.prototype.addEventListeners=function(){this.addManagedListener(this.eventService,Je.EVENT_GRID_COLUMNS_CHANGED,this.onGridColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_SCROLL_VISIBILITY_CHANGED,this.onScrollVisibilityChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_PINNED_ROW_DATA_CHANGED,this.onPinnedRowDataChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.addFocusListeners=function(e){var t=this;e.forEach((function(e){t.addManagedListener(e,"focusin",(function(t){var d=oa(t.target,"ag-root",e);e.classList.toggle("ag-has-focus",!d)})),t.addManagedListener(e,"focusout",(function(t){var d=t.target,a=t.relatedTarget,s=e.contains(a),o=oa(a,"ag-root",e);oa(d,"ag-root",e)||s&&!o||e.classList.remove("ag-has-focus")}))}))},t.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss("ag-column-moving",e)},t.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1),this.comp.setCellSelectableCss("ag-selectable",e)},t.prototype.onScrollVisibilityChanged=function(){var e=this,t=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(t),this.setStickyTopWidth(t);var d=t&&this.gridOptionsService.getScrollbarWidth()||0,a=Ad()?16:0,s="calc(100% + ".concat(d+a,"px)");this.animationFrameService.requestAnimationFrame((function(){return e.comp.setBodyViewportWidth(s)}))},t.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)},t.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},t.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.get("stopEditingWhenCellsLoseFocus")){var t=function(t){var a=t.relatedTarget;if(null!==Md(a)){var s=d.some((function(e){return e.contains(a)}))&&e.mouseEventService.isElementInThisGrid(a);if(!s){var o=e.popupService;s=o.getActivePopups().some((function(e){return e.contains(a)}))||o.isElementWithinCustomPopup(a)}s||e.rowRenderer.stopEditing()}else e.rowRenderer.stopEditing()},d=[this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop];d.forEach((function(d){return e.addManagedListener(d,"focusout",t)}))}},t.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),t=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,d=-1===t?-1:e+t;this.comp.setRowCount(d)},t.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},t.prototype.setVerticalScrollPaddingVisible=function(e){var t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)},t.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.get("alwaysShowVerticalScroll"),t=e?Ur:null,d=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||d&&va(this.eBodyViewport)},t.prototype.setupRowAnimationCssClass=function(){var e=this,t=function(){var t=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),d=t?Er.ANIMATION_ON:Er.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(d,t)};t(),this.addManagedListener(this.eventService,Je.EVENT_HEIGHT_SCALE_CHANGED,t),this.addManagedPropertyListener("animateRows",t)},t.prototype.getGridBodyElement=function(){return this.eGridBody},t.prototype.addBodyViewportListener=function(){var e=this.onBodyViewportContextMenu.bind(this);this.addManagedListener(this.eBodyViewport,"contextmenu",e),this.mockContextMenuForIPad(e),this.addManagedListener(this.eBodyViewport,"wheel",this.onBodyViewportWheel.bind(this)),this.addManagedListener(this.eStickyTop,"wheel",this.onStickyTopWheel.bind(this)),this.addFullWidthContainerWheelListener()},t.prototype.addFullWidthContainerWheelListener=function(){var e=this,t=this.eBodyViewport.querySelector(".ag-full-width-container"),d=this.eBodyViewport.querySelector(".ag-center-cols-viewport");t&&d&&this.addManagedListener(t,"wheel",(function(t){return e.onFullWidthContainerWheel(t,d)}))},t.prototype.onFullWidthContainerWheel=function(e,t){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),t.scrollBy({left:e.deltaX}))},t.prototype.onBodyViewportContextMenu=function(e,t,d){if(e||d){if(this.gridOptionsService.get("preventDefaultOnContextMenu"))(e||d).preventDefault();var a=(e||t).target;if(a===this.eBodyViewport||a===this.ctrlsService.getCenterRowContainerCtrl().getViewportElement()){if(!this.contextMenuFactory)return;e?this.contextMenuFactory.onContextMenu(e,null,null,null,null,this.eGridBody):d&&this.contextMenuFactory.onContextMenu(null,d,null,null,null,this.eGridBody)}}},t.prototype.mockContextMenuForIPad=function(e){if(Bd()){var t=new di(this.eBodyViewport);this.addManagedListener(t,di.EVENT_LONG_TAP,(function(t){e(void 0,t.touchStart,t.touchEvent)})),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},t.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},t.prototype.getGui=function(){return this.eGridBody},t.prototype.scrollVertically=function(e){var t=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t},t.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Nr(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},t.prototype.getRowDragFeature=function(){return this.rowDragFeature},t.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},t.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,t=e.getPinnedTopTotalHeight();t&&(t+=1);var d=e.getPinnedBottomTotalHeight();d&&(d+=1),this.comp.setTopHeight(t),this.comp.setBottomHeight(d),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(d?"inherit":"none"),this.setStickyTopOffsetTop()},t.prototype.setStickyTopHeight=function(e){void 0===e&&(e=0),this.comp.setStickyTopHeight("".concat(e,"px")),this.stickyTopHeight=e},t.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},t.prototype.setStickyTopWidth=function(e){if(e){var t=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - ".concat(t,"px)"))}else this.comp.setStickyTopWidth("100%")},t.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},t.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl().getHeaderHeight()+this.filterManager.getHeaderHeight(),t=this.pinnedRowModel.getPinnedTopTotalHeight(),d=0;e>0&&(d+=e+1),t>0&&(d+=t+1),this.comp.setStickyTopTop("".concat(d,"px"))},t.prototype.sizeColumnsToFit=function(e,t){var d=this,a=this.isVerticalScrollShowing()?this.gridOptionsService.getScrollbarWidth():0,s=ra(this.eGridBody)-a;s>0?this.columnModel.sizeColumnsToFit(s,"sizeColumnsToFit",!1,e):void 0===t?window.setTimeout((function(){d.sizeColumnsToFit(e,100)}),0):100===t?window.setTimeout((function(){d.sizeColumnsToFit(e,500)}),100):500===t?window.setTimeout((function(){d.sizeColumnsToFit(e,-1)}),500):console.warn("AG Grid: tried to call sizeColumnsToFit() but the grid is coming back with zero width, maybe the grid is not visible yet on the screen?")},t.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},t.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},Hr([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Hr([de("rowContainerHeightService")],t.prototype,"rowContainerHeightService",void 0),Hr([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Hr([de("columnModel")],t.prototype,"columnModel",void 0),Hr([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Hr([ae("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Hr([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),Hr([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Hr([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Hr([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Hr([de("popupService")],t.prototype,"popupService",void 0),Hr([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Hr([de("rowModel")],t.prototype,"rowModel",void 0),Hr([de("filterManager")],t.prototype,"filterManager",void 0),t}(ze);!function(e){e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE"}(jr||(jr={})),function(e){e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION"}(zr||(zr={}));var Yr,Qr="ag-cell-range-selected",$r=function(){function e(e,t){this.beans=e,this.cellCtrl=t}return e.prototype.setComp=function(e,t){this.cellComp=e,this.eGui=t,this.onRangeSelectionChanged()},e.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Qr,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Qr,"-1"),1===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Qr,"-2"),2===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Qr,"-3"),3===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Qr,"-4"),this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),pd(this.eGui,this.rangeCount>0||void 0),this.cellComp.addOrRemoveCssClass("ag-cell-range-single-cell",this.isSingleCell()),this.updateRangeBorders(),this.refreshHandle())},e.prototype.updateRangeBorders=function(){var e=this.getRangeBorders(),t=this.isSingleCell(),d=!t&&e.top,a=!t&&e.right,s=!t&&e.bottom,o=!t&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",d),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",a),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",s),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",o)},e.prototype.isSingleCell=function(){var e=this.beans.rangeService;return 1===this.rangeCount&&e&&!e.isMoreThanOneCell()},e.prototype.getHasChartRange=function(){var e=this.beans.rangeService;if(!this.rangeCount||!e)return!1;var t=e.getCellRanges();return t.length>0&&t.every((function(e){return De([zr.DIMENSION,zr.VALUE],e.type)}))},e.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},e.prototype.getRangeBorders=function(){var e,t,d=this,a=this.beans.gridOptionsService.get("enableRtl"),s=!1,o=!1,i=!1,l=!1,r=this.cellCtrl.getCellPosition().column,m=this.beans,n=m.rangeService,u=m.columnModel;a?(e=u.getDisplayedColAfter(r),t=u.getDisplayedColBefore(r)):(e=u.getDisplayedColBefore(r),t=u.getDisplayedColAfter(r));var p=n.getCellRanges().filter((function(e){return n.isCellInSpecificRange(d.cellCtrl.getCellPosition(),e)}));e||(l=!0),t||(o=!0);for(var f=0;f=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},sm=function(){function e(){}return e.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},am([de("resizeObserverService")],e.prototype,"resizeObserverService",void 0),am([de("paginationProxy")],e.prototype,"paginationProxy",void 0),am([de("context")],e.prototype,"context",void 0),am([de("columnApi")],e.prototype,"columnApi",void 0),am([de("gridApi")],e.prototype,"gridApi",void 0),am([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),am([de("expressionService")],e.prototype,"expressionService",void 0),am([de("environment")],e.prototype,"environment",void 0),am([de("rowRenderer")],e.prototype,"rowRenderer",void 0),am([de("templateService")],e.prototype,"templateService",void 0),am([de("valueService")],e.prototype,"valueService",void 0),am([de("eventService")],e.prototype,"eventService",void 0),am([de("columnModel")],e.prototype,"columnModel",void 0),am([de("headerNavigationService")],e.prototype,"headerNavigationService",void 0),am([de("navigationService")],e.prototype,"navigationService",void 0),am([de("columnAnimationService")],e.prototype,"columnAnimationService",void 0),am([ae("rangeService")],e.prototype,"rangeService",void 0),am([de("focusService")],e.prototype,"focusService",void 0),am([ae("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),am([de("popupService")],e.prototype,"popupService",void 0),am([de("valueFormatterService")],e.prototype,"valueFormatterService",void 0),am([de("stylingService")],e.prototype,"stylingService",void 0),am([de("columnHoverService")],e.prototype,"columnHoverService",void 0),am([de("userComponentFactory")],e.prototype,"userComponentFactory",void 0),am([de("userComponentRegistry")],e.prototype,"userComponentRegistry",void 0),am([de("animationFrameService")],e.prototype,"animationFrameService",void 0),am([de("dragService")],e.prototype,"dragService",void 0),am([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),am([de("sortController")],e.prototype,"sortController",void 0),am([de("filterManager")],e.prototype,"filterManager",void 0),am([de("rowContainerHeightService")],e.prototype,"rowContainerHeightService",void 0),am([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),am([de("cellPositionUtils")],e.prototype,"cellPositionUtils",void 0),am([de("rowPositionUtils")],e.prototype,"rowPositionUtils",void 0),am([de("selectionService")],e.prototype,"selectionService",void 0),am([ae("selectionHandleFactory")],e.prototype,"selectionHandleFactory",void 0),am([de("rowCssClassCalculator")],e.prototype,"rowCssClassCalculator",void 0),am([de("rowModel")],e.prototype,"rowModel",void 0),am([de("ctrlsService")],e.prototype,"ctrlsService",void 0),am([de("ctrlsFactory")],e.prototype,"ctrlsFactory",void 0),am([de("agStackComponentsRegistry")],e.prototype,"agStackComponentsRegistry",void 0),am([de("valueCache")],e.prototype,"valueCache",void 0),am([de("rowNodeEventThrottle")],e.prototype,"rowNodeEventThrottle",void 0),am([de("localeService")],e.prototype,"localeService",void 0),am([de("valueParserService")],e.prototype,"valueParserService",void 0),am([de("syncService")],e.prototype,"syncService",void 0),am([Z],e.prototype,"postConstruct",null),e=am([te("beans")],e)}(),om=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),im=function(e){function t(t,d,a){var s=e.call(this)||this;return s.cellCtrl=t,s.beans=d,s.column=a,s}return om(t,e),t.prototype.onMouseEvent=function(e,t){if(!Re(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)}},t.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var t=this.beans,d=t.eventService,a=t.rangeService,s=t.gridOptionsService,o=e.ctrlKey||e.metaKey;a&&o&&a.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&a.intersectLastRange(!0);var i=this.cellCtrl.createEvent(e,Je.EVENT_CELL_CLICKED);d.dispatchEvent(i);var l=this.column.getColDef();l.onCellClicked&&window.setTimeout((function(){return l.onCellClicked(i)}),0),!((s.get("singleClickEdit")||l.singleClickEdit)&&!s.get("suppressClickEdit"))||e.shiftKey&&0!=(null===a||void 0===a?void 0:a.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()},t.prototype.isDoubleClickOnIPad=function(){if(!Bd()||Ae("dblclick"))return!1;var e=(new Date).getTime(),t=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,t},t.prototype.onCellDoubleClicked=function(e){var t=this.column.getColDef(),d=this.cellCtrl.createEvent(e,Je.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(d),"function"===typeof t.onCellDoubleClicked&&window.setTimeout((function(){return t.onCellDoubleClicked(d)}),0),!this.beans.gridOptionsService.get("singleClickEdit")&&!this.beans.gridOptionsService.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)},t.prototype.onMouseDown=function(e){var t=e.ctrlKey,d=e.metaKey,a=e.shiftKey,s=e.target,o=this.cellCtrl,i=this.beans,l=i.eventService,r=i.rangeService,m=i.focusService;if(!this.isRightClickInExistingRange(e)){var n=r&&0!=r.getCellRanges().length;if(!a||!n){var u=Sd()&&!o.isEditing()&&!ta(s);o.focusCell(u)}if(a&&n&&!m.isCellFocused(o.getCellPosition())){e.preventDefault();var p=m.getFocusedCell();if(p){var f=p.column,c=p.rowIndex,_=p.rowPinned,y=i.rowRenderer.getRowByPosition({rowIndex:c,rowPinned:_}),C=null===y||void 0===y?void 0:y.getCellCtrl(f);(null===C||void 0===C?void 0:C.isEditing())&&C.stopEditing(),m.setFocusedCell({column:f,rowIndex:c,rowPinned:_,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(s)){if(r){var b=this.cellCtrl.getCellPosition();if(a)r.extendLatestRangeToCell(b);else{var q=t||d;r.setRangeToCell(b,q)}}l.dispatchEvent(this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_DOWN))}}},t.prototype.isRightClickInExistingRange=function(e){var t=this.beans.rangeService;if(t){var d=t.isCellInAnyRange(this.cellCtrl.getCellPosition()),a=2===e.button||e.ctrlKey&&this.beans.gridOptionsService.get("allowContextMenuWithControlKey");if(d&&a)return!0}return!1},t.prototype.containsWidget=function(e){return oa(e,"ag-selection-checkbox",3)},t.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.clearMouseOver()}},t.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var t=this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(t),this.beans.columnHoverService.setMouseOver([this.column])}},t.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var t=this.cellCtrl.getGui(),d=t.contains(e.target),a=t.contains(e.relatedTarget);return d&&a},t.prototype.destroy=function(){},t}(sm),lm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),rm=function(e){function t(t,d,a,s,o){var i=e.call(this)||this;return i.cellCtrl=t,i.beans=d,i.rowNode=s,i.rowCtrl=o,i}return lm(t,e),t.prototype.setComp=function(e){this.eGui=e},t.prototype.onKeyDown=function(e){var t=e.key;switch(t){case Ka.ENTER:this.onEnterKeyDown(e);break;case Ka.F2:this.onF2KeyDown(e);break;case Ka.ESCAPE:this.onEscapeKeyDown(e);break;case Ka.TAB:this.onTabKeyDown(e);break;case Ka.BACKSPACE:case Ka.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case Ka.DOWN:case Ka.UP:case Ka.RIGHT:case Ka.LEFT:this.onNavigationKeyDown(e,t)}},t.prototype.onNavigationKeyDown=function(e,t){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,t,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},t.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var t=this.beans.rangeService.extendLatestRangeInDirection(e);t&&this.beans.navigationService.ensureCellVisible(t)}},t.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},t.prototype.onBackspaceOrDeleteKeyDown=function(e,t){var d=this,a=d.cellCtrl,s=d.beans,o=d.rowNode,i=s.gridOptionsService,l=s.rangeService,r=s.eventService;a.isEditing()||(r.dispatchEvent({type:Je.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Ja(e,i.get("enableCellEditingOnBackspace"))?l&&i.get("enableRangeSelection")?l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):a.isCellEditable()&&o.setDataValue(a.getColumn(),null,"cellClear"):a.startRowOrCellEdit(e,t),r.dispatchEvent({type:Je.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},t.prototype.onEnterKeyDown=function(e){if(this.cellCtrl.isEditing()||this.rowCtrl.isEditing())this.cellCtrl.stopEditingAndFocus(!1,e.shiftKey);else if(this.beans.gridOptionsService.get("enterNavigatesVertically")){var t=e.shiftKey?Ka.UP:Ka.DOWN;this.beans.navigationService.navigateToNextCell(null,t,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(Ka.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},t.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(Ka.F2,e)},t.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},t.prototype.processCharacter=function(e){if(!(e.target!==this.eGui)&&!this.cellCtrl.isEditing()){var t=e.key;" "===t?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(t,e),e.preventDefault())}},t.prototype.onSpaceKeyDown=function(e){var t=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&t.isRowSelection()){var d=this.rowNode.isSelected(),a=!d;if(a||!t.get("suppressRowDeselection")){var s=this.beans.gridOptionsService.get("groupSelectsFiltered"),o=this.rowNode.setSelectedParams({newValue:a,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"});void 0===d&&0===o&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:s,event:e,source:"spaceKey"})}}e.preventDefault()},t.prototype.destroy=function(){e.prototype.destroy.call(this)},t}(ze),mm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),nm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},um=function(e){function t(t,d,a){var s=e.call(this,'
')||this;return s.rowNode=t,s.column=d,s.eCell=a,s}return mm(t,e),t.prototype.postConstruct=function(){this.getGui().appendChild(za("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()},t.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},t.prototype.onDragStart=function(e){var t=this,d=this.column.getColDef().dndSourceOnRowDrag;e.dataTransfer.setDragImage(this.eCell,0,0);d?d({rowNode:this.rowNode,dragEvent:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}):function(){try{var d=JSON.stringify(t.rowNode.data);e.dataTransfer.setData("application/json",d),e.dataTransfer.setData("text/plain",d)}catch(a){}}()},t.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},nm([Z],t.prototype,"postConstruct",null),t}(hs),pm=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},fm=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},hm=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Tm=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=0)&&d}return d},t.prototype.getDomOrder=function(){return this.gridOptionsService.get("ensureDomOrder")||this.gridOptionsService.isDomLayout("print")},t.prototype.listenOnDomOrder=function(e){var t=this,d=function(){e.rowComp.setDomOrder(t.getDomOrder())};this.addManagedPropertyListener("domLayout",d),this.addManagedPropertyListener("ensureDomOrder",d)},t.prototype.setAnimateFlags=function(e){if(!this.isSticky()&&e){var t=s(this.rowNode.oldRowTop),d=this.beans.columnModel.isPinningLeft(),a=this.beans.columnModel.isPinningRight();if(t){if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=d,this.slideInAnimation.right=a}else{if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.fadeInAnimation.fullWidth=!0);this.fadeInAnimation.center=!0,this.fadeInAnimation.left=d,this.fadeInAnimation.right=a}}},t.prototype.isEditing=function(){return this.editingRow},t.prototype.stopRowEditing=function(e){this.stopEditing(e)},t.prototype.isFullWidth=function(){return this.rowType!==Yr.Normal},t.prototype.getRowType=function(){return this.rowType},t.prototype.refreshFullWidth=function(){var e=this,t=function(t,d){if(!t)return!0;var a=t.rowComp.getFullWidthCellRenderer();if(!a)return!1;if(!a.refresh)return!1;var s=e.createFullWidthParams(t.element,d);return a.refresh(s)},d=t(this.fullWidthGui,null),a=t(this.centerGui,null),s=t(this.leftGui,"left"),o=t(this.rightGui,"right");return d&&a&&s&&o},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,Li.EVENT_HEIGHT_CHANGED,(function(){return e.onRowHeightChanged()})),this.addManagedListener(this.rowNode,Li.EVENT_ROW_SELECTED,(function(){return e.onRowSelected()})),this.addManagedListener(this.rowNode,Li.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,Li.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,Li.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var t=this.beans.eventService;this.addManagedListener(t,Je.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(t,Je.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(t,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(t,Je.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(t,Je.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(t,Je.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(t,Je.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(t,Je.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(t,Je.EVENT_COLUMN_MOVED,this.onColumnMoved.bind(this)),this.addDestroyFunc((function(){e.destroyBeans(e.rowDragComps,e.beans.context)})),this.addManagedPropertyListeners(["rowDragEntireRow"],(function(){e.gridOptionsService.get("rowDragEntireRow")?e.allRowGuis.forEach((function(t){e.addRowDraggerToRow(t)})):(e.destroyBeans(e.rowDragComps,e.beans.context),e.rowDragComps=[])})),this.addListenersForCellComps()},t.prototype.onColumnMoved=function(){this.updateColumnLists()},t.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,Li.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,Li.EVENT_CELL_CHANGED,(function(t){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(t)}))}))},t.prototype.onRowNodeDataChanged=function(e){var t=this;this.isFullWidth()!==!!this.rowNode.isFullWidthCell()?this.beans.rowRenderer.redrawRow(this.rowNode):this.isFullWidth()?this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode):(this.getAllCellCtrls().forEach((function(t){return t.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.allRowGuis.forEach((function(e){t.setRowCompRowId(e.rowComp),t.updateRowBusinessKey(),t.setRowCompRowBusinessKey(e.rowComp)})),this.onRowSelected(),this.postProcessCss())},t.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},t.prototype.postProcessCss=function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},t.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(t){var d=e===tr.Above,a=e===tr.Below;t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",d),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",a)}))},t.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},t.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))},t.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),t=1==this.rowNode.expanded;this.allRowGuis.forEach((function(d){d.rowComp.addOrRemoveCssClass("ag-row-group",e),d.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&t),d.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!t),ed(d.element,e&&t)}))},t.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},t.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},t.prototype.getRowPosition=function(){return{rowPinned:a(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},t.prototype.onKeyboardNavigate=function(e){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)}));if((t?t.element:null)===e.target){var d=this.rowNode,a=this.beans.focusService.getFocusedCell(),s={rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:a&&a.column};this.beans.navigationService.navigateToNextCell(e,e.key,s,!0),e.preventDefault()}},t.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented&&!Re(e)){var t=this.allRowGuis.find((function(t){return t.element.contains(e.target)})),d=t?t.element:null,a=d===e.target,s=null;a||(s=this.beans.focusService.findNextFocusableElement(d,!1,e.shiftKey)),(this.isFullWidth()&&a||!s)&&this.beans.navigationService.onTabKeyDown(this,e)}},t.prototype.onFullWidthRowFocused=function(e){var t,d=this.rowNode,a=!!e&&(this.isFullWidth()&&e.rowIndex===d.rowIndex&&e.rowPinned==d.rowPinned),s=this.fullWidthGui?this.fullWidthGui.element:null===(t=this.centerGui)||void 0===t?void 0:t.element;s&&(s.classList.toggle("ag-full-width-focus",a),a&&s.focus({preventScroll:!0}))},t.prototype.refreshCell=function(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),this.updateColumnLists()},t.prototype.removeCellCtrl=function(e,t){var d={list:[],map:{}};return e.list.forEach((function(e){e!==t&&(d.list.push(e),d.map[e.getInstanceId()]=e)})),d},t.prototype.onMouseEvent=function(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t)}},t.prototype.createRowEvent=function(e,t){return{type:e,node:this.rowNode,data:this.rowNode.data,rowIndex:this.rowNode.rowIndex,rowPinned:this.rowNode.rowPinned,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,event:t}},t.prototype.createRowEventWithSource=function(e,t){var d=this.createRowEvent(e,t);return d.source=this,d},t.prototype.onRowDblClick=function(e){if(!Re(e)){var t=this.createRowEventWithSource(Je.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(t)}},t.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=oa(e.target,"ag-row-drag",3),this.isFullWidth()){var t=this.rowNode,d=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:t.rowIndex,column:d.getAllDisplayedColumns()[0],rowPinned:t.rowPinned,forceBrowserFocus:!0})}},t.prototype.onRowClick=function(e){if(!(Re(e)||this.lastMouseDownOnDragger)){var t=this.createRowEventWithSource(Je.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(t);var d=e.ctrlKey||e.metaKey,a=e.shiftKey;if(!(this.gridOptionsService.get("groupSelectsChildren")&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.get("suppressRowClickSelection"))){var s=this.gridOptionsService.get("rowMultiSelectWithClick"),o=!this.gridOptionsService.get("suppressRowDeselection"),i="rowClicked";if(this.rowNode.isSelected())s?this.rowNode.setSelectedParams({newValue:!1,event:e,source:i}):d?o&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:i}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!a,rangeSelect:a,event:e,source:i});else{var l=!s&&!d;this.rowNode.setSelectedParams({newValue:!0,clearSelection:l,rangeSelect:a,event:e,source:i})}}}},t.prototype.setupDetailRowAutoHeight=function(e){var t=this;if(this.rowType===Yr.FullWidthDetail&&this.gridOptionsService.get("detailRowAutoHeight")){var d=function(){var d=e.clientHeight;if(null!=d&&d>0){t.beans.frameworkOverrides.setTimeout((function(){t.rowNode.setRowHeight(d),t.beans.clientSideRowModel?t.beans.clientSideRowModel.onRowHeightChanged():t.beans.serverSideRowModel&&t.beans.serverSideRowModel.onRowHeightChanged()}),0)}},a=this.beans.resizeObserverService.observeResize(e,d);this.addDestroyFunc(a),d()}},t.prototype.createFullWidthParams=function(e,t){var d=this;return{fullWidth:!0,data:this.rowNode.data,node:this.rowNode,value:this.rowNode.key,valueFormatted:this.rowNode.key,rowIndex:this.rowNode.rowIndex,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(e,t,a,s){return d.addFullWidthRowDragging(e,t,a,s)}}},t.prototype.addFullWidthRowDragging=function(e,t,d,a){if(void 0===d&&(d=""),this.isFullWidth()){var s=new Ui((function(){return d}),this.rowNode,void 0,e,t,a);this.createManagedBean(s,this.beans.context)}},t.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var t="ag-row-level-"+e,d="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(t,!0),e.rowComp.addOrRemoveCssClass(d,!1)}))}this.rowLevel=e},t.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},t.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},t.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},t.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",t)})))},t.prototype.stopEditing=function(e){var t,d;if(void 0===e&&(e=!1),!this.stoppingRowEdit){var a=this.getAllCellCtrls(),s=this.editingRow;this.stoppingRowEdit=!0;var o=!1;try{for(var i=Pm(a),l=i.next();!l.done;l=i.next()){var r=l.value.stopEditing(e);s&&!e&&!o&&r&&(o=!0)}}catch(n){t={error:n}}finally{try{l&&!l.done&&(d=i.return)&&d.call(i)}finally{if(t)throw t.error}}if(o){var m=this.createRowEvent(Je.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(m)}s&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},t.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach((function(t){t.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),t.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))},t.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach((function(t){return t.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var t=e?this.createRowEvent(Je.EVENT_ROW_EDITING_STARTED):this.createRowEvent(Je.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(t)},t.prototype.startRowEditing=function(e,t,d){(void 0===e&&(e=null),void 0===t&&(t=null),void 0===d&&(d=null),this.editingRow)||this.getAllCellCtrls().reduce((function(a,s){var o=s===t;return o?s.startEditing(e,o,d):s.startEditing(null,o,d),!!a||s.isEditing()}),!1)&&this.setEditingRow(!0)},t.prototype.getAllCellCtrls=function(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:Tm(Tm(Tm([],hm(this.centerCellCtrls.list),!1),hm(this.leftCellCtrls.list),!1),hm(this.rightCellCtrls.list),!1)},t.prototype.postProcessClassesFromGridOptions=function(){var e=this,t=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);t&&t.length&&t.forEach((function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}))},t.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!0)}))}),(function(t){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(t,!1)}))}))},t.prototype.setStylesFromGridOptions=function(e,t){var d=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,(function(e){return e.rowComp.setUserStyles(d.rowStyles)}))},t.prototype.getPinnedForContainer=function(e){return e===Sm.LEFT?"left":e===Sm.RIGHT?"right":null},t.prototype.getInitialRowClasses=function(e){var t=this.getPinnedForContainer(e),d={rowNode:this.rowNode,rowFocused:this.rowFocused,fadeRowIn:this.fadeInAnimation[e],rowIsEven:this.rowNode.rowIndex%2===0,rowLevel:this.rowLevel,fullWidthRow:this.isFullWidth(),firstRowOnPage:this.isFirstRowOnPage(),lastRowOnPage:this.isLastRowOnPage(),printLayout:this.printLayout,expandable:this.rowNode.isExpandable(),pinned:t};return this.beans.rowCssClassCalculator.getInitialRowClasses(d)},t.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(!e||"function"!==typeof e){var t,d=this.gridOptionsService.getCallback("getRowStyle");if(d)t=d({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});return t||e?Object.assign({},e,t):this.emptyStyle}console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},t.prototype.onRowSelected=function(e){var t=this,d=!!this.rowNode.isSelected();this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-selected",d),pd(e.element,!!d||void 0);var a=t.createAriaLabel();Ut(e.element,null==a?"":a)}))},t.prototype.createAriaLabel=function(){var e=this.rowNode.isSelected();if(!e||!this.gridOptionsService.get("suppressRowDeselection"))return this.beans.localeService.getLocaleTextFunc()(e?"ariaRowDeselect":"ariaRowSelect","Press SPACE to ".concat(e?"deselect":"select"," this row."))},t.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},t.prototype.addHoverFunctionality=function(e){var t=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return t.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return t.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,Li.EVENT_MOUSE_ENTER,(function(){t.beans.dragService.isDragging()||t.gridOptionsService.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),t.rowNode.setHovered(!0))})),this.addManagedListener(this.rowNode,Li.EVENT_MOUSE_LEAVE,(function(){e.classList.remove("ag-row-hover"),t.rowNode.setHovered(!1)})))},t.prototype.roundRowTopToBounds=function(e){var t=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.applyPaginationOffset(t.top,!0)-100,a=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(d,e),a)},t.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},t.prototype.forEachGui=function(e,t){e?t(e):this.allRowGuis.forEach(t)},t.prototype.onRowHeightChanged=function(e){if(null!=this.rowNode.rowHeight){var t=this.rowNode.rowHeight,d=this.beans.environment.getDefaultRowHeight(),a=this.gridOptionsService.isGetRowHeightFunction()?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,s=a?"".concat(Math.min(d,a)-2,"px"):void 0;this.forEachGui(e,(function(e){e.element.style.height="".concat(t,"px"),s&&e.element.style.setProperty("--ag-line-height",s)}))}},t.prototype.addEventListener=function(t,d){e.prototype.addEventListener.call(this,t,d)},t.prototype.removeEventListener=function(t,d){e.prototype.removeEventListener.call(this,t,d)},t.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var t=this.createRowEvent(Je.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(t),this.beans.eventService.dispatchEvent(t),e.prototype.destroy.call(this)},t.prototype.setupRemoveAnimation=function(){if(!this.isSticky())if(null!=this.rowNode.rowTop){var e=this.roundRowTopToBounds(this.rowNode.rowTop);this.setRowTop(e)}else this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0)}))},t.prototype.destroySecondPass=function(){this.allRowGuis.length=0,this.stopEditing();var e=function(e){return e.list.forEach((function(e){return e.destroy()})),{list:[],map:{}}};this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)},t.prototype.setFocusedClasses=function(e){var t=this;this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-focus",t.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!t.rowFocused)}))},t.prototype.onCellFocused=function(){this.onCellFocusChanged()},t.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},t.prototype.onCellFocusChanged=function(){var e=this.beans.focusService.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);e!==this.rowFocused&&(this.rowFocused=e,this.setFocusedClasses()),!e&&this.editingRow&&this.stopEditing(!1)},t.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},t.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},t.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},t.prototype.applyPaginationOffset=function(e,t){return void 0===t&&(t=!1),this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.paginationProxy.getPixelOffset()*(t?1:-1)},t.prototype.setRowTop=function(e){if(!this.printLayout&&s(e)){var t=this.applyPaginationOffset(e),d=this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeightService.getRealPixelPosition(t),a="".concat(d,"px");this.setRowTopStyle(a)}},t.prototype.getInitialRowTop=function(e){return this.gridOptionsService.get("suppressRowTransform")?this.getInitialRowTopShared(e):void 0},t.prototype.getInitialTransform=function(e){return this.gridOptionsService.get("suppressRowTransform")?void 0:"translateY(".concat(this.getInitialRowTopShared(e),")")},t.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var t;if(this.isSticky())t=this.rowNode.stickyRowTop;else{var d=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,a=this.applyPaginationOffset(d);t=this.rowNode.isRowPinned()?a:this.beans.rowContainerHeightService.getRealPixelPosition(a)}return t+"px"},t.prototype.setRowTopStyle=function(e){var t=this.gridOptionsService.get("suppressRowTransform");this.allRowGuis.forEach((function(d){return t?d.rowComp.setTop(e):d.rowComp.setTransform("translateY(".concat(e,")"))}))},t.prototype.getRowNode=function(){return this.rowNode},t.prototype.getCellCtrl=function(e){var t=null;return this.getAllCellCtrls().forEach((function(d){d.getColumn()==e&&(t=d)})),null!=t||this.getAllCellCtrls().forEach((function(d){d.getColSpanningList().indexOf(e)>=0&&(t=d)})),t},t.prototype.onRowIndexChanged=function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},t.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()},t.prototype.updateRowIndexes=function(e){var t=this.rowNode.getRowIndexString(),d=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),a=this.rowNode.rowIndex%2===0,s=d+this.rowNode.rowIndex+1;this.forEachGui(e,(function(e){e.rowComp.setRowIndex(t),e.rowComp.addOrRemoveCssClass("ag-row-even",a),e.rowComp.addOrRemoveCssClass("ag-row-odd",!a),id(e.element,s)}))},t.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},t.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},t.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},t.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},t.DOM_DATA_KEY_ROW_CTRL="renderedRow",t}(ze),Im=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Dm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Bm=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Gm=function(e){function t(t){var d=e.call(this)||this;return d.element=t,d}return Im(t,e),t.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},t.prototype.addKeyboardListeners=function(){var e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,t)},t.prototype.addMouseListeners=function(){var e=this;["dblclick","contextmenu","mouseover","mouseout","click",Ae("touchstart")?"touchstart":"mousedown"].forEach((function(t){var d=e.processMouseEvent.bind(e,t);e.addManagedListener(e.element,t,d)}))},t.prototype.processMouseEvent=function(e,t){if(this.mouseEventService.isEventFromThisGrid(t)&&!Re(t)){var d=this.getRowForEvent(t),a=this.mouseEventService.getRenderedCellForEvent(t);"contextmenu"===e?this.handleContextMenuMouseEvent(t,null,d,a):(a&&a.onMouseEvent(e,t),d&&d.onMouseEvent(e,t))}},t.prototype.mockContextMenuForIPad=function(){var e=this;if(Bd()){var t=new di(this.element);this.addManagedListener(t,di.EVENT_LONG_TAP,(function(t){var d=e.getRowForEvent(t.touchEvent),a=e.mouseEventService.getRenderedCellForEvent(t.touchEvent);e.handleContextMenuMouseEvent(null,t.touchEvent,d,a)})),this.addDestroyFunc((function(){return t.destroy()}))}},t.prototype.getRowForEvent=function(e){for(var t=e.target;t;){var d=this.gridOptionsService.getDomData(t,vm.DOM_DATA_KEY_ROW_CTRL);if(d)return d;t=t.parentElement}return null},t.prototype.handleContextMenuMouseEvent=function(e,t,d,a){var s=d?d.getRowNode():null,o=a?a.getColumn():null,i=null;if(o){var l=e||t;a.dispatchCellContextMenuEvent(l),i=this.valueService.getValue(o,s)}var r=this.ctrlsService.getGridBodyCtrl(),m=a?a.getGui():r.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,t,s,o,i,m)},t.prototype.getControlsForEventTarget=function(e){return{cellCtrl:xe(this.gridOptionsService,e,bm.DOM_DATA_KEY_CELL_CTRL),rowCtrl:xe(this.gridOptionsService,e,vm.DOM_DATA_KEY_ROW_CTRL)}},t.prototype.processKeyboardEvent=function(e,t){var d=this.getControlsForEventTarget(t.target),a=d.cellCtrl,s=d.rowCtrl;t.defaultPrevented||(a?this.processCellKeyboardEvent(a,e,t):s&&s.isFullWidth()&&this.processFullWidthRowKeyboardEvent(s,e,t))},t.prototype.processCellKeyboardEvent=function(e,t,d){var a=e.getRowNode(),s=e.getColumn(),o=e.isEditing();Qa(this.gridOptionsService,d,a,s,o)||"keydown"===t&&(!o&&this.navigationService.handlePageScrollingKey(d)||e.onKeyDown(d),this.doGridOperations(d,e.isEditing()),Ya(d)&&e.processCharacter(d));if("keydown"===t){var i=e.createEvent(d,Je.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(i)}},t.prototype.processFullWidthRowKeyboardEvent=function(e,t,d){var a=e.getRowNode(),s=this.focusService.getFocusedCell(),o=s&&s.column;if(!Qa(this.gridOptionsService,d,a,o,!1)){var i=d.key;if("keydown"===t)switch(i){case Ka.PAGE_HOME:case Ka.PAGE_END:case Ka.PAGE_UP:case Ka.PAGE_DOWN:this.navigationService.handlePageScrollingKey(d,!0);break;case Ka.UP:case Ka.DOWN:e.onKeyboardNavigate(d);break;case Ka.TAB:e.onTabKeyDown(d)}}if("keydown"===t){var l=e.createRowEvent(Je.EVENT_CELL_KEY_DOWN,d);this.eventService.dispatchEvent(l)}},t.prototype.doGridOperations=function(e,t){if((e.ctrlKey||e.metaKey)&&!t&&this.mouseEventService.isEventFromThisGrid(e)){var d=Xa(e);return d===Ka.A?this.onCtrlAndA(e):d===Ka.C?this.onCtrlAndC(e):d===Ka.D?this.onCtrlAndD(e):d===Ka.V?this.onCtrlAndV(e):d===Ka.X?this.onCtrlAndX(e):d===Ka.Y?this.onCtrlAndY():d===Ka.Z?this.onCtrlAndZ(e):void 0}},t.prototype.onCtrlAndA=function(e){var t=this,d=t.pinnedRowModel,a=t.paginationProxy,s=t.rangeService;if(s&&a.isRowsToRender()){var o=Bm([d.isEmpty("top"),d.isEmpty("bottom")],2),l=o[0]?null:"top",r=void 0,m=void 0;o[1]?(r=null,m=this.paginationProxy.getRowCount()-1):(r="bottom",m=d.getPinnedBottomRowData().length-1);var n=this.columnModel.getAllDisplayedColumns();if(i(n))return;s.setCellRange({rowStartIndex:0,rowStartPinned:l,rowEndIndex:m,rowEndPinned:r,columnStart:n[0],columnEnd:qe(n)})}e.preventDefault()},t.prototype.onCtrlAndC=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")){var t=this.getControlsForEventTarget(e.target),d=t.cellCtrl,a=t.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===a||void 0===a?void 0:a.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}},t.prototype.onCtrlAndX=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")&&!this.gridOptionsService.get("suppressCutToClipboard")){var t=this.getControlsForEventTarget(e.target),d=t.cellCtrl,a=t.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===a||void 0===a?void 0:a.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},t.prototype.onCtrlAndV=function(e){var t=this.getControlsForEventTarget(e.target),d=t.cellCtrl,a=t.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===a||void 0===a?void 0:a.isEditing())||this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},t.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},t.prototype.onCtrlAndZ=function(e){this.gridOptionsService.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},t.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},Dm([de("mouseEventService")],t.prototype,"mouseEventService",void 0),Dm([de("valueService")],t.prototype,"valueService",void 0),Dm([ae("contextMenuFactory")],t.prototype,"contextMenuFactory",void 0),Dm([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Dm([de("navigationService")],t.prototype,"navigationService",void 0),Dm([de("focusService")],t.prototype,"focusService",void 0),Dm([de("undoRedoService")],t.prototype,"undoRedoService",void 0),Dm([de("columnModel")],t.prototype,"columnModel",void 0),Dm([de("paginationProxy")],t.prototype,"paginationProxy",void 0),Dm([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),Dm([ae("rangeService")],t.prototype,"rangeService",void 0),Dm([ae("clipboardService")],t.prototype,"clipboardService",void 0),Dm([Z],t.prototype,"postConstruct",null),t}(ze),Mm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),wm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Lm=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Em=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s0;){var r;if(s0)l-=(r=d[o++]).getActualWidth(),i.push(r)}return i},t.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},t.prototype.getBodyHeight=function(){return this.bodyHeight},t.prototype.checkBodyHeight=function(){var e=la(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;var t={type:Je.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(t)}},t.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},t.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},t.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},t.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,t)},wm([de("ctrlsService")],t.prototype,"ctrlsService",void 0),wm([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),wm([de("columnModel")],t.prototype,"columnModel",void 0),wm([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),wm([Z],t.prototype,"postConstruct",null),t}(ze),Rm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Am=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},xm=function(e){function t(t){var d=e.call(this)||this;return d.element=t,d}return Rm(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},t.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),t=e>0;da(this.element,t),Da(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},Am([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Am([Z],t.prototype,"postConstruct",null),t}(ze),Wm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Fm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Nm=function(e){function t(t){var d=e.call(this)||this;return d.element=t,d}return Wm(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},t.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),t=e>0;da(this.element,t),Da(this.element,e)},t.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},Fm([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Fm([Z],t.prototype,"postConstruct",null),t}(ze),km=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Hm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},jm=function(e){function t(t,d){var a=e.call(this)||this;return a.eContainer=t,a.eViewport=d,a}return km(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},t.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),t=null!=e?"".concat(e,"px"):"";this.eContainer.style.height=t,this.eViewport&&(this.eViewport.style.height=t)},Hm([de("rowContainerHeightService")],t.prototype,"maxDivHeightScaler",void 0),Hm([Z],t.prototype,"postConstruct",null),t}(ze),zm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Um=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Km=function(e){function t(t){var d=e.call(this)||this;return d.eContainer=t,d}return zm(t,e),t.prototype.postConstruct=function(){var e=this;o(this.rangeService)||(this.params={eElement:this.eContainer,onDragStart:this.rangeService.onDragStart.bind(this.rangeService),onDragStop:this.rangeService.onDragStop.bind(this.rangeService),onDragging:this.rangeService.onDragging.bind(this.rangeService)},this.addManagedPropertyListener("enableRangeSelection",(function(t){t.currentValue?e.enableFeature():e.disableFeature()})),this.addDestroyFunc((function(){return e.disableFeature()})),this.gridOptionsService.get("enableRangeSelection")&&this.enableFeature())},t.prototype.enableFeature=function(){this.dragService.addDragSource(this.params)},t.prototype.disableFeature=function(){this.dragService.removeDragSource(this.params)},Um([ae("rangeService")],t.prototype,"rangeService",void 0),Um([de("dragService")],t.prototype,"dragService",void 0),Um([Z],t.prototype,"postConstruct",null),t}(ze),Ym=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Qm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},$m=function(e){function t(t,d){void 0===d&&(d=!1);var a=e.call(this)||this;return a.callback=t,a.addSpacer=d,a}return Ym(t,e),t.prototype.postConstruct=function(){var e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_LEFT_PINNED_WIDTH_CHANGED,e),this.addSpacer&&(this.addManagedListener(this.eventService,Je.EVENT_RIGHT_PINNED_WIDTH_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_SCROLL_VISIBILITY_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_SCROLLBAR_WIDTH_CHANGED,e)),this.setWidth()},t.prototype.setWidth=function(){var e,t=this.columnModel,d=this.gridOptionsService.isDomLayout("print"),a=t.getBodyContainerWidth(),s=t.getDisplayedColumnsLeftWidth(),o=t.getDisplayedColumnsRightWidth();d?e=a+s+o:(e=a,this.addSpacer&&0===(this.gridOptionsService.get("enableRtl")?s:o)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.gridOptionsService.getScrollbarWidth()));this.callback(e)},Qm([de("columnModel")],t.prototype,"columnModel",void 0),Qm([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Qm([Z],t.prototype,"postConstruct",null),t}(ze),Xm=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Jm=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Zm=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},en=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=0&&t()},t.prototype.getContainerElement=function(){return this.eContainer},t.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},t.prototype.setComp=function(e,t,d){var a=this;this.comp=e,this.eContainer=t,this.eViewport=d,this.createManagedBean(new Gm(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var s=[gm.TOP_CENTER,gm.TOP_LEFT,gm.TOP_RIGHT],o=[gm.STICKY_TOP_CENTER,gm.STICKY_TOP_LEFT,gm.STICKY_TOP_RIGHT],i=[gm.BOTTOM_CENTER,gm.BOTTOM_LEFT,gm.BOTTOM_RIGHT],l=[gm.CENTER,gm.LEFT,gm.RIGHT],r=en(en(en(en([],Zm(s),!1),Zm(i),!1),Zm(l),!1),Zm(o),!1),m=[gm.CENTER,gm.LEFT,gm.RIGHT,gm.FULL_WIDTH],n=[gm.CENTER,gm.TOP_CENTER,gm.STICKY_TOP_CENTER,gm.BOTTOM_CENTER],u=[gm.LEFT,gm.BOTTOM_LEFT,gm.TOP_LEFT,gm.STICKY_TOP_LEFT],p=[gm.RIGHT,gm.BOTTOM_RIGHT,gm.TOP_RIGHT,gm.STICKY_TOP_RIGHT];this.forContainers(u,(function(){a.pinnedWidthFeature=a.createManagedBean(new xm(a.eContainer)),a.addManagedListener(a.eventService,Je.EVENT_LEFT_PINNED_WIDTH_CHANGED,(function(){return a.onPinnedWidthChanged()}))})),this.forContainers(p,(function(){a.pinnedWidthFeature=a.createManagedBean(new Nm(a.eContainer)),a.addManagedListener(a.eventService,Je.EVENT_RIGHT_PINNED_WIDTH_CHANGED,(function(){return a.onPinnedWidthChanged()}))})),this.forContainers(m,(function(){return a.createManagedBean(new jm(a.eContainer,a.name===gm.CENTER?d:void 0))})),this.forContainers(r,(function(){return a.createManagedBean(new Km(a.eContainer))})),this.forContainers(n,(function(){return a.createManagedBean(new $m((function(e){return a.comp.setContainerWidth("".concat(e,"px"))})))})),this.addListeners(),this.registerWithCtrlsService()},t.prototype.addListeners=function(){var e=this;this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,(function(){return e.onDisplayedColumnsChanged()})),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,(function(){return e.onDisplayedColumnsWidthChanged()})),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_ROWS_CHANGED,(function(t){return e.onDisplayedRowsChanged(t.afterScroll)})),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},t.prototype.listenOnDomOrder=function(){var e=this;if([gm.STICKY_TOP_CENTER,gm.STICKY_TOP_LEFT,gm.STICKY_TOP_RIGHT,gm.STICKY_TOP_FULL_WIDTH].indexOf(this.name)>=0)this.comp.setDomOrder(!0);else{var t=function(){var t=e.gridOptionsService.get("ensureDomOrder"),d=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(t||d)};this.addManagedPropertyListener("domLayout",t),t()}},t.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([gm.TOP_CENTER,gm.STICKY_TOP_CENTER,gm.BOTTOM_CENTER],(function(){e.addManagedListener(e.eViewport,"scroll",(function(){return e.eViewport.scrollLeft=0}))}))},t.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([gm.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([gm.CENTER],(function(){return e.onHorizontalViewportChanged()}))},t.prototype.addPreventScrollWhileDragging=function(){var e=this,t=function(t){e.dragService.isDragging()&&t.cancelable&&t.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",t)}))},t.prototype.onHorizontalViewportChanged=function(e){void 0===e&&(e=!1);var t=this.getCenterWidth(),d=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(t,d,e)},t.prototype.getCenterWidth=function(){return ra(this.eViewport)},t.prototype.getCenterViewportScrollLeft=function(){return fa(this.eViewport,this.enableRtl)},t.prototype.registerViewportResizeListener=function(e){var t=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return t()}))},t.prototype.isViewportVisible=function(){return Ca(this.eViewport)},t.prototype.getViewportScrollLeft=function(){return fa(this.eViewport,this.enableRtl)},t.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsService.get("alwaysShowHorizontalScroll")||Oa(this.eViewport)},t.prototype.getViewportElement=function(){return this.eViewport},t.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX(".concat(e,"px)")},t.prototype.getHScrollPosition=function(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}},t.prototype.setCenterViewportScrollLeft=function(e){ca(this.eViewport,e,this.enableRtl)},t.prototype.isContainerVisible=function(){return!t.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},t.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())},t.prototype.onDisplayedRowsChanged=function(e){var t=this;if(void 0===e&&(e=!1),this.visible){var d=this.gridOptionsService.isDomLayout("print"),a=this.gridOptionsService.get("embedFullWidthRows")||d,s=this.getRowCtrls().filter((function(e){var d=e.isFullWidth();return t.isFullWithContainer?!a&&d:a||!d}));this.comp.setRowCtrls(s,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},t.prototype.getRowCtrls=function(){switch(this.name){case gm.TOP_CENTER:case gm.TOP_LEFT:case gm.TOP_RIGHT:case gm.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case gm.STICKY_TOP_CENTER:case gm.STICKY_TOP_LEFT:case gm.STICKY_TOP_RIGHT:case gm.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case gm.BOTTOM_CENTER:case gm.BOTTOM_LEFT:case gm.BOTTOM_RIGHT:case gm.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}},Jm([de("scrollVisibleService")],t.prototype,"scrollVisibleService",void 0),Jm([de("dragService")],t.prototype,"dragService",void 0),Jm([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Jm([de("columnModel")],t.prototype,"columnModel",void 0),Jm([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Jm([de("animationFrameService")],t.prototype,"animationFrameService",void 0),Jm([de("rowRenderer")],t.prototype,"rowRenderer",void 0),Jm([Z],t.prototype,"postConstruct",null),t}(ze),on=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ln=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},rn='
\n \n \n \n \n \n \n \n
'),mn=function(e){function t(){return e.call(this,rn)||this}return on(t,e),t.prototype.init=function(){var e=this,t=function(e,t){var d="".concat(e,"px");t.style.minHeight=d,t.style.height=d},d={setRowAnimationCssOnBodyViewport:function(t,d){return e.setRowAnimationCssOnBodyViewport(t,d)},setColumnCount:function(t){return ld(e.getGui(),t)},setRowCount:function(t){return od(e.getGui(),t)},setTopHeight:function(d){return t(d,e.eTop)},setBottomHeight:function(d){return t(d,e.eBottom)},setTopDisplay:function(t){return e.eTop.style.display=t},setBottomDisplay:function(t){return e.eBottom.style.display=t},setStickyTopHeight:function(t){return e.eStickyTop.style.height=t},setStickyTopTop:function(t){return e.eStickyTop.style.top=t},setStickyTopWidth:function(t){return e.eStickyTop.style.width=t},setColumnMovingCss:function(t,d){return e.addOrRemoveCssClass(t,d)},updateLayoutClasses:function(t,d){[e.eBodyViewport.classList,e.eBody.classList].forEach((function(e){e.toggle(pr.AUTO_HEIGHT,d.autoHeight),e.toggle(pr.NORMAL,d.normal),e.toggle(pr.PRINT,d.print)})),e.addOrRemoveCssClass(pr.AUTO_HEIGHT,d.autoHeight),e.addOrRemoveCssClass(pr.NORMAL,d.normal),e.addOrRemoveCssClass(pr.PRINT,d.print)},setAlwaysVerticalScrollClass:function(t,d){return e.eBodyViewport.classList.toggle(Ur,d)},registerBodyViewportResizeListener:function(t){var d=e.resizeObserverService.observeResize(e.eBodyViewport,t);e.addDestroyFunc((function(){return d()}))},setPinnedTopBottomOverflowY:function(t){return e.eTop.style.overflowY=e.eBottom.style.overflowY=t},setCellSelectableCss:function(t,d){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return e.classList.toggle(t,d)}))},setBodyViewportWidth:function(t){return e.eBodyViewport.style.width=t}};this.ctrl=this.createManagedBean(new Kr),this.ctrl.setComp(d,this.getGui(),this.eBodyViewport,this.eTop,this.eBottom,this.eStickyTop),(this.rangeService&&this.gridOptionsService.get("enableRangeSelection")||"multiple"===this.gridOptionsService.get("rowSelection"))&&sd(this.getGui(),!0)},t.prototype.setRowAnimationCssOnBodyViewport=function(e,t){var d=this.eBodyViewport.classList;d.toggle(Er.ANIMATION_ON,t),d.toggle(Er.ANIMATION_OFF,!t)},t.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},ln([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),ln([ae("rangeService")],t.prototype,"rangeService",void 0),ln([gs("eBodyViewport")],t.prototype,"eBodyViewport",void 0),ln([gs("eStickyTop")],t.prototype,"eStickyTop",void 0),ln([gs("eTop")],t.prototype,"eTop",void 0),ln([gs("eBottom")],t.prototype,"eBottom",void 0),ln([gs("gridHeader")],t.prototype,"headerRootComp",void 0),ln([gs("eBody")],t.prototype,"eBody",void 0),ln([Z],t.prototype,"init",null),t}(hs),nn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),un=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},pn=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nn(t,e),t.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onDisplayedColumnsWidthChanged.bind(this))},t.prototype.onDisplayedColumnsChanged=function(){this.update()},t.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},t.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},t.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var t={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(t)}},t.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var t={type:Je.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(t)}},t.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},t.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},un([de("ctrlsService")],t.prototype,"ctrlsService",void 0),un([Z],t.prototype,"postConstruct",null),t=un([te("scrollVisibleService")],t)}(ze),fn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),cn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},_n=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.gridInstanceId=d.gridInstanceSequence.next(),t}var d;return fn(t,e),d=t,t.prototype.stampTopLevelGridCompWithGridInstance=function(e){e[d.GRID_DOM_KEY]=this.gridInstanceId},t.prototype.getRenderedCellForEvent=function(e){return xe(this.gridOptionsService,e.target,bm.DOM_DATA_KEY_CELL_CTRL)},t.prototype.isEventFromThisGrid=function(e){return this.isElementInThisGrid(e.target)},t.prototype.isElementInThisGrid=function(e){for(var t=e;t;){var a=t[d.GRID_DOM_KEY];if(s(a))return a===this.gridInstanceId;t=t.parentElement}return!1},t.prototype.getCellPositionForEvent=function(e){var t=this.getRenderedCellForEvent(e);return t?t.getCellPosition():null},t.prototype.getNormalisedPosition=function(e){var t,d,a=this.gridOptionsService.isDomLayout("normal"),s=e;if(null!=s.clientX||null!=s.clientY?(t=s.clientX,d=s.clientY):(t=s.x,d=s.y),a){var o=this.ctrlsService.getGridBodyCtrl(),i=o.getScrollFeature().getVScrollPosition();t+=o.getScrollFeature().getHScrollPosition().left,d+=i.top}return{x:t,y:d}},t.gridInstanceSequence=new rs,t.GRID_DOM_KEY="__ag_grid_instance",cn([de("ctrlsService")],t.prototype,"ctrlsService",void 0),t=d=cn([te("mouseEventService")],t)}(ze),yn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Cn=function(){return Cn=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},qn=function(e){function t(){var t=e.call(this)||this;return t.onPageDown=N(t.onPageDown,100),t.onPageUp=N(t.onPageUp,100),t}return yn(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.handlePageScrollingKey=function(e,t){void 0===t&&(t=!1);var d=e.key,a=e.altKey,s=e.ctrlKey||e.metaKey,o=!!this.rangeService&&e.shiftKey,i=this.mouseEventService.getCellPositionForEvent(e),l=!1;switch(d){case Ka.PAGE_HOME:case Ka.PAGE_END:s||a||(this.onHomeOrEndKey(d),l=!0);break;case Ka.LEFT:case Ka.RIGHT:case Ka.UP:case Ka.DOWN:if(!i)return!1;!s||a||o||(this.onCtrlUpDownLeftRight(d,i),l=!0);break;case Ka.PAGE_DOWN:case Ka.PAGE_UP:s||a||(l=this.handlePageUpDown(d,i,t))}return l&&e.preventDefault(),l},t.prototype.handlePageUpDown=function(e,t,d){return d&&(t=this.focusService.getFocusedCell()),!!t&&(e===Ka.PAGE_UP?this.onPageUp(t):this.onPageDown(t),!0)},t.prototype.navigateTo=function(e){var t=e.scrollIndex,d=e.scrollType,a=e.scrollColumn,o=e.focusIndex,i=e.focusColumn;if(s(a)&&!a.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(a),s(t)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(t,d),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(o),this.focusService.setFocusedCell({rowIndex:o,column:i,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var l={rowIndex:o,rowPinned:null,column:i};this.rangeService.setRangeToCell(l)}},t.prototype.onPageDown=function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.getViewportHeight(),a=this.paginationProxy.getPixelOffset(),s=t.top+d,o=this.paginationProxy.getRowIndexAtPixel(s+a);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,o):this.navigateToNextPage(e,o)},t.prototype.onPageUp=function(e){var t=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.paginationProxy.getPixelOffset(),a=t.top,s=this.paginationProxy.getRowIndexAtPixel(a+d);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s,!0):this.navigateToNextPage(e,s,!0)},t.prototype.navigateToNextPage=function(e,t,d){void 0===d&&(d=!1);var a,s=this.getViewportHeight(),o=this.paginationProxy.getPageFirstRow(),i=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),r=this.paginationProxy.getRow(e.rowIndex),m=d?(null===r||void 0===r?void 0:r.rowHeight)-s-l:s-l,n=(null===r||void 0===r?void 0:r.rowTop)+m,u=this.paginationProxy.getRowIndexAtPixel(n+l);if(u===e.rowIndex){var p=d?-1:1;t=u=e.rowIndex+p}d?(a="bottom",ui&&(u=i),t>i&&(t=i)),this.isRowTallerThanView(u)&&(t=u,a="top"),this.navigateTo({scrollIndex:t,scrollType:a,scrollColumn:null,focusIndex:u,focusColumn:e.column})},t.prototype.navigateToNextPageWithAutoHeight=function(e,t,d){var a=this;void 0===d&&(d=!1),this.navigateTo({scrollIndex:t,scrollType:d?"bottom":"top",scrollColumn:null,focusIndex:t,focusColumn:e.column}),setTimeout((function(){var s=a.getNextFocusIndexForAutoHeight(e,d);a.navigateTo({scrollIndex:t,scrollType:d?"bottom":"top",scrollColumn:null,focusIndex:s,focusColumn:e.column,isAsync:!0})}),50)},t.prototype.getNextFocusIndexForAutoHeight=function(e,t){var d;void 0===t&&(t=!1);for(var a=t?-1:1,s=this.getViewportHeight(),o=this.paginationProxy.getPageLastRow(),i=0,l=e.rowIndex;l>=0&&l<=o;){var r=this.paginationProxy.getRow(l);if(r){var m=null!==(d=r.rowHeight)&&void 0!==d?d:0;if(i+m>s)break;i+=m}l+=a}return Math.max(0,Math.min(l,o))},t.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),t=this.gridOptionsService.getScrollbarWidth(),d=e.bottom-e.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(d-=t),d},t.prototype.isRowTallerThanView=function(e){var t=this.paginationProxy.getRow(e);if(!t)return!1;var d=t.rowHeight;return"number"===typeof d&&d>this.getViewportHeight()},t.prototype.onCtrlUpDownLeftRight=function(e,t){var d=this.cellNavigationService.getNextCellToFocus(e,t,!0),a=d.rowIndex,s=d.column;this.navigateTo({scrollIndex:a,scrollType:null,scrollColumn:s,focusIndex:a,focusColumn:s})},t.prototype.onHomeOrEndKey=function(e){var t=e===Ka.PAGE_HOME,d=this.columnModel.getAllDisplayedColumns(),a=t?d[0]:qe(d),s=t?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:s,scrollType:null,scrollColumn:a,focusIndex:s,focusColumn:a})},t.prototype.onTabKeyDown=function(e,t){var d=t.shiftKey;if(this.tabToNextCellCommon(e,d,t))t.preventDefault();else if(d){var a=e.getRowPosition(),s=a.rowIndex;(a.rowPinned?0===s:s===this.paginationProxy.getPageFirstRow())&&(0===this.gridOptionsService.get("headerHeight")?this.focusService.focusNextGridCoreContainer(!0,!0):(t.preventDefault(),this.focusService.focusPreviousFromFirstCell(t)))}else e instanceof bm&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(d)&&t.preventDefault()},t.prototype.tabToNextCell=function(e,t){var d=this.focusService.getFocusedCell();if(!d)return!1;var a=this.getCellByPosition(d);return!!(a||(a=this.rowRenderer.getRowByPosition(d))&&a.isFullWidth())&&this.tabToNextCellCommon(a,e,t)},t.prototype.tabToNextCellCommon=function(e,t,d){var a=e.isEditing();if(!a&&e instanceof bm){var s=e.getRowCtrl();s&&(a=s.isEditing())}return(a?"fullRow"===this.gridOptionsService.get("editType")?this.moveToNextEditingRow(e,t,d):this.moveToNextEditingCell(e,t,d):this.moveToNextCellNotEditing(e,t))||!!this.focusService.getFocusedHeader()},t.prototype.moveToNextEditingCell=function(e,t,d){void 0===d&&(d=null);var a=e.getCellPosition();e.getGui().focus(),e.stopEditing();var s=this.findNextCellToFocusOn(a,t,!0);return null!=s&&(s.startEditing(null,!0,d),s.focusCell(!1),!0)},t.prototype.moveToNextEditingRow=function(e,t,d){void 0===d&&(d=null);var a=e.getCellPosition(),s=this.findNextCellToFocusOn(a,t,!0);if(null==s)return!1;var o=s.getCellPosition(),i=this.isCellEditable(a),l=this.isCellEditable(o),r=o&&a.rowIndex===o.rowIndex&&a.rowPinned===o.rowPinned;(i&&e.setFocusOutOnEditor(),r)||(e.getRowCtrl().stopEditing(),s.getRowCtrl().startRowEditing(void 0,void 0,d));return l?(s.setFocusInOnEditor(),s.focusCell()):s.focusCell(!0),!0},t.prototype.moveToNextCellNotEditing=function(e,t){var d,a=this.columnModel.getAllDisplayedColumns();d=e instanceof vm?Cn(Cn({},e.getRowPosition()),{column:t?a[0]:qe(a)}):e.getCellPosition();var o=this.findNextCellToFocusOn(d,t,!1);if(o instanceof bm)o.focusCell(!0);else if(o)return this.tryToFocusFullWidthRow(o.getRowPosition(),t);return s(o)},t.prototype.findNextCellToFocusOn=function(e,t,d){for(var a=e;;){e!==a&&(e=a),t||(a=this.getLastCellOfColSpan(a)),a=this.cellNavigationService.getNextTabbedCell(a,t);var o=this.gridOptionsService.getCallback("tabToNextCell");if(s(o)){var i=o({backwards:t,editing:d,previousCellPosition:e,nextCellPosition:a||null});s(i)?(i.floating&&(M("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),i.rowPinned=i.floating),a={rowIndex:i.rowIndex,column:i.column,rowPinned:i.rowPinned}):a=null}if(!a)return null;if(a.rowIndex<0){var l=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+a.rowIndex,column:a.column},fromCell:!0}),null}var r="fullRow"===this.gridOptionsService.get("editType");if(d&&!r)if(!this.isCellEditable(a))continue;this.ensureCellVisible(a);var m=this.getCellByPosition(a);if(!m){var n=this.rowRenderer.getRowByPosition(a);if(!n||!n.isFullWidth()||d)continue;return n}if(!m.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(a),m}},t.prototype.isCellEditable=function(e){var t=this.lookupRowNodeForCell(e);return!!t&&e.column.isCellEditable(t)},t.prototype.getCellByPosition=function(e){var t=this.rowRenderer.getRowByPosition(e);return t?t.getCellCtrl(e.column):null},t.prototype.lookupRowNodeForCell=function(e){return"top"===e.rowPinned?this.pinnedRowModel.getPinnedTopRow(e.rowIndex):"bottom"===e.rowPinned?this.pinnedRowModel.getPinnedBottomRow(e.rowIndex):this.paginationProxy.getRow(e.rowIndex)},t.prototype.navigateToNextCell=function(e,t,d,a){for(var i=d,l=!1;i&&(i===d||!this.isValidNavigateCell(i));)this.gridOptionsService.get("enableRtl")?t===Ka.LEFT&&(i=this.getLastCellOfColSpan(i)):t===Ka.RIGHT&&(i=this.getLastCellOfColSpan(i)),l=o(i=this.cellNavigationService.getNextCellToFocus(t,i));if(l&&e&&e.key===Ka.UP&&(i={rowIndex:-1,rowPinned:null,column:d.column}),a){var r=this.gridOptionsService.getCallback("navigateToNextCell");if(s(r)){var m=r({key:t,previousCellPosition:d,nextCellPosition:i||null,event:e});s(m)?(m.floating&&(M("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),m.rowPinned=m.floating),i={rowPinned:m.rowPinned,rowIndex:m.rowIndex,column:m.column}):i=null}}if(i)if(i.rowIndex<0){var n=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:n+i.rowIndex,column:d.column},event:e||void 0,fromCell:!0})}else{var u=this.getNormalisedPosition(i);u?this.focusPosition(u):this.tryToFocusFullWidthRow(i)}},t.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var t=this.getCellByPosition(e);return t?(e=t.getCellPosition(),this.ensureCellVisible(e),e):null},t.prototype.tryToFocusFullWidthRow=function(e,t){void 0===t&&(t=!1);var d=this.columnModel.getAllDisplayedColumns(),a=this.rowRenderer.getRowByPosition(e);if(!a||!a.isFullWidth())return!1;var s=this.focusService.getFocusedCell(),o={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(t?qe(d):d[0])};this.focusPosition(o);var i=null!=s&&this.rowPositionUtils.before(o,s),l={type:Je.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:o.rowIndex,rowPinned:o.rowPinned,column:o.column,isFullWidthCell:!0,floating:o.rowPinned,fromBelow:i};return this.eventService.dispatchEvent(l),!0},t.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},t.prototype.isValidNavigateCell=function(e){return!!this.rowPositionUtils.getRowNode(e)},t.prototype.getLastCellOfColSpan=function(e){var t=this.getCellByPosition(e);if(!t)return e;var d=t.getColSpanningList();return 1===d.length?e:{rowIndex:e.rowIndex,column:qe(d),rowPinned:e.rowPinned}},t.prototype.ensureCellVisible=function(e){var t=this.gridOptionsService.isGroupRowsSticky(),d=this.rowModel.getRow(e.rowIndex);!(t&&(null===d||void 0===d?void 0:d.sticky))&&o(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},bn([de("mouseEventService")],t.prototype,"mouseEventService",void 0),bn([de("paginationProxy")],t.prototype,"paginationProxy",void 0),bn([de("focusService")],t.prototype,"focusService",void 0),bn([ae("rangeService")],t.prototype,"rangeService",void 0),bn([de("columnModel")],t.prototype,"columnModel",void 0),bn([de("rowModel")],t.prototype,"rowModel",void 0),bn([de("ctrlsService")],t.prototype,"ctrlsService",void 0),bn([de("rowRenderer")],t.prototype,"rowRenderer",void 0),bn([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),bn([de("rowPositionUtils")],t.prototype,"rowPositionUtils",void 0),bn([de("cellNavigationService")],t.prototype,"cellNavigationService",void 0),bn([de("pinnedRowModel")],t.prototype,"pinnedRowModel",void 0),bn([Z],t.prototype,"postConstruct",null),t=bn([te("navigationService")],t)}(ze),Pn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),hn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Tn=function(e){function t(t){var d=e.call(this,'
')||this;return d.params=t,d}return Pn(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),t.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},t.prototype.addKeyDownListener=function(){var e=this,t=this.getGui(),d=this.params;this.addManagedListener(t,"keydown",(function(t){Qa(e.gridOptionsService,t,d.node,d.column,!0)||d.onKeyDown(t)}))},t.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",hn([Z],t.prototype,"postConstruct",null),t}(fi),gn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Sn=function(e){function t(t,d,a,s,o){var i=e.call(this)||this;i.rendererVersion=0,i.editorVersion=0,i.beans=t,i.column=d.getColumn(),i.rowNode=d.getRowNode(),i.rowCtrl=d.getRowCtrl(),i.eRow=s,i.cellCtrl=d,i.setTemplate('
'));var l=i.getGui();i.forceWrapper=d.isForceWrapper(),i.refreshWrapper(!1);var r=function(e,t){null!=t&&""!=t?l.setAttribute(e,t):l.removeAttribute(e)};Nt(l,d.getCellAriaRole()),r("col-id",d.getColumnIdSanitised());var m=d.getTabIndex();void 0!==m&&r("tabindex",m.toString());var n={addOrRemoveCssClass:function(e,t){return i.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Sa(l,e)},getFocusableElement:function(){return i.getFocusableElement()},setIncludeSelection:function(e){return i.includeSelection=e},setIncludeRowDrag:function(e){return i.includeRowDrag=e},setIncludeDndSource:function(e){return i.includeDndSource=e},setRenderDetails:function(e,t,d){return i.setRenderDetails(e,t,d)},setEditDetails:function(e,t,d){return i.setEditDetails(e,t,d)},getCellEditor:function(){return i.cellEditor||null},getCellRenderer:function(){return i.cellRenderer||null},getParentOfValue:function(){return i.getParentOfValue()}};return d.setComp(n,i.getGui(),i.eCellWrapper,a,o),i}return gn(t,e),t.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},t.prototype.setRenderDetails=function(e,t,d){if(!(this.cellEditor&&!this.cellEditorPopupWrapper)){this.firstRender=null==this.firstRender;var a=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e)!(d||a)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e));else this.destroyRenderer(),this.insertValueWithoutCellRenderer(t)}},t.prototype.setEditDetails=function(e,t,d){e?this.createCellEditorInstance(e,t,d):this.destroyEditor()},t.prototype.removeControls=function(){this.checkboxSelectionComp=this.beans.context.destroyBean(this.checkboxSelectionComp),this.dndSourceComp=this.beans.context.destroyBean(this.dndSourceComp),this.rowDraggingComp=this.beans.context.destroyBean(this.rowDraggingComp)},t.prototype.refreshWrapper=function(e){var t=this.includeRowDrag||this.includeDndSource||this.includeSelection,d=t||this.forceWrapper,a=d&&null==this.eCellWrapper;a&&(this.eCellWrapper=ba(''),this.getGui().appendChild(this.eCellWrapper));var s=!d&&null!=this.eCellWrapper;s&&(ya(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!d);var o=!e&&d,i=o&&null==this.eCellValue;i&&(this.eCellValue=ba(''),this.eCellWrapper.appendChild(this.eCellValue));var l=!o&&null!=this.eCellValue;l&&(ya(this.eCellValue),this.eCellValue=void 0);var r=a||s||i||l;return r&&this.removeControls(),e||t&&this.addControls(),r},t.prototype.addControls=function(){this.includeRowDrag&&null==this.rowDraggingComp&&(this.rowDraggingComp=this.cellCtrl.createRowDragComp(),this.rowDraggingComp&&this.eCellWrapper.insertBefore(this.rowDraggingComp.getGui(),this.eCellValue)),this.includeDndSource&&null==this.dndSourceComp&&(this.dndSourceComp=this.cellCtrl.createDndSource(),this.eCellWrapper.insertBefore(this.dndSourceComp.getGui(),this.eCellValue)),this.includeSelection&&null==this.checkboxSelectionComp&&(this.checkboxSelectionComp=this.cellCtrl.createSelectionCheckbox(),this.eCellWrapper.insertBefore(this.checkboxSelectionComp.getGui(),this.eCellValue))},t.prototype.createCellEditorInstance=function(e,t,d){var a=this,s=this.editorVersion,i=e.newAgStackInstance();if(i){var l=e.params;i.then((function(e){return a.afterCellEditorCreated(s,e,l,t,d)})),o(this.cellEditor)&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},t.prototype.insertValueWithoutCellRenderer=function(e){var t=this.getParentOfValue();_a(t);var d=null!=e?it(e):null;null!=d&&(t.innerHTML=d)},t.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},t.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),ya(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},t.prototype.destroyEditor=function(){var e=this.beans.context;this.hideEditorPopup&&this.hideEditorPopup(),this.hideEditorPopup=void 0,this.cellEditor=e.destroyBean(this.cellEditor),this.cellEditorPopupWrapper=e.destroyBean(this.cellEditorPopupWrapper),ya(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},t.prototype.refreshCellRenderer=function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var t=this.cellRenderer.refresh(e.params);return!0===t||void 0===t},t.prototype.createCellRendererInstance=function(e){var t=this,d=!this.beans.gridOptionsService.get("suppressAnimationFrame"),a=this.rendererVersion,s=e.componentClass,o=function(){if(!(t.rendererVersion!==a||!t.isAlive())){var d=e.newAgStackInstance(),o=t.afterCellRendererCreated.bind(t,a,s);d&&d.then(o)}};d&&this.firstRender?this.beans.animationFrameService.createTask(o,this.rowNode.rowIndex,"createTasksP2"):o()},t.prototype.getCtrl=function(){return this.cellCtrl},t.prototype.getRowCtrl=function(){return this.rowCtrl},t.prototype.getCellRenderer=function(){return this.cellRenderer},t.prototype.getCellEditor=function(){return this.cellEditor},t.prototype.afterCellRendererCreated=function(e,t,d){if(!this.isAlive()||e!==this.rendererVersion)this.beans.context.destroyBean(d);else if(this.cellRenderer=d,this.cellRendererClass=t,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){var a=this.getParentOfValue();_a(a),a.appendChild(this.cellRendererGui)}},t.prototype.afterCellEditorCreated=function(e,t,d,a,s){if(e!==this.editorVersion)this.beans.context.destroyBean(t);else{if(t.isCancelBeforeStart&&t.isCancelBeforeStart())return this.beans.context.destroyBean(t),void this.cellCtrl.stopEditing(!0);if(!t.getGui)return console.warn("AG Grid: cellEditor for column ".concat(this.column.getId()," is missing getGui() method")),void this.beans.context.destroyBean(t);this.cellEditor=t,this.cellEditorGui=t.getGui();var o=a||void 0!==t.isPopup&&t.isPopup();o?this.addPopupCellEditor(d,s):this.addInCellEditor(),this.refreshEditStyles(!0,o),t.afterGuiAttached&&t.afterGuiAttached()}},t.prototype.refreshEditStyles=function(e,t){var d;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!t),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!t),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!t),null===(d=this.rowCtrl)||void 0===d||d.setInlineEditingCss(e)},t.prototype.addInCellEditor=function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();(e.contains(t.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui)&&this.getParentOfValue().appendChild(this.cellEditorGui)},t.prototype.addPopupCellEditor=function(e,t){var d=this;"fullRow"===this.beans.gridOptionsService.get("editType")&&console.warn("AG Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var a=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Tn(e));var s=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&s.appendChild(this.cellEditorGui);var o=this.beans.popupService,i=this.beans.gridOptionsService.get("stopEditingWhenCellsLoseFocus"),l=null!=t?t:a.getPopupPosition?a.getPopupPosition():"over",r=this.beans.gridOptionsService.get("enableRtl"),m={ePopup:s,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:l,alignSide:r?"right":"left",keepWithinBounds:!0},n=o.positionPopupByComponent.bind(o,m),u=this.beans.localeService.getLocaleTextFunc(),p=o.addPopup({modal:i,eChild:s,closeOnEsc:!0,closedCallback:function(){d.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:n,ariaLabel:u("ariaLabelCellEditor","Cell Editor")});p&&(this.hideEditorPopup=p.hideFunc)},t.prototype.detach=function(){this.eRow.removeChild(this.getGui())},t.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),e.prototype.destroy.call(this)},t.prototype.clearParentOfValue=function(){var e=this.getGui(),t=this.beans.gridOptionsService.getDocument();e.contains(t.activeElement)&&Gd()&&e.focus({preventScroll:!0}),_a(this.getParentOfValue())},t}(hs),On=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),vn=function(e){function t(t,d,a){var s=e.call(this)||this;s.cellComps={},s.beans=d,s.rowCtrl=t,s.setTemplate('
'));var o=s.getGui(),i=o.style;s.domOrder=s.rowCtrl.getDomOrder(),Nt(o,"row");var l=s.rowCtrl.getTabIndex();null!=l&&o.setAttribute("tabindex",l.toString());var r={setDomOrder:function(e){return s.domOrder=e},setCellCtrls:function(e){return s.setCellCtrls(e)},showFullWidth:function(e){return s.showFullWidth(e)},getFullWidthCellRenderer:function(){return s.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,t){return s.addOrRemoveCssClass(e,t)},setUserStyles:function(e){return Sa(o,e)},setTop:function(e){return i.top=e},setTransform:function(e){return i.transform=e},setRowIndex:function(e){return o.setAttribute("row-index",e)},setRowId:function(e){return o.setAttribute("row-id",e)},setRowBusinessKey:function(e){return o.setAttribute("row-business-key",e)}};return t.setComp(r,s.getGui(),a),s.addDestroyFunc((function(){t.unsetComp(a)})),s}return On(t,e),t.prototype.getInitialStyle=function(e){var t=this.rowCtrl.getInitialTransform(e),d=this.rowCtrl.getInitialRowTop(e);return t?"transform: ".concat(t):"top: ".concat(d)},t.prototype.showFullWidth=function(e){var t=this,d=e.newAgStackInstance();d&&d.then((function(e){if(t.isAlive()){var d=e.getGui();t.getGui().appendChild(d),t.rowCtrl.setupDetailRowAutoHeight(d),t.setFullWidthRowComp(e)}else t.beans.context.destroyBean(e)}))},t.prototype.setCellCtrls=function(e){var t=this,d=Object.assign({},this.cellComps);e.forEach((function(e){var a=e.getInstanceId();null==t.cellComps[a]?t.newCellComp(e):d[a]=null}));var a=g(d).filter((function(e){return null!=e}));this.destroyCells(a),this.ensureDomOrder(e)},t.prototype.ensureDomOrder=function(e){var t=this;if(this.domOrder){var d=[];e.forEach((function(e){var a=t.cellComps[e.getInstanceId()];a&&d.push(a.getGui())})),Ta(this.getGui(),d)}},t.prototype.newCellComp=function(e){var t=new Sn(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=t,this.getGui().appendChild(t.getGui())},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyAllCells()},t.prototype.destroyAllCells=function(){var e=g(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)},t.prototype.setFullWidthRowComp=function(e){var t=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){t.fullWidthCellRenderer=t.beans.context.destroyBean(t.fullWidthCellRenderer)}))},t.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},t.prototype.destroyCells=function(e){var t=this;e.forEach((function(e){if(e){var d=e.getCtrl().getInstanceId();t.cellComps[d]===e&&(e.detach(),e.destroy(),t.cellComps[d]=null)}}))},t}(hs),In=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Dn=function(){return Dn=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};var Gn,Mn=function(e){function t(){var t=e.call(this,function(){var e=hs.elementGettingCreated.getAttribute("name"),t=sn.getRowContainerCssClasses(e);return e===gm.CENTER||e===gm.TOP_CENTER||e===gm.STICKY_TOP_CENTER||e===gm.BOTTOM_CENTER?''):'
')}())||this;return t.rowComps={},t.name=hs.elementGettingCreated.getAttribute("name"),t.type=tn(t.name),t}return In(t,e),t.prototype.postConstruct=function(){var e=this,t={setViewportHeight:function(t){return e.eViewport.style.height=t},setRowCtrls:function(t){return e.setRowCtrls(t)},setDomOrder:function(t){e.domOrder=t},setContainerWidth:function(t){return e.eContainer.style.width=t}};this.createManagedBean(new sn(this.name)).setComp(t,this.eContainer,this.eViewport)},t.prototype.preDestroy=function(){this.setRowCtrls([])},t.prototype.setRowCtrls=function(e){var t=this,d=Dn({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;e.forEach((function(e){var a=e.getInstanceId(),s=d[a];if(s)t.rowComps[a]=s,delete d[a],t.ensureDomOrder(s.getGui());else{if(!e.getRowNode().displayed)return;var o=new vn(e,t.beans,t.type);t.rowComps[a]=o,t.appendRow(o.getGui())}})),g(d).forEach((function(e){t.eContainer.removeChild(e.getGui()),e.destroy()})),Nt(this.eContainer,e.length?"rowgroup":"presentation")},t.prototype.appendRow=function(e){this.domOrder?ga(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},t.prototype.ensureDomOrder=function(e){this.domOrder&&(ha(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},Bn([de("beans")],t.prototype,"beans",void 0),Bn([gs("eViewport")],t.prototype,"eViewport",void 0),Bn([gs("eContainer")],t.prototype,"eContainer",void 0),Bn([Z],t.prototype,"postConstruct",null),Bn([ee],t.prototype,"preDestroy",null),t}(hs),wn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Ln=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var t=this;if(this.clearColumnsList(),!this.gridOptionsService.get("functionsReadOnly")){var d=e.dragItem.columns;d&&d.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?t.columnsToAggregate.push(e):e.isAllowRowGroup()?t.columnsToGroup.push(e):e.isAllowPivot()&&t.columnsToPivot.push(e)))}))}},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?Hi.ICON_PINNED:Hi.ICON_MOVE:null},e.prototype.onDragLeave=function(e){this.clearColumnsList()},e.prototype.clearColumnsList=function(){this.columnsToAggregate.length=0,this.columnsToGroup.length=0,this.columnsToPivot.length=0},e.prototype.onDragging=function(e){},e.prototype.onDragStop=function(e){this.columnsToAggregate.length>0&&this.columnModel.addValueColumns(this.columnsToAggregate,"toolPanelDragAndDrop"),this.columnsToGroup.length>0&&this.columnModel.addRowGroupColumns(this.columnsToGroup,"toolPanelDragAndDrop"),this.columnsToPivot.length>0&&this.columnModel.addPivotColumns(this.columnsToPivot,"toolPanelDragAndDrop")},wn([de("columnModel")],e.prototype,"columnModel",void 0),wn([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e}(),En=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Vn=function(){function e(){}return e.attemptMoveColumns=function(e){var t=e.isFromHeader,d=e.hDirection,a=e.xPosition,s=e.fromEnter,o=e.fakeEvent,i=e.pinned,l=e.gridOptionsService,r=e.columnModel,m=d===No.Left,n=d===No.Right,u=e.allMovingColumns;if(t){var p=[];u.forEach((function(e){for(var t,d=null,a=e.getParent();null!=a&&1===a.getDisplayedLeafColumns().length;)d=a,a=a.getParent();null!=d?(!!(null===(t=d.getColGroupDef())||void 0===t?void 0:t.marryChildren)?d.getProvidedColumnGroup().getLeafColumns():d.getLeafColumns()).forEach((function(e){p.includes(e)||p.push(e)})):p.includes(e)||p.push(e)})),u=p}var f=u.slice();r.sortColumnsLikeGridColumns(f);var c=this.calculateValidMoves({movingCols:f,draggingRight:n,xPosition:a,pinned:i,gridOptionsService:l,columnModel:r}),_=this.calculateOldIndex(f,r);if(0!==c.length){var y=c[0],C=null!==_&&!s;if(t&&(C=null!==_),C&&!o){if(m&&y>=_)return;if(n&&y<=_)return}for(var b=r.getAllDisplayedColumns(),q=[],P=null,h=0;hi.length?[o,i]:[i,o],2))[0],i=s[1],o.forEach((function(e){-1===i.indexOf(e)&&d++}))},s=0;s0){for(var C=0;C0){var b=p[c-1];r=f.indexOf(b)+1}else-1===(r=f.indexOf(p[0]))&&(r=0);var q=[r],P=function(e,t){return e-t};if(d){for(var h=r+1,T=n.length-1;h<=T;)q.push(h),h++;q.sort(P)}else{h=r,T=n.length-1;for(var g=n[h];h<=T&&m.indexOf(g)<0;)h++,q.push(h),g=n[h];h=r-1;for(;h>=0;)q.push(h),h--;q.sort(P).reverse()}return q},e.normaliseX=function(e,t,d,a,s){var o=s.getHeaderRowContainerCtrl(t).getViewport();(d&&(e-=o.getBoundingClientRect().left),a.get("enableRtl"))&&(e=o.clientWidth-e);return null==t&&(e+=s.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e},e}(),Rn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},An=function(){function e(e,t){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.eContainer=t,this.centerContainer=!s(e)}return e.prototype.init=function(){var e=this;this.ctrlsService.whenReady((function(){e.gridBodyCon=e.ctrlsService.getGridBodyCtrl()}))},e.prototype.getIconName=function(){return this.pinned?Hi.ICON_PINNED:Hi.ICON_MOVE},e.prototype.onDragEnter=function(e){var t=e.dragItem.columns;if(e.dragSource.type===xi.ToolPanel)this.setColumnsVisible(t,!0,"uiColumnDragged");else{var d=e.dragItem.visibleState,a=(t||[]).filter((function(e){return d[e.getId()]}));this.setColumnsVisible(a,!0,"uiColumnDragged")}this.setColumnsPinned(t,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)},e.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},e.prototype.setColumnsVisible=function(e,t,d){if(void 0===d&&(d="api"),e){var a=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.setColumnsVisible(a,t,d)}},e.prototype.setColumnsPinned=function(e,t,d){if(void 0===d&&(d="api"),e){var a=e.filter((function(e){return!e.getColDef().lockPinned}));this.columnModel.setColumnsPinned(a,t,d)}},e.prototype.onDragStop=function(){this.onDragging(this.lastDraggingEvent,!1,!0,!0),this.ensureIntervalCleared(),this.lastMovedInfo=null},e.prototype.checkCenterForScrolling=function(e){if(this.centerContainer){var t=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),d=t+this.ctrlsService.getCenterRowContainerCtrl().getCenterWidth();this.gridOptionsService.get("enableRtl")?(this.needToMoveRight=ed-50):(this.needToMoveLeft=ed-50),this.needToMoveLeft||this.needToMoveRight?this.ensureIntervalStarted():this.ensureIntervalCleared()}},e.prototype.onDragging=function(e,t,d,a){var s,i=this;if(void 0===e&&(e=this.lastDraggingEvent),void 0===t&&(t=!1),void 0===d&&(d=!1),void 0===a&&(a=!1),a){if(this.lastMovedInfo){var l=this.lastMovedInfo,r=l.columns,m=l.toIndex;Vn.moveColumns(r,m,"uiColumnMoved",!0,this.columnModel)}}else if(this.lastDraggingEvent=e,!o(e.hDirection)){var n=Vn.normaliseX(e.x,this.pinned,!1,this.gridOptionsService,this.ctrlsService);t||this.checkCenterForScrolling(n);var u=this.normaliseDirection(e.hDirection),p=e.dragSource.type,f=(null===(s=e.dragSource.getDragItem().columns)||void 0===s?void 0:s.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==i.pinned})))||[],c=Vn.attemptMoveColumns({allMovingColumns:f,isFromHeader:p===xi.HeaderCell,hDirection:u,xPosition:n,pinned:this.pinned,fromEnter:t,fakeEvent:d,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel});c&&(this.lastMovedInfo=c)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsService.get("enableRtl"))return e;switch(e){case No.Left:return No.Right;case No.Right:return No.Left;default:console.error("AG Grid: Unknown direction ".concat(e))}},e.prototype.ensureIntervalStarted=function(){this.movingIntervalId||(this.intervalCount=0,this.failedMoveAttempts=0,this.movingIntervalId=window.setInterval(this.moveInterval.bind(this),100),this.needToMoveLeft?this.dragAndDropService.setGhostIcon(Hi.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Hi.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Hi.ICON_MOVE))},e.prototype.moveInterval=function(){var e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);var t=null,d=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?t=d.scrollHorizontally(-e):this.needToMoveRight&&(t=d.scrollHorizontally(e)),0!==t)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var a=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.getColDef().lockPinned}));if(a.length>0&&(this.dragAndDropService.setGhostIcon(Hi.ICON_PINNED),this.failedMoveAttempts>7)){var s=this.needToMoveLeft?"left":"right";this.setColumnsPinned(a,s,"uiColumnDragged"),this.dragAndDropService.nudge()}}},Rn([de("columnModel")],e.prototype,"columnModel",void 0),Rn([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),Rn([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),Rn([de("ctrlsService")],e.prototype,"ctrlsService",void 0),Rn([Z],e.prototype,"init",null),e}(),xn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Wn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Fn=function(e){function t(t,d){var a=e.call(this)||this;return a.pinned=t,a.eContainer=d,a}return xn(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){switch(e.pinned){case"left":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.leftRowContainerCtrl.getContainerElement()],[t.bottomLeftRowContainerCtrl.getContainerElement()],[t.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.rightRowContainerCtrl.getContainerElement()],[t.bottomRightRowContainerCtrl.getContainerElement()],[t.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[t.gridBodyCtrl.getBodyViewportElement(),t.centerRowContainerCtrl.getViewportElement()],[t.bottomCenterRowContainerCtrl.getViewportElement()],[t.topCenterRowContainerCtrl.getViewportElement()]]}}))},t.prototype.isInterestedIn=function(e){return e===xi.HeaderCell||e===xi.ToolPanel&&this.gridOptionsService.get("allowDragFromColumnsToolPanel")},t.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},t.prototype.getContainer=function(){return this.eContainer},t.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new An(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new Ln(this.pinned)),this.dragAndDropService.addDropTarget(this)},t.prototype.getIconName=function(){return this.currentDropListener.getIconName()},t.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===xi.ToolPanel},t.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},t.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},t.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},t.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},Wn([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),Wn([de("columnModel")],t.prototype,"columnModel",void 0),Wn([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Wn([Z],t.prototype,"postConstruct",null),Wn([Z],t.prototype,"init",null),t}(ze),Nn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),kn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Hn=function(e){function t(d){var a=e.call(this,t.TEMPLATE,d)||this;return a.headerCompVersion=0,a.column=d.getColumnGroupChild(),a.pinned=d.getPinned(),a}return Nn(t,e),t.prototype.postConstruct=function(){var e,t,d=this,a=this.getGui();e="col-id",null!=(t=this.column.getColId())&&""!=t?a.setAttribute(e,t):a.removeAttribute(e);var s={setWidth:function(e){return a.style.width=e},addOrRemoveCssClass:function(e,t){return d.addOrRemoveCssClass(e,t)},setAriaDescription:function(e){return Yt(a,e)},setAriaSort:function(e){return e?nd(a,e):ud(a)},setUserCompDetails:function(e){return d.setUserCompDetails(e)},getUserCompInstance:function(){return d.headerComp}};this.ctrl.setComp(s,this.getGui(),this.eResize,this.eHeaderCompWrapper);var o=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",o)},t.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},t.prototype.setUserCompDetails=function(e){var t=this;this.headerCompVersion++;var d=this.headerCompVersion;e.newAgStackInstance().then((function(e){return t.afterCompCreated(d,e)}))},t.prototype.afterCompCreated=function(e,t){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=t,this.headerCompGui=t.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(t)},t.TEMPLATE='
\n \n \n
',kn([gs("eResize")],t.prototype,"eResize",void 0),kn([gs("eHeaderCompWrapper")],t.prototype,"eHeaderCompWrapper",void 0),kn([Z],t.prototype,"postConstruct",null),kn([ee],t.prototype,"destroyHeaderComp",null),t}(Tr),jn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),zn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Un=function(e){function t(d){return e.call(this,t.TEMPLATE,d)||this}return jn(t,e),t.prototype.postConstruct=function(){var e=this,t=this.getGui();t.setAttribute("col-id",this.ctrl.getColId());var d={addOrRemoveCssClass:function(t,d){return e.addOrRemoveCssClass(t,d)},setResizableDisplayed:function(t){return da(e.eResize,t)},setWidth:function(e){return t.style.width=e},setAriaExpanded:function(e){return d="aria-expanded",void 0!=(a=e)?t.setAttribute(d,a):t.removeAttribute(d);var d,a},setUserCompDetails:function(t){return e.setUserCompDetails(t)},getUserCompInstance:function(){return e.headerGroupComp}};this.ctrl.setComp(d,t,this.eResize)},t.prototype.setUserCompDetails=function(e){var t=this;e.newAgStackInstance().then((function(e){return t.afterHeaderCompCreated(e)}))},t.prototype.afterHeaderCompCreated=function(e){var t=this,d=function(){return t.destroyBean(e)};if(this.isAlive()){var a=this.getGui(),s=e.getGui();a.appendChild(s),this.addDestroyFunc(d),this.headerGroupComp=e,this.ctrl.setDragSource(a)}else d()},t.TEMPLATE='
\n \n
',zn([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),zn([gs("eResize")],t.prototype,"eResize",void 0),zn([Z],t.prototype,"postConstruct",null),t}(Tr),Kn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Yn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter"}(Gn||(Gn={}));var Qn,$n=function(e){function t(t){var d=e.call(this)||this;return d.headerComps={},d.ctrl=t,d.setTemplate('
')),d}return Kn(t,e),t.prototype.init=function(){var e=this;this.getGui().style.transform=this.ctrl.getTransform(),id(this.getGui(),this.ctrl.getAriaRowIndex());var t={setHeight:function(t){return e.getGui().style.height=t},setTop:function(t){return e.getGui().style.top=t},setHeaderCtrls:function(t,d){return e.setHeaderCtrls(t,d)},setWidth:function(t){return e.getGui().style.width=t}};this.ctrl.setComp(t)},t.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],!1)},t.prototype.setHeaderCtrls=function(e,t){var d=this;if(this.isAlive()){var a=this.headerComps;if(this.headerComps={},e.forEach((function(e){var t=e.getInstanceId(),s=a[t];delete a[t],null==s&&(s=d.createHeaderComp(e),d.getGui().appendChild(s.getGui())),d.headerComps[t]=s})),y(a,(function(e,t){d.getGui().removeChild(t.getGui()),d.destroyBean(t)})),t){var s=g(this.headerComps);s.sort((function(e,t){return e.getCtrl().getColumnGroupChild().getLeft()-t.getCtrl().getColumnGroupChild().getLeft()}));var o=s.map((function(e){return e.getGui()}));Ta(this.getGui(),o)}}},t.prototype.createHeaderComp=function(e){var t;switch(this.ctrl.getType()){case Gn.COLUMN_GROUP:t=new Un(e);break;case Gn.FLOATING_FILTER:t=new Or(e);break;default:t=new Hn(e)}return this.createBean(t),t.setParentComponent(this),t},Yn([Z],t.prototype,"init",null),Yn([ee],t.prototype,"destroyHeaderCtrls",null),t}(hs),Xn=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Jn=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Zn=0,eu=function(e){function t(t,d){var a=e.call(this)||this;return a.resizeToggleTimeout=0,a.resizeMultiplier=1,a.resizeFeature=null,a.lastFocusEvent=null,a.dragSource=null,a.columnGroupChild=t,a.parentRowCtrl=d,a.instanceId=t.getUniqueId()+"-"+Zn++,a}return Xn(t,e),t.prototype.shouldStopEventPropagation=function(e){var t=this.focusService.getFocusedHeader(),d=t.headerRowIndex,a=t.column;return $a(this.gridOptionsService,e,d,a)},t.prototype.getWrapperHasFocus=function(){return this.gridOptionsService.getDocument().activeElement===this.eGui},t.prototype.setGui=function(e){this.eGui=e,this.addDomData(),this.addManagedListener(this.beans.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onDisplayedColumnsChanged()},t.prototype.onDisplayedColumnsChanged=function(){this.comp&&this.column&&(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())},t.prototype.refreshFirstAndLastStyles=function(){var e=this,t=e.comp,d=e.column,a=e.beans;cm.refreshFirstAndLastStyles(t,d,a.columnModel)},t.prototype.refreshAriaColIndex=function(){var e=this.beans,t=this.column,d=e.columnModel.getAriaColumnIndex(t);rd(this.eGui,d)},t.prototype.addResizeAndMoveKeyboardListeners=function(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))},t.prototype.onGuiKeyDown=function(e){var t,d=this.gridOptionsService.getDocument().activeElement,a=e.key===Ka.LEFT||e.key===Ka.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),d===this.eGui&&(e.shiftKey||e.altKey)&&((this.isResizing||a)&&(e.preventDefault(),e.stopImmediatePropagation()),a)){var s=e.key===Ka.LEFT!==this.gridOptionsService.get("enableRtl"),o=No[s?"Left":"Right"];e.altKey?(this.isResizing=!0,this.resizeMultiplier+=1,this.resizeHeader(o,e.shiftKey),null===(t=this.resizeFeature)||void 0===t||t.toggleColumnResizing(!0)):this.moveHeader(o)}},t.prototype.onGuiKeyUp=function(){var e=this;this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=setTimeout((function(){var t;null===(t=e.resizeFeature)||void 0===t||t.toggleColumnResizing(!1)}),150))},t.prototype.handleKeyDown=function(e){var t=this.getWrapperHasFocus();switch(e.key){case Ka.PAGE_DOWN:case Ka.PAGE_UP:case Ka.PAGE_HOME:case Ka.PAGE_END:t&&e.preventDefault()}},t.prototype.addDomData=function(){var e=this,d=t.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,d,this),this.addDestroyFunc((function(){return e.gridOptionsService.setDomData(e.eGui,d,null)}))},t.prototype.getGui=function(){return this.eGui},t.prototype.focus=function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)},t.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},t.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},t.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.getColumnGroupChild=function(){return this.columnGroupChild},t.prototype.removeDragSource=function(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.removeDragSource(),this.comp=null,this.column=null,this.resizeFeature=null,this.lastFocusEvent=null,this.columnGroupChild=null,this.parentRowCtrl=null,this.eGui=null},t.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",Jn([de("focusService")],t.prototype,"focusService",void 0),Jn([de("beans")],t.prototype,"beans",void 0),Jn([de("userComponentFactory")],t.prototype,"userComponentFactory",void 0),Jn([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Jn([de("dragAndDropService")],t.prototype,"dragAndDropService",void 0),t}(ze),tu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),du=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},au=function(e){function t(t,d,a,s){var o=e.call(this)||this;return o.columnOrGroup=t,o.eCell=d,o.ariaEl=o.eCell.querySelector("[role=columnheader]")||o.eCell,o.colsSpanning=s,o.beans=a,o}return tu(t,e),t.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},t.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?qe(this.colsSpanning):this.columnOrGroup},t.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,ce.EVENT_LEFT_CHANGED,this.onLeftChanged.bind(this)),this.setLeftFirstTime(),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onLeftChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onLeftChanged.bind(this))},t.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.get("suppressColumnMoveAnimation"),t=s(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&t&&!e?this.animateInLeft():this.onLeftChanged()},t.prototype.animateInLeft=function(){var e=this,t=this.getColumnOrGroup(),d=t.getLeft(),a=t.getOldLeft(),s=this.modifyLeftForPrintLayout(t,a),o=this.modifyLeftForPrintLayout(t,d);this.setLeft(s),this.actualLeft=o,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===o&&e.setLeft(o)}))},t.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)},t.prototype.modifyLeftForPrintLayout=function(e,t){if(!this.beans.gridOptionsService.isDomLayout("print"))return t;if("left"===e.getPinned())return t;var d=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?d+this.beans.columnModel.getBodyContainerWidth()+t:d+t},t.prototype.setLeft=function(e){if(s(e)&&(this.eCell.style.left="".concat(e,"px")),this.columnOrGroup instanceof ce)this.columnOrGroup;else{var t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&md(this.ariaEl,t.length),t[0]}},du([Z],t.prototype,"postConstruct",null),t}(ze),su=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ou=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},iu=function(e){function t(t,d){var a=e.call(this)||this;return a.columns=t,a.element=d,a}return su(t,e),t.prototype.postConstruct=function(){this.gridOptionsService.get("columnHoverHighlight")&&this.addMouseHoverListeners()},t.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},t.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},t.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},ou([de("columnHoverService")],t.prototype,"columnHoverService",void 0),ou([Z],t.prototype,"postConstruct",null),t}(ze),lu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),ru=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},mu=function(e){function t(t,d){var a=e.call(this,t,d)||this;return a.iconCreated=!1,a.column=t,a}return lu(t,e),t.prototype.setComp=function(e,t,d,a){this.comp=e,this.eButtonShowMainFilter=d,this.eFloatingFilterBody=a,this.setGui(t),this.setupActive(),this.setupWidth(),this.setupLeft(),this.setupHover(),this.setupFocus(),this.setupAria(),this.setupFilterButton(),this.setupUserComp(),this.setupSyncWithFilter(),this.setupUi(),this.addManagedListener(this.eButtonShowMainFilter,"click",this.showParentFilter.bind(this)),this.setupFilterChangedListener(),this.addManagedListener(this.column,ce.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},t.prototype.resizeHeader=function(){},t.prototype.moveHeader=function(){},t.prototype.setupActive=function(){var e=this.column.getColDef(),t=!!e.filter,d=!!e.floatingFilter;this.active=t&&d},t.prototype.setupUi=function(){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){var e=za("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},t.prototype.setupFocus=function(){this.createManagedBean(new Es(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},t.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();Ut(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},t.prototype.onTabKeyDown=function(e){if(!(this.gridOptionsService.getDocument().activeElement===this.eGui)){var t=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(t)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void t.focus();var d=this.findNextColumnWithFloatingFilter(e.shiftKey);d&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:d},event:e})&&e.preventDefault()}},t.prototype.findNextColumnWithFloatingFilter=function(e){var t=this.beans.columnModel,d=this.column;do{if(!(d=e?t.getDisplayedColBefore(d):t.getDisplayedColAfter(d)))break}while(!d.getColDef().filter||!d.getColDef().floatingFilter);return d},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var d=this.getWrapperHasFocus();switch(t.key){case Ka.UP:case Ka.DOWN:d||t.preventDefault();case Ka.LEFT:case Ka.RIGHT:if(d)return;t.stopPropagation();case Ka.ENTER:d&&this.focusService.focusInto(this.eGui)&&t.preventDefault();break;case Ka.ESCAPE:d||this.eGui.focus()}},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),d=!!e.relatedTarget&&oa(e.relatedTarget,"ag-floating-filter");if(t&&d&&e.target===this.eGui){var a=this.lastFocusEvent,s=!(!a||a.key!==Ka.TAB);if(a&&s){var o=a.shiftKey;this.focusService.focusInto(this.eGui,o)}}var i=this.getRowIndex();this.beans.focusService.setFocusedHeader(i,this.column)}},t.prototype.setupHover=function(){var e=this;this.createManagedBean(new iu([this.column],this.eGui));var t=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.setupLeft=function(){var e=new au(this.column,this.eGui,this.beans);this.createManagedBean(e)},t.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=!!e.floatingFilterComponentParams&&!!e.floatingFilterComponentParams.suppressFilterButton},t.prototype.setupUserComp=function(){var e=this;if(this.active){var t=this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return e.showParentFilter()}));t&&this.setCompDetails(t)}},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},t.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},t.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var t=function(t){var d=e.comp.getFloatingFilterComp();d&&d.then((function(d){if(d){var a=e.filterManager.getCurrentFloatingFilterParentModel(e.column);d.onParentModelChanged(a,t)}}))};this.destroySyncListener=this.addManagedListener(this.column,ce.EVENT_FILTER_CHANGED,t),this.filterManager.isFilterActive(this.column)&&t(null)}},t.prototype.setupWidth=function(){var e=this,t=function(){var t="".concat(e.column.getActualWidth(),"px");e.comp.setWidth(t)};this.addManagedListener(this.column,ce.EVENT_WIDTH_CHANGED,t),t()},t.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,ce.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},t.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},t.prototype.onColDefChanged=function(){var e,t,d=this,a=this.active;this.setupActive();var s=!a&&this.active;a&&!this.active&&(null===(e=this.destroySyncListener)||void 0===e||e.call(this),null===(t=this.destroyFilterChangedListener)||void 0===t||t.call(this));var o=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return d.showParentFilter()})):null,i=this.comp.getFloatingFilterComp();i&&o?i.then((function(e){var t;!e||d.filterManager.areFilterCompsDifferent(null!==(t=d.userCompDetails)&&void 0!==t?t:null,o)?d.updateCompDetails(o,s):d.updateFloatingFilterParams(o)})):this.updateCompDetails(o,s)},t.prototype.updateCompDetails=function(e,t){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),t&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},t.prototype.updateFloatingFilterParams=function(e){var t;if(e){var d=e.params;null===(t=this.comp.getFloatingFilterComp())||void 0===t||t.then((function(e){(null===e||void 0===e?void 0:e.onParamsUpdated)&&"function"===typeof e.onParamsUpdated&&e.onParamsUpdated(d)}))}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null},ru([de("filterManager")],t.prototype,"filterManager",void 0),ru([de("columnHoverService")],t.prototype,"columnHoverService",void 0),ru([de("menuFactory")],t.prototype,"menuFactory",void 0),t}(eu),nu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),uu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},pu=function(e){function t(t,d,a,s,o){var i=e.call(this)||this;return i.pinned=t,i.column=d,i.eResize=a,i.comp=s,i.ctrl=o,i}return nu(t,e),t.prototype.postConstruct=function(){var e,t,d=this,a=[],s=function(){a.forEach((function(e){return e()})),a.length=0},o=function(){var o=d.column.isResizable(),i=!d.gridOptionsService.get("suppressAutoSize")&&!d.column.getColDef().suppressAutoSize;(o!==e||i!==t)&&(e=o,t=i,s(),function(){if(da(d.eResize,e),e){var s=d.horizontalResizeService.addResizeBar({eResizeBar:d.eResize,onResizeStart:d.onResizeStart.bind(d),onResizing:d.onResizing.bind(d,!1),onResizeEnd:d.onResizing.bind(d,!0)});if(a.push(s),t){var o=d.gridOptionsService.get("skipHeaderOnAutoSize"),i=function(){d.columnModel.autoSizeColumn(d.column,o,"uiColumnResized")};d.eResize.addEventListener("dblclick",i);var l=new di(d.eResize);l.addEventListener(di.EVENT_DOUBLE_TAP,i),a.push((function(){d.eResize.removeEventListener("dblclick",i),l.removeEventListener(di.EVENT_DOUBLE_TAP,i),l.destroy()}))}}}())};o(),this.addDestroyFunc(s),this.ctrl.addRefreshFunction(o)},t.prototype.onResizing=function(e,t){var d=this,a=d.column,s=d.lastResizeAmount,o=d.resizeStartWidth,i=this.normaliseResizeAmount(t),l=[{key:a,newWidth:o+i}];if(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(i-s)>ra(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return;this.lastResizeAmount=i,this.columnModel.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)},t.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.normaliseResizeAmount=function(e){var t=e,d="left"!==this.pinned,a="right"===this.pinned;return this.gridOptionsService.get("enableRtl")?d&&(t*=-1):a&&(t*=-1),t},uu([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),uu([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),uu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),uu([de("columnModel")],t.prototype,"columnModel",void 0),uu([Z],t.prototype,"postConstruct",null),t}(ze),fu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),cu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},_u=function(e){function t(t){var d=e.call(this)||this;return d.cbSelectAllVisible=!1,d.processingEventFromCheckbox=!1,d.column=t,d}return fu(t,e),t.prototype.onSpaceKeyDown=function(e){var t=this.cbSelectAll,d=this.gridOptionsService.getDocument();t.isDisplayed()&&!t.getGui().contains(d.activeElement)&&(e.preventDefault(),t.setValue(!t.getValue()))},t.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},t.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new ro),this.cbSelectAll.addCssClass("ag-header-select-all"),Nt(this.cbSelectAll.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedListener(this.eventService,Je.EVENT_NEW_COLUMNS_LOADED,this.onNewColumnsLoaded.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_SELECTION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_PAGINATION_CHANGED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_MODEL_UPDATED,this.onModelChanged.bind(this)),this.addManagedListener(this.cbSelectAll,Je.EVENT_FIELD_VALUE_CHANGED,this.onCbSelectAll.bind(this)),Jt(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},t.prototype.onNewColumnsLoaded=function(){this.showOrHideSelectAll()},t.prototype.onDisplayedColumnsChanged=function(){this.isAlive()&&this.showOrHideSelectAll()},t.prototype.showOrHideSelectAll=function(){this.cbSelectAllVisible=this.isCheckboxSelection(),this.cbSelectAll.setDisplayed(this.cbSelectAllVisible,{skipAriaHidden:!0}),this.cbSelectAllVisible&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()},t.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},t.prototype.updateStateOfCheckbox=function(){if(!this.processingEventFromCheckbox){this.processingEventFromCheckbox=!0;var e=this.selectionService.getSelectAllState(this.isFilteredOnly(),this.isCurrentPageOnly());this.cbSelectAll.setValue(e),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}},t.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),t=this.cbSelectAll.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),d=e("ariaRowSelectAll","Press Space to toggle all rows selection");this.cbSelectAllVisible?this.headerCellCtrl.setAriaDescriptionProperty("selectAll","".concat(d," (").concat(t,")")):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel("".concat(d," (").concat(t,")")),this.headerCellCtrl.refreshAriaDescription()},t.prototype.checkSelectionType=function(e){return!("multiple"!==this.gridOptionsService.get("rowSelection"))||(console.warn("AG Grid: ".concat(e," is only available if using 'multiple' rowSelection.")),!1)},t.prototype.checkRightRowModelType=function(e){var t=this.rowModel.getType();return!("clientSide"!==t&&"serverSide"!==t)||(console.warn("AG Grid: ".concat(e," is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ").concat(t,".")),!1)},t.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),t=this.isFilteredOnly(),d=this.isCurrentPageOnly(),a="uiSelectAll";d?a="uiSelectAllCurrentPage":t&&(a="uiSelectAllFiltered");var s={source:a,justFiltered:t,justCurrentPage:d};e?this.selectionService.selectAllRowNodes(s):this.selectionService.deselectAllRowNodes(s)}},t.prototype.isCheckboxSelection=function(){var e=this.column.getColDef().headerCheckboxSelection;"function"===typeof e&&(e=e({column:this.column,colDef:this.column.getColDef(),columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api,context:this.gridOptionsService.context}));return!!e&&(this.checkRightRowModelType("headerCheckboxSelection")&&this.checkSelectionType("headerCheckboxSelection"))},t.prototype.isFilteredOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly},t.prototype.isCurrentPageOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly},cu([de("rowModel")],t.prototype,"rowModel",void 0),cu([de("selectionService")],t.prototype,"selectionService",void 0),t}(ze),yu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Cu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},bu=function(e){var t="function"===typeof Symbol&&Symbol.iterator,d=t&&e[t],a=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},qu=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Pu=function(e){function t(t,d){var a=e.call(this,t,d)||this;return a.refreshFunctions=[],a.userHeaderClasses=new Set,a.ariaDescriptionProperties=new Map,a.column=t,a}return yu(t,e),t.prototype.setComp=function(e,t,d,a){var s=this;this.comp=e,this.setGui(t),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(a),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new pu(this.getPinned(),this.column,d,e,this)),this.createManagedBean(new iu([this.column],t)),this.createManagedBean(new au(this.column,t,this.beans)),this.createManagedBean(new Es(t,{shouldStopEventPropagation:function(e){return s.shouldStopEventPropagation(e)},onTabKeyDown:function(){return null},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(),this.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],this.refresh.bind(this)),this.addManagedListener(this.column,ce.EVENT_COL_DEF_CHANGED,this.refresh.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_VALUE_CHANGED,this.onColumnValueChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,this.onColumnRowGroupChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_PIVOT_CHANGED,this.onColumnPivotChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_HEADER_HEIGHT_CHANGED,this.onHeaderHeightChanged.bind(this))},t.prototype.resizeHeader=function(e,t){var d,a;if(this.column.isResizable()){var s=this.column.getPinned(),o=this.gridOptionsService.get("enableRtl"),i=this.column.getActualWidth(),l=null!==(d=this.column.getMinWidth())&&void 0!==d?d:0,r=null!==(a=this.column.getMaxWidth())&&void 0!==a?a:Number.MAX_SAFE_INTEGER,m=e===No.Left;s&&o!==("right"===s)&&(m=!m);var n=(m?-1:1)*this.resizeMultiplier,u=Math.min(Math.max(i+n,l),r);if(s)if(this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+n>ra(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return;this.columnModel.setColumnWidths([{key:this.column,newWidth:u}],t,!0)}},t.prototype.moveHeader=function(e){var t=this,d=t.eGui,a=t.column,s=t.columnModel,o=t.gridOptionsService,i=t.ctrlsService,l=this.getPinned(),r=d.getBoundingClientRect().left,m=a.getActualWidth(),n=o.get("enableRtl"),u=e===No.Left!==n,p=Vn.normaliseX(u?r-20:r+m+20,l,!0,o,i);Vn.attemptMoveColumns({allMovingColumns:[a],isFromHeader:!0,hDirection:e,xPosition:p,pinned:l,fromEnter:!1,fakeEvent:!1,gridOptionsService:o,columnModel:s}),i.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(a,"auto")},t.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},t.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},t.prototype.lookupUserCompDetails=function(){var e=this.createParams(),t=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(t,e)},t.prototype.createParams=function(){var e=this;return{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,showColumnMenu:function(t){e.gridApi.showColumnMenuAfterButtonClick(e.column,t)},progressSort:function(t){e.sortController.progressSort(e.column,!!t,"uiColumnSorted")},setSort:function(t,d){e.sortController.setSortForColumn(e.column,t,!!d,"uiColumnSorted")},api:this.gridApi,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()}},t.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new _u(this.column)),this.selectAllFeature.setComp(this)},t.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t),t.key===Ka.SPACE&&this.selectAllFeature.onSpaceKeyDown(t),t.key===Ka.ENTER&&this.onEnterKeyDown(t)},t.prototype.onEnterKeyDown=function(e){var t=this.comp.getUserCompInstance();if(t)if(e.ctrlKey||e.metaKey)this.menuEnabled&&t.showMenu&&(e.preventDefault(),t.showMenu());else if(this.sortable){var d=e.shiftKey;this.sortController.progressSort(this.column,d,"uiColumnSorted")}},t.prototype.isMenuEnabled=function(){return this.menuEnabled},t.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var t=this.getRowIndex();this.focusService.setFocusedHeader(t,this.column)}this.setActiveHeader(!0)},t.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},t.prototype.setupTooltip=function(){var e=this,t={getColumn:function(){return e.column},getColDef:function(){return e.column.getColDef()},getGui:function(){return e.eGui},getLocation:function(){return"header"},getTooltipValue:function(){return e.column.getColDef().headerTooltip}},d=this.createManagedBean(new dm(t,this.beans));d.setComp(this.eGui),this.refreshFunctions.push((function(){return d.refreshToolTip()}))},t.prototype.setupClassesFromColDef=function(){var e=this,t=function(){var t=e.column.getColDef(),d=cm.getHeaderClassesFromColDef(t,e.gridOptionsService,e.column,null),a=e.userHeaderClasses;e.userHeaderClasses=new Set(d),d.forEach((function(t){a.has(t)?a.delete(t):e.comp.addOrRemoveCssClass(t,!0)})),a.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!1)}))};this.refreshFunctions.push(t),t()},t.prototype.setDragSource=function(e){var t=this;if(this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable){var d=this,a=d.column,s=d.columnModel,o=d.displayName,i=d.dragAndDropService,l=d.gridOptionsService,r=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),m=this.dragSource={type:xi.HeaderCell,eElement:e,getDefaultIconName:function(){return r?Hi.ICON_HIDE:Hi.ICON_NOT_ALLOWED},getDragItem:function(){return t.createDragItem(a)},dragItemName:o,onDragStarted:function(){r=!l.get("suppressDragLeaveHidesColumns"),a.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return a.setMoving(!1,"uiColumnMoved")},onGridEnter:function(e){var t;if(r){var d=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(d,!0,"uiColumnMoved")}},onGridExit:function(e){var t;if(r){var d=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(d,!1,"uiColumnMoved")}}};i.addDragSource(m,!0)}},t.prototype.createDragItem=function(e){var t={};return t[e.getId()]=e.isVisible(),{columns:[e],visibleState:t}},t.prototype.updateState=function(){var e=this.column.getColDef();this.menuEnabled=this.menuFactory.isMenuEnabled(this.column)&&!e.suppressMenu,this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()},t.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},t.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach((function(e){return e()}))},t.prototype.refreshHeaderComp=function(){var e=this.lookupUserCompDetails();!!(null!=this.comp.getUserCompInstance()&&this.userCompDetails.componentClass==e.componentClass)&&this.attemptHeaderCompRefresh(e.params)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)},t.prototype.attemptHeaderCompRefresh=function(e){var t=this.comp.getUserCompInstance();return!!t&&(!!t.refresh&&t.refresh(e))},t.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},t.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},t.prototype.workOutDraggable=function(){var e=this.column.getColDef();return!!(!this.gridOptionsService.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot},t.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},t.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},t.prototype.onColumnValueChanged=function(){this.checkDisplayName()},t.prototype.setupWidth=function(){var e=this,t=function(){var t=e.column.getActualWidth();e.comp.setWidth("".concat(t,"px"))};this.addManagedListener(this.column,ce.EVENT_WIDTH_CHANGED,t),t()},t.prototype.setupMovingCss=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,ce.EVENT_MOVING_CHANGED,t),t()},t.prototype.setupMenuClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,ce.EVENT_MENU_VISIBLE_CHANGED,t),t()},t.prototype.setupSortableClass=function(){var e=this,t=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};t(),this.addRefreshFunction(t),this.addManagedListener(this.eventService,ce.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},t.prototype.setupFilterClass=function(){var e=this,t=function(){var t=e.column.isFilterActive();e.comp.addOrRemoveCssClass("ag-header-cell-filtered",t),e.refreshAria()};this.addManagedListener(this.column,ce.EVENT_FILTER_ACTIVE_CHANGED,t),t()},t.prototype.setupWrapTextClass=function(){var e=this,t=function(){var t=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};t(),this.addRefreshFunction(t)},t.prototype.onDisplayedColumnsChanged=function(){e.prototype.onDisplayedColumnsChanged.call(this),this.isAlive()&&this.onHeaderHeightChanged()},t.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},t.prototype.refreshSpanHeaderHeight=function(){var e=this,t=e.eGui,d=e.column,a=e.comp,s=e.columnModel;if(e.gridOptionsService,!d.isSpanHeaderHeight())return t.style.removeProperty("top"),t.style.removeProperty("height"),a.addOrRemoveCssClass("ag-header-span-height",!1),void a.addOrRemoveCssClass("ag-header-span-total",!1);var o=this.getColumnGroupPaddingInfo(),i=o.numberOfParents,l=o.isSpanningTotal;a.addOrRemoveCssClass("ag-header-span-height",i>0);var r=s.getColumnHeaderRowHeight();if(0===i)return a.addOrRemoveCssClass("ag-header-span-total",!1),t.style.setProperty("top","0px"),void t.style.setProperty("height","".concat(r,"px"));a.addOrRemoveCssClass("ag-header-span-total",l);var m=i*(s.isPivotMode()?s.getPivotGroupHeaderHeight():s.getGroupHeaderHeight());t.style.setProperty("top","".concat(-m,"px")),t.style.setProperty("height","".concat(r+m,"px"))},t.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var t=e.getPaddingLevel()+1,d=!0;e;){if(!e.isPadding()){d=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:d}},t.prototype.setupAutoHeight=function(e){var t,d=this,a=function(t){if(d.isAlive()){var s=ia(d.getGui()),o=s.paddingTop+s.paddingBottom+s.borderBottomWidth+s.borderTopWidth,i=e.offsetHeight+o;if(t<5){var l=d.beans.gridOptionsService.getDocument();if(!l||!l.contains(e)||0==i)return void d.beans.frameworkOverrides.setTimeout((function(){return a(t+1)}),0)}d.columnModel.setColumnHeaderHeight(d.column,i)}},s=!1,o=function(){var e=d.column.isAutoHeaderHeight();e&&!s&&i(),!e&&s&&l()},i=function(){s=!0,a(0),d.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),t=d.resizeObserverService.observeResize(e,(function(){return a(0)}))},l=function(){s=!1,t&&t(),d.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),t=void 0};o(),this.addDestroyFunc((function(){return l()})),this.addManagedListener(this.column,ce.EVENT_WIDTH_CHANGED,(function(){return s&&a(0)})),this.addManagedListener(this.eventService,ce.EVENT_SORT_CHANGED,(function(){s&&d.beans.frameworkOverrides.setTimeout((function(){return a(0)}))})),this.addRefreshFunction(o)},t.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),t=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(kt(t)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},t.prototype.refreshAriaMenu=function(){if(this.menuEnabled){var e=this.localeService.getLocaleTextFunc();this.setAriaDescriptionProperty("menu",e("ariaMenuColumn","Press CTRL ENTER to open column menu."))}else this.setAriaDescriptionProperty("menu",null)},t.prototype.refreshAriaFiltered=function(){var e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)},t.prototype.setAriaDescriptionProperty=function(e,t){null!=t?this.ariaDescriptionProperties.set(e,t):this.ariaDescriptionProperties.delete(e)},t.prototype.refreshAriaDescription=function(){var e,t,d=null;try{for(var a=bu(this.ariaDescriptionProperties),s=a.next();!s.done;s=a.next()){var o=qu(s.value,2),i=o[0],l=o[1];d="filter"===i?"".concat(l," ").concat(d||""):"".concat(d||""," ").concat(l)}}catch(r){e={error:r}}finally{try{s&&!s.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}this.comp.setAriaDescription(null!==d&&void 0!==d?d:void 0)},t.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFiltered(),this.refreshAriaDescription()},t.prototype.addColumnHoverListener=function(){var e=this,t=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var t=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",t)}};this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HOVER_CHANGED,t),t()},t.prototype.getColId=function(){return this.column.getColId()},t.prototype.addActiveHeaderMouseListeners=function(){var e=this,t=function(t){return e.setActiveHeader("mouseenter"===t.type)};this.addManagedListener(this.getGui(),"mouseenter",t),this.addManagedListener(this.getGui(),"mouseleave",t)},t.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.refreshFunctions=null,this.selectAllFeature=null,this.dragSourceElement=null,this.userCompDetails=null,this.userHeaderClasses=null,this.ariaDescriptionProperties=null},Cu([de("columnModel")],t.prototype,"columnModel",void 0),Cu([de("pinnedWidthService")],t.prototype,"pinnedWidthService",void 0),Cu([de("columnHoverService")],t.prototype,"columnHoverService",void 0),Cu([de("sortController")],t.prototype,"sortController",void 0),Cu([de("menuFactory")],t.prototype,"menuFactory",void 0),Cu([de("resizeObserverService")],t.prototype,"resizeObserverService",void 0),Cu([de("gridApi")],t.prototype,"gridApi",void 0),t}(eu),hu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Tu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},gu=function(e){function t(t,d,a,s){var o=e.call(this)||this;return o.eResize=d,o.comp=t,o.pinned=a,o.columnGroup=s,o}return hu(t,e),t.prototype.postConstruct=function(){var e=this;if(this.columnGroup.isResizable()){var t=this.horizontalResizeService.addResizeBar({eResizeBar:this.eResize,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this,!1),onResizeEnd:this.onResizing.bind(this,!0)});if(this.addDestroyFunc(t),!this.gridOptionsService.get("suppressAutoSize")){var d=this.gridOptionsService.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(function(){var t=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||t.push(e.getColId())})),t.length>0&&e.columnModel.autoSizeColumns({columns:t,skipHeader:d,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")}))}}else this.comp.setResizableDisplayed(!1)},t.prototype.onResizeStart=function(e){var t=this.getInitialValues(e);this.storeLocalValues(t),this.toggleColumnResizing(!0)},t.prototype.onResizing=function(e,t,d){void 0===d&&(d="uiColumnResized");var a=this.normaliseDragChange(t),s=this.resizeStartWidth+a;this.resizeColumnsFromLocalValues(s,d,e)},t.prototype.getInitialValues=function(e){var t=this.getColumnsToResize(),d=this.getInitialSizeOfColumns(t),a={columnsToResize:t,resizeStartWidth:d,resizeRatios:this.getSizeRatiosOfColumns(t,d)},s=null;if(e&&(s=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),s){var o=s.getDisplayedLeafColumns(),i=a.groupAfterColumns=o.filter((function(e){return e.isResizable()})),l=a.groupAfterStartWidth=this.getInitialSizeOfColumns(i);a.groupAfterRatios=this.getSizeRatiosOfColumns(i,l)}else a.groupAfterColumns=void 0,a.groupAfterStartWidth=void 0,a.groupAfterRatios=void 0;return a},t.prototype.storeLocalValues=function(e){var t=e.columnsToResize,d=e.resizeStartWidth,a=e.resizeRatios,s=e.groupAfterColumns,o=e.groupAfterStartWidth,i=e.groupAfterRatios;this.resizeCols=t,this.resizeStartWidth=d,this.resizeRatios=a,this.resizeTakeFromCols=s,this.resizeTakeFromStartWidth=o,this.resizeTakeFromRatios=i},t.prototype.clearLocalValues=function(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0},t.prototype.resizeLeafColumnsToFit=function(e){var t=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),d=this.getInitialValues();t>d.resizeStartWidth&&this.resizeColumns(d,t,e,!0)},t.prototype.resizeColumnsFromLocalValues=function(e,t,d){var a,s,o;if(void 0===d&&(d=!0),this.resizeCols&&this.resizeRatios){var i={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!==(a=this.resizeTakeFromCols)&&void 0!==a?a:void 0,groupAfterStartWidth:null!==(s=this.resizeTakeFromStartWidth)&&void 0!==s?s:void 0,groupAfterRatios:null!==(o=this.resizeTakeFromRatios)&&void 0!==o?o:void 0};this.resizeColumns(i,e,t,d)}},t.prototype.resizeColumns=function(e,t,d,a){void 0===a&&(a=!0);var s=e.columnsToResize,o=e.resizeStartWidth,i=e.resizeRatios,l=e.groupAfterColumns,r=e.groupAfterStartWidth,m=e.groupAfterRatios,n=[];if(n.push({columns:s,ratios:i,width:t}),l){var u=t-o;n.push({columns:l,ratios:m,width:r-u})}this.columnModel.resizeColumnSets({resizeSets:n,finished:a,source:d}),a&&this.toggleColumnResizing(!1)},t.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},t.prototype.getColumnsToResize=function(){return this.columnGroup.getDisplayedLeafColumns().filter((function(e){return e.isResizable()}))},t.prototype.getInitialSizeOfColumns=function(e){return e.reduce((function(e,t){return e+t.getActualWidth()}),0)},t.prototype.getSizeRatiosOfColumns=function(e,t){return e.map((function(e){return e.getActualWidth()/t}))},t.prototype.normaliseDragChange=function(e){var t=e;return this.gridOptionsService.get("enableRtl")?"left"!==this.pinned&&(t*=-1):"right"===this.pinned&&(t*=-1),t},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.clearLocalValues()},Tu([de("horizontalResizeService")],t.prototype,"horizontalResizeService",void 0),Tu([de("autoWidthCalculator")],t.prototype,"autoWidthCalculator",void 0),Tu([de("columnModel")],t.prototype,"columnModel",void 0),Tu([Z],t.prototype,"postConstruct",null),t}(ze),Su=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Ou=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},vu=function(e){function t(t,d){var a=e.call(this)||this;return a.removeChildListenersFuncs=[],a.columnGroup=d,a.comp=t,a}return Su(t,e),t.prototype.postConstruct=function(){this.addListenersToChildrenColumns(),this.addManagedListener(this.columnGroup,Xe.EVENT_DISPLAYED_CHILDREN_CHANGED,this.onDisplayedChildrenChanged.bind(this)),this.onWidthChanged(),this.addDestroyFunc(this.removeListenersOnChildrenColumns.bind(this))},t.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var t=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(d){d.addEventListener("widthChanged",t),d.addEventListener("visibleChanged",t),e.removeChildListenersFuncs.push((function(){d.removeEventListener("widthChanged",t),d.removeEventListener("visibleChanged",t)}))}))},t.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]},t.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},t.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth("".concat(e,"px")),this.comp.addOrRemoveCssClass("ag-hidden",0===e)},Ou([Z],t.prototype,"postConstruct",null),t}(ze),Iu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Du=function(){return Du=Object.assign||function(e){for(var t,d=1,a=arguments.length;d=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Gu=function(e){function t(t,d){var a=e.call(this,t,d)||this;return a.onSuppressColMoveChange=function(){if(a.isSuppressMoving())a.removeDragSource();else if(!a.dragSource){var e=a.getGui();a.setDragSource(e)}},a.column=t,a}return Iu(t,e),t.prototype.setComp=function(e,t,d){this.comp=e,this.setGui(t),this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var a=this.getParentRowCtrl().getPinned(),s=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new iu(s,t)),this.createManagedBean(new au(this.column,t,this.beans)),this.createManagedBean(new vu(e,this.column)),this.resizeFeature=this.createManagedBean(new gu(e,d,a,this.column)),this.createManagedBean(new Es(t,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:function(){},handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)})),this.addManagedPropertyListener(Je.EVENT_SUPPRESS_COLUMN_MOVE_CHANGED,this.onSuppressColMoveChange),this.addResizeAndMoveKeyboardListeners()},t.prototype.resizeHeader=function(e,t){if(this.resizeFeature){var d=(e===No.Left?-1:1)*this.resizeMultiplier,a=this.resizeFeature.getInitialValues(t);this.resizeFeature.resizeColumns(a,a.resizeStartWidth+d,"uiColumnResized",!0)}},t.prototype.moveHeader=function(e){var t=this,d=t.eGui,a=t.column,s=t.columnModel,o=t.gridOptionsService,i=t.ctrlsService,l=o.get("enableRtl"),r=e===No.Left,m=this.getPinned(),n=d.getBoundingClientRect(),u=n.left,p=n.width,f=Vn.normaliseX(r!==l?u-20:u+p+20,m,!0,o,i),c=a.getGroupId(),_=this.focusService.getFocusedHeader();Vn.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:f,pinned:m,fromEnter:!1,fakeEvent:!1,gridOptionsService:o,columnModel:s});var y=a.getDisplayedLeafColumns(),C=r?y[0]:qe(y);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(C,"auto"),!this.isAlive()&&_&&this.restoreFocus(c,a,_)},t.prototype.restoreFocus=function(e,t,d){var a=t.getLeafColumns();if(a.length){var s=a[0].getParent();if(s){var o=this.findGroupWidthId(s,e);o&&this.focusService.focusHeaderPosition({headerPosition:Du(Du({},d),{column:o})})}}},t.prototype.findGroupWidthId=function(e,t){for(;e;){if(e.getGroupId()===t)return e;e=e.getParent()}return null},t.prototype.resizeLeafColumnsToFit=function(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)},t.prototype.setupUserComp=function(){var e=this,t={displayName:this.displayName,columnGroup:this.column,setExpanded:function(t){e.columnModel.setColumnGroupOpened(e.column.getProvidedColumnGroup(),t,"gridInitializing")},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},d=this.userComponentFactory.getHeaderGroupCompDetails(t);this.comp.setUserCompDetails(d)},t.prototype.setupTooltip=function(){var e=this,t=this.column.getColGroupDef(),d={getColumn:function(){return e.column},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return t&&t.headerTooltip}};t&&(d.getColDef=function(){return t}),this.createManagedBean(new dm(d,this.beans)).setComp(this.eGui)},t.prototype.setupExpandable=function(){var e=this.column.getProvidedColumnGroup();this.refreshExpanded(),this.addManagedListener(e,ye.EVENT_EXPANDABLE_CHANGED,this.refreshExpanded.bind(this)),this.addManagedListener(e,ye.EVENT_EXPANDED_CHANGED,this.refreshExpanded.bind(this))},t.prototype.refreshExpanded=function(){var e=this.column;this.expandable=e.isExpandable();var t=e.isExpanded();this.expandable?this.comp.setAriaExpanded(t?"true":"false"):this.comp.setAriaExpanded(void 0)},t.prototype.getColId=function(){return this.column.getUniqueId()},t.prototype.addClasses=function(){var e=this,t=this.column.getColGroupDef(),d=cm.getHeaderClassesFromColDef(t,this.gridOptionsService,null,this.column);this.column.isPadding()?(d.push("ag-header-group-cell-no-group"),this.column.getLeafColumns().every((function(e){return e.isSpanHeaderHeight()}))&&d.push("ag-header-span-height")):d.push("ag-header-group-cell-with-group");d.forEach((function(t){return e.comp.addOrRemoveCssClass(t,!0)}))},t.prototype.setupMovingCss=function(){var e=this,t=this.column.getProvidedColumnGroup().getLeafColumns(),d=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};t.forEach((function(t){e.addManagedListener(t,ce.EVENT_MOVING_CHANGED,d)})),d()},t.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var t=this.getRowIndex();this.beans.focusService.setFocusedHeader(t,this.column)}},t.prototype.handleKeyDown=function(t){e.prototype.handleKeyDown.call(this,t);var d=this.getWrapperHasFocus();if(this.expandable&&d&&t.key===Ka.ENTER){var a=this.column,s=!a.isExpanded();this.columnModel.setColumnGroupOpened(a.getProvidedColumnGroup(),s,"uiColumnExpanded")}},t.prototype.setDragSource=function(e){var t=this;if(!this.isSuppressMoving()&&(this.removeDragSource(),e)){var d=this,a=d.column,s=d.columnModel,o=d.displayName,i=d.gridOptionsService,l=d.dragAndDropService,r=a.getProvidedColumnGroup().getLeafColumns(),m=!i.get("suppressDragLeaveHidesColumns"),n=this.dragSource={type:xi.HeaderCell,eElement:e,getDefaultIconName:function(){return m?Hi.ICON_HIDE:Hi.ICON_NOT_ALLOWED},dragItemName:o,getDragItem:function(){return t.getDragItemForGroup(a)},onDragStarted:function(){m=!i.get("suppressDragLeaveHidesColumns"),r.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return r.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))},onGridEnter:function(e){var t;if(m){var d=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(d,!0,"uiColumnMoved")}},onGridExit:function(e){var t;if(m){var d=(null===(t=null===e||void 0===e?void 0:e.columns)||void 0===t?void 0:t.filter((function(e){return!e.getColDef().lockVisible})))||[];s.setColumnsVisible(d,!1,"uiColumnMoved")}}};l.addDragSource(n,!0)}},t.prototype.getDragItemForGroup=function(e){var t=e.getProvidedColumnGroup().getLeafColumns(),d={};t.forEach((function(e){return d[e.getId()]=e.isVisible()}));var a=[];return this.columnModel.getAllDisplayedColumns().forEach((function(e){t.indexOf(e)>=0&&(a.push(e),ge(t,e))})),t.forEach((function(e){return a.push(e)})),{columns:a,visibleState:d}},t.prototype.isSuppressMoving=function(){var e=!1;return this.column.getLeafColumns().forEach((function(t){(t.getColDef().suppressMovable||t.getColDef().lockPosition)&&(e=!0)})),e||this.gridOptionsService.get("suppressMovableColumns")},Bu([de("columnModel")],t.prototype,"columnModel",void 0),t}(eu),Mu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),wu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Lu=function(e){var t="function"===typeof Symbol&&Symbol.iterator,d=t&&e[t],a=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Eu=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Vu=0,Ru=function(e){function t(t,d,a){var s=e.call(this)||this;s.instanceId=Vu++,s.rowIndex=t,s.pinned=d,s.type=a;var o=a==Gn.COLUMN_GROUP?"ag-header-row-column-group":a==Gn.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return s.headerRowClass="ag-header-row ".concat(o),s}return Mu(t,e),t.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.get("ensureDomOrder")},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setComp=function(e,t){void 0===t&&(t=!0),this.comp=e,t&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()},t.prototype.getHeaderRowClass=function(){return this.headerRowClass},t.prototype.getAriaRowIndex=function(){return this.rowIndex+1},t.prototype.getTransform=function(){if(Sd())return"translateZ(0)"},t.prototype.addEventListeners=function(){var e=this;this.addManagedListener(this.eventService,Je.EVENT_COLUMN_RESIZED,this.onColumnResized.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_VIRTUAL_COLUMNS_CHANGED,(function(t){return e.onVirtualColumnsChanged(t.afterScroll)})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_GRID_STYLES_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),this.addManagedPropertyListener("ensureDomOrder",(function(t){return e.isEnsureDomOrder=t.currentValue})),this.addManagedPropertyListener("headerHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("groupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("pivotGroupHeaderHeight",this.onRowHeightChanged.bind(this)),this.addManagedPropertyListener("floatingFiltersHeight",this.onRowHeightChanged.bind(this))},t.prototype.getHeaderCellCtrl=function(e){if(this.headerCellCtrls)return u(this.headerCellCtrls).find((function(t){return t.getColumnGroupChild()===e}))},t.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},t.prototype.getType=function(){return this.type},t.prototype.onColumnResized=function(){this.setWidth()},t.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth("".concat(e,"px"))},t.prototype.getWidthForRow=function(){return this.isPrintLayout?null!=this.pinned?0:this.columnModel.getContainerWidth("right")+this.columnModel.getContainerWidth("left")+this.columnModel.getContainerWidth(null):this.columnModel.getContainerWidth(this.pinned)},t.prototype.onRowHeightChanged=function(){var e=this.getTopAndHeight(),t=e.topOffset,d=e.rowHeight;this.comp.setTop(t+"px"),this.comp.setHeight(d+"px")},t.prototype.getTopAndHeight=function(){var e=this.columnModel.getHeaderRowCount(),t=[],d=0;this.filterManager.hasFloatingFilters()&&(e++,d=1);for(var a=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),o=e-(1+d),i=0;i=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Wu=function(e,t){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var a,s,o=d.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)i.push(a.value)}catch(l){s={error:l}}finally{try{a&&!a.done&&(d=o.return)&&d.call(o)}finally{if(s)throw s.error}}return i},Fu=function(e,t,d){if(d||2===arguments.length)for(var a,s=0,o=t.length;s=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ju=function(e){function t(t){var d=e.call(this)||this;return d.headerRowComps={},d.rowCompsList=[],d.pinned=t,d}return ku(t,e),t.prototype.init=function(){var e=this;this.selectAndSetTemplate();var t={setDisplayed:function(t){return e.setDisplayed(t)},setCtrls:function(t){return e.setCtrls(t)},setCenterWidth:function(t){return e.eCenterContainer.style.width=t},setViewportScrollLeft:function(t){return e.getGui().scrollLeft=t},setPinnedContainerWidth:function(t){var d=e.getGui();d.style.width=t,d.style.maxWidth=t,d.style.minWidth=t}};this.createManagedBean(new Nu(this.pinned)).setComp(t,this.getGui())},t.prototype.selectAndSetTemplate=function(){var e="left"==this.pinned,d="right"==this.pinned,a=e?t.PINNED_LEFT_TEMPLATE:d?t.PINNED_RIGHT_TEMPLATE:t.CENTER_TEMPLATE;this.setTemplate(a),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},t.prototype.destroyRowComps=function(){this.setCtrls([])},t.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},t.prototype.setCtrls=function(e){var t,d=this,a=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];e.forEach((function(e){var s=e.getInstanceId(),o=a[s];delete a[s];var i=o||d.createBean(new $n(e));d.headerRowComps[s]=i,d.rowCompsList.push(i),function(e){var a=e.getGui();a.parentElement!=d.eRowContainer&&d.eRowContainer.appendChild(a),t&&ha(d.eRowContainer,a,t),t=a}(i)})),g(a).forEach((function(e){return d.destroyRowComp(e)}))},t.PINNED_LEFT_TEMPLATE='',t.PINNED_RIGHT_TEMPLATE='',t.CENTER_TEMPLATE='',Hu([gs("eCenterContainer")],t.prototype,"eCenterContainer",void 0),Hu([Z],t.prototype,"init",null),Hu([ee],t.prototype,"destroyRowComps",null),t}(hs),zu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Uu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i};!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(Qn||(Qn={}));var Ku,Yu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return zu(t,e),t.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(t){e.gridBodyCon=t.gridBodyCtrl}))},t.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},t.prototype.navigateVertically=function(e,t,d){if(t||(t=this.focusService.getFocusedHeader()),!t)return!1;var a=t.headerRowIndex,s=t.column,o=this.getHeaderRowCount(),i=e===Qn.UP?this.headerPositionUtils.getColumnVisibleParent(s,a):this.headerPositionUtils.getColumnVisibleChild(s,a),l=i.nextRow,r=i.nextFocusColumn,m=!1;return l<0&&(l=0,r=s,m=!0),l>=o&&(l=-1),!(!m&&!r)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:r},allowUserOverride:!0,event:d})},t.prototype.navigateHorizontally=function(e,t,d){void 0===t&&(t=!1);var a,s,o=this.focusService.getFocusedHeader();return e===Qn.LEFT!==this.gridOptionsService.get("enableRtl")?(s="Before",a=this.headerPositionUtils.findHeader(o,s)):(s="After",a=this.headerPositionUtils.findHeader(o,s)),a||!t?this.focusService.focusHeaderPosition({headerPosition:a,direction:s,fromTab:t,allowUserOverride:!0,event:d}):this.focusNextHeaderRow(o,s,d)},t.prototype.focusNextHeaderRow=function(e,t,d){var a,s=e.headerRowIndex,o=null;return"Before"===t?s>0&&(a=s-1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"end")):(a=s+1,o=this.headerPositionUtils.findColAtEdgeForHeaderRow(a,"start")),this.focusService.focusHeaderPosition({headerPosition:o,direction:t,fromTab:!0,allowUserOverride:!0,event:d})},t.prototype.scrollToColumn=function(e,t){if(void 0===t&&(t="After"),!e.getPinned()){var d;if(e instanceof Xe){var a=e.getDisplayedLeafColumns();d="Before"===t?qe(a):a[0]}else d=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(d)}},Uu([de("focusService")],t.prototype,"focusService",void 0),Uu([de("headerPositionUtils")],t.prototype,"headerPositionUtils",void 0),Uu([de("ctrlsService")],t.prototype,"ctrlsService",void 0),Uu([Z],t.prototype,"postConstruct",null),t=Uu([te("headerNavigationService")],t)}(ze),Qu=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),$u=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},Xu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Qu(t,e),t.prototype.setComp=function(e,t,d){this.comp=e,this.eGui=t,this.createManagedBean(new Es(d,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_PIVOT_MODE_CHANGED,this.onPivotModeChanged.bind(this)),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.onPivotModeChanged(),this.setupHeaderHeight(),this.ctrlsService.registerGridHeaderCtrl(this)},t.prototype.setupHeaderHeight=function(){var e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListener("headerHeight",e),this.addManagedPropertyListener("pivotHeaderHeight",e),this.addManagedPropertyListener("groupHeaderHeight",e),this.addManagedPropertyListener("pivotGroupHeaderHeight",e),this.addManagedPropertyListener("floatingFiltersHeight",e),this.addManagedListener(this.eventService,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HEADER_HEIGHT_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_GRID_STYLES_CHANGED,e),this.addManagedListener(this.eventService,Je.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,e)},t.prototype.getHeaderHeight=function(){return this.headerHeight},t.prototype.setHeaderHeight=function(){var e,t=this.columnModel,d=0,a=t.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(a++,d=1);var s=this.columnModel.getColumnGroupHeaderRowHeight(),o=this.columnModel.getColumnHeaderRowHeight(),i=a-(1+d);if(e=d*t.getFloatingFiltersHeight(),e+=i*s,e+=o,this.headerHeight!==e){this.headerHeight=e;var l="".concat(e+1,"px");this.comp.setHeightAndMinHeight(l),this.eventService.dispatchEvent({type:Je.EVENT_HEADER_HEIGHT_CHANGED})}},t.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},t.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.getAllDisplayedColumns().some((function(e){return e.isSpanHeaderHeight()}));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)},t.prototype.onTabKeyDown=function(e){var t=this.gridOptionsService.get("enableRtl"),d=e.shiftKey!==t?Qn.LEFT:Qn.RIGHT;(this.headerNavigationService.navigateHorizontally(d,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},t.prototype.handleKeyDown=function(e){var t=null;switch(e.key){case Ka.LEFT:t=Qn.LEFT;case Ka.RIGHT:s(t)||(t=Qn.RIGHT),this.headerNavigationService.navigateHorizontally(t,!1,e);break;case Ka.UP:t=Qn.UP;case Ka.DOWN:s(t)||(t=Qn.DOWN),this.headerNavigationService.navigateVertically(t,null,e)&&e.preventDefault();break;default:return}},t.prototype.onFocusOut=function(e){var t=this.gridOptionsService.getDocument(),d=e.relatedTarget;!d&&this.eGui.contains(t.activeElement)||this.eGui.contains(d)||this.focusService.clearFocusedHeader()},$u([de("headerNavigationService")],t.prototype,"headerNavigationService",void 0),$u([de("focusService")],t.prototype,"focusService",void 0),$u([de("columnModel")],t.prototype,"columnModel",void 0),$u([de("ctrlsService")],t.prototype,"ctrlsService",void 0),$u([de("filterManager")],t.prototype,"filterManager",void 0),t}(ze),Ju=function(){var e=function(t,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(e[d]=t[d])},e(t,d)};return function(t,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function a(){this.constructor=t}e(t,d),t.prototype=null===d?Object.create(d):(a.prototype=d.prototype,new a)}}(),Zu=function(e,t,d,a){var s,o=arguments.length,i=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,d):a;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,t,d,a);else for(var l=e.length-1;l>=0;l--)(s=e[l])&&(i=(o<3?s(i):o>3?s(t,d,i):s(t,d))||i);return o>3&&i&&Object.defineProperty(t,d,i),i},ep=function(e){function t(){return e.call(this,t.TEMPLATE)||this}return Ju(t,e),t.prototype.postConstruct=function(){var e=this,t={addOrRemoveCssClass:function(t,d){return e.addOrRemoveCssClass(t,d)},setHeightAndMinHeight:function(t){e.getGui().style.height=t,e.getGui().style.minHeight=t}};this.createManagedBean(new Xu).setComp(t,this.getGui(),this.getFocusableElement());var d=function(t){e.createManagedBean(t),e.appendChild(t)};d(new ju("left")),d(new ju(null)),d(new ju("right"))},t.TEMPLATE='