diff --git a/build/asset-manifest.json b/build/asset-manifest.json index 5b10573..703253f 100644 --- a/build/asset-manifest.json +++ b/build/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "./static/css/main.be588df3.css", - "main.js": "./static/js/main.4b3c98cb.js", + "main.js": "./static/js/main.dbb3f482.js", "index.html": "./index.html", "main.be588df3.css.map": "./static/css/main.be588df3.css.map", - "main.4b3c98cb.js.map": "./static/js/main.4b3c98cb.js.map" + "main.dbb3f482.js.map": "./static/js/main.dbb3f482.js.map" }, "entrypoints": [ "static/css/main.be588df3.css", - "static/js/main.4b3c98cb.js" + "static/js/main.dbb3f482.js" ] } \ No newline at end of file diff --git a/build/leaderboard.html b/build/leaderboard.html index a8e4c9b..c949eff 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.4b3c98cb.js b/build/static/js/main.dbb3f482.js similarity index 74% rename from build/static/js/main.4b3c98cb.js rename to build/static/js/main.dbb3f482.js index 08b6b9c..79c0004 100644 --- a/build/static/js/main.4b3c98cb.js +++ b/build/static/js/main.dbb3f482.js @@ -1,3 +1,3 @@ -/*! For license information please see main.4b3c98cb.js.LICENSE.txt */ -(()=>{"use strict";var e={520:(e,a,d)=>{function t(e){return null==e||""===e?null:e}function i(e,a){return void 0===a&&(a=!1),null!=e&&(""!==e||a)}function s(e){return!i(e)}function o(e){return null==e||0===e.length}function l(e){return null!=e&&"function"===typeof e.toString?e.toString():null}function m(e){if(void 0!==e){if(null===e||""===e)return null;if("number"===typeof e)return isNaN(e)?void 0:e;var a=parseInt(e,10);return isNaN(a)?void 0:a}}function u(e){if(void 0!==e)return null!==e&&""!==e&&("boolean"===typeof e?e:/true/i.test(e))}function n(e,a){return(e?JSON.stringify(e):null)===(a?JSON.stringify(a):null)}function r(e){if(e instanceof Set||e instanceof Map){var a=[];return e.forEach((function(e){return a.push(e)})),a}return Object.values(e)}d.r(a),d.d(a,{AbstractHeaderCellCtrl:()=>er,AgAbstractField:()=>zi,AgAbstractLabel:()=>ji,AgAutocomplete:()=>cp,AgCheckbox:()=>ls,AgDialog:()=>Xc,AgGroupComponent:()=>kc,AgInputDateField:()=>mc,AgInputNumberField:()=>xs,AgInputRange:()=>nc,AgInputTextArea:()=>oc,AgInputTextField:()=>Ms,AgMenuItemComponent:()=>Wc,AgMenuList:()=>Fc,AgMenuPanel:()=>Nc,AgPanel:()=>zc,AgPickerField:()=>$i,AgPromise:()=>ri,AgPromiseStatus:()=>ii,AgRadioButton:()=>us,AgRichSelect:()=>Dc,AgSelect:()=>ds,AgSlider:()=>wc,AgStackComponentsRegistry:()=>Qa,AgToggleButton:()=>ic,AlignedGridsService:()=>Op,AllCommunityModules:()=>iC,AnimateShowChangeCellRenderer:()=>Do,AnimateSlideCellRenderer:()=>wo,AnimationFrameService:()=>yf,AutoScrollService:()=>sm,AutoWidthCalculator:()=>Lf,Autowired:()=>de,BarColumnLabelPlacement:()=>Hq,BaseComponentWrapper:()=>zq,BaseCreator:()=>Nb,BaseGridSerializingSession:()=>Ab,Bean:()=>ae,BeanStub:()=>je,Beans:()=>iu,BodyDropPivotTarget:()=>Mn,BodyDropTarget:()=>Rn,CHART_TOOLBAR_ALLOW_LIST:()=>$q,CHART_TOOL_PANEL_ALLOW_LIST:()=>Yq,CHART_TOOL_PANEL_MENU_OPTIONS:()=>Xq,CellComp:()=>In,CellCtrl:()=>bu,CellNavigationService:()=>hp,CellPositionUtils:()=>dy,CellRangeType:()=>jm,ChangedPath:()=>Wf,CheckboxCellEditor:()=>Sl,CheckboxCellRenderer:()=>Il,CheckboxSelectionComponent:()=>Vo,ClientSideRowModelModule:()=>gb,ClientSideRowModelSteps:()=>zr,ColDefUtil:()=>em,Column:()=>pe,ColumnApi:()=>Mp,ColumnFactory:()=>Ye,ColumnGroup:()=>Xe,ColumnKeyCreator:()=>c,ColumnModel:()=>Ca,ColumnUtils:()=>Ta,Component:()=>hi,ComponentUtil:()=>Ma,Context:()=>X,CssClassApplier:()=>pu,CssClassManager:()=>qi,CsvCreator:()=>Kb,CsvExportModule:()=>Jb,CtrlsService:()=>Oy,CustomTooltipFeature:()=>yi,DEFAULT_CHART_GROUPS:()=>Kq,DataTypeService:()=>fq,DateCellEditor:()=>ql,DateFilter:()=>Ts,DateStringCellEditor:()=>hl,DisplayedGroupCreator:()=>Oa,Downloader:()=>Hb,DragAndDropService:()=>Ho,DragService:()=>im,DragSourceType:()=>Fo,Environment:()=>V_,EventService:()=>ue,Events:()=>Je,ExcelFactoryMode:()=>Ao,ExpansionService:()=>Pf,ExpressionService:()=>Rp,FilterManager:()=>Pm,FloatingFilterMapper:()=>$l,FocusService:()=>u_,GROUP_AUTO_COLUMN_ID:()=>da,Grid:()=>Wq,GridApi:()=>cm,GridBodyComp:()=>un,GridBodyCtrl:()=>zm,GridComp:()=>e_,GridCoreCreator:()=>Uq,GridCtrl:()=>Xp,GridHeaderComp:()=>ef,GridHeaderCtrl:()=>Xr,GridOptionsService:()=>Jy,GridSerializer:()=>Xb,GroupCellRenderer:()=>dl,GroupCellRendererCtrl:()=>Zo,GroupInstanceIdCreator:()=>Ze,HeaderCellCtrl:()=>Pr,HeaderFilterCellComp:()=>Om,HeaderFilterCellCtrl:()=>ur,HeaderGroupCellCtrl:()=>Gr,HeaderNavigationDirection:()=>Yn,HeaderNavigationService:()=>Kr,HeaderPositionUtils:()=>_y,HeaderRowComp:()=>$n,HeaderRowContainerComp:()=>Wr,HeaderRowContainerCtrl:()=>Nr,HeaderRowCtrl:()=>Qr,HeaderRowType:()=>Gn,HorizontalDirection:()=>Rs,HorizontalResizeService:()=>tf,InfiniteRowModelModule:()=>Rb,KeyCode:()=>zt,LargeTextCellEditor:()=>yo,LayoutCssClasses:()=>fm,LocaleService:()=>aq,Logger:()=>Kp,LoggerFactory:()=>zp,ManagedFocusFeature:()=>ki,ModuleNames:()=>W,ModuleRegistry:()=>K,MouseEventService:()=>_n,MoveColumnFeature:()=>Vn,NavigationService:()=>Cn,NumberCellEditor:()=>pl,NumberFilter:()=>Ns,NumberSequence:()=>mi,Optional:()=>te,PaginationProxy:()=>Zf,PinnedRowModel:()=>Af,PopupComponent:()=>co,PopupEditorWrapper:()=>Tn,PopupService:()=>sp,PositionableFeature:()=>Ei,PostConstruct:()=>Z,PreConstruct:()=>J,PreDestroy:()=>ee,PropertyKeys:()=>ga,ProvidedColumnGroup:()=>ye,ProvidedFilter:()=>Ai,Qualifier:()=>se,QuerySelector:()=>Ti,RefSelector:()=>Li,ResizeObserverService:()=>cf,RowAnimationCssClasses:()=>km,RowContainerComp:()=>wn,RowContainerCtrl:()=>sn,RowContainerName:()=>Lu,RowContainerType:()=>Iu,RowCtrl:()=>Bu,RowHighlightPosition:()=>am,RowNode:()=>Mo,RowNodeBlock:()=>Uf,RowNodeBlockLoader:()=>$f,RowNodeSorter:()=>Ty,RowPositionUtils:()=>Z_,RowRenderer:()=>xf,RowType:()=>mb,ScalarFilter:()=>ys,ScrollVisibleService:()=>fn,SelectCellEditor:()=>Co,SelectableService:()=>W_,SelectionHandleType:()=>Wm,ServerSideTransactionResultStatus:()=>qf,SetLeftFeature:()=>tr,SimpleFilter:()=>ps,SortController:()=>s_,SortIndicatorComp:()=>so,StandardMenuFactory:()=>lf,StylingService:()=>dc,TabGuardClassNames:()=>Hf,TabGuardComp:()=>hc,TabGuardCtrl:()=>qc,TabbedLayout:()=>nf,TemplateService:()=>Hp,TextCellEditor:()=>Oo,TextFilter:()=>js,TextFloatingFilter:()=>eo,Timer:()=>fi,TooltipFeature:()=>du,TouchListener:()=>ao,UserComponentFactory:()=>Zl,UserComponentRegistry:()=>vl,ValueCache:()=>h_,ValueFormatterService:()=>Ef,ValueParserService:()=>_q,ValueService:()=>Qp,VanillaFrameworkOverrides:()=>yp,VerticalDirection:()=>Es,VirtualList:()=>Ic,VirtualListDragFeature:()=>um,XmlFactory:()=>eC,ZipContainer:()=>tC,_:()=>li,__FORCE_MODULE_DETECTION:()=>Jq,createGrid:()=>Aq,getRowContainerTypeForName:()=>an});var f=Object.freeze({__proto__:null,makeNull:t,exists:i,missing:s,missingOrEmpty:o,toStringOrNull:l,attrToNumber:m,attrToBoolean:u,attrToString:function(e){if(null!=e&&""!==e)return e},jsonEquals:n,defaultComparator:function(e,a,d){void 0===d&&(d=!1);var t=null==e,i=null==a;if(e&&e.toNumber&&(e=e.toNumber()),a&&a.toNumber&&(a=a.toNumber()),t&&i)return 0;if(t)return-1;if(i)return 1;function s(e,a){return e>a?1:e=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},_=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o};function y(e,a){var d,t;if(null!=e)if(Array.isArray(e))for(var i=0;i=0)){var i=d[e],s=S(i)&&i.constructor===Object;t[e]=s?b(i):i}})),t}}function C(e,a){return e[a]}function P(e,a,d){e[a]=d}function h(e,a,d,t){var i=C(e,d);void 0!==i&&P(a,d,t?t(i):i)}function T(e){var a={};return e.filter((function(e){return null!=e})).forEach((function(e){Object.keys(e).forEach((function(e){return a[e]=null}))})),Object.keys(a)}function L(e){if(!e)return[];var a=Object;if("function"===typeof a.values)return a.values(e);var d=[];for(var t in e)e.hasOwnProperty(t)&&e.propertyIsEnumerable(t)&&d.push(e[t]);return d}function I(e,a,d,t){void 0===d&&(d=!0),void 0===t&&(t=!1),i(a)&&y(a,(function(a,i){var s=e[a];if(s!==i){if(t)if(null==s&&null!=i)"object"===typeof i&&i.constructor===Object&&(s={},e[a]=s);S(i)&&S(s)&&!Array.isArray(s)?I(s,i,d,t):(d||void 0!==i)&&(e[a]=i)}}))}function O(e,a,d){if(a&&e){if(!d)return e[a];for(var t=a.split("."),i=e,s=0;s1;)if(null==(i=i[t.shift()]))return d;var s=i[t[0]];return null!=s?s:d},set:function(e,a,d){if(null!=e){var t=a.split("."),i=e;t.forEach((function(e,a){i[e]||(i[e]={}),a0&&window.setTimeout((function(){return e.forEach((function(e){return e()}))}),a)}function R(e,a){var d;return function(){for(var t=[],i=0;id;(e()||l)&&(a(),o=!0,null!=s&&(window.clearInterval(s),s=null),l&&t&&console.warn(t))};l(),o||(s=window.setInterval(l,10))}function H(e){e&&e()}var W,j=Object.freeze({__proto__:null,doOnce:G,warnOnce:w,errorOnce:v,getFunctionName:M,isFunction:k,executeInAWhile:x,executeNextVMTurn:F,executeAfter:E,debounce:R,throttle:N,waitUntil:A,compose:function(){for(var e=[],a=0;a0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},z=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i<\/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===(i=Object.entries(W).find((function(e){var d=U(e,2);return d[0],d[1]===a})))||void 0===i?void 0:i[0];s="AG Grid: unable to use ".concat(d," as the ").concat(l," is not registered").concat(e.areGridScopedModules?" for gridId: ".concat(t):"",". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ").concat(l," } from '").concat(a,"';\n \n ModuleRegistry.registerModules([ ").concat(l," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else s="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(s)}),o),!1},e.__isRegistered=function(a,d){var t;return!!e.globalModulesMap[a]||!!(null===(t=e.gridModulesMap[d])||void 0===t?void 0:t[a])},e.__getRegisteredModules=function(a){return z(z([],U(r(e.globalModulesMap)),!1),U(r(e.gridModulesMap[a]||{})),!1)},e.__getGridRegisteredModules=function(a){var d;return r(null!==(d=e.gridModulesMap[a])&&void 0!==d?d:{})||[]},e.__isPackageBased=function(){return!e.moduleBased},e.globalModulesMap={},e.gridModulesMap={},e.areGridScopedModules=!1,e}(),Y=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},$=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i> 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 r(this.beanWrappers).map((function(e){return e.beanInstance}))},e.prototype.createBean=function(e,a){if(!e)throw Error("Can't wire to bean since it is null");return this.wireBeans([e],a),e},e.prototype.wireBeans=function(e,a){this.autoWireBeans(e),this.methodWireBeans(e),this.callLifeCycleMethods(e,"preConstructMethods"),i(a)&&e.forEach(a),this.callLifeCycleMethods(e,"postConstructMethods")},e.prototype.createBeans=function(){var e=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),y(this.beanWrappers,(function(a,d){var t;d.bean.__agBeanMetaData&&d.bean.__agBeanMetaData.autowireMethods&&d.bean.__agBeanMetaData.autowireMethods.agConstructor&&(t=d.bean.__agBeanMetaData.autowireMethods.agConstructor);var i=e.getBeansForParameters(t,d.bean.name),s=new(d.bean.bind.apply(d.bean,$([null],Y(i),!1)));d.beanInstance=s}));var a=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(a))},e.prototype.createBeanWrapper=function(e){var a=e.__agBeanMetaData;if(!a){var d=void 0;return d=e.prototype.constructor?M(e.prototype.constructor):""+e,void console.error("Context item ".concat(d," is not a bean"))}var t={bean:e,beanInstance:null,beanName:a.beanName};this.beanWrappers[a.beanName]=t},e.prototype.autoWireBeans=function(e){var a=this;e.forEach((function(e){a.forEachMetaDataInHierarchy(e,(function(d,t){var i=d.agClassAttributes;i&&i.forEach((function(d){var i=a.lookupBeanInstance(t,d.beanName,d.optional);e[d.attributeName]=i}))}))}))},e.prototype.methodWireBeans=function(e){var a=this;e.forEach((function(e){a.forEachMetaDataInHierarchy(e,(function(d,t){y(d.autowireMethods,(function(d,i){if("agConstructor"!==d){var s=a.getBeansForParameters(i,t);e[d].apply(e,s)}}))}))}))},e.prototype.forEachMetaDataInHierarchy=function(e,a){for(var d=Object.getPrototypeOf(e);null!=d;){var t=d.constructor;if(t.hasOwnProperty("__agBeanMetaData"))a(t.__agBeanMetaData,this.getBeanName(t));d=Object.getPrototypeOf(d)}},e.prototype.getBeanName=function(e){if(e.__agBeanMetaData&&e.__agBeanMetaData.beanName)return e.__agBeanMetaData.beanName;var a=e.toString();return a.substring(9,a.indexOf("("))},e.prototype.getBeansForParameters=function(e,a){var d=this,t=[];return e&&y(e,(function(e,i){var s=d.lookupBeanInstance(a,i);t[Number(e)]=s})),t},e.prototype.lookupBeanInstance=function(e,a,d){if(void 0===d&&(d=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(a," is used after the grid is destroyed!")),null;if("context"===a)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(a))return this.contextParams.providedBeanInstances[a];var t=this.beanWrappers[a];return t?t.beanInstance:(d||console.error("AG Grid: unable to find bean reference ".concat(a," while initialising ").concat(e)),null)},e.prototype.callLifeCycleMethods=function(e,a){var d=this;e.forEach((function(e){return d.callLifeCycleMethodsOnBean(e,a)}))},e.prototype.callLifeCycleMethodsOnBean=function(e,a,d){var t={};this.forEachMetaDataInHierarchy(e,(function(e){var i=e[a];i&&i.forEach((function(e){e!=d&&(t[e]=!0)}))})),Object.keys(t).forEach((function(a){return e[a]()}))},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,K.__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 a=this;return e?(e.forEach((function(e){a.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,a,d){var t=oe(e.constructor);t.preConstructMethods||(t.preConstructMethods=[]),t.preConstructMethods.push(a)}function Z(e,a,d){var t=oe(e.constructor);t.postConstructMethods||(t.postConstructMethods=[]),t.postConstructMethods.push(a)}function ee(e,a,d){var t=oe(e.constructor);t.preDestroyMethods||(t.preDestroyMethods=[]),t.preDestroyMethods.push(a)}function ae(e){return function(a){oe(a).beanName=e}}function de(e){return function(a,d,t){ie(a,e,!1,a,d,null)}}function te(e){return function(a,d,t){ie(a,e,!0,a,d,null)}}function ie(e,a,d,t,i,s){if(null!==a)if("number"!==typeof s){var o=oe(e.constructor);o.agClassAttributes||(o.agClassAttributes=[]),o.agClassAttributes.push({attributeName:i,beanName:a,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 se(e){return function(a,d,t){var i,s="function"==typeof a?a:a.constructor;if("number"===typeof t){var o=void 0;d?(i=oe(s),o=d):(i=oe(s),o="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[o]||(i.autowireMethods[o]={}),i.autowireMethods[o][t]=e}}}function oe(e){return e.hasOwnProperty("__agBeanMetaData")||(e.__agBeanMetaData={}),e.__agBeanMetaData}var le=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},me=function(e,a){return function(d,t){a(d,t,e)}},ue=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,a,d,t,i){if(void 0===t&&(t=null),void 0===i&&(i=null),this.frameworkOverrides=d,this.gridOptionsService=a,t){var s=a.useAsyncEvents();this.addGlobalListener(t,s)}i&&this.addGlobalListener(i,!1)},e.prototype.getListeners=function(e,a,d){var t=a?this.allAsyncListeners:this.allSyncListeners,i=t.get(e);return!i&&d&&(i=new Set,t.set(e,i)),i},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,a,d){void 0===d&&(d=!1),this.getListeners(e,d,!0).add(a)},e.prototype.removeEventListener=function(e,a,d){void 0===d&&(d=!1);var t=this.getListeners(e,d,!1);t&&(t.delete(a),0===t.size&&(d?this.allAsyncListeners:this.allSyncListeners).delete(e))},e.prototype.addGlobalListener=function(e,a){void 0===a&&(a=!1),(a?this.globalAsyncListeners:this.globalSyncListeners).add(e)},e.prototype.removeGlobalListener=function(e,a){void 0===a&&(a=!1),(a?this.globalAsyncListeners:this.globalSyncListeners).delete(e)},e.prototype.dispatchEvent=function(e){var a=e;if(this.gridOptionsService){var d=this.gridOptionsService,t=d.api,i=d.columnApi,s=d.context;a.api=t,a.columnApi=i,a.context=s}this.dispatchToListeners(a,!0),this.dispatchToListeners(a,!1),this.firedEvents[a.type]=!0},e.prototype.dispatchEventOnce=function(e){this.firedEvents[e.type]||this.dispatchEvent(e)},e.prototype.dispatchToListeners=function(e,a){var d,t=this,i=e.type;if(a&&"event"in e){var s=e.event;s instanceof Event&&(e.eventPath=s.composedPath())}var o=null!==(d=this.getListeners(i,a,!1))&&void 0!==d?d:new Set,l=new Set(o);l.size>0&&function(d,i){d.forEach((function(d){i.has(d)&&(a?t.dispatchAsync((function(){return d(e)})):d(e))}))}(l,o),new Set(a?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(d){a?t.dispatchAsync((function(){return t.frameworkOverrides.dispatchEvent(i,(function(){return d(i,e)}),!0)})):t.frameworkOverrides.dispatchEvent(i,(function(){return d(i,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([me(0,se("loggerFactory")),me(1,se("gridOptionsService")),me(2,se("frameworkOverrides")),me(3,se("globalEventListener")),me(4,se("globalSyncEventListener"))],e.prototype,"setBeans",null),e=le([ae("eventService")],e)}(),ne=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},re={resizable:!0,sortable:!0},fe=0;function ce(){return fe++}var pe=function(){function e(e,a,d,t){this.instanceId=ce(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new ue,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=e,this.userProvidedColDef=a,this.colId=d,this.primary=t,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 a=e.sortIndex,d=e.initialSortIndex;void 0!==a?null!==a&&(this.sortIndex=a):null!==d&&(this.sortIndex=d);var t=e.hide,i=e.initialHide;this.visible=void 0!==t?!t:!i,void 0!==e.pinned?this.setPinned(e.pinned):this.setPinned(e.initialPinned);var s=e.flex,o=e.initialFlex;void 0!==s?this.flex=s:void 0!==o&&(this.flex=o)},e.prototype.setColDef=function(e,a,d){void 0===d&&(d="api"),this.colDef=e,this.userProvidedColDef=a,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=i(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!e,this.tooltipFieldContainsDots=i(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=i(this.colDef.tooltipField)||i(this.colDef.tooltipValueGetter)||i(this.colDef.tooltipComponent)},e.prototype.resetActualWidth=function(e){void 0===e&&(e="api");var a=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(a,e,!0)},e.prototype.isEmptyGroup=function(){return!1},e.prototype.isRowGroupDisplayed=function(e){if(s(this.colDef)||s(this.colDef.showRowGroup))return!1;var a=!0===this.colDef.showRowGroup,d=this.colDef.showRowGroup===e;return a||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,a){this.eventService.addEventListener(e,a)},e.prototype.removeEventListener=function(e,a){this.eventService.removeEventListener(e,a)},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 a=this.createColumnFunctionCallbackParams(e);return(0,this.colDef.suppressNavigable)(a)}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 a;return null!==(a=this.colDef[e])&&void 0!==a?a:re[e]},e.prototype.isColumnFunc=function(e,a){return"boolean"===typeof a?a:"function"===typeof a&&a(this.createColumnFunctionCallbackParams(e))},e.prototype.setMoving=function(e,a){void 0===a&&(a="api"),this.moving=e,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",a))},e.prototype.createColumnEvent=function(e,a){return{type:e,column:this,columns:[this],source:a,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,a){void 0===a&&(a="api"),this.sort!==e&&(this.sort=e,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",a))),this.dispatchStateUpdatedEvent("sort")},e.prototype.setMenuVisible=function(e,a){void 0===a&&(a="api"),this.menuVisible!==e&&(this.menuVisible=e,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",a)))},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 s(this.sort)},e.prototype.isSorting=function(){return i(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,a){void 0===a&&(a="api"),this.oldLeft=this.left,this.left!==e&&(this.left=e,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",a)))},e.prototype.isFilterActive=function(){return this.filterActive},e.prototype.setFilterActive=function(e,a,d){void 0===a&&(a="api"),this.filterActive!==e&&(this.filterActive=e,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",a)));var t=this.createColumnEvent("filterChanged",a);d&&I(t,d),this.eventService.dispatchEvent(t)},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,a){void 0===a&&(a="api"),this.firstRightPinned!==e&&(this.firstRightPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",a)))},e.prototype.setLastLeftPinned=function(e,a){void 0===a&&(a="api"),this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",a)))},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,a){void 0===a&&(a="api");var d=!0===e;this.visible!==d&&(this.visible=d,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",a))),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 a=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,a},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(s(this.colDef.colSpan))return 1;var a=this.createBaseColDefParams(e),d=this.colDef.colSpan(a);return Math.max(d,1)},e.prototype.getRowSpan=function(e){if(s(this.colDef.rowSpan))return 1;var a=this.createBaseColDefParams(e),d=this.colDef.rowSpan(a);return Math.max(d,1)},e.prototype.setActualWidth=function(e,a,d){void 0===a&&(a="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"!==a&&"gridInitializing"!==a&&(this.flex=null),d||this.fireColumnWidthChangedEvent(a)),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"),i(this.minWidth)&&this.setActualWidth(this.minWidth,e)},e.prototype.setRowGroupActive=function(e,a){void 0===a&&(a="api"),this.rowGroupActive!==e&&(this.rowGroupActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",a))),this.dispatchStateUpdatedEvent("rowGroup")},e.prototype.isRowGroupActive=function(){return this.rowGroupActive},e.prototype.setPivotActive=function(e,a){void 0===a&&(a="api"),this.pivotActive!==e&&(this.pivotActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",a))),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,a){void 0===a&&(a="api"),this.aggregationActive!==e&&(this.aggregationActive=e,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",a)))},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 a=this.getColDef().menuTabs;return null==a&&(a=e),a},e.prototype.dispatchStateUpdatedEvent=function(a){this.eventService.dispatchEvent({type:e.EVENT_STATE_UPDATED,key:a})},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,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ye=function(){function e(e,a,d,t){this.localEventService=new ue,this.expandable=!1,this.instanceId=ce(),this.expandableListenerRemoveCallback=null,this.colGroupDef=e,this.groupId=a,this.expanded=!!e&&!!e.openByDefault,this.padding=d,this.level=t}return e.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},e.prototype.reset=function(e,a){this.colGroupDef=e,this.level=a,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(a){this.expanded=void 0!==a&&a;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(a){this.children&&this.children.forEach((function(d){d instanceof pe?a.push(d):d instanceof e&&d.addLeafColumns(a)}))},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 a=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(e){return e.addEventListener("visibleChanged",a)})),this.expandableListenerRemoveCallback=function(){e.getLeafColumns().forEach((function(e){return e.removeEventListener("visibleChanged",a)})),e.expandableListenerRemoveCallback=null}},e.prototype.setExpandable=function(){if(!this.isPadding()){for(var a=!1,d=!1,t=!1,i=this.findChildrenRemovingPadding(),s=0,o=i.length;s=0&&(e[d]=e[e.length-1],e.pop())}function Le(e,a){var d=e.indexOf(a);d>=0&&e.splice(d,1)}function Ie(e,a){for(var d=0;d-1}function ge(e){return[].concat.apply([],e)}function Ge(e,a){null!=a&&null!=e&&a.forEach((function(a){return e.push(a)}))}var we=Object.freeze({__proto__:null,firstExistingValue:be,existsAndNotEmpty:function(e){return null!=e&&e.length>0},last:Ce,areEqual:Pe,shallowCompare:function(e,a){return Pe(e,a)},sortNumerically:he,removeRepeatsFromArray:function(e,a){if(e)for(var d=e.length-2;d>=0;d--){var t=e[d]===a,i=e[d+1]===a;t&&i&&e.splice(d+1,1)}},removeFromUnorderedArray:Te,removeFromArray:Le,removeAllFromUnorderedArray:Ie,removeAllFromArray:Oe,insertIntoArray:Be,insertArrayIntoArray:function(e,a,d){if(null!=e&&null!=a)for(var t=a.length-1;t>=0;t--){Be(e,a[t],d)}},moveInArray:Se,includes:De,flatten:ge,pushAll:Ge,toStrings:function(e){return e.map(l)},forEachReverse:function(e,a){if(null!=e)for(var d=e.length-1;d>=0;d--)a(e[d],d)}}),ve="__ag_Grid_Stop_Propagation",Me=["touchstart","touchend","touchmove","touchcancel","scroll"],ke={};function xe(e){e[ve]=!0}function Qe(e){return!0===e[ve]}var Ve=function(){var e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return function(a){if("boolean"===typeof ke[a])return ke[a];var d=document.createElement(e[a]||"div");return ke[a="on"+a]=a in d}}();function Fe(e,a,d){for(var t=a;t;){var i=e.getDomData(t,d);if(i)return i;t=t.parentElement}return null}function Ee(e,a){return!(!a||!e)&&Ne(a).indexOf(e)>=0}function Re(e){for(var a=[],d=e.target;d;)a.push(d),d=d.parentElement;return a}function Ne(e){var a=e;return a.path?a.path:a.composedPath?a.composedPath():Re(a)}function Ae(e,a,d,t){var i=De(Me,d)?{passive:!0}:void 0;e&&e.addEventListener&&e.addEventListener(a,d,t,i)}var He=Object.freeze({__proto__:null,stopPropagationForAgGrid:xe,isStopPropagationForAgGrid:Qe,isEventSupported:Ve,getCtrlForEventTarget:Fe,isElementInEventPath:Ee,createEventPath:Re,getEventPath:Ne,addSafePassiveEventListener:Ae}),We=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},je=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,a){this.localEventService||(this.localEventService=new ue),this.localEventService.addEventListener(e,a)},e.prototype.removeEventListener=function(e,a){this.localEventService&&this.localEventService.removeEventListener(e,a)},e.prototype.dispatchEventAsync=function(e){var a=this;window.setTimeout((function(){return a.dispatchEvent(e)}),0)},e.prototype.dispatchEvent=function(e){this.localEventService&&this.localEventService.dispatchEvent(e)},e.prototype.addManagedListener=function(e,a,d){var t=this;if(!this.destroyed){e instanceof HTMLElement?Ae(this.getFrameworkOverrides(),e,a,d):e.addEventListener(a,d);var i=function(){return e.removeEventListener(a,d),t.destroyFunctions=t.destroyFunctions.filter((function(e){return e!==i})),null};return this.destroyFunctions.push(i),i}},e.prototype.setupGridOptionListener=function(e,a){var d=this;this.gridOptionsService.addEventListener(e,a);var t=function(){return d.gridOptionsService.removeEventListener(e,a),d.destroyFunctions=d.destroyFunctions.filter((function(e){return e!==t})),null};this.destroyFunctions.push(t)},e.prototype.addManagedPropertyListener=function(e,a){this.destroyed||this.setupGridOptionListener(e,a)},e.prototype.addManagedPropertyListeners=function(e,a){var d=this;if(!this.destroyed){var t=e.join("-")+this.propertyListenerId++,i=function(e){if(e.changeSet){if(e.changeSet&&e.changeSet.id===d.lastChangeSetIdLookup[t])return;d.lastChangeSetIdLookup[t]=e.changeSet.id}var i={type:"gridPropertyChanged",changeSet:e.changeSet};a(i)};e.forEach((function(e){return d.setupGridOptionListener(e,i)}))}},e.prototype.addDestroyFunc=function(e){this.isAlive()?this.destroyFunctions.push(e):e()},e.prototype.createManagedBean=function(e,a){var d=this.createBean(e,a);return this.addDestroyFunc(this.destroyBean.bind(this,e,a)),d},e.prototype.createBean=function(e,a,d){return(a||this.getContext()).createBean(e,d)},e.prototype.destroyBean=function(e,a){return(a||this.getContext()).destroyBean(e)},e.prototype.destroyBeans=function(e,a){var d=this;return e&&e.forEach((function(e){return d.destroyBean(e,a)})),[]},e.EVENT_DESTROYED="destroyed",We([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),We([de("context")],e.prototype,"context",void 0),We([de("eventService")],e.prototype,"eventService",void 0),We([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),We([de("localeService")],e.prototype,"localeService",void 0),We([de("environment")],e.prototype,"environment",void 0),We([ee],e.prototype,"destroy",null),e}(),Ue=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ze=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ke=function(e,a){return function(d,t){a(d,t,e)}},Ye=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Ue(a,e),a.prototype.setBeans=function(e){this.logger=e.create("ColumnFactory")},a.prototype.createColumnTree=function(e,a,d){var t=new c,i=this.extractExistingTreeData(d),s=i.existingCols,o=i.existingGroups,l=i.existingColKeys;t.addExistingKeys(l);var m=this.recursivelyCreateColumns(e,0,a,s,t,o),u=this.findMaxDept(m,0);this.logger.log("Number of levels for grouped columns is "+u);var n=this.balanceColumnTree(m,0,u,t);return this.columnUtils.depthFirstOriginalTreeSearch(null,n,(function(e,a){e instanceof ye&&e.setupExpandable(),e.setOriginalParent(a)})),{columnTree:n,treeDept:u}},a.prototype.extractExistingTreeData=function(e){var a=[],d=[],t=[];return e&&this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){if(e instanceof ye){var i=e;d.push(i)}else{var s=e;t.push(s.getId()),a.push(s)}})),{existingCols:a,existingGroups:d,existingColKeys:t}},a.prototype.createForAutoGroups=function(e,a){var d=this;return e.map((function(e){return d.createAutoGroupTreeItem(a,e)}))},a.prototype.createAutoGroupTreeItem=function(e,a){for(var d=this.findDepth(e),t=a,i=d-1;i>=0;i--){var s=new ye(null,"FAKE_PATH_".concat(a.getId(),"}_").concat(i),!0,i);this.createBean(s),s.setChildren([t]),t.setOriginalParent(s),t=s}return 0===d&&a.setOriginalParent(null),t},a.prototype.findDepth=function(e){for(var a=0,d=e;d&&d[0]&&d[0]instanceof ye;)a++,d=d[0].getChildren();return a},a.prototype.balanceColumnTree=function(e,a,d,t){for(var i=[],s=0;s=a;r--){var f=t.getUniqueKey(null,null),c=this.createMergedColGroupDef(null),p=new ye(c,f,!0,a);this.createBean(p),n&&n.setChildren([p]),n=p,u||(u=n)}if(u&&n){if(i.push(u),e.some((function(e){return e instanceof ye}))){n.setChildren([o]);continue}n.setChildren(e);break}i.push(o)}}return i},a.prototype.findMaxDept=function(e,a){for(var d=a,t=0;t=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Xe=function(){function e(e,a,d,t){this.displayedChildren=[],this.localEventService=new ue,this.groupId=a,this.partId=d,this.providedColumnGroup=e,this.pinned=t}return e.createUniqueId=function(e,a){return e+"_"+a},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(a){a instanceof e&&a.checkLeft()})),this.displayedChildren.length>0)if(this.gridOptionsService.get("enableRtl")){var a=Ce(this.displayedChildren).getLeft();this.setLeft(a)}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(a){this.oldLeft=a,this.left!==a&&(this.left=a,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,a){this.localEventService.addEventListener(e,a)},e.prototype.removeEventListener=function(e,a){this.localEventService.removeEventListener(e,a)},e.prototype.getGroupId=function(){return this.groupId},e.prototype.getPartId=function(){return this.partId},e.prototype.isChildInThisGroupDeepSearch=function(a){var d=!1;return this.children.forEach((function(t){a===t&&(d=!0),t instanceof e&&t.isChildInThisGroupDeepSearch(a)&&(d=!0)})),d},e.prototype.getActualWidth=function(){var e=0;return this.displayedChildren&&this.displayedChildren.forEach((function(a){e+=a.getActualWidth()})),e},e.prototype.isResizable=function(){if(!this.displayedChildren)return!1;var e=!1;return this.displayedChildren.forEach((function(a){a.isResizable()&&(e=!0)})),e},e.prototype.getMinWidth=function(){var e=0;return this.displayedChildren.forEach((function(a){e+=a.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(a){this.displayedChildren.forEach((function(d){d instanceof pe?a.push(d):d instanceof e&&d.addDisplayedLeafColumns(a)}))},e.prototype.addLeafColumns=function(a){this.children.forEach((function(d){d instanceof pe?a.push(d):d instanceof e&&d.addLeafColumns(a)}))},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 a=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(t){if(!(t instanceof e&&(!t.displayedChildren||!t.displayedChildren.length)))switch(t.getColumnGroupShow()){case"open":d.providedColumnGroup.isExpanded()&&a.displayedChildren.push(t);break;case"closed":d.providedColumnGroup.isExpanded()||a.displayedChildren.push(t);break;default:a.displayedChildren.push(t)}})),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 a,d=this.existingIds[e];return a="number"!==typeof d?0:d+1,this.existingIds[e]=a,a},e}(),ea=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),aa=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},da="ag-Grid-AutoColumn",ta=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return ea(a,e),a.prototype.createAutoGroupColumns=function(e){var a=this,d=[],t=this.gridOptionsService.get("treeData"),i=this.gridOptionsService.isGroupMultiAutoColumn();return t&&i&&(console.warn('AG Grid: you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),i=!1),i?e.forEach((function(e,t){d.push(a.createOneAutoGroupColumn(e,t))})):d.push(this.createOneAutoGroupColumn()),d},a.prototype.updateAutoGroupColumns=function(e){var a=this;e.forEach((function(e,d){return a.updateOneAutoGroupColumn(e,d)}))},a.prototype.createOneAutoGroupColumn=function(e,a){var d;d=e?"".concat(da,"-").concat(e.getId()):da;var t=this.createAutoGroupColDef(d,e,a);t.colId=d;var i=new pe(t,null,d,!0);return this.context.createBean(i),i},a.prototype.updateOneAutoGroupColumn=function(e,a){var d=e.getColDef(),t="string"==typeof d.showRowGroup?d.showRowGroup:void 0,i=null!=t?this.columnModel.getPrimaryColumn(t):void 0,s=this.createAutoGroupColDef(e.getId(),null!==i&&void 0!==i?i:void 0,a);e.setColDef(s,null),this.columnFactory.applyColumnState(e,s)},a.prototype.createAutoGroupColDef=function(e,a,d){var t=this.createBaseColDef(a);(I(t,this.gridOptionsService.get("autoGroupColumnDef")),t=this.columnFactory.addColumnDefaultAndTypes(t,e),this.gridOptionsService.get("treeData"))||s(t.field)&&s(t.valueGetter)&&s(t.filterValueGetter)&&"agGroupColumnFilter"!==t.filter&&(t.filter=!1);d&&d>0&&(t.headerCheckboxSelection=!1);var i=this.gridOptionsService.isColumnsSortingCoupledToGroup(),o=t.valueGetter||null!=t.field;return i&&!o&&(t.sortIndex=void 0,t.initialSort=void 0),t},a.prototype.createBaseColDef=function(e){var a=this.gridOptionsService.get("autoGroupColumnDef"),d={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(a&&(a.cellRenderer||a.cellRendererSelector)||(d.cellRenderer="agGroupCellRenderer"),e){var t=e.getColDef();Object.assign(d,{headerName:this.columnModel.getDisplayNameForColumn(e,"header"),headerValueGetter:t.headerValueGetter}),t.cellRenderer&&Object.assign(d,{cellRendererParams:{innerRenderer:t.cellRenderer,innerRendererParams:t.cellRendererParams}}),d.showRowGroup=e.getColId()}else d.showRowGroup=!0;return d},aa([de("columnModel")],a.prototype,"columnModel",void 0),aa([de("columnFactory")],a.prototype,"columnFactory",void 0),a=aa([ae("autoGroupColService")],a)}(je),ia=/[&<>"']/g,sa={"&":"&","<":"<",">":">",'"':""","'":"'"};function oa(e,a){if(null==e)return null;var d=e.toString().toString();return a?d:d.replace(ia,(function(e){return sa[e]}))}function la(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 ma(e){return e.replace(/[A-Z]/g,(function(e){return"-".concat(e.toLocaleLowerCase())}))}var ua=Object.freeze({__proto__:null,utf8_encode:function(e){var a=String.fromCharCode;function d(e,d){return a(e>>d&63|128)}function t(e){if(e>=0&&e<=31&&10!==e){var t=e.toString(16).toUpperCase().padStart(4,"0");return"_x".concat(t,"_")}if(0==(4294967168&e))return a(e);var i="";return 0==(4294965248&e)?i=a(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),i=a(e>>12&15|224),i+=d(e,6)):0==(4292870144&e)&&(i=a(e>>18&7|240),i+=d(e,12),i+=d(e,6)),i+=a(63&e|128)}for(var i=function(e){var a=[];if(!e)return[];for(var d,t,i=e.length,s=0;s=55296&&d<=56319&&s=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},pa=function(e,a){return function(d,t){a(d,t,e)}},_a=function(e,a){var d={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&a.indexOf(t)<0&&(d[t]=e[t]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(t=Object.getOwnPropertySymbols(e);i0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},qa=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Ca=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.primaryHeaderRowCount=0,a.secondaryHeaderRowCount=0,a.gridHeaderRowCount=0,a.displayedColumnsLeft=[],a.displayedColumnsRight=[],a.displayedColumnsCenter=[],a.displayedColumns=[],a.displayedColumnsAndGroupsMap={},a.viewportColumns=[],a.viewportColumnsHash="",a.headerViewportColumns=[],a.viewportColumnsCenter=[],a.headerViewportColumnsCenter=[],a.autoHeightActiveAtLeastOnce=!1,a.rowGroupColumns=[],a.valueColumns=[],a.pivotColumns=[],a.ready=!1,a.autoGroupsNeedBuilding=!1,a.forceRecreateAutoGroups=!1,a.pivotMode=!1,a.bodyWidth=0,a.leftWidth=0,a.rightWidth=0,a.bodyWidthDirty=!0,a.shouldQueueResizeOperations=!1,a.resizeOperationQueue=[],a}return fa(a,e),a.prototype.init=function(){var e=this;this.suppressColumnVirtualisation=this.gridOptionsService.get("suppressColumnVirtualisation");var a=this.gridOptionsService.get("pivotMode");this.isPivotSettingAllowed(a)&&(this.pivotMode=a),this.addManagedPropertyListeners(["groupDisplayType","treeData","treeDataDisplayType","groupHideOpenParents"],(function(){return e.buildAutoGroupColumns()})),this.addManagedPropertyListener("autoGroupColumnDef",(function(){return e.onAutoGroupColumnDefChanged()})),this.addManagedPropertyListeners(["defaultColDef","columnTypes","suppressFieldDotNotation"],(function(a){return e.onSharedColDefChanged(a.source)})),this.addManagedPropertyListener("pivotMode",(function(a){return e.setPivotMode(e.gridOptionsService.get("pivotMode"),a.source)})),this.addManagedListener(this.eventService,Je.EVENT_FIRST_DATA_RENDERED,(function(){return e.onFirstDataRendered()}))},a.prototype.buildAutoGroupColumns=function(){this.columnDefs&&(this.autoGroupsNeedBuilding=!0,this.forceRecreateAutoGroups=!0,this.updateGridColumns(),this.updateDisplayedColumns("gridOptionsChanged"))},a.prototype.onAutoGroupColumnDefChanged=function(){this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns)},a.prototype.onSharedColDefChanged=function(e){void 0===e&&(e="api"),this.gridColumns&&(this.groupAutoColumns&&this.autoGroupColService.updateAutoGroupColumns(this.groupAutoColumns),this.createColumnsFromColumnDefs(!0,e))},a.prototype.setColumnDefs=function(e,a){void 0===a&&(a="api");var d=!!this.columnDefs;this.columnDefs=e,this.createColumnsFromColumnDefs(d,a)},a.prototype.recreateColumnDefs=function(e){void 0===e&&(e="api"),this.onSharedColDefChanged(e)},a.prototype.destroyOldColumns=function(e,a){var d={};if(e){this.columnUtils.depthFirstOriginalTreeSearch(null,e,(function(e){d[e.getInstanceId()]=e})),a&&this.columnUtils.depthFirstOriginalTreeSearch(null,a,(function(e){d[e.getInstanceId()]=null}));var t=Object.values(d).filter((function(e){return null!=e}));this.destroyBeans(t)}},a.prototype.destroyColumns=function(){this.destroyOldColumns(this.primaryColumnTree),this.destroyOldColumns(this.secondaryBalancedTree),this.destroyOldColumns(this.groupAutoColsBalancedTree)},a.prototype.createColumnsFromColumnDefs=function(e,a){var d=this;void 0===a&&(a="api");var t=e?this.compareColumnStatesAndDispatchEvents(a):void 0;this.valueCache.expire(),this.autoGroupsNeedBuilding=!0;var i=this.primaryColumns,s=this.primaryColumnTree,o=this.columnFactory.createColumnTree(this.columnDefs,!0,s);this.destroyOldColumns(this.primaryColumnTree,o.columnTree),this.primaryColumnTree=o.columnTree,this.primaryHeaderRowCount=o.treeDept+1,this.primaryColumns=this.getColumnsFromTree(this.primaryColumnTree),this.primaryColumnsMap={},this.primaryColumns.forEach((function(e){return d.primaryColumnsMap[e.getId()]=e})),this.extractRowGroupColumns(a,i),this.extractPivotColumns(a,i),this.extractValueColumns(a,i),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(a),this.checkViewportColumns()),this.dispatchEverythingChanged(a),t&&t(),this.dispatchNewColumnsLoaded(a)},a.prototype.dispatchNewColumnsLoaded=function(e){var a={type:Je.EVENT_NEW_COLUMNS_LOADED,source:e};this.eventService.dispatchEvent(a),"gridInitializing"===e&&this.onColumnsReady()},a.prototype.dispatchEverythingChanged=function(e){void 0===e&&(e="api");var a={type:Je.EVENT_COLUMN_EVERYTHING_CHANGED,source:e};this.eventService.dispatchEvent(a)},a.prototype.orderGridColumnsLikePrimary=function(){var e=this,a=this.primaryColumns;if(a){var d=a.filter((function(a){return e.gridColumns.indexOf(a)>=0})),t=this.gridColumns.filter((function(e){return d.indexOf(e)<0}));this.gridColumns=qa(qa([],ya(t),!1),ya(d),!1),this.gridColumns=this.placeLockedColumns(this.gridColumns)}},a.prototype.getAllDisplayedAutoHeightCols=function(){return this.displayedAutoHeightCols},a.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)},a.prototype.getDisplayedColumnsStartingAt=function(e){for(var a=e,d=[];null!=a;)d.push(a),a=this.getDisplayedColAfter(a);return d},a.prototype.checkViewportColumns=function(e){if((void 0===e&&(e=!1),null!=this.displayedColumnsCenter)&&this.extractViewport()){var a={type:Je.EVENT_VIRTUAL_COLUMNS_CHANGED,afterScroll:e};this.eventService.dispatchEvent(a)}},a.prototype.setViewportPosition=function(e,a,d){void 0===d&&(d=!1),(e!==this.scrollWidth||a!==this.scrollPosition||this.bodyWidthDirty)&&(this.scrollWidth=e,this.scrollPosition=a,this.bodyWidthDirty=!0,this.setViewport(),this.ready&&this.checkViewportColumns(d))},a.prototype.isPivotMode=function(){return this.pivotMode},a.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)},a.prototype.setPivotMode=function(e,a){if(void 0===a&&(a="api"),e!==this.pivotMode&&this.isPivotSettingAllowed(this.pivotMode)&&(this.pivotMode=e,this.gridColumns)){this.autoGroupsNeedBuilding=!0,this.updateGridColumns(),this.updateDisplayedColumns(a);var d={type:Je.EVENT_COLUMN_PIVOT_MODE_CHANGED};this.eventService.dispatchEvent(d)}},a.prototype.getSecondaryPivotColumn=function(e,a){if(s(this.secondaryColumns))return null;var d=this.getPrimaryColumn(a),t=null;return this.secondaryColumns.forEach((function(a){var i=a.getColDef().pivotKeys,s=a.getColDef().pivotValueColumn;Pe(i,e)&&s===d&&(t=a)})),t},a.prototype.setBeans=function(e){this.logger=e.create("columnModel")},a.prototype.setFirstRightAndLastLeftPinned=function(e){var a,d;this.gridOptionsService.get("enableRtl")?(a=this.displayedColumnsLeft?this.displayedColumnsLeft[0]:null,d=this.displayedColumnsRight?Ce(this.displayedColumnsRight):null):(a=this.displayedColumnsLeft?Ce(this.displayedColumnsLeft):null,d=this.displayedColumnsRight?this.displayedColumnsRight[0]:null),this.gridColumns.forEach((function(t){t.setLastLeftPinned(t===a,e),t.setFirstRightPinned(t===d,e)}))},a.prototype.autoSizeColumns=function(e){var a=this;if(this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return a.autoSizeColumns(e)}));else{var d=e.columns,t=e.skipHeader,i=e.skipHeaderGroups,s=e.stopAtGroup,o=e.source,l=void 0===o?"api":o;this.animationFrameService.flushAllFrames();for(var m=[],u=-1,n=null!=t?t:this.gridOptionsService.get("skipHeaderOnAutoSize"),r=null!=i?i:n;0!==u;)u=0,this.actionOnGridColumns(d,(function(e){if(m.indexOf(e)>=0)return!1;var d=a.autoWidthCalculator.getPreferredWidthForColumn(e,n);if(d>0){var t=a.normaliseColumnWidth(e,d);e.setActualWidth(t,l),m.push(e),u++}return!0}),l);r||this.autoSizeColumnGroupsByColumns(d,l,s),this.dispatchColumnResizedEvent(m,!0,"autosizeColumns")}},a.prototype.dispatchColumnResizedEvent=function(e,a,d,t){if(void 0===t&&(t=null),e&&e.length){var i={type:Je.EVENT_COLUMN_RESIZED,columns:e,column:1===e.length?e[0]:null,flexColumns:t,finished:a,source:d};this.eventService.dispatchEvent(i)}},a.prototype.dispatchColumnChangedEvent=function(e,a,d){var t={type:e,columns:a,column:a&&1==a.length?a[0]:null,source:d};this.eventService.dispatchEvent(t)},a.prototype.dispatchColumnMovedEvent=function(e){var a=e.movedColumns,d=e.source,t=e.toIndex,i=e.finished,s={type:Je.EVENT_COLUMN_MOVED,columns:a,column:a&&1===a.length?a[0]:null,toIndex:t,finished:i,source:d};this.eventService.dispatchEvent(s)},a.prototype.dispatchColumnPinnedEvent=function(e,a){if(e.length){var d=1===e.length?e[0]:null,t=this.getCommonValue(e,(function(e){return e.getPinned()})),i={type:Je.EVENT_COLUMN_PINNED,pinned:null!=t?t:null,columns:e,column:d,source:a};this.eventService.dispatchEvent(i)}},a.prototype.dispatchColumnVisibleEvent=function(e,a){if(e.length){var d=1===e.length?e[0]:null,t=this.getCommonValue(e,(function(e){return e.isVisible()})),i={type:Je.EVENT_COLUMN_VISIBLE,visible:t,columns:e,column:d,source:a};this.eventService.dispatchEvent(i)}},a.prototype.autoSizeColumn=function(e,a,d){void 0===d&&(d="api"),e&&this.autoSizeColumns({columns:[e],skipHeader:a,skipHeaderGroups:!0,source:d})},a.prototype.autoSizeColumnGroupsByColumns=function(e,a,d){var t,i,s,o,l,m=new Set;this.getGridColumns(e).forEach((function(e){for(var a=e.getParent();a&&a!=d;)a.isPadding()||m.add(a),a=a.getParent()}));try{for(var u=ba(m),n=u.next();!n.done;n=u.next()){var r=n.value;try{for(var f=(s=void 0,ba(this.ctrlsService.getHeaderRowContainerCtrls())),c=f.next();!c.done;c=f.next()){if(l=c.value.getHeaderCtrlForColumn(r))break}}catch(p){s={error:p}}finally{try{c&&!c.done&&(o=f.return)&&o.call(f)}finally{if(s)throw s.error}}l&&l.resizeLeafColumnsToFit(a)}}catch(_){t={error:_}}finally{try{n&&!n.done&&(i=u.return)&&i.call(u)}finally{if(t)throw t.error}}return[]},a.prototype.autoSizeAllColumns=function(e,a){var d=this;if(void 0===a&&(a="api"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return d.autoSizeAllColumns(e,a)}));else{var t=this.getAllDisplayedColumns();this.autoSizeColumns({columns:t,skipHeader:e,source:a})}},a.prototype.getColumnsFromTree=function(e){var a=[],d=function(e){for(var t=0;t=0},a.prototype.getAllDisplayedColumns=function(){return this.displayedColumns},a.prototype.getViewportColumns=function(){return this.viewportColumns},a.prototype.getDisplayedLeftColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsLeft):this.displayedColumnsLeft},a.prototype.getDisplayedRightColumnsForRow=function(e){return this.colSpanActive?this.getDisplayedColumnsForRow(e,this.displayedColumnsRight):this.displayedColumnsRight},a.prototype.isColSpanActive=function(){return this.colSpanActive},a.prototype.getDisplayedColumnsForRow=function(e,a,d,t){for(var i,s=[],o=null,l=function(l){var m,u=a[l],n=a.length-l,r=Math.min(u.getColSpan(e),n),f=[u];if(r>1){for(var c=r-1,p=1;p<=c;p++)f.push(a[l+p]);l+=c}if(d?(m=!1,f.forEach((function(e){d(e)&&(m=!0)}))):m=!0,m){if(0===s.length&&o)!!t&&t(u)&&s.push(o);s.push(u)}o=u,i=l},m=0;ma.viewportLeft}))},a.prototype.isColumnAtEdge=function(e,a){var d=this.getAllDisplayedColumns();if(!d.length)return!1;var t,i="first"===a;if(e instanceof Xe){var s=e.getDisplayedLeafColumns();if(!s.length)return!1;t=i?s[0]:Ce(s)}else t=e;return(i?d[0]:Ce(d))===t},a.prototype.getAriaColumnIndex=function(e){var a;return a=e instanceof Xe?e.getLeafColumns()[0]:e,this.getAllGridColumns().indexOf(a)+1},a.prototype.isColumnInHeaderViewport=function(e){return!!e.isAutoHeaderHeight()||this.isColumnInRowViewport(e)},a.prototype.isColumnInRowViewport=function(e){if(e.isAutoHeight())return!0;var a=e.getLeft()||0,d=a+e.getActualWidth(),t=this.viewportLeft-200,i=this.viewportRight+200;return!(ai&&d>i)},a.prototype.getDisplayedColumnsLeftWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsLeft)},a.prototype.getDisplayedColumnsRightWidth=function(){return this.getWidthOfColsInList(this.displayedColumnsRight)},a.prototype.updatePrimaryColumnList=function(e,a,d,t,i,s){var l=this;if(void 0===s&&(s="api"),e&&!o(e)){var m=!1;if(e.forEach((function(e){var i=l.getPrimaryColumn(e);if(i){if(d){if(a.indexOf(i)>=0)return;a.push(i)}else{if(a.indexOf(i)<0)return;Le(a,i)}t(i),m=!0}})),m){this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(s);var u={type:i,columns:a,column:1===a.length?a[0]:null,source:s};this.eventService.dispatchEvent(u)}}},a.prototype.setRowGroupColumns=function(e,a){void 0===a&&(a="api"),this.autoGroupsNeedBuilding=!0,this.setPrimaryColumnList(e,this.rowGroupColumns,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,!0,this.setRowGroupActive.bind(this),a)},a.prototype.setRowGroupActive=function(e,a,d){e!==a.isRowGroupActive()&&(a.setRowGroupActive(e,d),e&&!this.gridOptionsService.get("suppressRowGroupHidesColumns")&&this.setColumnVisible(a,!1,d),e||this.gridOptionsService.get("suppressMakeColumnVisibleAfterUnGroup")||this.setColumnVisible(a,!0,d))},a.prototype.addRowGroupColumn=function(e,a){void 0===a&&(a="api"),e&&this.addRowGroupColumns([e],a)},a.prototype.addRowGroupColumns=function(e,a){void 0===a&&(a="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!0,this.setRowGroupActive.bind(this,!0),Je.EVENT_COLUMN_ROW_GROUP_CHANGED,a)},a.prototype.removeRowGroupColumns=function(e,a){void 0===a&&(a="api"),this.autoGroupsNeedBuilding=!0,this.updatePrimaryColumnList(e,this.rowGroupColumns,!1,this.setRowGroupActive.bind(this,!1),Je.EVENT_COLUMN_ROW_GROUP_CHANGED,a)},a.prototype.removeRowGroupColumn=function(e,a){void 0===a&&(a="api"),e&&this.removeRowGroupColumns([e],a)},a.prototype.addPivotColumns=function(e,a){void 0===a&&(a="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!0,(function(e){return e.setPivotActive(!0,a)}),Je.EVENT_COLUMN_PIVOT_CHANGED,a)},a.prototype.setPivotColumns=function(e,a){void 0===a&&(a="api"),this.setPrimaryColumnList(e,this.pivotColumns,Je.EVENT_COLUMN_PIVOT_CHANGED,!0,(function(e,d){d.setPivotActive(e,a)}),a)},a.prototype.addPivotColumn=function(e,a){void 0===a&&(a="api"),this.addPivotColumns([e],a)},a.prototype.removePivotColumns=function(e,a){void 0===a&&(a="api"),this.updatePrimaryColumnList(e,this.pivotColumns,!1,(function(e){return e.setPivotActive(!1,a)}),Je.EVENT_COLUMN_PIVOT_CHANGED,a)},a.prototype.removePivotColumn=function(e,a){void 0===a&&(a="api"),this.removePivotColumns([e],a)},a.prototype.setPrimaryColumnList=function(e,a,d,t,s,o){var l=this;if(this.gridColumns){var m=new Map;a.forEach((function(e,a){return m.set(e,a)})),a.length=0,i(e)&&e.forEach((function(e){var d=l.getPrimaryColumn(e);d&&a.push(d)})),a.forEach((function(e,a){var d=m.get(e);void 0!==d?t&&d!==a||m.delete(e):m.set(e,0)})),(this.primaryColumns||[]).forEach((function(e){var d=a.indexOf(e)>=0;s(d,e)})),this.autoGroupsNeedBuilding&&this.updateGridColumns(),this.updateDisplayedColumns(o),this.dispatchColumnChangedEvent(d,qa([],ya(m.keys()),!1),o)}},a.prototype.setValueColumns=function(e,a){void 0===a&&(a="api"),this.setPrimaryColumnList(e,this.valueColumns,Je.EVENT_COLUMN_VALUE_CHANGED,!1,this.setValueActive.bind(this),a)},a.prototype.setValueActive=function(e,a,d){if(e!==a.isValueActive()&&(a.setValueActive(e,d),e&&!a.getAggFunc())){var t=this.aggFuncService.getDefaultAggFunc(a);a.setAggFunc(t)}},a.prototype.addValueColumns=function(e,a){void 0===a&&(a="api"),this.updatePrimaryColumnList(e,this.valueColumns,!0,this.setValueActive.bind(this,!0),Je.EVENT_COLUMN_VALUE_CHANGED,a)},a.prototype.addValueColumn=function(e,a){void 0===a&&(a="api"),e&&this.addValueColumns([e],a)},a.prototype.removeValueColumn=function(e,a){void 0===a&&(a="api"),this.removeValueColumns([e],a)},a.prototype.removeValueColumns=function(e,a){void 0===a&&(a="api"),this.updatePrimaryColumnList(e,this.valueColumns,!1,this.setValueActive.bind(this,!1),Je.EVENT_COLUMN_VALUE_CHANGED,a)},a.prototype.normaliseColumnWidth=function(e,a){var d=e.getMinWidth();i(d)&&a0?s+=d:o=!1})),d>=t&&(!o||d<=s)},a.prototype.resizeColumnSets=function(e){var a=this,d=e.resizeSets,t=e.finished,s=e.source;if(!d||d.every((function(e){return a.checkMinAndMaxWidthsForSet(e)}))){var o=[],l=[];d.forEach((function(e){var a=e.width,d=e.columns,t=e.ratios,m={},u={};d.forEach((function(e){return l.push(e)}));for(var n=!0,r=0,f=function(){if(++r>1e3)return console.error("AG Grid: infinite loop in resizeColumnSets"),"break";n=!1;var e=[],s=0,o=a;d.forEach((function(a,d){if(u[a.getId()])o-=m[a.getId()];else{e.push(a);var i=t[d];s+=i}}));var l=1/s;e.forEach((function(d,s){var r;s===e.length-1?r=o:(r=Math.round(t[s]*a*l),o-=r);var f=d.getMinWidth(),c=d.getMaxWidth();i(f)&&r0&&r>c&&(r=c,u[d.getId()]=!0,n=!0),m[d.getId()]=r}))};n;){if("break"===f())break}d.forEach((function(e){var a=m[e.getId()];e.getActualWidth()!==a&&(e.setActualWidth(a,s),o.push(e))}))}));var m=o.length>0,u=[];m&&(u=this.refreshFlexedColumns({resizingCols:l,skipSetLeft:!0}),this.setLeftValues(s),this.updateBodyWidths(),this.checkViewportColumns());var n=l.concat(u);(m||t)&&this.dispatchColumnResizedEvent(n,t,s,u)}else if(t){var r=d&&d.length>0?d[0].columns:null;this.dispatchColumnResizedEvent(r,t,s)}},a.prototype.setColumnAggFunc=function(e,a,d){if(void 0===d&&(d="api"),e){var t=this.getPrimaryColumn(e);t&&(t.setAggFunc(a),this.dispatchColumnChangedEvent(Je.EVENT_COLUMN_VALUE_CHANGED,[t],d))}},a.prototype.moveRowGroupColumn=function(e,a,d){if(void 0===d&&(d="api"),!this.isRowGroupEmpty()){var t=this.rowGroupColumns[e],i=this.rowGroupColumns.slice(e,a);this.rowGroupColumns.splice(e,1),this.rowGroupColumns.splice(a,0,t);var s={type:Je.EVENT_COLUMN_ROW_GROUP_CHANGED,columns:i,column:1===i.length?i[0]:null,source:d};this.eventService.dispatchEvent(s)}},a.prototype.moveColumns=function(e,a,d,t){if(void 0===d&&(d="api"),void 0===t&&(t=!0),this.gridColumns){if(this.columnAnimationService.start(),a>this.gridColumns.length-e.length)return console.warn("AG Grid: tried to insert columns in invalid location, toIndex = "+a),void console.warn("AG Grid: remember that you should not count the moving columns when calculating the new index");var i=this.getGridColumns(e);!this.doesMovePassRules(i,a)||(Se(this.gridColumns,i,a),this.updateDisplayedColumns(d),this.dispatchColumnMovedEvent({movedColumns:i,source:d,toIndex:a,finished:t}),this.columnAnimationService.finish())}},a.prototype.doesMovePassRules=function(e,a){var d=this.getProposedColumnOrder(e,a);return this.doesOrderPassRules(d)},a.prototype.doesOrderPassRules=function(e){return!!this.doesMovePassMarryChildren(e)&&!!this.doesMovePassLockedPositions(e)},a.prototype.getProposedColumnOrder=function(e,a){var d=this.gridColumns.slice();return Se(d,e,a),d},a.prototype.sortColumnsLikeGridColumns=function(e){var a=this;!e||e.length<=1||(e.filter((function(e){return a.gridColumns.indexOf(e)<0})).length>0||e.sort((function(e,d){return a.gridColumns.indexOf(e)-a.gridColumns.indexOf(d)})))},a.prototype.doesMovePassLockedPositions=function(e){var a=0,d=!0;return e.forEach((function(e){var t,i=(t=e.getColDef().lockPosition)?!0===t||"left"===t?0:2:1;it.getLeafColumns().length-1&&(a=!1)}}})),a},a.prototype.moveColumn=function(e,a,d){void 0===d&&(d="api"),this.moveColumns([e],a,d)},a.prototype.moveColumnByIndex=function(e,a,d){if(void 0===d&&(d="api"),this.gridColumns){var t=this.gridColumns[e];this.moveColumn(t,a,d)}},a.prototype.getColumnDefs=function(){var e=this;if(this.primaryColumns){var a=this.primaryColumns.slice();return this.gridColsArePrimary?a.sort((function(a,d){return e.gridColumns.indexOf(a)-e.gridColumns.indexOf(d)})):this.lastPrimaryOrder&&a.sort((function(a,d){return e.lastPrimaryOrder.indexOf(a)-e.lastPrimaryOrder.indexOf(d)})),this.columnDefFactory.buildColumnDefs(a,this.rowGroupColumns,this.pivotColumns)}},a.prototype.getBodyContainerWidth=function(){return this.bodyWidth},a.prototype.getContainerWidth=function(e){switch(e){case"left":return this.leftWidth;case"right":return this.rightWidth;default:return this.bodyWidth}},a.prototype.updateBodyWidths=function(){var e=this.getWidthOfColsInList(this.displayedColumnsCenter),a=this.getWidthOfColsInList(this.displayedColumnsLeft),d=this.getWidthOfColsInList(this.displayedColumnsRight);if(this.bodyWidthDirty=this.bodyWidth!==e,this.bodyWidth!==e||this.leftWidth!==a||this.rightWidth!==d){this.bodyWidth=e,this.leftWidth=a,this.rightWidth=d;var t={type:Je.EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED};this.eventService.dispatchEvent(t)}},a.prototype.getValueColumns=function(){return this.valueColumns?this.valueColumns:[]},a.prototype.getPivotColumns=function(){return this.pivotColumns?this.pivotColumns:[]},a.prototype.isPivotActive=function(){return this.pivotColumns&&this.pivotColumns.length>0&&this.pivotMode},a.prototype.getRowGroupColumns=function(){return this.rowGroupColumns?this.rowGroupColumns:[]},a.prototype.getDisplayedCenterColumns=function(){return this.displayedColumnsCenter},a.prototype.getDisplayedLeftColumns=function(){return this.displayedColumnsLeft},a.prototype.getDisplayedRightColumns=function(){return this.displayedColumnsRight},a.prototype.getDisplayedColumns=function(e){switch(e){case"left":return this.getDisplayedLeftColumns();case"right":return this.getDisplayedRightColumns();default:return this.getDisplayedCenterColumns()}},a.prototype.getAllPrimaryColumns=function(){return this.primaryColumns?this.primaryColumns.slice():null},a.prototype.getSecondaryColumns=function(){return this.secondaryColumns?this.secondaryColumns.slice():null},a.prototype.getAllColumnsForQuickFilter=function(){return this.columnsForQuickFilter},a.prototype.getAllGridColumns=function(){var e;return null!==(e=this.gridColumns)&&void 0!==e?e:[]},a.prototype.isEmpty=function(){return o(this.gridColumns)},a.prototype.isRowGroupEmpty=function(){return o(this.rowGroupColumns)},a.prototype.setColumnVisible=function(e,a,d){void 0===d&&(d="api"),this.setColumnsVisible([e],a,d)},a.prototype.setColumnsVisible=function(e,a,d){void 0===a&&(a=!1),void 0===d&&(d="api"),this.applyColumnState({state:e.map((function(e){return{colId:"string"===typeof e?e:e.getColId(),hide:!a}}))},d)},a.prototype.setColumnPinned=function(e,a,d){void 0===d&&(d="api"),e&&this.setColumnsPinned([e],a,d)},a.prototype.setColumnsPinned=function(e,a,d){var t;(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(),t=!0===a||"left"===a?"left":"right"===a?"right":null,this.actionOnGridColumns(e,(function(e){return e.getPinned()!==t&&(e.setPinned(t),!0)}),d,(function(){return{type:Je.EVENT_COLUMN_PINNED,pinned:t,column:null,columns:null,source:d}})),this.columnAnimationService.finish()))},a.prototype.actionOnGridColumns=function(e,a,d,t){var s=this;if(!o(e)){var l=[];if(e.forEach((function(e){var d=s.getGridColumn(e);d&&(!1!==a(d)&&l.push(d))})),l.length&&(this.updateDisplayedColumns(d),i(t)&&t)){var m=t();m.columns=l,m.column=1===l.length?l[0]:null,this.eventService.dispatchEvent(m)}}},a.prototype.getDisplayedColBefore=function(e){var a=this.getAllDisplayedColumns(),d=a.indexOf(e);return d>0?a[d-1]:null},a.prototype.getDisplayedColAfter=function(e){var a=this.getAllDisplayedColumns(),d=a.indexOf(e);return d0},a.prototype.isPinningRight=function(){return this.displayedColumnsRight.length>0},a.prototype.getPrimaryAndSecondaryAndAutoColumns=function(){var e;return(e=[]).concat.apply(e,[this.primaryColumns||[],this.groupAutoColumns||[],this.secondaryColumns||[]])},a.prototype.createStateItemFromColumn=function(e){var a=e.isRowGroupActive()?this.rowGroupColumns.indexOf(e):null,d=e.isPivotActive()?this.pivotColumns.indexOf(e):null,t=e.isValueActive()?e.getAggFunc():null,i=null!=e.getSort()?e.getSort():null,s=null!=e.getSortIndex()?e.getSortIndex():null,o=null!=e.getFlex()&&e.getFlex()>0?e.getFlex():null;return{colId:e.getColId(),width:e.getActualWidth(),hide:!e.isVisible(),pinned:e.getPinned(),sort:i,sortIndex:s,aggFunc:t,rowGroup:e.isRowGroupActive(),rowGroupIndex:a,pivot:e.isPivotActive(),pivotIndex:d,flex:o}},a.prototype.getColumnState=function(){if(s(this.primaryColumns)||!this.isAlive())return[];var e=this.getPrimaryAndSecondaryAndAutoColumns().map(this.createStateItemFromColumn.bind(this));return this.orderColumnStateList(e),e},a.prototype.orderColumnStateList=function(e){var a=na(this.gridColumns.map((function(e,a){return[e.getColId(),a]})));e.sort((function(e,d){return(a.has(e.colId)?a.get(e.colId):-1)-(a.has(d.colId)?a.get(d.colId):-1)}))},a.prototype.resetColumnState=function(e){var a=this;if(void 0===e&&(e="api"),!o(this.primaryColumns)){var d=this.getColumnsFromTree(this.primaryColumnTree),t=[],i=1e3,l=1e3,m=[];this.groupAutoColumns&&(m=m.concat(this.groupAutoColumns)),d&&(m=m.concat(d)),m.forEach((function(e){var d=a.getColumnStateFromColDef(e);s(d.rowGroupIndex)&&d.rowGroup&&(d.rowGroupIndex=i++),s(d.pivotIndex)&&d.pivot&&(d.pivotIndex=l++),t.push(d)})),this.applyColumnState({state:t,applyOrder:!0},e)}},a.prototype.getColumnStateFromColDef=function(e){var a=function(e,a){return null!=e?e:null!=a?a:null},d=e.getColDef(),t=a(d.sort,d.initialSort),i=a(d.sortIndex,d.initialSortIndex),s=a(d.hide,d.initialHide),o=a(d.pinned,d.initialPinned),l=a(d.width,d.initialWidth),m=a(d.flex,d.initialFlex),u=a(d.rowGroupIndex,d.initialRowGroupIndex),n=a(d.rowGroup,d.initialRowGroup);null!=u||null!=n&&0!=n||(u=null,n=null);var r=a(d.pivotIndex,d.initialPivotIndex),f=a(d.pivot,d.initialPivot);null!=r||null!=f&&0!=f||(r=null,f=null);var c=a(d.aggFunc,d.initialAggFunc);return{colId:e.getColId(),sort:t,sortIndex:i,hide:s,pinned:o,width:l,flex:m,rowGroup:n,rowGroupIndex:u,pivot:f,pivotIndex:r,aggFunc:c}},a.prototype.applyColumnState=function(e,a){var d=this;if(o(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 t=function(t,i,s){var o=d.compareColumnStatesAndDispatchEvents(a);d.autoGroupsNeedBuilding=!0;var l=i.slice(),m={},u={},n=[],r=[],f=0,c=d.rowGroupColumns.slice(),p=d.pivotColumns.slice();t.forEach((function(t){var i=t.colId||"";if(i.startsWith(da))return n.push(t),void r.push(t);var o=s(i);o?(d.syncColumnWithStateItem(o,t,e.defaultState,m,u,!1,a),Le(l,o)):(r.push(t),f+=1)}));var _=function(t){return d.syncColumnWithStateItem(t,null,e.defaultState,m,u,!1,a)};l.forEach(_);var y=function(e,a,d,t){var i=e[d.getId()],s=e[t.getId()],o=null!=i,l=null!=s;if(o&&l)return i-s;if(o)return-1;if(l)return 1;var m=a.indexOf(d),u=a.indexOf(t),n=m>=0;return n&&u>=0?m-u:n?-1:1};d.rowGroupColumns.sort(y.bind(d,m,c)),d.pivotColumns.sort(y.bind(d,u,p)),d.updateGridColumns();var q=d.groupAutoColumns?d.groupAutoColumns.slice():[];return n.forEach((function(t){var i=d.getAutoColumn(t.colId);Le(q,i),d.syncColumnWithStateItem(i,t,e.defaultState,null,null,!0,a)})),q.forEach(_),d.applyOrderAfterApplyState(e),d.updateDisplayedColumns(a),d.dispatchEverythingChanged(a),o(),{unmatchedAndAutoStates:r,unmatchedCount:f}};this.columnAnimationService.start();var s=t(e.state||[],this.primaryColumns||[],(function(e){return d.getPrimaryColumn(e)})),l=s.unmatchedAndAutoStates,m=s.unmatchedCount;return(l.length>0||i(e.defaultState))&&(m=t(l,this.secondaryColumns||[],(function(e){return d.getSecondaryColumn(e)})).unmatchedCount),this.columnAnimationService.finish(),0===m},a.prototype.applyOrderAfterApplyState=function(e){var a=this;if(e.applyOrder&&e.state){var d=[],t={};e.state.forEach((function(e){if(e.colId&&!t[e.colId]){var i=a.gridColumnsMap[e.colId];i&&(d.push(i),t[e.colId]=!0)}}));var i=0;this.gridColumns.forEach((function(e){var a=e.getColId();null!=t[a]||(a.startsWith(da)?Be(d,e,i++):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.")}},a.prototype.compareColumnStatesAndDispatchEvents=function(e){var a=this,d={rowGroupColumns:this.rowGroupColumns.slice(),pivotColumns:this.pivotColumns.slice(),valueColumns:this.valueColumns.slice()},t=this.getColumnState(),i={};return t.forEach((function(e){i[e.colId]=e})),function(){var s=a.getPrimaryAndSecondaryAndAutoColumns(),o=function(d,t,i,s){if(!Pe(t.map(s),i.map(s))){var o=new Set(t);i.forEach((function(e){o.delete(e)||o.add(e)}));var l=qa([],ya(o),!1),m={type:d,columns:l,column:1===l.length?l[0]:null,source:e};a.eventService.dispatchEvent(m)}},l=function(e){var a=[];return s.forEach((function(d){var t=i[d.getColId()];t&&e(t,d)&&a.push(d)})),a},m=function(e){return e.getColId()};o(Je.EVENT_COLUMN_ROW_GROUP_CHANGED,d.rowGroupColumns,a.rowGroupColumns,m),o(Je.EVENT_COLUMN_PIVOT_CHANGED,d.pivotColumns,a.pivotColumns,m);var u=l((function(e,a){var d=null!=e.aggFunc,t=d!=a.isValueActive(),i=d&&e.aggFunc!=a.getAggFunc();return t||i}));u.length>0&&a.dispatchColumnChangedEvent(Je.EVENT_COLUMN_VALUE_CHANGED,u,e);a.dispatchColumnResizedEvent(l((function(e,a){return e.width!=a.getActualWidth()})),!0,e);a.dispatchColumnPinnedEvent(l((function(e,a){return e.pinned!=a.getPinned()})),e);a.dispatchColumnVisibleEvent(l((function(e,a){return e.hide==a.isVisible()})),e);l((function(e,a){return e.sort!=a.getSort()||e.sortIndex!=a.getSortIndex()})).length>0&&a.sortController.dispatchSortChangedEvents(e),a.normaliseColumnMovedEventForColumnState(t,e)}},a.prototype.getCommonValue=function(e,a){if(e&&0!=e.length){for(var d=a(e[0]),t=1;t=r&&e.setActualWidth(c,l)}var p=m("sort").value1;void 0!==p&&("desc"===p||"asc"===p?e.setSort(p,l):e.setSort(void 0,l));var _=m("sortIndex").value1;if(void 0!==_&&e.setSortIndex(_),!o&&e.isPrimary()){var y=m("aggFunc").value1;void 0!==y&&("string"===typeof y?(e.setAggFunc(y),e.isValueActive()||(e.setValueActive(!0,l),this.valueColumns.push(e))):(i(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),Le(this.valueColumns,e))));var q=m("rowGroup","rowGroupIndex"),b=q.value1,C=q.value2;void 0===b&&void 0===C||("number"===typeof C||b?(e.isRowGroupActive()||(e.setRowGroupActive(!0,l),this.rowGroupColumns.push(e)),t&&"number"===typeof C&&(t[e.getId()]=C)):e.isRowGroupActive()&&(e.setRowGroupActive(!1,l),Le(this.rowGroupColumns,e)));var P=m("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)),s&&"number"===typeof T&&(s[e.getId()]=T)):e.isPivotActive()&&(e.setPivotActive(!1,l),Le(this.pivotColumns,e)))}}},a.prototype.getGridColumns=function(e){return this.getColumns(e,this.getGridColumn.bind(this))},a.prototype.getColumns=function(e,a){var d=[];return e&&e.forEach((function(e){var t=a(e);t&&d.push(t)})),d},a.prototype.getColumnWithValidation=function(e){if(null==e)return null;var a=this.getGridColumn(e);return a||console.warn("AG Grid: could not find column "+e),a},a.prototype.getPrimaryColumn=function(e){return this.primaryColumns?this.getColumn(e,this.primaryColumns,this.primaryColumnsMap):null},a.prototype.getGridColumn=function(e){return this.getColumn(e,this.gridColumns,this.gridColumnsMap)},a.prototype.lookupGridColumn=function(e){return this.gridColumnsMap[e]},a.prototype.getSecondaryColumn=function(e){return this.secondaryColumns?this.getColumn(e,this.secondaryColumns,this.secondaryColumnsMap):null},a.prototype.getColumn=function(e,a,d){if(!e||!d)return null;if("string"==typeof e&&d[e])return d[e];for(var t=0;t=0:r?void 0!==p?p:!!(void 0!==y)&&(null!=y&&y>=0):a.indexOf(d)>=0)&&((r?null!=_||null!=y:null!=_)?l.push(d):n.push(d))}));var r=function(e){var a=t(e.getColDef()),d=i(e.getColDef());return null!=a?a:d};l.sort((function(e,a){var d=r(e),t=r(a);return d===t?0:d=0&&f.push(e)})),n.forEach((function(e){f.indexOf(e)<0&&f.push(e)})),a.forEach((function(e){f.indexOf(e)<0&&d(e,!1)})),f.forEach((function(e){a.indexOf(e)<0&&d(e,!0)})),f},a.prototype.extractPivotColumns=function(e,a){this.pivotColumns=this.extractColumns(a,this.pivotColumns,(function(a,d){return a.setPivotActive(d,e)}),(function(e){return e.pivotIndex}),(function(e){return e.initialPivotIndex}),(function(e){return e.pivot}),(function(e){return e.initialPivot}))},a.prototype.resetColumnGroupState=function(e){if(void 0===e&&(e="api"),this.primaryColumnTree){var a=[];this.columnUtils.depthFirstOriginalTreeSearch(null,this.primaryColumnTree,(function(e){if(e instanceof ye){var d=e.getColGroupDef(),t={groupId:e.getGroupId(),open:d?d.openByDefault:void 0};a.push(t)}})),this.setColumnGroupState(a,e)}},a.prototype.getColumnGroupState=function(){var e=[];return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(a){a instanceof ye&&e.push({groupId:a.getGroupId(),open:a.isExpanded()})})),e},a.prototype.setColumnGroupState=function(e,a){var d=this;if(void 0===a&&(a="api"),this.gridBalancedTree){this.columnAnimationService.start();var t=[];if(e.forEach((function(e){var a=e.groupId,i=e.open,s=d.getProvidedColumnGroup(a);s&&s.isExpanded()!==i&&(d.logger.log("columnGroupOpened("+s.getGroupId()+","+i+")"),s.setExpanded(i),t.push(s))})),this.updateGroupsAndDisplayedColumns(a),this.setFirstRightAndLastLeftPinned(a),t.length){var i={type:Je.EVENT_COLUMN_GROUP_OPENED,columnGroup:1===ye.length?t[0]:void 0,columnGroups:t};this.eventService.dispatchEvent(i)}this.columnAnimationService.finish()}},a.prototype.setColumnGroupOpened=function(e,a,d){var t;void 0===d&&(d="api"),t=e instanceof ye?e.getId():e||"",this.setColumnGroupState([{groupId:t,open:a}],d)},a.prototype.getProvidedColumnGroup=function(e){"string"!==typeof e&&console.error("AG Grid: group key must be a string");var a=null;return this.columnUtils.depthFirstOriginalTreeSearch(null,this.gridBalancedTree,(function(d){d instanceof ye&&d.getId()===e&&(a=d)})),a},a.prototype.calculateColumnsForDisplay=function(){var e=this;return this.pivotMode&&s(this.secondaryColumns)?this.gridColumns.filter((function(a){var d=e.groupAutoColumns&&De(e.groupAutoColumns,a),t=e.valueColumns&&De(e.valueColumns,a);return d||t})):this.gridColumns.filter((function(a){return e.groupAutoColumns&&De(e.groupAutoColumns,a)||a.isVisible()}))},a.prototype.checkColSpanActiveInCols=function(e){var a=!1;return e.forEach((function(e){i(e.getColDef().colSpan)&&(a=!0)})),a},a.prototype.calculateColumnsForGroupDisplay=function(){var e=this;this.groupDisplayColumns=[],this.groupDisplayColumnsMap={};this.gridColumns.forEach((function(a){var d=a.getColDef(),t=d.showRowGroup;d&&i(t)&&(e.groupDisplayColumns.push(a),"string"===typeof t?e.groupDisplayColumnsMap[t]=a:!0===t&&e.getRowGroupColumns().forEach((function(d){e.groupDisplayColumnsMap[d.getId()]=a})))}))},a.prototype.getGroupDisplayColumns=function(){return this.groupDisplayColumns},a.prototype.getGroupDisplayColumnForGroup=function(e){return this.groupDisplayColumnsMap[e]},a.prototype.updateDisplayedColumns=function(e){var a=this.calculateColumnsForDisplay();this.buildDisplayedTrees(a),this.updateGroupsAndDisplayedColumns(e),this.setFirstRightAndLastLeftPinned(e)},a.prototype.isSecondaryColumnsPresent=function(){return i(this.secondaryColumns)},a.prototype.setSecondaryColumns=function(e,a){var d=this;if(void 0===a&&(a="api"),this.gridColumns){var t=e&&e.length>0;if(t||!s(this.secondaryColumns)){if(t){this.processSecondaryColumnDefinitions(e);var i=this.columnFactory.createColumnTree(e,!1,this.secondaryBalancedTree||this.previousSecondaryColumns||void 0);this.destroyOldColumns(this.secondaryBalancedTree,i.columnTree),this.secondaryBalancedTree=i.columnTree,this.secondaryHeaderRowCount=i.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(a)}}},a.prototype.processSecondaryColumnDefinitions=function(e){var a=this.gridOptionsService.get("processPivotResultColDef"),d=this.gridOptionsService.get("processPivotResultColGroupDef");if(a||d){var t=function(e){e.forEach((function(e){if(i(e.children)){var s=e;d&&d(s),t(s.children)}else{a&&a(e)}}))};e&&t(e)}},a.prototype.updateGridColumns=function(){var e,a=this,d=this.gridBalancedTree;if(this.gridColsArePrimary?this.lastPrimaryOrder=this.gridColumns:this.lastSecondaryOrder=this.gridColumns,this.secondaryColumns&&this.secondaryBalancedTree){var t=this.secondaryColumns.every((function(e){return void 0!==a.gridColumnsMap[e.getColId()]}));this.gridBalancedTree=this.secondaryBalancedTree.slice(),this.gridHeaderRowCount=this.secondaryHeaderRowCount,this.gridColumns=this.secondaryColumns.slice(),this.gridColsArePrimary=!1,t&&(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 i=na(this.groupAutoColumns.map((function(e){return[e,!0]})));e=e.filter((function(e){return!i.has(e)})),e=qa(qa([],ya(this.groupAutoColumns),!1),ya(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 a.gridColumnsMap[e.getId()]=e})),this.setAutoHeightActive(),!Pe(d,this.gridBalancedTree)){var s={type:Je.EVENT_GRID_COLUMNS_CHANGED};this.eventService.dispatchEvent(s)}},a.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")||w("autoHeight columns only work with Client Side Row Model and Server Side Row Model."))},a.prototype.orderGridColsLike=function(e){if(!s(e)){var a=na(e.map((function(e,a){return[e,a]}))),d=!0;if(this.gridColumns.forEach((function(e){a.has(e)&&(d=!1)})),!d){var t=na(this.gridColumns.map((function(e){return[e,!0]}))),i=e.filter((function(e){return t.has(e)})),o=na(i.map((function(e){return[e,!0]}))),l=this.gridColumns.filter((function(e){return!o.has(e)})),m=i.slice();l.forEach((function(e){var a=e.getOriginalParent();if(a){for(var d=[];!d.length&&a;){a.getLeafColumns().forEach((function(e){var a=m.indexOf(e)>=0,t=d.indexOf(e)<0;a&&t&&d.push(e)})),a=a.getOriginalParent()}if(d.length){var t=d.map((function(e){return m.indexOf(e)})),i=Math.max.apply(Math,qa([],ya(t),!1));Be(m,e,i+1)}else m.push(e)}else m.push(e)})),this.gridColumns=m}}},a.prototype.isPrimaryColumnGroupsPresent=function(){return this.primaryHeaderRowCount>1},a.prototype.refreshQuickFilterColumns=function(){var e,a=null!==(e=this.isPivotMode()?this.secondaryColumns:this.primaryColumns)&&void 0!==e?e:[];this.groupAutoColumns&&(a=a.concat(this.groupAutoColumns)),this.columnsForQuickFilter=this.gridOptionsService.get("includeHiddenColumnsInQuickFilter")?a:a.filter((function(e){return e.isVisible()||e.isRowGroupActive()}))},a.prototype.placeLockedColumns=function(e){var a=[],d=[],t=[];return e.forEach((function(e){var i=e.getColDef().lockPosition;"right"===i?t.push(e):"left"===i||!0===i?a.push(e):d.push(e)})),qa(qa(qa([],ya(a),!1),ya(d),!1),ya(t),!1)},a.prototype.addAutoGroupToGridColumns=function(){if(s(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)},a.prototype.clearDisplayedAndViewportColumns=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={},this.displayedColumnsLeft=[],this.displayedColumnsRight=[],this.displayedColumnsCenter=[],this.displayedColumns=[],this.viewportColumns=[],this.headerViewportColumns=[],this.viewportColumnsHash=""},a.prototype.updateGroupsAndDisplayedColumns=function(e){this.updateOpenClosedVisibilityInColumnGroups(),this.deriveDisplayedColumns(e),this.refreshFlexedColumns(),this.extractViewport(),this.updateBodyWidths();var a={type:Je.EVENT_DISPLAYED_COLUMNS_CHANGED};this.eventService.dispatchEvent(a)},a.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()}))},a.prototype.isAutoRowHeightActive=function(){return this.autoHeightActive},a.prototype.wasAutoRowHeightEverActive=function(){return this.autoHeightActiveAtLeastOnce},a.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)},a.prototype.setLeftValues=function(e){this.setLeftValuesOfColumns(e),this.setLeftValuesOfGroups()},a.prototype.setLeftValuesOfColumns=function(e){var a=this;if(this.primaryColumns){var d=this.primaryColumns.slice(0),t=this.gridOptionsService.get("enableRtl");[this.displayedColumnsLeft,this.displayedColumnsRight,this.displayedColumnsCenter].forEach((function(i){if(t){var s=a.getWidthOfColsInList(i);i.forEach((function(a){s-=a.getActualWidth(),a.setLeft(s,e)}))}else{var o=0;i.forEach((function(a){a.setLeft(o,e),o+=a.getActualWidth()}))}Ie(d,i)})),d.forEach((function(a){a.setLeft(null,e)}))}},a.prototype.setLeftValuesOfGroups=function(){[this.displayedTreeLeft,this.displayedTreeRight,this.displayedTreeCentre].forEach((function(e){e.forEach((function(e){e instanceof Xe&&e.checkLeft()}))}))},a.prototype.derivedDisplayedColumnsFromDisplayedTree=function(e,a){a.length=0,this.columnUtils.depthFirstDisplayedColumnTreeSearch(e,(function(e){e instanceof pe&&a.push(e)}))},a.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)},a.prototype.getVirtualHeaderGroupRow=function(e,a){var d;switch(e){case"left":d=this.viewportRowLeft[a];break;case"right":d=this.viewportRowRight[a];break;default:d=this.viewportRowCenter[a]}return s(d)&&(d=[]),d},a.prototype.calculateHeaderRows=function(){this.viewportRowLeft={},this.viewportRowRight={},this.viewportRowCenter={};var e={};this.headerViewportColumns.forEach((function(a){return e[a.getId()]=!0}));var a=function(d,t,i){for(var s=!1,o=0;o=0;l--)if(s.has(o[l])){t=l;break}var m=0,u=[],n=0,r=0;for(l=0;lt?(u.push(this.displayedColumnsCenter[l]),r+=this.displayedColumnsCenter[l].getFlex(),n+=null!==(a=this.displayedColumnsCenter[l].getMinWidth())&&void 0!==a?a:0):m+=this.displayedColumnsCenter[l].getActualWidth()}if(!u.length)return[];var f=[];m+n>this.flexViewportWidth&&(u.forEach((function(e){var a;return e.setActualWidth(null!==(a=e.getMinWidth())&&void 0!==a?a:0,d)})),f=u,u=[]);var c,p=[];e:for(;;){var _=(c=this.flexViewportWidth-m)/r;for(l=0;lP&&(b=P),b){y.setActualWidth(b,d),Te(u,y),r-=y.getFlex(),f.push(y),m+=y.getActualWidth();continue e}p[l]=Math.round(q)}break}var h=c;return u.forEach((function(e,a){e.setActualWidth(Math.min(p[a],h),d),f.push(e),h-=p[a]})),e.skipSetLeft||this.setLeftValues(d),e.updateBodyWidths&&this.updateBodyWidths(),e.fireResizedEvent&&this.dispatchColumnResizedEvent(f,!0,d,u),u},a.prototype.sizeColumnsToFit=function(e,a,d,t){var s,o,l,m,u,n=this;if(void 0===a&&(a="sizeColumnsToFit"),this.shouldQueueResizeOperations)this.resizeOperationQueue.push((function(){return n.sizeColumnsToFit(e,a,d,t)}));else{var r={};t&&(null===(s=null===t||void 0===t?void 0:t.columnLimits)||void 0===s||s.forEach((function(e){var a=e.key,d=_a(e,["key"]);r["string"===typeof a?a:a.getColId()]=d})));var f=this.getAllDisplayedColumns(),c=e===this.getWidthOfColsInList(f);if(!(e<=0||!f.length||c)){var p=[],_=[];f.forEach((function(e){!0===e.getColDef().suppressSizeToFit?_.push(e):p.push(e)}));var y=p.slice(0),q=!1,b=function(e){Le(p,e),_.push(e)};for(p.forEach((function(e){var d,i;e.resetActualWidth(a);var s=null===r||void 0===r?void 0:r[e.getId()],o=null!==(d=null===s||void 0===s?void 0:s.minWidth)&&void 0!==d?d:null===t||void 0===t?void 0:t.defaultMinWidth,l=null!==(i=null===s||void 0===s?void 0:s.maxWidth)&&void 0!==i?i:null===t||void 0===t?void 0:t.defaultMaxWidth,m=e.getActualWidth();"number"===typeof o&&ml&&e.setActualWidth(l,a,!0)}));!q;){q=!0;var C=e-this.getWidthOfColsInList(_);if(C<=0)p.forEach((function(e){var d,i,s=null!==(i=null===(d=null===r||void 0===r?void 0:r[e.getId()])||void 0===d?void 0:d.minWidth)&&void 0!==i?i:null===t||void 0===t?void 0:t.defaultMinWidth;"number"!==typeof s?e.setMinimum(a):e.setActualWidth(s,a,!0)}));else for(var P=C/this.getWidthOfColsInList(p),h=C,T=p.length-1;T>=0;T--){var L=p[T],I=null===r||void 0===r?void 0:r[L.getId()],O=null!==(o=null===I||void 0===I?void 0:I.minWidth)&&void 0!==o?o:null===t||void 0===t?void 0:t.defaultMinWidth,B=null!==(l=null===I||void 0===I?void 0:I.maxWidth)&&void 0!==l?l:null===t||void 0===t?void 0:t.defaultMaxWidth,S=null!==(m=L.getMinWidth())&&void 0!==m?m:0,D=null!==(u=L.getMaxWidth())&&void 0!==u?u:Number.MAX_VALUE,g="number"===typeof O&&O>S?O:L.getMinWidth(),G="number"===typeof B&&BG?(w=G,b(L),q=!1):0===T&&(w=h),L.setActualWidth(w,a,!0),h-=w}}y.forEach((function(e){e.fireColumnWidthChangedEvent(a)})),this.setLeftValues(a),this.updateBodyWidths(),d||this.dispatchColumnResizedEvent(y,!0,a)}}},a.prototype.buildDisplayedTrees=function(e){var a=[],d=[],t=[];e.forEach((function(e){switch(e.getPinned()){case"left":a.push(e);break;case"right":d.push(e);break;default:t.push(e)}}));var i=new Ze;this.displayedTreeLeft=this.displayedGroupCreator.createDisplayedGroups(a,i,"left",this.displayedTreeLeft),this.displayedTreeRight=this.displayedGroupCreator.createDisplayedGroups(d,i,"right",this.displayedTreeRight),this.displayedTreeCentre=this.displayedGroupCreator.createDisplayedGroups(t,i,null,this.displayedTreeCentre),this.updateDisplayedMap()},a.prototype.updateDisplayedMap=function(){var e=this;this.displayedColumnsAndGroupsMap={};var a=function(a){e.displayedColumnsAndGroupsMap[a.getUniqueId()]=a};this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeCentre,a),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeLeft,a),this.columnUtils.depthFirstAllColumnTreeSearch(this.displayedTreeRight,a)},a.prototype.isDisplayed=function(e){return this.displayedColumnsAndGroupsMap[e.getUniqueId()]===e},a.prototype.updateOpenClosedVisibilityInColumnGroups=function(){var e=this.getAllDisplayedTrees();this.columnUtils.depthFirstAllColumnTreeSearch(e,(function(e){e instanceof Xe&&e.calculateDisplayedColumns()}))},a.prototype.getGroupAutoColumns=function(){return this.groupAutoColumns},a.prototype.createGroupAutoColumnsIfNeeded=function(){var e=this.forceRecreateAutoGroups;if(this.forceRecreateAutoGroups=!1,!this.autoGroupsNeedBuilding)return!1;this.autoGroupsNeedBuilding=!1;var a=this.gridOptionsService.isGroupUseEntireRow(this.pivotMode),d=this.pivotMode?this.gridOptionsService.get("pivotSuppressAutoColumn"):this.isGroupSuppressAutoColumn();if((this.rowGroupColumns.length>0||this.gridOptionsService.get("treeData"))&&!d&&!a){var t=this.autoGroupColService.createAutoGroupColumns(this.rowGroupColumns);if(!this.autoColsEqual(t,this.groupAutoColumns)||e)return this.groupAutoColumns=t,!0}else this.groupAutoColumns=null;return!1},a.prototype.isGroupSuppressAutoColumn=function(){return"custom"===this.gridOptionsService.get("groupDisplayType")||"custom"===this.gridOptionsService.get("treeDataDisplayType")},a.prototype.autoColsEqual=function(e,a){return Pe(e,a,(function(e,a){return e.getColId()===a.getColId()}))},a.prototype.getWidthOfColsInList=function(e){return e.reduce((function(e,a){return e+a.getActualWidth()}),0)},a.prototype.getFirstDisplayedColumn=function(){var e=this.gridOptionsService.get("enableRtl"),a=["getDisplayedLeftColumns","getDisplayedCenterColumns","getDisplayedRightColumns"];e&&a.reverse();for(var d=0;dthis.rowGroupColumns.findIndex((function(a){return a.getColId()===e.getColId()})))},a.prototype.generateColumnStateForRowGroupAndPivotIndexes=function(e,a){var d=this,t={},i=function(e,a,i,s,o,l){if(!a.length||!d.primaryColumns)return[];for(var m=Object.keys(e),u=new Set(m),n=new Set(m),r=new Set(a.map((function(e){var a=e.getColId();return n.delete(a),a})).concat(m)),f=[],c={},p=0,_=0;_=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ta=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Pa(a,e),a.prototype.calculateColMinWidth=function(e){return null!=e.minWidth?e.minWidth:this.environment.getMinColWidth()},a.prototype.calculateColMaxWidth=function(e){return null!=e.maxWidth?e.maxWidth:Number.MAX_SAFE_INTEGER},a.prototype.calculateColInitialWidth=function(e){var a,d=this.calculateColMinWidth(e),t=this.calculateColMaxWidth(e),i=m(e.width),s=m(e.initialWidth);return a=null!=i?i:null!=s?s:200,Math.max(Math.min(a,t),d)},a.prototype.getOriginalPathForColumn=function(e,a){var d=[],t=!1,i=function(a,s){for(var o=0;o=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Oa=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return La(a,e),a.prototype.createDisplayedGroups=function(e,a,d,t){for(var i=this,s=this.mapOldGroupsById(t),o=[],l=e,m=function(){var e=l;l=[];for(var t=0,m=function(m){var u=t;t=m;var n=e[u],r=(n instanceof Xe?n.getProvidedColumnGroup():n).getOriginalParent();if(null!=r){var f=i.createColumnGroup(r,a,s,d);for(c=u;c0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Sa=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},va=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Qa=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.componentsMappedByName={},a}return ka(a,e),a.prototype.setupComponents=function(e){var a=this;e&&e.forEach((function(e){return a.addComponent(e)}))},a.prototype.addComponent=function(e){var a=e.componentName.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase().toUpperCase();this.componentsMappedByName[a]=e.componentClass},a.prototype.getComponentClass=function(e){return this.componentsMappedByName[e]},a=xa([ae("agStackComponentsRegistry")],a)}(je);function Va(e,a,d){null==d||"string"===typeof d&&""==d?Ea(e,a):Fa(e,a,d)}function Fa(e,a,d){e.setAttribute(Ra(a),d.toString())}function Ea(e,a){e.removeAttribute(Ra(a))}function Ra(e){return"aria-".concat(e)}function Na(e,a){a?e.setAttribute("role",a):e.removeAttribute("role")}function Aa(e){return"asc"===e?"ascending":"desc"===e?"descending":"mixed"===e?"other":"none"}function Ha(e){return parseInt(e.getAttribute("aria-level"),10)}function Wa(e){return parseInt(e.getAttribute("aria-posinset"),10)}function ja(e){return e.getAttribute("aria-label")}function Ua(e,a){Va(e,"label",a)}function za(e,a){Va(e,"labelledby",a)}function Ka(e,a){Va(e,"description",a)}function Ya(e,a){Va(e,"live",a)}function $a(e,a){Va(e,"level",a)}function Xa(e,a){Va(e,"disabled",a)}function Ja(e,a){Va(e,"hidden",a)}function Za(e,a){Va(e,"activedescendant",a)}function ed(e,a){Fa(e,"expanded",a)}function ad(e){Ea(e,"expanded")}function dd(e,a){Fa(e,"setsize",a)}function td(e,a){Fa(e,"posinset",a)}function id(e,a){Fa(e,"multiselectable",a)}function sd(e,a){Fa(e,"rowcount",a)}function od(e,a){Fa(e,"rowindex",a)}function ld(e,a){Fa(e,"colcount",a)}function md(e,a){Fa(e,"colindex",a)}function ud(e,a){Fa(e,"colspan",a)}function nd(e,a){Fa(e,"sort",a)}function rd(e){Ea(e,"sort")}function fd(e,a){Va(e,"selected",a)}function cd(e,a){Va(e,"controls",a.id),za(a,e.id)}function pd(e,a){return void 0===a?e("ariaIndeterminate","indeterminate"):!0===a?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var _d,yd,qd,bd,Cd,Pd,hd,Td,Ld=Object.freeze({__proto__:null,setAriaRole:Na,getAriaSortState:Aa,getAriaLevel:Ha,getAriaPosInSet:Wa,getAriaLabel:ja,setAriaLabel:Ua,setAriaLabelledBy:za,setAriaDescription:Ka,setAriaDescribedBy:function(e,a){Va(e,"describedby",a)},setAriaLive:Ya,setAriaAtomic:function(e,a){Va(e,"atomic",a)},setAriaRelevant:function(e,a){Va(e,"relevant",a)},setAriaLevel:$a,setAriaDisabled:Xa,setAriaHidden:Ja,setAriaActiveDescendant:Za,setAriaExpanded:ed,removeAriaExpanded:ad,setAriaSetSize:dd,setAriaPosInSet:td,setAriaMultiSelectable:id,setAriaRowCount:sd,setAriaRowIndex:od,setAriaColCount:ld,setAriaColIndex:md,setAriaColSpan:ud,setAriaSort:nd,removeAriaSort:rd,setAriaSelected:fd,setAriaChecked:function(e,a){Fa(e,"checked",void 0===a?"mixed":a)},setAriaControls:cd,getAriaCheckboxStateName:pd});function Id(){return void 0===_d&&(_d=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),_d}function Od(){if(void 0===yd)if(Id()){var e=navigator.userAgent.match(/version\/(\d+)/i);e&&(yd=null!=e[1]?parseFloat(e[1]):0)}else yd=0;return yd}function Bd(){if(void 0===qd){var e=window;qd=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return qd}function Sd(){return void 0===bd&&(bd=/(firefox)/i.test(navigator.userAgent)),bd}function Dd(){return void 0===Cd&&(Cd=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),Cd}function gd(){return void 0===Pd&&(Pd=/iPad|iPhone|iPod/.test(navigator.platform)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),Pd}function Gd(){return!Id()||Od()>=15}function wd(e){if(!e)return null;var a=e.tabIndex,d=e.getAttribute("tabIndex");return-1!==a||null!==d&&(""!==d||Sd())?a.toString():null}function vd(){if(!document.body)return-1;var e=1e6,a=navigator.userAgent.toLowerCase().match(/firefox/)?6e6:1e9,d=document.createElement("div");for(document.body.appendChild(d);;){var t=2*e;if(d.style.height=t+"px",t>a||d.clientHeight!==t)break;e=t}return document.body.removeChild(d),e}function Md(){var e,a,d;return null!==(a=null===(e=document.body)||void 0===e?void 0:e.clientWidth)&&void 0!==a?a:window.innerHeight||(null===(d=document.documentElement)||void 0===d?void 0:d.clientWidth)||-1}function kd(){var e,a,d;return null!==(a=null===(e=document.body)||void 0===e?void 0:e.clientHeight)&&void 0!==a?a:window.innerHeight||(null===(d=document.documentElement)||void 0===d?void 0:d.clientHeight)||-1}function xd(){return null==Td&&Qd(),Td}function Qd(){var e=document.body,a=document.createElement("div");a.style.width=a.style.height="100px",a.style.opacity="0",a.style.overflow="scroll",a.style.msOverflowStyle="scrollbar",a.style.position="absolute",e.appendChild(a);var d=a.offsetWidth-a.clientWidth;0===d&&0===a.clientWidth&&(d=null),a.parentNode&&a.parentNode.removeChild(a),null!=d&&(Td=d,hd=0===d)}function Vd(){return null==hd&&Qd(),hd}var Fd=Object.freeze({__proto__:null,isBrowserSafari:Id,getSafariVersion:Od,isBrowserChrome:Bd,isBrowserFirefox:Sd,isMacOsUserAgent:Dd,isIOSUserAgent:gd,browserSupportsPreventScroll:Gd,getTabIndex:wd,getMaxDivHeight:vd,getBodyWidth:Md,getBodyHeight:kd,getScrollbarWidth:xd,isInvisibleScrollbar:Vd});function Ed(e,a){return e.toString().padStart(a,"0")}function Rd(e,a){for(var d=[],t=e;t<=a;t++)d.push(t);return d}function Nd(e,a,d){return"number"!==typeof e?"":e.toString().replace(".",d).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1".concat(a))}var Ad=Object.freeze({__proto__:null,padStartWidthZeros:Ed,createArrayOfNumbers:Rd,cleanNumber:function(e){return"string"===typeof e&&(e=parseInt(e,10)),"number"===typeof e?Math.floor(e):null},decToHex:function(e,a){for(var d="",t=0;t>>=8;return d},formatNumberTwoDecimalPlacesAndCommas:function(e,a,d){return"number"!==typeof e?"":Nd(Math.round(100*e)/100,a,d)},formatNumberCommas:Nd,sum:function(e){return null==e?null:e.reduce((function(e,a){return e+a}),0)}}),Hd=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o};function Wd(e,a,d){if(void 0===a&&(a=!0),void 0===d&&(d="-"),!e)return null;var t=[e.getFullYear(),e.getMonth()+1,e.getDate()].map((function(e){return Ed(e,2)})).join(d);return a&&(t+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map((function(e){return Ed(e,2)})).join(":")),t}var jd=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,a){void 0===a&&(a="YYYY-MM-DD");var d=Ed(e.getFullYear(),4),t=["January","February","March","April","May","June","July","August","September","October","November","December"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],s={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 t[e.getMonth()]},MMM:function(){return t[e.getMonth()].slice(0,3)},MM:function(){return Ed(e.getMonth()+1,2)},Mo:function(){return"".concat(e.getMonth()+1).concat(jd(e.getMonth()+1))},M:function(){return"".concat(e.getMonth()+1)},Do:function(){return"".concat(e.getDate()).concat(jd(e.getDate()))},DD:function(){return Ed(e.getDate(),2)},D:function(){return"".concat(e.getDate())},dddd:function(){return i[e.getDay()]},ddd:function(){return i[e.getDay()].slice(0,3)},dd:function(){return i[e.getDay()].slice(0,2)},do:function(){return"".concat(e.getDay()).concat(jd(e.getDay()))},d:function(){return"".concat(e.getDay())}},o=new RegExp(Object.keys(s).join("|"),"g");return a.replace(o,(function(e){return e in s?s[e]():e}))}function zd(e){if(!e)return null;var a=Hd(e.split(" "),2),d=a[0],t=a[1];if(!d)return null;var i=d.split("-").map((function(e){return parseInt(e,10)}));if(3!==i.filter((function(e){return!isNaN(e)})).length)return null;var s=Hd(i,3),o=s[0],l=s[1],m=s[2],u=new Date(o,l-1,m);if(u.getFullYear()!==o||u.getMonth()!==l-1||u.getDate()!==m)return null;if(!t||"00:00:00"===t)return u;var n=Hd(t.split(":").map((function(e){return parseInt(e,10)})),3),r=n[0],f=n[1],c=n[2];return r>=0&&r<24&&u.setHours(r),f>=0&&f<60&&u.setMinutes(f),c>=0&&c<60&&u.setSeconds(c),u}var Kd,Yd=Object.freeze({__proto__:null,serialiseDate:Wd,dateToFormattedString:Ud,parseDateTimeFromString:zd}),$d=function(e){var a="function"===typeof Symbol&&Symbol.iterator,d=a&&e[a],t=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Xd=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o};function Jd(e,a,d){for(var t=e.parentElement,i=t&&t.firstChild;i;)a&&i.classList.toggle(a,i===e),d&&i.classList.toggle(d,i!==e),i=i.nextSibling}var Zd="[tabindex], input, select, button, textarea, [href]",et="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function at(e){var a=Element.prototype.matches||Element.prototype.msMatchesSelector,d=a.call(e,"input, select, button, textarea"),t=a.call(e,et),i=qt(e);return d&&!t&&i}function dt(e,a,d){void 0===d&&(d={});var t=d.skipAriaHidden;e.classList.toggle("ag-hidden",!a),t||Ja(e,!a)}function tt(e,a,d){void 0===d&&(d={});var t=d.skipAriaHidden;e.classList.toggle("ag-invisible",!a),t||Ja(e,!a)}function it(e,a){var d="disabled",t=a?function(e){return e.setAttribute(d,"")}:function(e){return e.removeAttribute(d)};t(e),xt(e.querySelectorAll("input"),(function(e){return t(e)}))}function st(e,a,d){for(var t=0;e;){if(e.classList.contains(a))return!0;if(e=e.parentElement,"number"==typeof d){if(++t>d)break}else if(e===d)break}return!1}function ot(e){var a=window.getComputedStyle(e),d=a.height,t=a.width,i=a.borderTopWidth,s=a.borderRightWidth,o=a.borderBottomWidth,l=a.borderLeftWidth,m=a.paddingTop,u=a.paddingRight,n=a.paddingBottom,r=a.paddingLeft,f=a.marginTop,c=a.marginRight,p=a.marginBottom,_=a.marginLeft,y=a.boxSizing;return{height:parseFloat(d),width:parseFloat(t),borderTopWidth:parseFloat(i),borderRightWidth:parseFloat(s),borderBottomWidth:parseFloat(o),borderLeftWidth:parseFloat(l),paddingTop:parseFloat(m),paddingRight:parseFloat(u),paddingBottom:parseFloat(n),paddingLeft:parseFloat(r),marginTop:parseFloat(f),marginRight:parseFloat(c),marginBottom:parseFloat(p),marginLeft:parseFloat(_),boxSizing:y}}function lt(e){var a=ot(e);return"border-box"===a.boxSizing?a.height-a.paddingTop-a.paddingBottom:a.height}function mt(e){var a=ot(e);return"border-box"===a.boxSizing?a.width-a.paddingLeft-a.paddingRight:a.width}function ut(e){var a=ot(e),d=a.marginBottom+a.marginTop;return Math.ceil(e.offsetHeight+d)}function nt(e){var a=ot(e),d=a.marginLeft+a.marginRight;return Math.ceil(e.offsetWidth+d)}function rt(e){var a=e.getBoundingClientRect(),d=ot(e),t=d.borderTopWidth,i=d.borderLeftWidth,s=d.borderRightWidth,o=d.borderBottomWidth;return{top:a.top+(t||0),left:a.left+(i||0),right:a.right+(s||0),bottom:a.bottom+(o||0)}}function ft(){if("boolean"===typeof Kd)return Kd;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,Kd=0===Math.floor(e.scrollLeft),document.body.removeChild(e),Kd}function ct(e,a){var d=e.scrollLeft;return a&&(d=Math.abs(d),Bd()&&!ft()&&(d=e.scrollWidth-e.clientWidth-d)),d}function pt(e,a,d){d&&(ft()?a*=-1:(Id()||Bd())&&(a=e.scrollWidth-e.clientWidth-a)),e.scrollLeft=a}function _t(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function yt(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function qt(e){var a=e;return a.checkVisibility?a.checkVisibility({checkVisibilityCSS:!0}):!(!e.offsetParent||"visible"!==window.getComputedStyle(e).visibility)}function bt(e){var a=document.createElement("div");return a.innerHTML=(e||"").trim(),a.firstChild}function Ct(e){return e&&e.clientHeight?e.clientHeight:0}function Pt(e){return e&&e.clientWidth?e.clientWidth:0}function ht(e,a,d){if(!d||d.nextSibling!==a){var t=document.activeElement,i=a.contains(t);d?d.nextSibling?e.insertBefore(a,d.nextSibling):e.appendChild(a):e.firstChild&&e.firstChild!==a&&e.insertAdjacentElement("afterbegin",a),i&&t&&Gd()&&t.focus({preventScroll:!0})}}function Tt(e,a){for(var d=0;d=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")};function Et(e,a,d){var t={},i=e.filter((function(e){return!a.some((function(a){return a===e}))}));return i.length>0&&i.forEach((function(e){return t[e]=Rt(e,d).values})),t}function Rt(e,a,d,t){var i,s,o=a.map((function(a,d){return{value:a,relevance:Nt(e.toLowerCase(),a.toLocaleLowerCase()),idx:d}}));if(o.sort((function(e,a){return a.relevance-e.relevance})),d&&(o=o.filter((function(e){return 0!==e.relevance}))),o.length>0&&t&&t>0){var l=o[0].relevance*t;o=o.filter((function(e){return l-e.relevance<0}))}var m=[],u=[];try{for(var n=Ft(o),r=n.next();!r.done;r=n.next()){var f=r.value;m.push(f.value),u.push(f.idx)}}catch(c){i={error:c}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(i)throw i.error}}return{values:m,indices:u}}function Nt(e,a){for(var d=e.replace(/\s/g,""),t=a.replace(/\s/g,""),i=0,s=-1,o=0;o-1||"object"===typeof i&&i["ag-icon"])return t}var s=document.createElement("span");return s.appendChild(t),s}function jt(e,a,d,t){var i=null,s=d&&d.getColDef().icons;if(s&&(i=s[e]),a&&!i){var o=a.get("icons");o&&(i=o[e])}if(!i){var l=document.createElement("span"),m=Ht[e];return m||(t?m=e:(console.warn("AG Grid: Did not find icon ".concat(e)),m="")),l.setAttribute("class","ag-icon ag-icon-".concat(m)),l.setAttribute("unselectable","on"),Na(l,"presentation"),l}var u=void 0;if("function"===typeof i)u=i();else{if("string"!==typeof i)throw new Error("icon from grid options needs to be a string or a function");u=i}return"string"===typeof u?bt(u):wt(u)?u:void console.warn("AG Grid: iconRenderer should return back a string or a dom object")}var Ut=Object.freeze({__proto__:null,iconNameClassMap:Ht,createIcon:Wt,createIconNoSpan:jt}),zt=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 Kt(e){return!(e.altKey||e.ctrlKey||e.metaKey)&&1===e.key.length}function Yt(e,a,d,t,i){var s=t?t.getColDef().suppressKeyboardEvent:void 0;if(!s)return!1;var o={event:a,editing:i,column:t,api:e.api,node:d,data:d.data,colDef:t.getColDef(),context:e.context,columnApi:e.columnApi};if(s&&s(o))return!0;return!1}function $t(e,a,d,t){var s=t.getDefinition(),o=s&&s.suppressHeaderKeyboardEvent;return!!i(o)&&!!o({api:e.api,columnApi:e.columnApi,context:e.context,colDef:s,column:t,headerRowIndex:d,event:a})}function Xt(e){var a;switch(e.keyCode){case 65:a=zt.A;break;case 67:a=zt.C;break;case 86:a=zt.V;break;case 68:a=zt.D;break;case 90:a=zt.Z;break;case 89:a=zt.Y;break;default:a=e.code}return a}function Jt(e,a){return void 0===a&&(a=!1),e===zt.DELETE||!a&&e===zt.BACKSPACE&&Dd()}var Zt=Object.freeze({__proto__:null,isEventFromPrintableCharacter:Kt,isUserSuppressingKeyboardEvent:Yt,isUserSuppressingHeaderKeyboardEvent:$t,normaliseQwertyAzerty:Xt,isDeleteKey:Jt});function ei(e,a,d){if(0===d)return!1;var t=Math.abs(e.clientX-a.clientX),i=Math.abs(e.clientY-a.clientY);return Math.max(t,i)<=d}var ai=Object.freeze({__proto__:null,areEventsNear:ei});var di=Object.freeze({__proto__:null,sortRowNodesByOrder:function(e,a){if(!e)return!1;for(var d=function(e,d){var t=a[e.id],i=a[d.id],s=void 0!==t,o=void 0!==i;return s&&o?t-i:!s&&!o?e.__objectId-d.__objectId:s?1:-1},t=!1,i=0;i0){t=!0;break}return!!t&&(e.sort(d),!0)}});function ti(e){var a=new Set;return e.forEach((function(e){return a.add(e)})),a}var ii,si=Object.freeze({__proto__:null,convertToSet:ti}),oi=function(){return oi=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e[e.NOTHING=0]="NOTHING",e[e.WAITING_TO_SHOW=1]="WAITING_TO_SHOW",e[e.SHOWING=2]="SHOWING"}(ui||(ui={})),function(e){e[e.HOVER=0]="HOVER",e[e.FOCUS=1]="FOCUS"}(ni||(ni={}));var yi=function(e){function a(a,d,t){var i=e.call(this)||this;return i.parentComp=a,i.tooltipShowDelayOverride=d,i.tooltipHideDelayOverride=t,i.SHOW_QUICK_TOOLTIP_DIFF=1e3,i.FADE_OUT_TOOLTIP_TIMEOUT=1e3,i.INTERACTIVE_HIDE_DELAY=100,i.interactionEnabled=!1,i.isInteractingWithTooltip=!1,i.state=ui.NOTHING,i.tooltipInstanceCount=0,i.tooltipMouseTrack=!1,i}return ci(a,e),a.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===ni.HOVER&&(this.addManagedListener(e,"mouseenter",this.onMouseEnter.bind(this)),this.addManagedListener(e,"mouseleave",this.onMouseLeave.bind(this))),this.tooltipTrigger===ni.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)))},a.prototype.getGridOptionsTooltipDelay=function(e){var a=this.gridOptionsService.get(e);return a<0&&w("".concat(e," should not be lower than 0")),Math.max(200,a)},a.prototype.getTooltipDelay=function(e){var a,d;return"show"===e?null!==(a=this.tooltipShowDelayOverride)&&void 0!==a?a:this.getGridOptionsTooltipDelay("tooltipShowDelay"):null!==(d=this.tooltipHideDelayOverride)&&void 0!==d?d:this.getGridOptionsTooltipDelay("tooltipHideDelay")},a.prototype.destroy=function(){this.setToDoNothing(),e.prototype.destroy.call(this)},a.prototype.getTooltipTrigger=function(){var e=this.gridOptionsService.get("tooltipTrigger");return e&&"hover"!==e?ni.FOCUS:ni.HOVER},a.prototype.onMouseEnter=function(e){var d=this;this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),gd()||(a.isLocked?this.showTooltipTimeoutId=window.setTimeout((function(){d.prepareToShowTooltip(e)}),this.INTERACTIVE_HIDE_DELAY):this.prepareToShowTooltip(e))},a.prototype.onMouseMove=function(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===ui.SHOWING&&this.tooltipComp&&this.positionTooltip()},a.prototype.onMouseDown=function(){this.setToDoNothing()},a.prototype.onMouseLeave=function(){this.interactionEnabled?this.lockService():this.setToDoNothing()},a.prototype.onFocusIn=function(){this.prepareToShowTooltip()},a.prototype.onFocusOut=function(e){var a,d=e.relatedTarget,t=this.parentComp.getGui(),i=null===(a=this.tooltipComp)||void 0===a?void 0:a.getGui();this.isInteractingWithTooltip||t.contains(d)||this.interactionEnabled&&(null===i||void 0===i?void 0:i.contains(d))||this.setToDoNothing()},a.prototype.onKeyDown=function(){this.setToDoNothing()},a.prototype.prepareToShowTooltip=function(e){if(this.state!=ui.NOTHING||a.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=ui.WAITING_TO_SHOW,!0},a.prototype.isLastTooltipHiddenRecently=function(){return(new Date).getTime()-a.lastTooltipHideTime1)d.forEach((function(e){return a.addCssClass(e)}));else if(!0!==this.cssClassStates[e]&&e.length){var t=this.getGui();t&&t.classList.add(e),this.cssClassStates[e]=!0}},e.prototype.removeCssClass=function(e){var a=this,d=(e||"").split(" ");if(d.length>1)d.forEach((function(e){return a.removeCssClass(e)}));else if(!1!==this.cssClassStates[e]&&e.length){var t=this.getGui();t&&t.classList.remove(e),this.cssClassStates[e]=!1}},e.prototype.containsCssClass=function(e){var a=this.getGui();return!!a&&a.classList.contains(e)},e.prototype.addOrRemoveCssClass=function(e,a){var d=this;if(e){if(e.indexOf(" ")>=0){var t=(e||"").split(" ");if(t.length>1)return void t.forEach((function(e){return d.addOrRemoveCssClass(e,a)}))}if(this.cssClassStates[e]!==a&&e.length){var i=this.getGui();i&&i.classList.toggle(e,a),this.cssClassStates[e]=a}}},e}(),bi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ci=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Pi=new mi,hi=function(e){function a(a){var d=e.call(this)||this;return d.displayed=!0,d.visible=!0,d.compId=Pi.next(),d.cssClassManager=new qi((function(){return d.eGui})),a&&d.setTemplate(a),d}return bi(a,e),a.prototype.preConstructOnComponent=function(){this.usingBrowserTooltips=this.gridOptionsService.get("enableBrowserTooltips")},a.prototype.getCompId=function(){return this.compId},a.prototype.getTooltipParams=function(){return{value:this.tooltipText,location:"UNKNOWN"}},a.prototype.setTooltip=function(e,a,d){var t=this;this.tooltipText!=e&&(this.tooltipText&&(t.usingBrowserTooltips?t.getGui().removeAttribute("title"):t.tooltipFeature=t.destroyBean(t.tooltipFeature)),null!=e&&(this.tooltipText=e,this.tooltipText&&(t.usingBrowserTooltips?t.getGui().setAttribute("title",t.tooltipText):t.tooltipFeature=t.createBean(new yi(t,a,d)))))},a.prototype.createChildComponentsFromTags=function(e,a){var d=this;vt(e.childNodes).forEach((function(t){if(t instanceof HTMLElement){var i=d.createComponentFromElement(t,(function(e){e.getGui()&&d.copyAttributesFromNode(t,e.getGui())}),a);if(i){if(i.addItems&&t.children.length){d.createChildComponentsFromTags(t,a);var s=Array.prototype.slice.call(t.children);i.addItems(s)}d.swapComponentForNode(i,e,t)}else t.childNodes&&d.createChildComponentsFromTags(t,a)}}))},a.prototype.createComponentFromElement=function(e,d,t){var i=e.nodeName,s=t?t[e.getAttribute("ref")]:void 0,o=this.agStackComponentsRegistry.getComponentClass(i);if(o){a.elementGettingCreated=e;var l=new o(s);return l.setParentComponent(this),this.createBean(l,null,d),l}return null},a.prototype.copyAttributesFromNode=function(e,a){Mt(e.attributes,(function(e,d){return a.setAttribute(e,d)}))},a.prototype.swapComponentForNode=function(e,a,d){var t=e.getGui();a.replaceChild(t,d),a.insertBefore(document.createComment(d.nodeName),t),this.addDestroyFunc(this.destroyBean.bind(this,e)),this.swapInComponentForQuerySelectors(e,d)},a.prototype.swapInComponentForQuerySelectors=function(e,a){var d=this;this.iterateOverQuerySelectors((function(t){d[t.attributeName]===a&&(d[t.attributeName]=e)}))},a.prototype.iterateOverQuerySelectors=function(e){for(var a=Object.getPrototypeOf(this);null!=a;){var d=a.__agComponentMetaData,t=M(a.constructor);d&&d[t]&&d[t].querySelectors&&d[t].querySelectors.forEach((function(a){return e(a)})),a=Object.getPrototypeOf(a)}},a.prototype.activateTabIndex=function(e){var a=this.gridOptionsService.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach((function(e){return e.setAttribute("tabindex",a.toString())}))},a.prototype.setTemplate=function(e,a){var d=bt(e);this.setTemplateFromElement(d,a)},a.prototype.setTemplateFromElement=function(e,a){this.eGui=e,this.eGui.__agComponent=this,this.wireQuerySelectors(),this.getContext()&&this.createChildComponentsFromTags(this.getGui(),a)},a.prototype.createChildComponentsPreConstruct=function(){this.getGui()&&this.createChildComponentsFromTags(this.getGui())},a.prototype.wireQuerySelectors=function(){var e=this;if(this.eGui){var a=this;this.iterateOverQuerySelectors((function(d){var t=function(e){return a[d.attributeName]=e};if(d.refSelector&&e.getAttribute("ref")===d.refSelector)t(e.eGui);else{var i=e.eGui.querySelector(d.querySelector);i&&t(i.__agComponent||i)}}))}},a.prototype.getGui=function(){return this.eGui},a.prototype.getFocusableElement=function(){return this.eGui},a.prototype.getAriaElement=function(){return this.getFocusableElement()},a.prototype.setParentComponent=function(e){this.parentComponent=e},a.prototype.getParentComponent=function(){return this.parentComponent},a.prototype.setGui=function(e){this.eGui=e},a.prototype.queryForHtmlElement=function(e){return this.eGui.querySelector(e)},a.prototype.queryForHtmlInputElement=function(e){return this.eGui.querySelector(e)},a.prototype.appendChild=function(e,a){if(null!=e)if(a||(a=this.eGui),wt(e))a.appendChild(e);else{var d=e;a.appendChild(d.getGui())}},a.prototype.isDisplayed=function(){return this.displayed},a.prototype.setVisible=function(e,a){if(void 0===a&&(a={}),e!==this.visible){this.visible=e;var d=a.skipAriaHidden;tt(this.eGui,e,{skipAriaHidden:d})}},a.prototype.setDisplayed=function(e,d){if(void 0===d&&(d={}),e!==this.displayed){this.displayed=e;var t=d.skipAriaHidden;dt(this.eGui,e,{skipAriaHidden:t});var i={type:a.EVENT_DISPLAYED_CHANGED,visible:this.displayed};this.dispatchEvent(i)}},a.prototype.destroy=function(){this.tooltipFeature&&(this.tooltipFeature=this.destroyBean(this.tooltipFeature)),this.parentComponent&&(this.parentComponent=void 0);var a=this.eGui;a&&a.__agComponent&&(a.__agComponent=void 0),e.prototype.destroy.call(this)},a.prototype.addGuiEventListener=function(e,a,d){var t=this;this.eGui.addEventListener(e,a,d),this.addDestroyFunc((function(){return t.eGui.removeEventListener(e,a)}))},a.prototype.addCssClass=function(e){this.cssClassManager.addCssClass(e)},a.prototype.removeCssClass=function(e){this.cssClassManager.removeCssClass(e)},a.prototype.containsCssClass=function(e){return this.cssClassManager.containsCssClass(e)},a.prototype.addOrRemoveCssClass=function(e,a){this.cssClassManager.addOrRemoveCssClass(e,a)},a.prototype.getAttribute=function(e){var a=this.eGui;return a?a.getAttribute(e):null},a.prototype.getRefElement=function(e){return this.queryForHtmlElement('[ref="'.concat(e,'"]'))},a.EVENT_DISPLAYED_CHANGED="displayedChanged",Ci([de("agStackComponentsRegistry")],a.prototype,"agStackComponentsRegistry",void 0),Ci([J],a.prototype,"preConstructOnComponent",null),Ci([J],a.prototype,"createChildComponentsPreConstruct",null),a}(je);function Ti(e){return Ii.bind(this,e,void 0)}function Li(e){return Ii.bind(this,"[ref=".concat(e,"]"),e)}function Ii(e,a,d,t,i){null!==e?"number"!==typeof i?function(e,a,d){var t=function(e,a){e.__agComponentMetaData||(e.__agComponentMetaData={});e.__agComponentMetaData[a]||(e.__agComponentMetaData[a]={});return e.__agComponentMetaData[a]}(e,M(e.constructor));t[a]||(t[a]=[]);t[a].push(d)}(d,"querySelectors",{attributeName:t,querySelector:e,refSelector:a}):console.error("AG Grid: QuerySelector should be on an attribute"):console.error("AG Grid: QuerySelector selector should not be null")}var Oi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Bi=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Si=function(e){function a(){return e.call(this,'\n ')||this}return Oi(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(e){this.params=e;var a=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),d=this.localeService.getLocaleTextFunc();this.eFloatingFilterText.setDisabled(!0).setInputAriaLabel("".concat(a," ").concat(d("ariaFilterInput","Filter Input")))},a.prototype.onParentModelChanged=function(e){var a=this;e?this.params.parentFilterInstance((function(d){if(d.getModelAsString){var t=d.getModelAsString(e);a.eFloatingFilterText.setValue(t)}})):this.eFloatingFilterText.setValue("")},a.prototype.onParamsUpdated=function(e){this.init(e)},Bi([Li("eFloatingFilterText")],a.prototype,"eFloatingFilterText",void 0),Bi([de("columnModel")],a.prototype,"columnModel",void 0),a}(hi),Di=function(){function e(e,a,d,t){var i=this;this.alive=!0,this.context=e,this.eParent=t,a.getDateCompDetails(d).newAgStackInstance().then((function(a){i.alive?(i.dateComp=a,a&&(t.appendChild(a.getGui()),a.afterGuiAttached&&a.afterGuiAttached(),i.tempValue&&a.setDate(i.tempValue),null!=i.disabled&&i.setDateCompDisabled(i.disabled))):e.destroyBean(a)}))}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){dt(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 a;(null===(a=this.dateComp)||void 0===a?void 0:a.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}(),gi=function(){function e(){this.customFilterOptions={}}return e.prototype.init=function(e,a){this.filterOptions=e.filterOptions||a,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(a){if("string"!==typeof a){[["displayKey"],["displayName"],["predicate","test"]].every((function(e){return!!e.some((function(e){return null!=a[e]}))||(console.warn("AG Grid: ignoring FilterOptionDef as it doesn't contain one of '".concat(e,"'")),!1)}))?e.customFilterOptions[a.displayKey]=a:e.filterOptions=e.filterOptions.filter((function(e){return e===a}))||[]}}))},e.prototype.selectDefaultItem=function(e){if(e.defaultOption)this.defaultOption=e.defaultOption;else if(this.filterOptions.length>=1){var a=this.filterOptions[0];"string"===typeof a?this.defaultOption=a:a.displayKey?this.defaultOption=a.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}(),Gi={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"},wi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),vi=function(){return vi=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ki=function(e){function a(a,d){void 0===d&&(d={});var t=e.call(this)||this;return t.eFocusableElement=a,t.callbacks=d,t.callbacks=vi({shouldStopEventPropagation:function(){return!1},onTabKeyDown:function(e){if(!e.defaultPrevented){var a=t.focusService.findNextFocusableElement(t.eFocusableElement,!1,e.shiftKey);a&&(a.focus(),e.preventDefault())}}},d),t}return wi(a,e),a.prototype.postConstruct=function(){this.eFocusableElement.classList.add(a.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)},a.prototype.addKeyDownListeners=function(e){var a=this;this.addManagedListener(e,"keydown",(function(e){e.defaultPrevented||Qe(e)||(a.callbacks.shouldStopEventPropagation(e)?xe(e):e.key===zt.TAB?a.callbacks.onTabKeyDown(e):a.callbacks.handleKeyDown&&a.callbacks.handleKeyDown(e))}))},a.FOCUS_MANAGED_CLASS="ag-focus-managed",Mi([de("focusService")],a.prototype,"focusService",void 0),Mi([Z],a.prototype,"postConstruct",null),a}(je),xi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Qi=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Vi="ag-resizer-wrapper",Fi='
\n
\n
\n
\n
\n
\n
\n
\n
\n
'),Ei=function(e){function a(a,d){var t=e.call(this)||this;return t.element=a,t.dragStartPosition={x:0,y:0},t.position={x:0,y:0},t.lastSize={width:-1,height:-1},t.positioned=!1,t.resizersAdded=!1,t.resizeListeners=[],t.boundaryEl=null,t.isResizing=!1,t.isMoving=!1,t.resizable={},t.movable=!1,t.currentResizer=null,t.config=Object.assign({},{popup:!1},d),t}return xi(a,e),a.prototype.center=function(){var e=this.offsetParent,a=e.clientHeight,d=e.clientWidth/2-this.getWidth()/2,t=a/2-this.getHeight()/2;this.offsetElement(d,t)},a.prototype.initialisePosition=function(){if(!this.positioned){var e=this.config,a=e.centered,d=e.forcePopupParentAsOffsetParent,t=e.minWidth,i=e.width,s=e.minHeight,o=e.height,l=e.x,m=e.y;this.offsetParent||this.setOffsetParent();var u=0,n=0,r=qt(this.element);if(r){var f=this.findBoundaryElement(),c=window.getComputedStyle(f);if(null!=c.minWidth){var p=f.offsetWidth-this.element.offsetWidth;n=parseInt(c.minWidth,10)-p}if(null!=c.minHeight){var _=f.offsetHeight-this.element.offsetHeight;u=parseInt(c.minHeight,10)-_}}if(this.minHeight=s||u,this.minWidth=t||n,i&&this.setWidth(i),o&&this.setHeight(o),i&&o||this.refreshSize(),a)this.center();else if(l||m)this.offsetElement(l,m);else if(r&&d){var y=!0;if((f=this.boundaryEl)||(f=this.findBoundaryElement(),y=!1),f){var q=parseFloat(f.style.top),b=parseFloat(f.style.left);y?this.offsetElement(isNaN(b)?0:b,isNaN(q)?0:q):this.setPosition(b,q)}}this.positioned=!!this.offsetParent}},a.prototype.isPositioned=function(){return this.positioned},a.prototype.getPosition=function(){return this.position},a.prototype.setMovable=function(e,a){if(this.config.popup&&e!==this.movable){this.movable=e;var d=this.moveElementDragListener||{eElement:a,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)}},a.prototype.setResizable=function(e){var a=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 t=!!e[d],i=a.getResizerElement(d),s={dragStartPixels:0,eElement:i,onDragStart:function(e){return a.onResizeStart(e,d)},onDragging:a.onResize.bind(a),onDragStop:function(e){return a.onResizeEnd(e,d)}};(t||!a.isAlive()&&!t)&&(t?(a.dragService.addDragSource(s),a.resizeListeners.push(s),i.style.pointerEvents="all"):i.style.pointerEvents="none",a.resizable[d]=t)}))},a.prototype.removeSizeFromEl=function(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")},a.prototype.restoreLastSize=function(){this.element.style.flex="0 0 auto";var e=this.lastSize,a=e.height,d=e.width;-1!==d&&(this.element.style.width="".concat(d,"px")),-1!==a&&(this.element.style.height="".concat(a,"px"))},a.prototype.getHeight=function(){return this.element.offsetHeight},a.prototype.setHeight=function(e){var a=this.config.popup,d=this.element,t=!1;if("string"===typeof e&&-1!==e.indexOf("%"))gt(d,e),e=ut(d),t=!0;else if(e=Math.max(this.minHeight,e),this.positioned){var i=this.getAvailableHeight();i&&e>i&&(e=i)}this.getHeight()!==e&&(t?(d.style.maxHeight="unset",d.style.minHeight="unset"):a?gt(d,e):(d.style.height="".concat(e,"px"),d.style.flex="0 0 auto",this.lastSize.height="number"===typeof e?e:parseFloat(e)))},a.prototype.getAvailableHeight=function(){var e=this.config,a=e.popup,d=e.forcePopupParentAsOffsetParent;this.positioned||this.initialisePosition();var t=this.offsetParent.clientHeight;if(!t)return null;var i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),o=a?this.position.y:i.top,l=a?0:s.top,m=0;if(d){var u=this.element.parentElement;if(u)m=u.getBoundingClientRect().bottom-i.bottom}return t+l-o-m},a.prototype.getWidth=function(){return this.element.offsetWidth},a.prototype.setWidth=function(e){var a=this.element,d=this.config.popup,t=!1;if("string"===typeof e&&-1!==e.indexOf("%"))Dt(a,e),e=nt(a),t=!0;else if(this.positioned){e=Math.max(this.minWidth,e);var i=this.offsetParent.clientWidth,s=d?this.position.x:this.element.getBoundingClientRect().left;i&&e+s>i&&(e=i-s)}this.getWidth()!==e&&(t?(a.style.maxWidth="unset",a.style.minWidth="unset"):this.config.popup?Dt(a,e):(a.style.width="".concat(e,"px"),a.style.flex=" unset",this.lastSize.width="number"===typeof e?e:parseFloat(e)))},a.prototype.offsetElement=function(e,a){void 0===e&&(e=0),void 0===a&&(a=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:a}}}),this.setPosition(parseFloat(d.style.left),parseFloat(d.style.top)))},a.prototype.constrainSizeToAvailableHeight=function(e){var a=this;if(this.config.forcePopupParentAsOffsetParent){e?this.resizeObserverSubscriber=this.resizeObserverService.observeResize(this.popupService.getPopupParent(),(function(){var e=a.getAvailableHeight();a.element.style.setProperty("max-height","".concat(e,"px"))})):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}},a.prototype.setPosition=function(e,a){this.position.x=e,this.position.y=a},a.prototype.updateDragStartPosition=function(e,a){this.dragStartPosition={x:e,y:a}},a.prototype.calculateMouseMovement=function(e){var a=e.e,d=e.isLeft,t=e.isTop,i=e.anywhereWithin,s=e.topBuffer,o=a.clientX-this.dragStartPosition.x,l=a.clientY-this.dragStartPosition.y;return{movementX:this.shouldSkipX(a,!!d,!!i,o)?0:o,movementY:this.shouldSkipY(a,!!t,s,l)?0:l}},a.prototype.shouldSkipX=function(e,a,d,t){var i=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),l=this.config.popup?this.position.x:i.left,m=l<=0&&s.left>=e.clientX||s.right<=e.clientX&&s.right<=o.right;return!!m||(m=a?t<0&&e.clientX>l+s.left||t>0&&e.clientXo.right||t>0&&e.clientXo.right||t>0&&e.clientX=e.clientY||s.bottom<=e.clientY&&s.bottom<=o.bottom;return!!m||(m=a?t<0&&e.clientY>l+s.top+d||t>0&&e.clientYo.bottom||t>0&&e.clientYthis.element.parentElement.offsetHeight&&(I=!0),I||this.setHeight(L)}this.updateDragStartPosition(e.clientX,e.clientY),((d||t)&&y||q)&&this.offsetElement(p+y,_+q)}},a.prototype.onResizeEnd=function(e,a){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[a].element.classList.remove("ag-active"),this.dispatchEvent(d)},a.prototype.refreshSize=function(){var e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))},a.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)},a.prototype.onMove=function(e){if(this.isMoving){var a,d=this.position,t=d.x,i=d.y;this.config.calculateTopBuffer&&(a=this.config.calculateTopBuffer());var s=this.calculateMouseMovement({e:e,isTop:!0,anywhereWithin:!0,topBuffer:a}),o=s.movementX,l=s.movementY;this.offsetElement(t+o,i+l),this.updateDragStartPosition(e.clientX,e.clientY)}},a.prototype.onMoveEnd=function(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")},a.prototype.setOffsetParent=function(){this.config.forcePopupParentAsOffsetParent?this.offsetParent=this.popupService.getPopupParent():this.offsetParent=this.element.offsetParent},a.prototype.findBoundaryElement=function(){for(var e=this.element;e;){if("static"!==window.getComputedStyle(e).position)return e;e=e.parentElement}return this.element},a.prototype.clearResizeListeners=function(){for(;this.resizeListeners.length;){var e=this.resizeListeners.pop();this.dragService.removeDragSource(e)}},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.moveElementDragListener&&this.dragService.removeDragSource(this.moveElementDragListener),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()},Qi([de("popupService")],a.prototype,"popupService",void 0),Qi([de("resizeObserverService")],a.prototype,"resizeObserverService",void 0),Qi([de("dragService")],a.prototype,"dragService",void 0),a}(je),Ri=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ni=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ai=function(e){function a(a){var d=e.call(this)||this;return d.filterNameKey=a,d.applyActive=!1,d.hidePopup=null,d.debouncePending=!1,d.appliedModel=null,d.buttonListeners=[],d}return Ri(a,e),a.prototype.postConstruct=function(){this.resetTemplate(),this.createManagedBean(new ki(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new Ei(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)},a.prototype.handleKeyDown=function(e){},a.prototype.getFilterTitle=function(){return this.translate(this.filterNameKey)},a.prototype.isFilterActive=function(){return!!this.appliedModel},a.prototype.resetTemplate=function(e){var a=this.getGui();a&&a.removeEventListener("submit",this.onFormSubmit);var d='\n
\n
\n ').concat(this.createBodyTemplate(),"\n
\n
");this.setTemplate(d,e),(a=this.getGui())&&a.addEventListener("submit",this.onFormSubmit)},a.prototype.isReadOnly=function(){return!!this.providedFilterParams.readOnly},a.prototype.init=function(e){var a=this;this.setParams(e),this.resetUiToDefaults(!0).then((function(){a.updateUiVisibility(),a.setupOnBtApplyDebounce()}))},a.prototype.setParams=function(e){this.providedFilterParams=e,this.applyActive=a.isUseApplyButton(e),this.resetButtonsPanel()},a.prototype.updateParams=function(e){var d=this;this.providedFilterParams=e,this.applyActive=a.isUseApplyButton(e),this.resetUiToActiveModel(this.getModel(),(function(){d.updateUiVisibility(),d.setupOnBtApplyDebounce()}))},a.prototype.resetButtonsPanel=function(){var e=this,a=this.providedFilterParams.buttons,d=a&&a.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(_t(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 t=document.createDocumentFragment();ti(a).forEach((function(a){return function(a){var d,i;switch(a){case"apply":d=e.translate("applyFilter"),i=function(a){return e.onBtApply(!1,!1,a)};break;case"clear":d=e.translate("clearFilter"),i=function(){return e.onBtClear()};break;case"reset":d=e.translate("resetFilter"),i=function(){return e.onBtReset()};break;case"cancel":d=e.translate("cancelFilter"),i=function(a){e.onBtCancel(a)};break;default:return void console.warn("AG Grid: Unknown button type specified")}var s=bt('').concat(d,"\n "));e.buttonListeners.push(e.addManagedListener(s,"click",i)),t.append(s)}(a)})),this.eButtonsPanel.append(t),this.getGui().appendChild(this.eButtonsPanel)}else this.eButtonsPanel&&yt(this.eButtonsPanel)},a.prototype.getDefaultDebounceMs=function(){return 0},a.prototype.setupOnBtApplyDebounce=function(){var e=this,d=a.getDebounceMs(this.providedFilterParams,this.getDefaultDebounceMs()),t=R(this.checkApplyDebounce.bind(this),d);this.onBtApplyDebounce=function(){e.debouncePending=!0,t()}},a.prototype.checkApplyDebounce=function(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())},a.prototype.getModel=function(){return this.appliedModel?this.appliedModel:null},a.prototype.setModel=function(e){var a=this;return(null!=e?this.setModelIntoUi(e):this.resetUiToDefaults()).then((function(){a.updateUiVisibility(),a.applyModel("api")}))},a.prototype.onBtCancel=function(e){var a=this;this.resetUiToActiveModel(this.getModel(),(function(){a.handleCancelEnd(e)}))},a.prototype.handleCancelEnd=function(e){this.providedFilterParams.closeOnApply&&this.close(e)},a.prototype.resetUiToActiveModel=function(e,a){var d=this,t=function(){d.onUiChanged(!1,"prevent"),null===a||void 0===a||a()};null!=e?this.setModelIntoUi(e).then(t):this.resetUiToDefaults().then(t)},a.prototype.onBtClear=function(){var e=this;this.resetUiToDefaults().then((function(){return e.onUiChanged()}))},a.prototype.onBtReset=function(){this.onBtClear(),this.onBtApply()},a.prototype.applyModel=function(e){var a=this.getModelFromUi();if(!this.isModelValid(a))return!1;var d=this.appliedModel;return this.appliedModel=a,!this.areModelsEqual(d,a)},a.prototype.isModelValid=function(e){return!0},a.prototype.onFormSubmit=function(e){e.preventDefault()},a.prototype.onBtApply=function(e,a,d){if(void 0===e&&(e=!1),void 0===a&&(a=!1),d&&d.preventDefault(),this.applyModel(a?"rowDataUpdated":"ui")){this.providedFilterParams.filterChangedCallback({afterFloatingFilter:e,afterDataChange:a,source:"columnFilter"})}this.providedFilterParams.closeOnApply&&this.applyActive&&!e&&!a&&this.close(d)},a.prototype.onNewRowsLoaded=function(){},a.prototype.close=function(e){if(this.hidePopup){var a,d=e,t=d&&d.key;"Enter"!==t&&"Space"!==t||(a={keyboardEvent:d}),this.hidePopup(a),this.hidePopup=null}},a.prototype.onUiChanged=function(e,a){if(void 0===e&&(e=!1),this.updateUiVisibility(),this.providedFilterParams.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){var d=this.isModelValid(this.getModelFromUi()),t=this.getRefElement("applyFilterButton");t&&it(t,!d)}e&&!a||"immediately"===a?this.onBtApply(e):(this.applyActive||a)&&"debounce"!==a||this.onBtApplyDebounce()},a.prototype.afterGuiAttached=function(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(null===e||void 0===e?void 0:e.container)},a.prototype.refreshFilterResizer=function(e){if(this.positionableFeature&&"toolPanel"!==e){var a="floatingFilter"===e,d=this.positionableFeature,t=this.gridOptionsService;a?(d.restoreLastSize(),d.setResizable(t.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)}},a.prototype.afterGuiDetached=function(){this.checkApplyDebounce(),this.positionableFeature&&this.positionableFeature.constrainSizeToAvailableHeight(!1)},a.getDebounceMs=function(e,d){return a.isUseApplyButton(e)?(null!=e.debounceMs&&console.warn("AG Grid: debounceMs is ignored when apply button is present"),0):null!=e.debounceMs?e.debounceMs:d},a.isUseApplyButton=function(e){return!!e.buttons&&e.buttons.indexOf("apply")>=0},a.prototype.refresh=function(e){return this.providedFilterParams=e,!0},a.prototype.destroy=function(){var a=this.getGui();a&&a.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),e.prototype.destroy.call(this)},a.prototype.translate=function(e){return this.localeService.getLocaleTextFunc()(e,Gi[e])},a.prototype.getCellValue=function(e){return this.providedFilterParams.getValue(e)},a.prototype.getPositionableElement=function(){return this.eFilterBody},Ni([de("rowModel")],a.prototype,"rowModel",void 0),Ni([Li("eFilterBody")],a.prototype,"eFilterBody",void 0),Ni([Z],a.prototype,"postConstruct",null),a}(hi),Hi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Wi=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ji=function(e){function a(a,d){var t=e.call(this,d)||this;return t.labelSeparator="",t.labelAlignment="left",t.disabled=!1,t.label="",t.config=a||{},t}return Hi(a,e),a.prototype.postConstruct=function(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");var e=this.config,a=e.labelSeparator,d=e.label,t=e.labelWidth,i=e.labelAlignment;null!=a&&this.setLabelSeparator(a),null!=d&&this.setLabel(d),null!=t&&this.setLabelWidth(t),this.setLabelAlignment(i||this.labelAlignment),this.refreshLabel()},a.prototype.refreshLabel=function(){_t(this.eLabel),"string"===typeof this.label?this.eLabel.innerText=this.label+this.labelSeparator:this.label&&this.eLabel.appendChild(this.label),""===this.label?(dt(this.eLabel,!1),Na(this.eLabel,"presentation")):(dt(this.eLabel,!0),Na(this.eLabel,null))},a.prototype.setLabelSeparator=function(e){return this.labelSeparator===e||(this.labelSeparator=e,null!=this.label&&this.refreshLabel()),this},a.prototype.getLabelId=function(){return this.eLabel.id=this.eLabel.id||"ag-".concat(this.getCompId(),"-label"),this.eLabel.id},a.prototype.getLabel=function(){return this.label},a.prototype.setLabel=function(e){return this.label===e||(this.label=e,this.refreshLabel()),this},a.prototype.setLabelAlignment=function(e){var a=this.getGui().classList;return a.toggle("ag-label-align-left","left"===e),a.toggle("ag-label-align-right","right"===e),a.toggle("ag-label-align-top","top"===e),this},a.prototype.setLabelEllipsis=function(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this},a.prototype.setLabelWidth=function(e){return null==this.label||St(this.eLabel,e),this},a.prototype.setDisabled=function(e){e=!!e;var a=this.getGui();return it(a,e),a.classList.toggle("ag-disabled",e),this.disabled=e,this},a.prototype.isDisabled=function(){return!!this.disabled},Wi([Z],a.prototype,"postConstruct",null),a}(hi),Ui=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),zi=function(e){function a(a,d,t){var i=e.call(this,a,d)||this;return i.className=t,i}return Ui(a,e),a.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()},a.prototype.refreshAriaLabelledBy=function(){var e=this.getAriaElement(),a=this.getLabelId();null!==ja(e)?za(e,""):za(e,null!==a&&void 0!==a?a:"")},a.prototype.setAriaLabel=function(e){return Ua(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this},a.prototype.onValueChange=function(e){var a=this;return this.addManagedListener(this,Je.EVENT_FIELD_VALUE_CHANGED,(function(){return e(a.getValue())})),this},a.prototype.getWidth=function(){return this.getGui().clientWidth},a.prototype.setWidth=function(e){return Dt(this.getGui(),e),this},a.prototype.getPreviousValue=function(){return this.previousValue},a.prototype.getValue=function(){return this.value},a.prototype.setValue=function(e,a){return this.value===e||(this.previousValue=this.value,this.value=e,a||this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED})),this},a}(ji),Ki=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Yi=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},$i=function(e){function a(a){var d=e.call(this,a,(null===a||void 0===a?void 0:a.template)||'\n ',null===a||void 0===a?void 0:a.className)||this;if(d.isPickerDisplayed=!1,d.skipClick=!1,d.pickerGap=4,d.hideCurrentPicker=null,d.ariaRole=null===a||void 0===a?void 0:a.ariaRole,d.onPickerFocusIn=d.onPickerFocusIn.bind(d),d.onPickerFocusOut=d.onPickerFocusOut.bind(d),!a)return d;var t=a.pickerGap,i=a.maxPickerHeight,s=a.variableWidth,o=a.minPickerWidth,l=a.maxPickerWidth;return null!=t&&(d.pickerGap=t),d.variableWidth=!!s,null!=i&&d.setPickerMaxHeight(i),null!=o&&d.setPickerMinWidth(o),null!=l&&d.setPickerMaxWidth(l),d}return Ki(a,e),a.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.setupAria();var a="ag-".concat(this.getCompId(),"-display");this.eDisplayField.setAttribute("id",a);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 t=this.config.pickerIcon;if(t){var i=jt(t,this.gridOptionsService);i&&this.eIcon.appendChild(i)}},a.prototype.setupAria=function(){var e=this.getAriaElement();e.setAttribute("tabindex",this.gridOptionsService.get("tabIndex").toString()),ed(e,!1),this.ariaRole&&Na(e,this.ariaRole)},a.prototype.onLabelOrWrapperMouseDown=function(e){if(e){var a=this.getFocusableElement();if(a!==this.eWrapper&&(null===e||void 0===e?void 0:e.target)===a)return;e.preventDefault(),this.getFocusableElement().focus()}this.skipClick?this.skipClick=!1:this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())},a.prototype.onKeyDown=function(e){switch(e.key){case zt.UP:case zt.DOWN:case zt.ENTER:case zt.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case zt.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker())}},a.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)},a.prototype.renderAndPositionPicker=function(){var e=this,a=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 t=this.localeService.getLocaleTextFunc(),i=this.config,s=i.pickerAriaLabelKey,o=i.pickerAriaLabelValue,l=i.modalPicker,m={modal:void 0===l||l,eChild:d,closeOnEsc:!0,closedCallback:function(){var d=a.activeElement===a.body;e.beforeHidePicker(),d&&e.isAlive()&&e.getFocusableElement().focus()},ariaLabel:t(s,o)},u=this.popupService.addPopup(m),n=this,r=n.maxPickerHeight,f=n.minPickerWidth,c=n.maxPickerWidth;n.variableWidth?(f&&(d.style.minWidth=f),d.style.width=Gt(nt(this.eWrapper)),c&&(d.style.maxWidth=c)):St(d,null!==c&&void 0!==c?c:nt(this.eWrapper));var p=null!==r&&void 0!==r?r:"".concat(lt(this.popupService.getPopupParent()),"px");return d.style.setProperty("max-height",p),d.style.position="absolute",this.alignPickerToComponent(),u.hideFunc},a.prototype.alignPickerToComponent=function(){if(this.pickerComponent){var e=this.config.pickerType,a=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:a})}},a.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},a.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))},a.prototype.onPickerFocusIn=function(){this.togglePickerHasFocus(!0)},a.prototype.onPickerFocusOut=function(e){var a;(null===(a=this.pickerComponent)||void 0===a?void 0:a.getGui().contains(e.relatedTarget))||this.togglePickerHasFocus(!1)},a.prototype.togglePickerHasFocus=function(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)},a.prototype.hidePicker=function(){this.hideCurrentPicker&&this.hideCurrentPicker()},a.prototype.setInputWidth=function(e){return St(this.eWrapper,e),this},a.prototype.getFocusableElement=function(){return this.eWrapper},a.prototype.setPickerGap=function(e){return this.pickerGap=e,this},a.prototype.setPickerMinWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.minPickerWidth=null==e?void 0:e,this},a.prototype.setPickerMaxWidth=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerWidth=null==e?void 0:e,this},a.prototype.setPickerMaxHeight=function(e){return"number"===typeof e&&(e="".concat(e,"px")),this.maxPickerHeight=null==e?void 0:e,this},a.prototype.destroy=function(){this.hidePicker(),e.prototype.destroy.call(this)},Yi([de("popupService")],a.prototype,"popupService",void 0),Yi([Li("eLabel")],a.prototype,"eLabel",void 0),Yi([Li("eWrapper")],a.prototype,"eWrapper",void 0),Yi([Li("eDisplayField")],a.prototype,"eDisplayField",void 0),Yi([Li("eIcon")],a.prototype,"eIcon",void 0),a}(zi),Xi=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ji=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Zi=function(e){function a(a){void 0===a&&(a="default");var d=e.call(this,'
'))||this;return d.cssIdentifier=a,d.options=[],d.itemEls=[],d}return Xi(a,e),a.prototype.init=function(){this.addManagedListener(this.getGui(),"keydown",this.handleKeyDown.bind(this))},a.prototype.handleKeyDown=function(e){var a=e.key;switch(a){case zt.ENTER:if(this.highlightedEl){var d=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(d)}else this.setValue(this.getValue());break;case zt.DOWN:case zt.UP:var t=a===zt.DOWN,i=void 0;if(e.preventDefault(),this.highlightedEl){var s=this.itemEls.indexOf(this.highlightedEl)+(t?1:-1);s=Math.min(Math.max(s,0),this.itemEls.length-1),i=this.itemEls[s]}else i=this.itemEls[t?0:this.itemEls.length-1];this.highlightItem(i)}},a.prototype.addOptions=function(e){var a=this;return e.forEach((function(e){return a.addOption(e)})),this},a.prototype.addOption=function(e){var a=e.value,d=oa(e.text||a);return this.options.push({value:a,text:d}),this.renderOption(a,d),this.updateIndices(),this},a.prototype.updateIndices=function(){var e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((function(a,d){td(a,d+1),dd(a,e.length)}))},a.prototype.renderOption=function(e,a){var d=this,t=document.createElement("div");Na(t,"option"),t.classList.add("ag-list-item","ag-".concat(this.cssIdentifier,"-list-item")),t.innerHTML="".concat(a,""),t.tabIndex=-1,this.itemEls.push(t),this.addManagedListener(t,"mouseover",(function(){return d.highlightItem(t)})),this.addManagedListener(t,"mouseleave",(function(){return d.clearHighlighted()})),this.addManagedListener(t,"click",(function(){return d.setValue(e)})),this.getGui().appendChild(t)},a.prototype.setValue=function(e,a){if(this.value===e)return this.fireItemSelected(),this;if(null==e)return this.reset(),this;var d=this.options.findIndex((function(a){return a.value===e}));if(-1!==d){var t=this.options[d];this.value=t.value,this.displayValue=null!=t.text?t.text:t.value,this.highlightItem(this.itemEls[d]),a||this.fireChangeEvent()}return this},a.prototype.setValueByIndex=function(e){return this.setValue(this.options[e].value)},a.prototype.getValue=function(){return this.value},a.prototype.getDisplayValue=function(){return this.displayValue},a.prototype.refreshHighlighted=function(){var e=this;this.clearHighlighted();var a=this.options.findIndex((function(a){return a.value===e.value}));-1!==a&&this.highlightItem(this.itemEls[a])},a.prototype.reset=function(){this.value=null,this.displayValue=null,this.clearHighlighted(),this.fireChangeEvent()},a.prototype.highlightItem=function(e){qt(e)&&(this.clearHighlighted(),this.highlightedEl=e,this.highlightedEl.classList.add(a.ACTIVE_CLASS),fd(this.highlightedEl,!0),this.highlightedEl.focus())},a.prototype.clearHighlighted=function(){this.highlightedEl&&qt(this.highlightedEl)&&(this.highlightedEl.classList.remove(a.ACTIVE_CLASS),fd(this.highlightedEl,!1),this.highlightedEl=null)},a.prototype.fireChangeEvent=function(){this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED}),this.fireItemSelected()},a.prototype.fireItemSelected=function(){this.dispatchEvent({type:a.EVENT_ITEM_SELECTED})},a.EVENT_ITEM_SELECTED="selectedItem",a.ACTIVE_CLASS="ag-active-item",Ji([Z],a.prototype,"init",null),a}(hi),es=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),as=function(){return as=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ss=function(e){function a(a,d,t,i){void 0===t&&(t="text"),void 0===i&&(i="input");var s=e.call(this,a,'\n
\n
\n \n
"),d)||this;return s.inputType=t,s.displayFieldTag=i,s}return ts(a,e),a.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 a=this.config,d=a.width,t=a.value;null!=d&&this.setWidth(d),null!=t&&this.setValue(t),this.addInputListeners(),this.activateTabIndex([this.eInput])},a.prototype.addInputListeners=function(){var e=this;this.addManagedListener(this.eInput,"input",(function(a){return e.setValue(a.target.value)}))},a.prototype.setInputType=function(){"input"===this.displayFieldTag&&this.eInput.setAttribute("type",this.inputType)},a.prototype.getInputElement=function(){return this.eInput},a.prototype.setInputWidth=function(e){return St(this.eWrapper,e),this},a.prototype.setInputName=function(e){return this.getInputElement().setAttribute("name",e),this},a.prototype.getFocusableElement=function(){return this.eInput},a.prototype.setMaxLength=function(e){return this.eInput.maxLength=e,this},a.prototype.setInputPlaceholder=function(e){return kt(this.eInput,"placeholder",e),this},a.prototype.setInputAriaLabel=function(e){return Ua(this.eInput,e),this.refreshAriaLabelledBy(),this},a.prototype.setDisabled=function(a){return it(this.eInput,a),e.prototype.setDisabled.call(this,a)},a.prototype.setAutoComplete=function(e){if(!0===e)kt(this.eInput,"autocomplete",null);else{var a="string"===typeof e?e:"off";kt(this.eInput,"autocomplete",a)}return this},is([Li("eLabel")],a.prototype,"eLabel",void 0),is([Li("eWrapper")],a.prototype,"eWrapper",void 0),is([Li("eInput")],a.prototype,"eInput",void 0),a}(zi),os=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ls=function(e){function a(a,d,t){void 0===d&&(d="ag-checkbox"),void 0===t&&(t="checkbox");var i=e.call(this,a,d,t)||this;return i.labelAlignment="right",i.selected=!1,i.readOnly=!1,i.passive=!1,i}return os(a,e),a.prototype.addInputListeners=function(){this.addManagedListener(this.eInput,"click",this.onCheckboxClick.bind(this)),this.addManagedListener(this.eLabel,"click",this.toggle.bind(this))},a.prototype.getNextValue=function(){return void 0===this.selected||!this.selected},a.prototype.setPassive=function(e){this.passive=e},a.prototype.isReadOnly=function(){return this.readOnly},a.prototype.setReadOnly=function(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e},a.prototype.setDisabled=function(a){return this.eWrapper.classList.toggle("ag-disabled",a),e.prototype.setDisabled.call(this,a)},a.prototype.toggle=function(){if(!this.eInput.disabled){var e=this.isSelected(),a=this.getNextValue();this.passive?this.dispatchChange(a,e):this.setValue(a)}},a.prototype.getValue=function(){return this.isSelected()},a.prototype.setValue=function(e,a){return this.refreshSelectedClass(e),this.setSelected(e,a),this},a.prototype.setName=function(e){return this.getInputElement().name=e,this},a.prototype.isSelected=function(){return this.selected},a.prototype.setSelected=function(e,a){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,a||this.dispatchChange(this.selected,this.previousValue))},a.prototype.dispatchChange=function(e,a,d){this.dispatchEvent({type:Je.EVENT_FIELD_VALUE_CHANGED,selected:e,previousValue:a,event:d});var t=this.getInputElement(),i={type:Je.EVENT_CHECKBOX_CHANGED,id:t.id,name:t.name,selected:e,previousValue:a};this.eventService.dispatchEvent(i)},a.prototype.onCheckboxClick=function(e){if(!this.passive&&!this.eInput.disabled){var a=this.isSelected(),d=this.selected=e.target.checked;this.refreshSelectedClass(d),this.dispatchChange(d,a,e)}},a.prototype.refreshSelectedClass=function(e){this.eWrapper.classList.toggle("ag-checked",!0===e),this.eWrapper.classList.toggle("ag-indeterminate",null==e)},a}(ss),ms=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),us=function(e){function a(a){return e.call(this,a,"ag-radio-button","radio")||this}return ms(a,e),a.prototype.isSelected=function(){return this.eInput.checked},a.prototype.toggle=function(){this.eInput.disabled||this.isSelected()||this.setValue(!0)},a.prototype.addInputListeners=function(){e.prototype.addInputListeners.call(this),this.addManagedListener(this.eventService,Je.EVENT_CHECKBOX_CHANGED,this.onChange.bind(this))},a.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)},a}(ls),ns=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),rs=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},fs=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=0?0:e===a.IN_RANGE?2:1},a.prototype.onFloatingFilterChanged=function(e,a){this.setTypeFromFloatingFilter(e),this.setValueFromFloatingFilter(a),this.onUiChanged(!0)},a.prototype.setTypeFromFloatingFilter=function(e){var a=this;this.eTypes.forEach((function(d,t){0===t?d.setValue(e,!0):d.setValue(a.optionsFactory.getDefaultOption(),!0)}))},a.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]},a.prototype.getConditionTypes=function(){return this.eTypes.map((function(e){return e.getValue()}))},a.prototype.getConditionType=function(e){return this.eTypes[e].getValue()},a.prototype.getJoinOperator=function(){return 0===this.eJoinOperatorsOr.length?this.defaultJoinOperator:!0===this.eJoinOperatorsOr[0].getValue()?"OR":"AND"},a.prototype.areModelsEqual=function(e,a){var d=this;if(!e&&!a)return!0;if(!e&&a||e&&!a)return!1;var t,i=!e.operator,s=!a.operator;if(!i&&s||i&&!s)return!1;if(i){var o=e,l=a;t=this.areSimpleModelsEqual(o,l)}else{var m=e,u=a;t=m.operator===u.operator&&Pe(m.conditions,u.conditions,(function(e,a){return d.areSimpleModelsEqual(e,a)}))}return t},a.prototype.shouldRefresh=function(e){var a,d,t,i=this.getModel(),s=i?null!==(a=i.conditions)&&void 0!==a?a:[i]:null,o=null!==(t=null===(d=e.filterOptions)||void 0===d?void 0:d.map((function(e){return"string"===typeof e?e:e.displayKey})))&&void 0!==t?t:this.getDefaultFilterOptions();return!(s&&!s.every((function(e){return void 0!==o.find((function(a){return a===e.type}))})))&&!("number"===typeof e.maxNumConditions&&s&&s.length>e.maxNumConditions)},a.prototype.refresh=function(a){return!!this.shouldRefresh(a)&&(!!e.prototype.refresh.call(this,a)&&(this.setParams(a),this.removeConditionsAndOperators(0),this.createOption(),this.setModel(this.getModel()),!0))},a.prototype.setModelIntoUi=function(e){var a=this;if(e.operator){var d=e;d.conditions||(d.conditions=[d.condition1,d.condition2]);var t=this.validateAndUpdateConditions(d.conditions),i=this.getNumConditions();if(ti)for(var s=i;s1&&this.removeConditionsAndOperators(1),this.eTypes[0].setValue(l.type,!0),this.setConditionIntoUi(l,0)}return this.lastUiCompletePosition=this.getNumConditions()-1,this.createMissingConditionsAndOperators(),this.onUiChanged(),ri.resolve()},a.prototype.validateAndUpdateConditions=function(e){var a=e.length;return a>this.maxNumConditions&&(e.splice(this.maxNumConditions),w('Filter Model contains more conditions than "filterParams.maxNumConditions". Additional conditions have been ignored.'),a=this.maxNumConditions),a},a.prototype.doesFilterPass=function(e){var a,d=this,t=this.getModel();if(null==t)return!0;var i=t.operator,s=[];if(i){var o=t;s.push.apply(s,fs([],rs(null!==(a=o.conditions)&&void 0!==a?a:[]),!1))}else s.push(t);return s[i&&"OR"===i?"some":"every"]((function(a){return d.individualConditionPasses(e,a)}))},a.prototype.setParams=function(a){e.prototype.setParams.call(this,a),this.setNumConditions(a),this.defaultJoinOperator=this.getDefaultJoinOperator(a.defaultJoinOperator),this.filterPlaceholder=a.filterPlaceholder,this.optionsFactory=new gi,this.optionsFactory.init(a,this.getDefaultFilterOptions()),this.createFilterListOptions(),this.createOption(),this.createMissingConditionsAndOperators(),this.isReadOnly()&&this.eFilterBody.setAttribute("tabindex","-1")},a.prototype.setNumConditions=function(e){var a,d;null!=e.suppressAndOrCondition&&w('Since v29.2 "filterParams.suppressAndOrCondition" is deprecated. Use "filterParams.maxNumConditions = 1" instead.'),null!=e.alwaysShowBothConditions&&w('Since v29.2 "filterParams.alwaysShowBothConditions" is deprecated. Use "filterParams.numAlwaysVisibleConditions = 2" instead.'),this.maxNumConditions=null!==(a=e.maxNumConditions)&&void 0!==a?a:e.suppressAndOrCondition?1:2,this.maxNumConditions<1&&(w('"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&&(w('"filterParams.numAlwaysVisibleConditions" must be greater than or equal to zero.'),this.numAlwaysVisibleConditions=1),this.numAlwaysVisibleConditions>this.maxNumConditions&&(w('"filterParams.numAlwaysVisibleConditions" cannot be greater than "filterParams.maxNumConditions".'),this.numAlwaysVisibleConditions=this.maxNumConditions)},a.prototype.createOption=function(){var e=this,a=this.createManagedBean(new ds);this.eTypes.push(a),a.addCssClass("ag-filter-select"),this.eFilterBody.appendChild(a.getGui());var d=this.createValueElement();this.eConditionBodies.push(d),this.eFilterBody.appendChild(d),this.putOptionsIntoDropdown(a),this.resetType(a);var t=this.getNumConditions()-1;this.forEachPositionInput(t,(function(a){return e.resetInput(a)})),this.addChangedListeners(a,t)},a.prototype.createJoinOperatorPanel=function(){var e=document.createElement("div");this.eJoinOperatorPanels.push(e),e.classList.add("ag-filter-condition");var a=this.createJoinOperator(this.eJoinOperatorsAnd,e,"and"),d=this.createJoinOperator(this.eJoinOperatorsOr,e,"or");this.eFilterBody.appendChild(e);var t=this.eJoinOperatorPanels.length-1,i=this.joinOperatorId++;this.resetJoinOperatorAnd(a,t,i),this.resetJoinOperatorOr(d,t,i),this.isReadOnly()||(a.onValueChange(this.listener),d.onValueChange(this.listener))},a.prototype.createJoinOperator=function(e,a,d){var t=this.createManagedBean(new us);return e.push(t),t.addCssClass("ag-filter-condition-operator"),t.addCssClass("ag-filter-condition-operator-".concat(d)),a.appendChild(t.getGui()),t},a.prototype.getDefaultJoinOperator=function(e){return"AND"===e||"OR"===e?e:"AND"},a.prototype.createFilterListOptions=function(){var e=this,a=this.optionsFactory.getFilterOptions();this.filterListOptions=a.map((function(a){return"string"===typeof a?e.createBoilerplateListOption(a):e.createCustomListOption(a)}))},a.prototype.putOptionsIntoDropdown=function(e){this.filterListOptions.forEach((function(a){e.addOption(a)})),e.setDisabled(this.filterListOptions.length<=1)},a.prototype.createBoilerplateListOption=function(e){return{value:e,text:this.translate(e)}},a.prototype.createCustomListOption=function(e){var a=e.displayKey,d=this.optionsFactory.getCustomOption(e.displayKey);return{value:a,text:d?this.localeService.getLocaleTextFunc()(d.displayKey,d.displayName):this.translate(a)}},a.prototype.isAllowTwoConditions=function(){return this.maxNumConditions>=2},a.prototype.createBodyTemplate=function(){return""},a.prototype.getCssIdentifier=function(){return"simple-filter"},a.prototype.updateUiVisibility=function(){var e=this.getJoinOperator();this.updateNumConditions(),this.updateConditionStatusesAndValues(this.lastUiCompletePosition,e)},a.prototype.updateNumConditions=function(){for(var e,a=-1,d=!0,t=0;t0&&this.removeConditionsAndOperators(s,o),this.createMissingConditionsAndOperators()}}this.lastUiCompletePosition=a},a.prototype.updateConditionStatusesAndValues=function(e,a){var d=this;this.eTypes.forEach((function(a,t){var i=d.isConditionDisabled(t,e);a.setDisabled(i||d.filterListOptions.length<=1),1===t&&(it(d.eJoinOperatorPanels[0],i),d.eJoinOperatorsAnd[0].setDisabled(i),d.eJoinOperatorsOr[0].setDisabled(i))})),this.eConditionBodies.forEach((function(e,a){dt(e,d.isConditionBodyVisible(a))}));var t="OR"===(null!==a&&void 0!==a?a:this.getJoinOperator());this.eJoinOperatorsAnd.forEach((function(e,a){e.setValue(!t,!0)})),this.eJoinOperatorsOr.forEach((function(e,a){e.setValue(t,!0)})),this.forEachInput((function(a,t,i,s){d.setElementDisplayed(a,t=this.getNumConditions())){this.removeComponents(this.eTypes,e,a),this.removeElements(this.eConditionBodies,e,a),this.removeValueElements(e,a);var d=Math.max(e-1,0);this.removeElements(this.eJoinOperatorPanels,d,a),this.removeComponents(this.eJoinOperatorsAnd,d,a),this.removeComponents(this.eJoinOperatorsOr,d,a)}},a.prototype.removeElements=function(e,a,d){this.removeItems(e,a,d).forEach((function(e){return yt(e)}))},a.prototype.removeComponents=function(e,a,d){var t=this;this.removeItems(e,a,d).forEach((function(e){yt(e.getGui()),t.destroyBean(e)}))},a.prototype.removeItems=function(e,a,d){return null==d?e.splice(a):e.splice(a,d)},a.prototype.afterGuiAttached=function(a){if(e.prototype.afterGuiAttached.call(this,a),this.resetPlaceholder(),!(null===a||void 0===a?void 0:a.suppressFocus))if(this.isReadOnly())this.eFilterBody.focus();else{var d=this.getInputs(0)[0];if(!d)return;d instanceof ss&&d.getInputElement().focus()}},a.prototype.afterGuiDetached=function(){e.prototype.afterGuiDetached.call(this);var a=this.getModel();this.resetUiToActiveModel(a);for(var d=-1,t=-1,i=!1,s=this.getJoinOperator(),o=this.getNumConditions()-1;o>=0;o--)if(this.isConditionUiComplete(o))-1===d&&(d=o,t=o);else{var l=o=this.numAlwaysVisibleConditions&&!this.isConditionUiComplete(o-1)||l)&&(this.removeConditionsAndOperators(o,1),i=!0,l&&t--)}var m=!1;this.getNumConditions()1?"inRangeStart":0===t?"filterOoo":"inRangeEnd",l=0===t&&s>1?a("ariaFilterFromValue","Filter from value"):0===t?a("ariaFilterValue","Filter Value"):a("ariaFilterToValue","Filter to Value");d.setInputPlaceholder(e.getPlaceholderText(o,i)),d.setInputAriaLabel(l)}}))},a.prototype.setElementValue=function(e,a,d){e instanceof ss&&e.setValue(null!=a?String(a):null,!0)},a.prototype.setElementDisplayed=function(e,a){e instanceof hi&&dt(e.getGui(),a)},a.prototype.setElementDisabled=function(e,a){e instanceof hi&&it(e.getGui(),a)},a.prototype.attachElementOnChange=function(e,a){e instanceof ss&&e.onValueChange(a)},a.prototype.forEachInput=function(e){var a=this;this.getConditionTypes().forEach((function(d,t){a.forEachPositionTypeInput(t,d,e)}))},a.prototype.forEachPositionInput=function(e,a){var d=this.getConditionType(e);this.forEachPositionTypeInput(e,d,a)},a.prototype.forEachPositionTypeInput=function(e,a,d){for(var t=this.getNumberOfInputs(a),i=this.getInputs(e),s=0;sa+1},a.prototype.isConditionBodyVisible=function(e){var a=this.getConditionType(e);return this.getNumberOfInputs(a)>0},a.prototype.isConditionUiComplete=function(e){return!(e>=this.getNumConditions())&&(this.getConditionType(e)!==a.EMPTY&&!this.getValues(e).some((function(e){return null==e})))},a.prototype.getNumConditions=function(){return this.eTypes.length},a.prototype.getUiCompleteConditions=function(){for(var e=[],a=0;a0)},a.prototype.resetInput=function(e){this.setElementValue(e,null),this.setElementDisabled(e,this.isReadOnly())},a.prototype.setConditionIntoUi=function(e,a){var d=this,t=this.mapValuesFromModel(e);this.forEachInput((function(e,i,s,o){s===a&&d.setElementValue(e,null!=t[i]?t[i]:null)}))},a.prototype.setValueFromFloatingFilter=function(e){var a=this;this.forEachInput((function(d,t,i,s){a.setElementValue(d,0===t&&0===i?e:null,!0)}))},a.prototype.isDefaultOperator=function(e){return e===this.defaultJoinOperator},a.prototype.addChangedListeners=function(e,a){var d=this;this.isReadOnly()||(e.onValueChange(this.listener),this.forEachPositionInput(a,(function(e){d.attachElementOnChange(e,d.listener)})))},a.prototype.individualConditionPasses=function(e,a){var d=this.getCellValue(e.node),t=this.mapValuesFromModel(a),i=this.optionsFactory.getCustomOption(a.type),s=this.evaluateCustomFilter(i,t,d);return null!=s?s:null==d?this.evaluateNullValue(a.type):this.evaluateNonNullValue(t,d,a,e)},a.prototype.evaluateCustomFilter=function(e,a,d){if(null!=e){var t=e.predicate;return null==t||a.some((function(e){return null==e}))?void 0:t(a,d)}},a.prototype.isBlank=function(e){return null==e||"string"===typeof e&&0===e.trim().length},a.prototype.hasInvalidInputs=function(){return!1},a.EMPTY="empty",a.BLANK="blank",a.NOT_BLANK="notBlank",a.EQUALS="equals",a.NOT_EQUAL="notEqual",a.LESS_THAN="lessThan",a.LESS_THAN_OR_EQUAL="lessThanOrEqual",a.GREATER_THAN="greaterThan",a.GREATER_THAN_OR_EQUAL="greaterThanOrEqual",a.IN_RANGE="inRange",a.CONTAINS="contains",a.NOT_CONTAINS="notContains",a.STARTS_WITH="startsWith",a.ENDS_WITH="endsWith",a}(Ai),_s=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ys=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return _s(a,e),a.prototype.setParams=function(a){e.prototype.setParams.call(this,a),this.scalarFilterParams=a},a.prototype.evaluateNullValue=function(e){switch(e){case a.EQUALS:case a.NOT_EQUAL:if(this.scalarFilterParams.includeBlanksInEquals)return!0;break;case a.GREATER_THAN:case a.GREATER_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInGreaterThan)return!0;break;case a.LESS_THAN:case a.LESS_THAN_OR_EQUAL:if(this.scalarFilterParams.includeBlanksInLessThan)return!0;break;case a.IN_RANGE:if(this.scalarFilterParams.includeBlanksInRange)return!0;break;case a.BLANK:return!0;case a.NOT_BLANK:return!1}return!1},a.prototype.evaluateNonNullValue=function(e,d,t){var i=this.comparator(),s=null!=e[0]?i(e[0],d):0;switch(t.type){case a.EQUALS:return 0===s;case a.NOT_EQUAL:return 0!==s;case a.GREATER_THAN:return s>0;case a.GREATER_THAN_OR_EQUAL:return s>=0;case a.LESS_THAN:return s<0;case a.LESS_THAN_OR_EQUAL:return s<=0;case a.IN_RANGE:var o=i(e[1],d);return this.scalarFilterParams.inRangeInclusive?s>=0&&o<=0:s>0&&o<0;case a.BLANK:return this.isBlank(d);case a.NOT_BLANK:return!this.isBlank(d);default:return console.warn('AG Grid: Unexpected type of filter "'+t.type+'", it looks like the filter was configured with incorrect Filter Options'),!0}},a}(ps),qs=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),bs=function(){return bs=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ps=1/0,hs=function(e){function a(a,d,t){var i=e.call(this,d,t)||this;return i.dateFilterParams=a,i}return qs(a,e),a.prototype.conditionToString=function(e,a){var d=e.type,t=(a||{}).numberOfInputs,i=d==ps.IN_RANGE||2===t,s=zd(e.dateFrom),o=zd(e.dateTo),l=this.dateFilterParams.inRangeFloatingFilterDateFormat;if(i){var m=null!==s?Ud(s,l):"null",u=null!==o?Ud(o,l):"null";return"".concat(m,"-").concat(u)}return null!=s?Ud(s,l):"".concat(d)},a.prototype.updateParams=function(a){e.prototype.updateParams.call(this,a),this.dateFilterParams=a.dateFilterParams},a}(cs),Ts=function(e){function a(){var a=e.call(this,"dateFilter")||this;return a.eConditionPanelsFrom=[],a.eConditionPanelsTo=[],a.dateConditionFromComps=[],a.dateConditionToComps=[],a.minValidYear=1e3,a.maxValidYear=Ps,a.minValidDate=null,a.maxValidDate=null,a}return qs(a,e),a.prototype.afterGuiAttached=function(a){e.prototype.afterGuiAttached.call(this,a),this.dateConditionFromComps[0].afterGuiAttached(a)},a.prototype.mapValuesFromModel=function(e){var a=e||{},d=a.dateFrom,t=a.dateTo,i=a.type;return[d&&zd(d)||null,t&&zd(t)||null].slice(0,this.getNumberOfInputs(i))},a.prototype.comparator=function(){return this.dateFilterParams.comparator?this.dateFilterParams.comparator:this.defaultComparator.bind(this)},a.prototype.defaultComparator=function(e,a){return null==a||ae?1:0},a.prototype.setParams=function(a){this.dateFilterParams=a,e.prototype.setParams.call(this,a);var d=function(e,d){if(null!=a[e]){if(!isNaN(a[e]))return null==a[e]?d:Number(a[e]);console.warn("AG Grid: DateFilter ".concat(e," is not a number"))}return d};this.minValidYear=d("minValidYear",1e3),this.maxValidYear=d("maxValidYear",Ps),this.minValidYear>this.maxValidYear&&console.warn("AG Grid: DateFilter minValidYear should be <= maxValidYear"),a.minValidDate?this.minValidDate=a.minValidDate instanceof Date?a.minValidDate:zd(a.minValidDate):this.minValidDate=null,a.maxValidDate?this.maxValidDate=a.maxValidDate instanceof Date?a.maxValidDate:zd(a.maxValidDate):this.maxValidDate=null,this.minValidDate&&this.maxValidDate&&this.minValidDate>this.maxValidDate&&console.warn("AG Grid: DateFilter minValidDate should be <= maxValidDate"),this.filterModelFormatter=new hs(this.dateFilterParams,this.localeService,this.optionsFactory)},a.prototype.createDateCompWrapper=function(e){var a=this,d=new Di(this.getContext(),this.userComponentFactory,{onDateChanged:function(){return a.onUiChanged()},filterParams:this.dateFilterParams},e);return this.addDestroyFunc((function(){return d.destroy()})),d},a.prototype.setElementValue=function(e,a){e.setDate(a)},a.prototype.setElementDisplayed=function(e,a){e.setDisplayed(a)},a.prototype.setElementDisabled=function(e,a){e.setDisabled(a)},a.prototype.getDefaultFilterOptions=function(){return a.DEFAULT_FILTER_OPTIONS},a.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},a.prototype.createFromToElement=function(e,a,d,t){var i=document.createElement("div");i.classList.add("ag-filter-".concat(t)),i.classList.add("ag-filter-date-".concat(t)),a.push(i),e.appendChild(i),d.push(this.createDateCompWrapper(i))},a.prototype.removeValueElements=function(e,a){this.removeDateComps(this.dateConditionFromComps,e,a),this.removeDateComps(this.dateConditionToComps,e,a),this.removeItems(this.eConditionPanelsFrom,e,a),this.removeItems(this.eConditionPanelsTo,e,a)},a.prototype.removeDateComps=function(e,a,d){this.removeItems(e,a,d).forEach((function(e){return e.destroy()}))},a.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},a.prototype.isConditionUiComplete=function(a){var d=this;if(!e.prototype.isConditionUiComplete.call(this,a))return!1;var t=!0;return this.forEachInput((function(e,i,s,o){s!==a||!t||i>=o||(t=t&&d.isValidDateValue(e.getDate()))})),t},a.prototype.areSimpleModelsEqual=function(e,a){return e.dateFrom===a.dateFrom&&e.dateTo===a.dateTo&&e.type===a.type},a.prototype.getFilterType=function(){return"date"},a.prototype.createCondition=function(e){var a=this.getConditionType(e),d={},t=this.getValues(e);return t.length>0&&(d.dateFrom=Wd(t[0])),t.length>1&&(d.dateTo=Wd(t[1])),bs({dateFrom:null,dateTo:null,filterType:this.getFilterType(),type:a},d)},a.prototype.resetPlaceholder=function(){var e=this.localeService.getLocaleTextFunc(),a=this.translate("dateFormatOoo"),d=e("ariaFilterValue","Filter Value");this.forEachInput((function(e){e.setInputPlaceholder(a),e.setInputAriaLabel(d)}))},a.prototype.getInputs=function(e){return e>=this.dateConditionFromComps.length?[null,null]:[this.dateConditionFromComps[e],this.dateConditionToComps[e]]},a.prototype.getValues=function(e){var a=[];return this.forEachPositionInput(e,(function(e,d,t,i){d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ss=function(e){function a(){return e.call(this,'\n ')||this}return Os(a,e),a.prototype.getDefaultFilterOptions=function(){return Ts.DEFAULT_FILTER_OPTIONS},a.prototype.init=function(a){e.prototype.init.call(this,a),this.params=a,this.filterParams=a.filterParams,this.createDateComponent(),this.filterModelFormatter=new hs(this.filterParams,this.localeService,this.optionsFactory);var d=this.localeService.getLocaleTextFunc();this.eReadOnlyText.setDisabled(!0).setInputAriaLabel(d("ariaDateFilterInput","Date Filter Input"))},a.prototype.onParamsUpdated=function(a){e.prototype.onParamsUpdated.call(this,a),this.params=a,this.filterParams=a.filterParams,this.updateDateComponent(),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory,dateFilterParams:this.filterParams}),this.updateCompOnModelChange(a.currentParentModel())},a.prototype.updateCompOnModelChange=function(e){var a=!this.isReadOnly()&&this.canWeEditAfterModelFromParentFilter(e);if(this.setEditable(a),a){if(e){var d=e;this.dateComp.setDate(zd(d.dateFrom))}else this.dateComp.setDate(null);this.eReadOnlyText.setValue("")}else this.eReadOnlyText.setValue(this.filterModelFormatter.getModelAsString(e)),this.dateComp.setDate(null)},a.prototype.setEditable=function(e){dt(this.eDateWrapper,e),dt(this.eReadOnlyText.getGui(),!e)},a.prototype.onParentModelChanged=function(a,d){this.isEventFromFloatingFilter(d)||this.isEventFromDataChange(d)||(e.prototype.setLastTypeFromModel.call(this,a),this.updateCompOnModelChange(a))},a.prototype.onDateChanged=function(){var e=this,a=Wd(this.dateComp.getDate());this.params.parentFilterInstance((function(d){if(d){var t=zd(a);d.onFloatingFilterChanged(e.getLastType()||null,t)}}))},a.prototype.getDateComponentParams=function(){var e=Ai.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs());return{onDateChanged:R(this.onDateChanged.bind(this),e),filterParams:this.params.column.getColDef().filterParams}},a.prototype.createDateComponent=function(){var e=this;this.dateComp=new Di(this.getContext(),this.userComponentFactory,this.getDateComponentParams(),this.eDateWrapper),this.addDestroyFunc((function(){return e.dateComp.destroy()}))},a.prototype.updateDateComponent=function(){var e=this.getDateComponentParams(),a=this.gridOptionsService,d=a.api,t=a.columnApi,i=a.context;e.api=d,e.columnApi=t,e.context=i,this.dateComp.updateParams(e)},a.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},Bs([de("userComponentFactory")],a.prototype,"userComponentFactory",void 0),Bs([Li("eReadOnlyText")],a.prototype,"eReadOnlyText",void 0),Bs([Li("eDateWrapper")],a.prototype,"eDateWrapper",void 0),a}(Is),Ds=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),gs=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Gs=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},ws=function(e){function a(){return e.call(this,'\n
\n \n
')||this}return Ds(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(e){var a=this;this.params=e,this.setParams(e);var d=this.gridOptionsService.getDocument(),t=this.eDateInput.getInputElement();this.addManagedListener(t,"mousedown",(function(){a.eDateInput.isDisabled()||a.usingSafariDatePicker||t.focus()})),this.addManagedListener(t,"input",(function(e){e.target===d.activeElement&&(a.eDateInput.isDisabled()||a.params.onDateChanged())}))},a.prototype.setParams=function(e){var a=this.eDateInput.getInputElement(),d=this.shouldUseBrowserDatePicker(e);this.usingSafariDatePicker=d&&Id(),a.type=d?"date":"text";var t=e.filterParams||{},i=t.minValidYear,s=t.maxValidYear,o=t.minValidDate,l=t.maxValidDate;if(o&&i&&w("DateFilter should not have both minValidDate and minValidYear parameters set at the same time! minValidYear will be ignored."),l&&s&&w("DateFilter should not have both maxValidDate and maxValidYear parameters set at the same time! maxValidYear will be ignored."),o&&l){var m=Gs([o,l].map((function(e){return e instanceof Date?e:zd(e)})),2),u=m[0],n=m[1];u&&n&&u.getTime()>n.getTime()&&w("DateFilter parameter minValidDate should always be lower than or equal to parameter maxValidDate.")}o?o instanceof Date?a.min=Ud(o):a.min=o:i&&(a.min="".concat(i,"-01-01")),l?l instanceof Date?a.max=Ud(l):a.max=l:s&&(a.max="".concat(s,"-12-31"))},a.prototype.onParamsUpdated=function(e){this.params=e,this.setParams(e)},a.prototype.getDate=function(){return zd(this.eDateInput.getValue())},a.prototype.setDate=function(e){this.eDateInput.setValue(Wd(e,!1))},a.prototype.setInputPlaceholder=function(e){this.eDateInput.setInputPlaceholder(e)},a.prototype.setDisabled=function(e){this.eDateInput.setDisabled(e)},a.prototype.afterGuiAttached=function(e){e&&e.suppressFocus||this.eDateInput.getInputElement().focus()},a.prototype.shouldUseBrowserDatePicker=function(e){return e.filterParams&&null!=e.filterParams.browserDatePicker?e.filterParams.browserDatePicker:Bd()||Sd()||Id()&&Od()>=14.1},gs([Li("eDateInput")],a.prototype,"eDateInput",void 0),a}(hi),vs=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ms=function(e){function a(a,d,t){return void 0===d&&(d="ag-text-field"),void 0===t&&(t="text"),e.call(this,a,d,t)||this}return vs(a,e),a.prototype.postConstruct=function(){e.prototype.postConstruct.call(this),this.config.allowedCharPattern&&this.preventDisallowedCharacters()},a.prototype.setValue=function(a,d){return this.eInput.value!==a&&(this.eInput.value=i(a)?a:""),e.prototype.setValue.call(this,a,d)},a.prototype.setStartValue=function(e){this.setValue(e,!0)},a.prototype.preventDisallowedCharacters=function(){var e=new RegExp("[".concat(this.config.allowedCharPattern,"]"));this.addManagedListener(this.eInput,"keydown",(function(a){Kt(a)&&a.key&&!e.test(a.key)&&a.preventDefault()})),this.addManagedListener(this.eInput,"paste",(function(a){var d,t=null===(d=a.clipboardData)||void 0===d?void 0:d.getData("text");t&&t.split("").some((function(a){return!e.test(a)}))&&a.preventDefault()}))},a}(ss),ks=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),xs=function(e){function a(a){return e.call(this,a,"ag-number-field","number")||this}return ks(a,e),a.prototype.postConstruct=function(){var a=this;e.prototype.postConstruct.call(this),this.addManagedListener(this.eInput,"blur",(function(){var e=parseFloat(a.eInput.value),d=isNaN(e)?"":a.normalizeValue(e.toString());a.value!==d&&a.setValue(d)})),this.addManagedListener(this.eInput,"wheel",this.onWheel.bind(this)),this.eInput.step="any"},a.prototype.onWheel=function(e){document.activeElement===this.eInput&&e.preventDefault()},a.prototype.normalizeValue=function(e){if(""===e)return"";null!=this.precision&&(e=this.adjustPrecision(e));var a=parseFloat(e);return null!=this.min&&athis.max&&(e=this.max.toString()),e},a.prototype.adjustPrecision=function(e,a){if(null==this.precision)return e;if(a){var d=parseFloat(e).toFixed(this.precision);return parseFloat(d).toString()}var t=String(e).split(".");if(t.length>1){if(t[1].length<=this.precision)return e;if(this.precision>0)return"".concat(t[0],".").concat(t[1].slice(0,this.precision))}return t[0]},a.prototype.setMin=function(e){return this.min===e||(this.min=e,kt(this.eInput,"min",e)),this},a.prototype.setMax=function(e){return this.max===e||(this.max=e,kt(this.eInput,"max",e)),this},a.prototype.setPrecision=function(e){return this.precision=e,this},a.prototype.setStep=function(e){return this.step===e||(this.step=e,kt(this.eInput,"step",e)),this},a.prototype.setValue=function(a,d){var t=this;return this.setValueOrInputValue((function(a){return e.prototype.setValue.call(t,a,d)}),(function(){return t}),a)},a.prototype.setStartValue=function(a){var d=this;return this.setValueOrInputValue((function(a){return e.prototype.setValue.call(d,a,!0)}),(function(e){d.eInput.value=e}),a)},a.prototype.setValueOrInputValue=function(e,a,d){if(i(d)){var t=this.isScientificNotation(d);if(t&&this.eInput.validity.valid)return e(d);if(!t)t=(d=this.adjustPrecision(d))!=this.normalizeValue(d);if(t)return a(d)}return e(d)},a.prototype.getValue=function(){if(this.eInput.validity.valid){var a=this.eInput.value;return this.isScientificNotation(a)?this.adjustPrecision(a,!0):e.prototype.getValue.call(this)}},a.prototype.isScientificNotation=function(e){return"string"===typeof e&&e.includes("e")},a}(Ms),Qs=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Vs=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Qs(a,e),a.prototype.conditionToString=function(e,a){var d=(a||{}).numberOfInputs;return e.type==ps.IN_RANGE||2===d?"".concat(this.formatValue(e.filter),"-").concat(this.formatValue(e.filterTo)):null!=e.filter?this.formatValue(e.filter):"".concat(e.type)},a}(cs);function Fs(e){var a=(null!==e&&void 0!==e?e:{}).allowedCharPattern;return null!==a&&void 0!==a?a:null}var Es,Rs,Ns=function(e){function a(){var a=e.call(this,"numberFilter")||this;return a.eValuesFrom=[],a.eValuesTo=[],a}return Qs(a,e),a.prototype.refresh=function(a){return this.numberFilterParams.allowedCharPattern===a.allowedCharPattern&&e.prototype.refresh.call(this,a)},a.prototype.mapValuesFromModel=function(e){var a=e||{},d=a.filter,t=a.filterTo,i=a.type;return[this.processValue(d),this.processValue(t)].slice(0,this.getNumberOfInputs(i))},a.prototype.getDefaultDebounceMs=function(){return 500},a.prototype.comparator=function(){return function(e,a){return e===a?0:e0&&(d.filter=t[0]),t.length>1&&(d.filterTo=t[1]),d},a.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},a.prototype.getModelAsString=function(e){var a;return null!==(a=this.filterModelFormatter.getModelAsString(e))&&void 0!==a?a:""},a.prototype.hasInvalidInputs=function(){var e=!1;return this.forEachInput((function(a){a.getInputElement().validity.valid||(e=!0)})),e},a.DEFAULT_FILTER_OPTIONS=[ys.EQUALS,ys.NOT_EQUAL,ys.GREATER_THAN,ys.GREATER_THAN_OR_EQUAL,ys.LESS_THAN,ys.LESS_THAN_OR_EQUAL,ys.IN_RANGE,ys.BLANK,ys.NOT_BLANK],a}(ys),As=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Hs=function(){return Hs=Object.assign||function(e){for(var a,d=1,t=arguments.length;d0&&(d.filter=t[0]),t.length>1&&(d.filterTo=t[1]),d},a.prototype.getFilterType=function(){return"text"},a.prototype.areSimpleModelsEqual=function(e,a){return e.filter===a.filter&&e.filterTo===a.filterTo&&e.type===a.type},a.prototype.getInputs=function(e){return e>=this.eValuesFrom.length?[null,null]:[this.eValuesFrom[e],this.eValuesTo[e]]},a.prototype.getValues=function(e){return this.getValuesWithSideEffects(e,!1)},a.prototype.getValuesWithSideEffects=function(e,d){var i=this,s=[];return this.forEachPositionInput(e,(function(e,o,l,m){var u;if(o=0},a.prototype.evaluateNonNullValue=function(e,a,d,t){var i=this,s=e.map((function(e){return i.formatter(e)}))||[],o=this.formatter(a),l=this.textFilterParams,m=l.api,u=l.colDef,n=l.column,r=l.columnApi,f=l.context,c=l.textFormatter;if(d.type===ps.BLANK)return this.isBlank(a);if(d.type===ps.NOT_BLANK)return!this.isBlank(a);var p={api:m,colDef:u,column:n,columnApi:r,context:f,node:t.node,data:t.data,filterOption:d.type,value:o,textFormatter:c};return s.some((function(e){return i.matcher(Hs(Hs({},p),{filterText:e}))}))},a.prototype.getModelAsString=function(e){var a;return null!==(a=this.filterModelFormatter.getModelAsString(e))&&void 0!==a?a:""},a.DEFAULT_FILTER_OPTIONS=[ps.CONTAINS,ps.NOT_CONTAINS,ps.EQUALS,ps.NOT_EQUAL,ps.STARTS_WITH,ps.ENDS_WITH,ps.BLANK,ps.NOT_BLANK],a.DEFAULT_FORMATTER=function(e){return e},a.DEFAULT_LOWERCASE_FORMATTER=function(e){return null==e?null:e.toString().toLowerCase()},a.DEFAULT_MATCHER=function(e){var d=e.filterOption,t=e.value,i=e.filterText;if(null==i)return!1;switch(d){case a.CONTAINS:return t.indexOf(i)>=0;case a.NOT_CONTAINS:return t.indexOf(i)<0;case a.EQUALS:return t===i;case a.NOT_EQUAL:return t!=i;case a.STARTS_WITH:return 0===t.indexOf(i);case a.ENDS_WITH:var s=t.lastIndexOf(i);return s>=0&&s===t.length-i.length;default:return!1}},a}(ps),Us=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),zs=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Ks=function(e){function a(a){var d=e.call(this)||this;return d.params=a,d.valueChangedListener=function(){},d}return Us(a,e),a.prototype.setupGui=function(e){var a,d=this;this.eFloatingFilterTextInput=this.createManagedBean(new Ms(null===(a=this.params)||void 0===a?void 0:a.config));var t=this.eFloatingFilterTextInput.getGui();e.appendChild(t),this.addManagedListener(t,"input",(function(e){return d.valueChangedListener(e)})),this.addManagedListener(t,"keydown",(function(e){return d.valueChangedListener(e)}))},a.prototype.setEditable=function(e){this.eFloatingFilterTextInput.setDisabled(!e)},a.prototype.setAutoComplete=function(e){this.eFloatingFilterTextInput.setAutoComplete(e)},a.prototype.getValue=function(){return this.eFloatingFilterTextInput.getValue()},a.prototype.setValue=function(e,a){this.eFloatingFilterTextInput.setValue(e,a)},a.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},a.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},a.prototype.setAriaLabel=function(e){this.eFloatingFilterTextInput.setInputAriaLabel(e)},a}(je),Ys=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Us(a,e),a.prototype.postConstruct=function(){this.setTemplate('\n \n ')},a.prototype.getDefaultDebounceMs=function(){return 500},a.prototype.onParentModelChanged=function(e,a){this.isEventFromFloatingFilter(a)||this.isEventFromDataChange(a)||(this.setLastTypeFromModel(e),this.setEditable(this.canWeEditAfterModelFromParentFilter(e)),this.floatingFilterInputService.setValue(this.getFilterModelFormatter().getModelAsString(e)))},a.prototype.init=function(a){this.setupFloatingFilterInputService(a),e.prototype.init.call(this,a),this.setTextInputParams(a)},a.prototype.setupFloatingFilterInputService=function(e){this.floatingFilterInputService=this.createFloatingFilterInputService(e),this.floatingFilterInputService.setupGui(this.eFloatingFilterInputContainer)},a.prototype.setTextInputParams=function(e){var a;this.params=e;var d=null!==(a=e.browserAutoComplete)&&void 0!==a&&a;if(this.floatingFilterInputService.setParams({ariaLabel:this.getAriaLabel(e),autoComplete:d}),this.applyActive=Ai.isUseApplyButton(this.params.filterParams),!this.isReadOnly()){var t=Ai.getDebounceMs(this.params.filterParams,this.getDefaultDebounceMs()),i=R(this.syncUpWithParentFilter.bind(this),t);this.floatingFilterInputService.setValueChangedListener(i)}},a.prototype.onParamsUpdated=function(a){e.prototype.onParamsUpdated.call(this,a),this.setTextInputParams(a)},a.prototype.recreateFloatingFilterInputService=function(e){var a=this.floatingFilterInputService.getValue();_t(this.eFloatingFilterInputContainer),this.destroyBean(this.floatingFilterInputService),this.setupFloatingFilterInputService(e),this.floatingFilterInputService.setValue(a,!0)},a.prototype.getAriaLabel=function(e){var a=this.columnModel.getDisplayNameForColumn(e.column,"header",!0),d=this.localeService.getLocaleTextFunc();return"".concat(a," ").concat(d("ariaFilterInput","Filter Input"))},a.prototype.syncUpWithParentFilter=function(e){var a=this,d=e.key===zt.ENTER;if(!this.applyActive||d){var t=this.floatingFilterInputService.getValue();this.params.filterParams.trimInput&&(t=js.trimInput(t),this.floatingFilterInputService.setValue(t,!0)),this.params.parentFilterInstance((function(e){e&&e.onFloatingFilterChanged(a.getLastType()||null,t||null)}))}},a.prototype.setEditable=function(e){this.floatingFilterInputService.setEditable(e)},zs([de("columnModel")],a.prototype,"columnModel",void 0),zs([Li("eFloatingFilterInputContainer")],a.prototype,"eFloatingFilterInputContainer",void 0),zs([Z],a.prototype,"postConstruct",null),a}(Is),$s=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Xs=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.valueChangedListener=function(){},a.numberInputActive=!0,a}return $s(a,e),a.prototype.setupGui=function(e){var a=this;this.eFloatingFilterNumberInput=this.createManagedBean(new xs),this.eFloatingFilterTextInput=this.createManagedBean(new Ms),this.eFloatingFilterTextInput.setDisabled(!0);var d=this.eFloatingFilterNumberInput.getGui(),t=this.eFloatingFilterTextInput.getGui();e.appendChild(d),e.appendChild(t),this.setupListeners(d,(function(e){return a.valueChangedListener(e)})),this.setupListeners(t,(function(e){return a.valueChangedListener(e)}))},a.prototype.setEditable=function(e){this.numberInputActive=e,this.eFloatingFilterNumberInput.setDisplayed(this.numberInputActive),this.eFloatingFilterTextInput.setDisplayed(!this.numberInputActive)},a.prototype.setAutoComplete=function(e){this.eFloatingFilterNumberInput.setAutoComplete(e),this.eFloatingFilterTextInput.setAutoComplete(e)},a.prototype.getValue=function(){return this.getActiveInputElement().getValue()},a.prototype.setValue=function(e,a){this.getActiveInputElement().setValue(e,a)},a.prototype.getActiveInputElement=function(){return this.numberInputActive?this.eFloatingFilterNumberInput:this.eFloatingFilterTextInput},a.prototype.setValueChangedListener=function(e){this.valueChangedListener=e},a.prototype.setupListeners=function(e,a){this.addManagedListener(e,"input",a),this.addManagedListener(e,"keydown",a)},a.prototype.setParams=function(e){this.setAriaLabel(e.ariaLabel),void 0!==e.autoComplete&&this.setAutoComplete(e.autoComplete)},a.prototype.setAriaLabel=function(e){this.eFloatingFilterNumberInput.setInputAriaLabel(e),this.eFloatingFilterTextInput.setInputAriaLabel(e)},a}(je),Js=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return $s(a,e),a.prototype.init=function(a){var d;e.prototype.init.call(this,a),this.filterModelFormatter=new Vs(this.localeService,this.optionsFactory,null===(d=a.filterParams)||void 0===d?void 0:d.numberFormatter)},a.prototype.onParamsUpdated=function(a){Fs(a.filterParams)!==this.allowedCharPattern&&this.recreateFloatingFilterInputService(a),e.prototype.onParamsUpdated.call(this,a),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},a.prototype.getDefaultFilterOptions=function(){return Ns.DEFAULT_FILTER_OPTIONS},a.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},a.prototype.createFloatingFilterInputService=function(e){return this.allowedCharPattern=Fs(e.filterParams),this.allowedCharPattern?this.createManagedBean(new Ks({config:{allowedCharPattern:this.allowedCharPattern}})):this.createManagedBean(new Xs)},a}(Ys),Zs=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),eo=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Zs(a,e),a.prototype.init=function(a){e.prototype.init.call(this,a),this.filterModelFormatter=new Ws(this.localeService,this.optionsFactory)},a.prototype.onParamsUpdated=function(a){e.prototype.onParamsUpdated.call(this,a),this.filterModelFormatter.updateParams({optionsFactory:this.optionsFactory})},a.prototype.getDefaultFilterOptions=function(){return js.DEFAULT_FILTER_OPTIONS},a.prototype.getFilterModelFormatter=function(){return this.filterModelFormatter},a.prototype.createFloatingFilterInputService=function(){return this.createManagedBean(new Ks)},a}(Ys),ao=function(){function e(e,a){void 0===a&&(a=!1);var d=this;this.destroyFuncs=[],this.touching=!1,this.eventService=new ue,this.eElement=e,this.preventMouseClick=a;var t=this.onTouchStart.bind(this),i=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);this.eElement.addEventListener("touchstart",t,{passive:!0}),this.eElement.addEventListener("touchmove",i,{passive:!0}),this.eElement.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push((function(){d.eElement.removeEventListener("touchstart",t,{passive:!0}),d.eElement.removeEventListener("touchmove",i,{passive:!0}),d.eElement.removeEventListener("touchend",s,{passive:!1})}))}return e.prototype.getActiveTouch=function(e){for(var a=0;a0)if(a-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=a;else this.lastTapTime=a},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}(),to=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),io=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},so=function(e){function a(d){var t=e.call(this)||this;return d||t.setTemplate(a.TEMPLATE),t}return to(a,e),a.prototype.attachCustomElements=function(e,a,d,t,i){this.eSortOrder=e,this.eSortAsc=a,this.eSortDesc=d,this.eSortMixed=t,this.eSortNone=i},a.prototype.setupSort=function(e,a){var d=this;void 0===a&&(a=!1),this.column=e,this.suppressOrder=a,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())},a.prototype.addInIcon=function(e,a,d){if(null!=a){var t=jt(e,this.gridOptionsService,d);t&&a.appendChild(t)}},a.prototype.onSortChanged=function(){this.updateIcons(),this.suppressOrder||this.updateSortOrder()},a.prototype.updateIcons=function(){var e=this.sortController.getDisplaySortForColumn(this.column);if(this.eSortAsc){var a="asc"===e;dt(this.eSortAsc,a,{skipAriaHidden:!0})}if(this.eSortDesc){var d="desc"===e;dt(this.eSortDesc,d,{skipAriaHidden:!0})}if(this.eSortNone){var t=!this.column.getColDef().unSortIcon&&!this.gridOptionsService.get("unSortIcon"),i=null===e||void 0===e;dt(this.eSortNone,!t&&i,{skipAriaHidden:!0})}},a.prototype.setupMultiSortIndicator=function(){var e=this;this.addInIcon("sortUnSort",this.eSortMixed,this.column);var a=this.column.getColDef().showRowGroup;this.gridOptionsService.isColumnsSortingCoupledToGroup()&&a&&(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())},a.prototype.updateMultiSortIndicator=function(){if(this.eSortMixed){var e="mixed"===this.sortController.getDisplaySortForColumn(this.column);dt(this.eSortMixed,e,{skipAriaHidden:!0})}},a.prototype.updateSortOrder=function(){var e,a=this;if(this.eSortOrder){var d=this.sortController.getColumnsWithSortingOrdered(),t=null!==(e=this.sortController.getDisplaySortIndexForColumn(this.column))&&void 0!==e?e:-1,i=d.some((function(e){var d;return null!==(d=a.sortController.getDisplaySortIndexForColumn(e))&&void 0!==d&&d})),s=t>=0&&i;dt(this.eSortOrder,s,{skipAriaHidden:!0}),t>=0?this.eSortOrder.innerHTML=(t+1).toString():_t(this.eSortOrder)}},a.TEMPLATE='\n \n \n \n \n \n ',io([Li("eSortOrder")],a.prototype,"eSortOrder",void 0),io([Li("eSortAsc")],a.prototype,"eSortAsc",void 0),io([Li("eSortDesc")],a.prototype,"eSortDesc",void 0),io([Li("eSortMixed")],a.prototype,"eSortMixed",void 0),io([Li("eSortNone")],a.prototype,"eSortNone",void 0),io([de("columnModel")],a.prototype,"columnModel",void 0),io([de("sortController")],a.prototype,"sortController",void 0),a}(hi),oo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),lo=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},mo=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.lastMovingChanged=0,a}return oo(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.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))))},a.prototype.workOutTemplate=function(){var e=be(this.params.template,a.TEMPLATE);return e=e&&e.trim?e.trim():e},a.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)},a.prototype.setDisplayName=function(e){if(this.currentDisplayName!=e.displayName){this.currentDisplayName=e.displayName;var a=oa(this.currentDisplayName);this.eText&&(this.eText.innerHTML=a)}},a.prototype.setupIcons=function(e){this.addInIcon("menu",this.eMenu,e),this.addInIcon("filter",this.eFilter,e)},a.prototype.addInIcon=function(e,a,d){if(null!=a){var t=jt(e,this.gridOptionsService,d);t&&a.appendChild(t)}},a.prototype.setupTap=function(){var e=this,a=this.gridOptionsService;if(!a.get("suppressTouch")){var d=new ao(this.getGui(),!0),t=a.get("suppressMenuHide"),s=t&&i(this.eMenu),o=s?new ao(this.eMenu,!0):d;if(this.params.enableMenu){var l=s?"EVENT_TAP":"EVENT_LONG_TAP";this.addManagedListener(o,ao[l],(function(d){a.api.showColumnMenuAfterMouseClick(e.params.column,d.touchStart)}))}if(this.params.enableSorting){this.addManagedListener(d,ao.EVENT_TAP,(function(a){var d=a.touchStart.target;t&&e.eMenu.contains(d)||e.sortController.progressSort(e.params.column,!1,"uiColumnSorted")}))}this.addDestroyFunc((function(){return d.destroy()})),s&&this.addDestroyFunc((function(){return o.destroy()}))}},a.prototype.workOutShowMenu=function(){var e=!this.gridOptionsService.get("suppressMenuHide"),a=gd()&&e;return this.params.enableMenu&&!a},a.prototype.shouldSuppressMenuHide=function(){return this.gridOptionsService.get("suppressMenuHide")},a.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)):yt(this.eMenu))},a.prototype.showMenu=function(e){e||(e=this.eMenu),this.menuFactory.showMenuAfterButtonClick(this.params.column,e,"columnMenu")},a.prototype.workOutSort=function(){return this.params.enableSorting},a.prototype.setupSort=function(){var e=this;if(this.currentSort=this.params.enableSorting,this.eSortIndicator||(this.eSortIndicator=this.context.createBean(new so(!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,pe.EVENT_MOVING_CHANGED,(function(){e.lastMovingChanged=(new Date).getTime()})),this.eLabel&&this.addManagedListener(this.eLabel,"click",(function(a){var d=e.params.column.isMoving(),t=(new Date).getTime()-e.lastMovingChanged<50;if(!(d||t)){var i="ctrl"===e.gridOptionsService.get("multiSortKey")?a.ctrlKey||a.metaKey:a.shiftKey;e.params.progressSort(i)}}));var a=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 a=e.columnModel.getSourceColumnsForGroupColumn(e.params.column),d=!(null===a||void 0===a?void 0:a.every((function(a){return e.params.column.getSort()==a.getSort()})));e.addOrRemoveCssClass("ag-header-cell-sorted-mixed",d)}};this.addManagedListener(this.eventService,Je.EVENT_SORT_CHANGED,a),this.addManagedListener(this.eventService,Je.EVENT_COLUMN_ROW_GROUP_CHANGED,a)}},a.prototype.setupFilterIcon=function(){this.eFilter&&(this.addManagedListener(this.params.column,pe.EVENT_FILTER_CHANGED,this.onFilterChanged.bind(this)),this.onFilterChanged())},a.prototype.onFilterChanged=function(){var e=this.params.column.isFilterActive();dt(this.eFilter,e,{skipAriaHidden:!0})},a.TEMPLATE='',lo([de("sortController")],a.prototype,"sortController",void 0),lo([de("menuFactory")],a.prototype,"menuFactory",void 0),lo([de("columnModel")],a.prototype,"columnModel",void 0),lo([Li("eFilter")],a.prototype,"eFilter",void 0),lo([Li("eSortIndicator")],a.prototype,"eSortIndicator",void 0),lo([Li("eMenu")],a.prototype,"eMenu",void 0),lo([Li("eLabel")],a.prototype,"eLabel",void 0),lo([Li("eText")],a.prototype,"eText",void 0),lo([Li("eSortOrder")],a.prototype,"eSortOrder",void 0),lo([Li("eSortAsc")],a.prototype,"eSortAsc",void 0),lo([Li("eSortDesc")],a.prototype,"eSortDesc",void 0),lo([Li("eSortMixed")],a.prototype,"eSortMixed",void 0),lo([Li("eSortNone")],a.prototype,"eSortNone",void 0),a}(hi),uo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),no=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ro=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return uo(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(e){this.params=e,this.checkWarnings(),this.setupLabel(),this.addGroupExpandIcon(),this.setupExpandIcons()},a.prototype.checkWarnings=function(){this.params.template&&w("A template was provided for Header Group Comp - templates are only supported for Header Comps (not groups)")},a.prototype.setupExpandIcons=function(){var e=this;this.addInIcon("columnGroupOpened","agOpened"),this.addInIcon("columnGroupClosed","agClosed");var a=function(a){if(!Qe(a)){var d=!e.params.columnGroup.isExpanded();e.columnModel.setColumnGroupOpened(e.params.columnGroup.getProvidedColumnGroup(),d,"uiColumnExpanded")}};this.addTouchAndClickListeners(this.eCloseIcon,a),this.addTouchAndClickListeners(this.eOpenIcon,a);var d=function(e){xe(e)};this.addManagedListener(this.eCloseIcon,"dblclick",d),this.addManagedListener(this.eOpenIcon,"dblclick",d),this.addManagedListener(this.getGui(),"dblclick",a),this.updateIconVisibility();var t=this.params.columnGroup.getProvidedColumnGroup();this.addManagedListener(t,ye.EVENT_EXPANDED_CHANGED,this.updateIconVisibility.bind(this)),this.addManagedListener(t,ye.EVENT_EXPANDABLE_CHANGED,this.updateIconVisibility.bind(this))},a.prototype.addTouchAndClickListeners=function(e,a){var d=new ao(e,!0);this.addManagedListener(d,ao.EVENT_TAP,a),this.addDestroyFunc((function(){return d.destroy()})),this.addManagedListener(e,"click",a)},a.prototype.updateIconVisibility=function(){if(this.params.columnGroup.isExpandable()){var e=this.params.columnGroup.isExpanded();dt(this.eOpenIcon,e),dt(this.eCloseIcon,!e)}else dt(this.eOpenIcon,!1),dt(this.eCloseIcon,!1)},a.prototype.addInIcon=function(e,a){var d=jt(e,this.gridOptionsService,null);d&&this.getRefElement(a).appendChild(d)},a.prototype.addGroupExpandIcon=function(){if(!this.params.columnGroup.isExpandable())return dt(this.eOpenIcon,!1),void dt(this.eCloseIcon,!1)},a.prototype.setupLabel=function(){var e,a=this.params,d=a.displayName,t=a.columnGroup;if(i(d)){var s=oa(d);this.getRefElement("agLabel").innerHTML=s}this.addOrRemoveCssClass("ag-sticky-label",!(null===(e=t.getColGroupDef())||void 0===e?void 0:e.suppressStickyLabel))},a.TEMPLATE='',no([de("columnModel")],a.prototype,"columnModel",void 0),no([Li("agOpened")],a.prototype,"eOpenIcon",void 0),no([Li("agClosed")],a.prototype,"eCloseIcon",void 0),a}(hi),fo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),co=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return fo(a,e),a.prototype.isPopup=function(){return!0},a.prototype.setParentComponent=function(a){a.addCssClass("ag-has-popup"),e.prototype.setParentComponent.call(this,a)},a.prototype.destroy=function(){var a=this.parentComponent;a&&a.isAlive()&&a.getGui().classList.remove("ag-has-popup"),e.prototype.destroy.call(this)},a}(hi),po=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),_o=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},yo=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return po(a,e),a.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),i(e.value,!0)&&this.eTextArea.setValue(e.value.toString(),!0),this.addGuiEventListener("keydown",this.onKeyDown.bind(this)),this.activateTabIndex()},a.prototype.onKeyDown=function(e){var a=e.key;(a===zt.LEFT||a===zt.UP||a===zt.RIGHT||a===zt.DOWN||e.shiftKey&&a===zt.ENTER)&&e.stopPropagation()},a.prototype.afterGuiAttached=function(){var e=this.localeService.getLocaleTextFunc();this.eTextArea.setInputAriaLabel(e("ariaInputEditor","Input Editor")),this.focusAfterAttached&&this.eTextArea.getFocusableElement().focus()},a.prototype.getValue=function(){var e=this.eTextArea.getValue();return i(e)||i(this.params.value)?this.params.parseValue(e):this.params.value},a.TEMPLATE='
\n \n
',_o([Li("eTextArea")],a.prototype,"eTextArea",void 0),a}(co),qo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),bo=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Co=function(e){function a(){var a=e.call(this,'
\n \n
')||this;return a.startedByEnter=!1,a}return qo(a,e),a.prototype.init=function(e){this.focusAfterAttached=e.cellStartedEdit;var a=this,d=a.eSelect,t=a.valueFormatterService,i=a.gridOptionsService,o=e.values,l=e.value,m=e.eventKey;if(s(o))console.warn("AG Grid: no values found for select cellEditor");else{this.startedByEnter=null!=m&&m===zt.ENTER;var u=!1;o.forEach((function(a){var i={value:a},s=t.formatValue(e.column,null,a),o=null!==s&&void 0!==s;i.text=o?s:a,d.addOption(i),u=u||l===a})),u?d.setValue(e.value,!0):e.values.length&&d.setValue(e.values[0],!0);var n=e.valueListGap,r=e.valueListMaxWidth,f=e.valueListMaxHeight;null!=n&&d.setPickerGap(n),null!=f&&d.setPickerMaxHeight(f),null!=r&&d.setPickerMaxWidth(r),"fullRow"!==i.get("editType")&&this.addManagedListener(this.eSelect,ds.EVENT_ITEM_SELECTED,(function(){return e.stopEditing()}))}},a.prototype.afterGuiAttached=function(){var e=this;this.focusAfterAttached&&this.eSelect.getFocusableElement().focus(),this.startedByEnter&&setTimeout((function(){e.isAlive()&&e.eSelect.showPicker()}))},a.prototype.focusIn=function(){this.eSelect.getFocusableElement().focus()},a.prototype.getValue=function(){return this.eSelect.getValue()},a.prototype.isPopup=function(){return!1},bo([de("valueFormatterService")],a.prototype,"valueFormatterService",void 0),bo([Li("eSelect")],a.prototype,"eSelect",void 0),a}(co),Po=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ho=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},To=function(e){function a(a){var d=e.call(this,'\n
\n '.concat(a.getTemplate(),"\n
"))||this;return d.cellEditorInput=a,d}return Po(a,e),a.prototype.init=function(e){this.params=e;var a,d=this.eInput;if(this.cellEditorInput.init(d,e),e.cellStartedEdit){this.focusAfterAttached=!0;var t=e.eventKey;t===zt.BACKSPACE||e.eventKey===zt.DELETE?a="":t&&1===t.length?a=t:(a=this.cellEditorInput.getStartValue(),t!==zt.F2&&(this.highlightAllOnFocus=!0))}else this.focusAfterAttached=!1,a=this.cellEditorInput.getStartValue();null!=a&&d.setStartValue(a),this.addManagedListener(d.getGui(),"keydown",(function(e){var a=e.key;a!==zt.PAGE_UP&&a!==zt.PAGE_DOWN||e.preventDefault()}))},a.prototype.afterGuiAttached=function(){var e,a,d=this.localeService.getLocaleTextFunc(),t=this.eInput;if(t.setInputAriaLabel(d("ariaInputEditor","Input Editor")),this.focusAfterAttached){Id()||t.getFocusableElement().focus();var i=t.getInputElement();this.highlightAllOnFocus?i.select():null===(a=(e=this.cellEditorInput).setCaret)||void 0===a||a.call(e)}},a.prototype.focusIn=function(){var e=this.eInput,a=e.getFocusableElement(),d=e.getInputElement();a.focus(),d.select()},a.prototype.getValue=function(){return this.cellEditorInput.getValue()},a.prototype.isPopup=function(){return!1},ho([Li("eInput")],a.prototype,"eInput",void 0),a}(co),Lo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Io=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,a){this.eInput=e,this.params=a,null!=a.maxLength&&e.setMaxLength(a.maxLength)},e.prototype.getValue=function(){var e=this.eInput.getValue();return i(e)||i(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(),a=i(e)&&e.length||0;a&&this.eInput.getInputElement().setSelectionRange(a,a)},e}(),Oo=function(e){function a(){return e.call(this,new Io)||this}return Lo(a,e),a}(To),Bo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),So=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Do=function(e){function a(){var d=e.call(this,a.TEMPLATE)||this;return d.refreshCount=0,d}return Bo(a,e),a.prototype.init=function(e){this.eValue=this.queryForHtmlElement(".ag-value-change-value"),this.eDelta=this.queryForHtmlElement(".ag-value-change-delta"),this.refresh(e)},a.prototype.showDelta=function(e,a){var d=Math.abs(a),t=e.formatValue(d),s=i(t)?t:d,o=a>=0;this.eDelta.innerHTML=o?"\u2191"+s:"\u2193"+s,this.eDelta.classList.toggle("ag-value-change-delta-up",o),this.eDelta.classList.toggle("ag-value-change-delta-down",!o)},a.prototype.setTimerToRemoveDelta=function(){var e=this;this.refreshCount++;var a=this.refreshCount;window.setTimeout((function(){a===e.refreshCount&&e.hideDeltaValue()}),2e3)},a.prototype.hideDeltaValue=function(){this.eValue.classList.remove("ag-value-change-value-highlight"),_t(this.eDelta)},a.prototype.refresh=function(e){var a=e.value;if(a===this.lastValue)return!1;if(i(e.valueFormatted)?this.eValue.innerHTML=e.valueFormatted:i(e.value)?this.eValue.innerHTML=a:_t(this.eValue),this.filterManager.isSuppressFlashingCellsBecauseFiltering())return!1;if("number"===typeof a&&"number"===typeof this.lastValue){var d=a-this.lastValue;this.showDelta(e,d)}return this.lastValue&&this.eValue.classList.add("ag-value-change-value-highlight"),this.setTimerToRemoveDelta(),this.lastValue=a,!0},a.TEMPLATE='',So([de("filterManager")],a.prototype,"filterManager",void 0),a}(hi),go=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Go=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},wo=function(e){function a(){var d=e.call(this,a.TEMPLATE)||this;return d.refreshCount=0,d.eCurrent=d.queryForHtmlElement(".ag-value-slide-current"),d}return go(a,e),a.prototype.init=function(e){this.refresh(e)},a.prototype.addSlideAnimation=function(){var e=this;this.refreshCount++;var a=this.refreshCount;this.ePrevious&&this.getGui().removeChild(this.ePrevious),this.ePrevious=bt(''),this.ePrevious.innerHTML=this.eCurrent.innerHTML,this.getGui().insertBefore(this.ePrevious,this.eCurrent),window.setTimeout((function(){a===e.refreshCount&&e.ePrevious.classList.add("ag-value-slide-out-end")}),50),window.setTimeout((function(){a===e.refreshCount&&(e.getGui().removeChild(e.ePrevious),e.ePrevious=null)}),3e3)},a.prototype.refresh=function(e){var a=e.value;return s(a)&&(a=""),a!==this.lastValue&&(!this.filterManager.isSuppressFlashingCellsBecauseFiltering()&&(this.addSlideAnimation(),this.lastValue=a,i(e.valueFormatted)?this.eCurrent.innerHTML=e.valueFormatted:i(e.value)?this.eCurrent.innerHTML=a:_t(this.eCurrent),!0))},a.TEMPLATE='\n \n ',Go([de("filterManager")],a.prototype,"filterManager",void 0),a}(hi),vo=function(){return vo=Object.assign||function(e){for(var a,d=1,t=arguments.length;d0?t: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=a},e.prototype.getGroupKeys=function(e){void 0===e&&(e=!1);var a=[],d=this;for(e&&(d=d.parent);d&&d.level>=0;)a.push(d.key),d=d.parent;return a.reverse(),a},e.prototype.isPixelInRange=function(e){return!(!i(this.rowTop)||!i(this.rowHeight))&&(e>=this.rowTop&&et&&(t=o)})),!a&&((d||t<10)&&(t=this.beans.gridOptionsService.getRowHeightForNode(this).height),t!=this.rowHeight))){this.setRowHeight(t);var s=this.beans.rowModel;s.onRowHeightChangedDebounced&&s.onRowHeightChangedDebounced()}},e.prototype.setRowIndex=function(a){this.rowIndex!==a&&(this.rowIndex=a,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_ROW_INDEX_CHANGED)))},e.prototype.setUiLevel=function(a){this.uiLevel!==a&&(this.uiLevel=a,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_UI_LEVEL_CHANGED)))},e.prototype.setExpanded=function(a,d){if(this.expanded!==a){this.expanded=a,this.eventService&&this.eventService.dispatchEvent(this.createLocalRowEvent(e.EVENT_EXPANDED_CHANGED));var t=Object.assign({},this.createGlobalRowEvent(Je.EVENT_ROW_GROUP_OPENED),{expanded:a,event:d||null});this.beans.rowNodeEventThrottle.dispatchExpanded(t),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,a,d){var t=this,i=function(){var a;return"string"!==typeof e?e:null!==(a=t.beans.columnModel.getGridColumn(e))&&void 0!==a?a:t.beans.columnModel.getPrimaryColumn(e)}(),s=this.getValueFromValueService(i);if(this.beans.gridOptionsService.get("readOnlyEdit"))return this.dispatchEventForSaveValueReadOnly(i,s,a,d),!1;var o=this.beans.valueService.setValue(this,i,a,d);return this.dispatchCellChangedEvent(i,a,s),this.checkRowSelectable(),o},e.prototype.getValueFromValueService=function(e){var a=this.leafGroup&&this.beans.columnModel.isPivotMode(),d=this.group&&this.expanded&&!this.footer&&!a,t=this.beans.gridOptionsService.getGroupIncludeFooter()({node:this}),i=this.beans.gridOptionsService.get("groupSuppressBlankHeader"),s=d&&t&&!i;return this.beans.valueService.getValue(e,this,!1,s)},e.prototype.dispatchEventForSaveValueReadOnly=function(e,a,d,t){var i={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:a,newValue:d,value:d,source:t};this.beans.eventService.dispatchEvent(i)},e.prototype.setGroupValue=function(e,a){var d=this.beans.columnModel.getGridColumn(e);s(this.groupData)&&(this.groupData={});var t=d.getColId(),i=this.groupData[t];i!==a&&(this.groupData[t]=a,this.dispatchCellChangedEvent(d,a,i))},e.prototype.setAggData=function(e){var a=this,d=T([this.aggData,e]),t=this.aggData;this.aggData=e,this.eventService&&d.forEach((function(e){var d=a.aggData?a.aggData[e]:void 0,i=t?t[e]:void 0;if(d!==i){var s=a.beans.columnModel.lookupGridColumn(e);s&&a.dispatchCellChangedEvent(s,d,i)}}))},e.prototype.updateHasChildren=function(){var a=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;if(this.beans.gridOptionsService.isRowModelType("serverSide")){var d=this.beans.gridOptionsService.get("treeData"),t=this.beans.gridOptionsService.get("isServerSideGroup");a=!this.stub&&!this.footer&&(d?!!t&&t(this.data):!!this.group)}a!==this.__hasChildren&&(this.__hasChildren=!!a,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&&o(this.childrenAfterGroup)},e.prototype.dispatchCellChangedEvent=function(a,d,t){var i={type:e.EVENT_CELL_CHANGED,node:this,column:a,newValue:d,oldValue:t};this.dispatchLocalEvent(i)},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(a){return a.depthFirstSearch(e)})),e(this)},e.prototype.calculateSelectedFromChildren=function(){var e,a=!1,d=!1,t=!1;if(!(null===(e=this.childrenAfterGroup)||void 0===e?void 0:e.length))return this.selectable?this.selected:null;for(var i=0;i=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Vo=function(e){function a(){return e.call(this,'\n ')||this}return ko(a,e),a.prototype.postConstruct=function(){this.eCheckbox.setPassive(!0),Ya(this.eCheckbox.getInputElement(),"polite")},a.prototype.getCheckboxId=function(){return this.eCheckbox.getInputElement().id},a.prototype.onDataChanged=function(){this.onSelectionChanged()},a.prototype.onSelectableChanged=function(){this.showOrHideSelect()},a.prototype.onSelectionChanged=function(){var e=this.localeService.getLocaleTextFunc(),a=this.rowNode.isSelected(),d=pd(e,a),t=e("ariaRowToggleSelection","Press Space to toggle row selection");this.eCheckbox.setValue(a,!0),this.eCheckbox.setInputAriaLabel("".concat(t," (").concat(d,")"))},a.prototype.onClicked=function(e,a,d){return this.rowNode.setSelectedParams({newValue:e,rangeSelect:d.shiftKey,groupSelectsFiltered:a,event:d,source:"checkboxSelected"})},a.prototype.init=function(e){var a=this;if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListener(this.eCheckbox.getInputElement(),"dblclick",(function(e){xe(e)})),this.addManagedListener(this.eCheckbox.getInputElement(),"click",(function(e){xe(e);var d=a.gridOptionsService.get("groupSelectsFiltered"),t=a.eCheckbox.getValue();a.shouldHandleIndeterminateState(t,d)?0===a.onClicked(!0,d,e||{})&&a.onClicked(!1,d,e):t?a.onClicked(!1,d,e):a.onClicked(!0,d,e||{})})),this.addManagedListener(this.rowNode,Mo.EVENT_ROW_SELECTED,this.onSelectionChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_DATA_CHANGED,this.onDataChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.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,Mo.EVENT_DATA_CHANGED,d),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,d),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")},a.prototype.shouldHandleIndeterminateState=function(e,a){return a&&(void 0===this.eCheckbox.getPreviousValue()||void 0===e)&&this.gridOptionsService.isRowModelType("clientSide")},a.prototype.showOrHideSelect=function(){var e,a,d,t,i=this.rowNode.selectable,s=this.getIsVisible();if(i)if("function"===typeof s){var o=null===(e=this.overrides)||void 0===e?void 0:e.callbackParams,l=null===(a=this.column)||void 0===a?void 0:a.createColumnFunctionCallbackParams(this.rowNode);i=!!l&&s(xo(xo({},o),l))}else i=null!==s&&void 0!==s&&s;if(null===(d=this.column)||void 0===d?void 0:d.getColDef().showDisabledCheckboxes)return this.eCheckbox.setDisabled(!i),this.setVisible(!0),void this.setDisplayed(!0);(null===(t=this.overrides)||void 0===t?void 0:t.removeHidden)?this.setDisplayed(i):this.setVisible(i)},a.prototype.getIsVisible=function(){var e,a;return this.overrides?this.overrides.isVisible:null===(a=null===(e=this.column)||void 0===e?void 0:e.getColDef())||void 0===a?void 0:a.checkboxSelection},Qo([Li("eCheckbox")],a.prototype,"eCheckbox",void 0),Qo([Z],a.prototype,"postConstruct",null),a}(hi);!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(Es||(Es={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(Rs||(Rs={}));var Fo,Eo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ro=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},No=function(e){var a="function"===typeof Symbol&&Symbol.iterator,d=a&&e[a],t=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"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"}(Fo||(Fo={}));var Ao,Ho=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.dragSourceAndParamsList=[],a.dropTargets=[],a}var d;return Eo(a,e),d=a,a.prototype.init=function(){this.ePinnedIcon=Wt("columnMovePin",this.gridOptionsService,null),this.eHideIcon=Wt("columnMoveHide",this.gridOptionsService,null),this.eMoveIcon=Wt("columnMoveMove",this.gridOptionsService,null),this.eLeftIcon=Wt("columnMoveLeft",this.gridOptionsService,null),this.eRightIcon=Wt("columnMoveRight",this.gridOptionsService,null),this.eGroupIcon=Wt("columnMoveGroup",this.gridOptionsService,null),this.eAggregateIcon=Wt("columnMoveValue",this.gridOptionsService,null),this.ePivotIcon=Wt("columnMovePivot",this.gridOptionsService,null),this.eDropNotAllowedIcon=Wt("dropNotAllowed",this.gridOptionsService,null)},a.prototype.addDragSource=function(e,a){void 0===a&&(a=!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:a};this.dragSourceAndParamsList.push({params:d,dragSource:e}),this.dragService.addDragSource(d)},a.prototype.removeDragSource=function(e){var a=this.dragSourceAndParamsList.find((function(a){return a.dragSource===e}));a&&(this.dragService.removeDragSource(a.params),Le(this.dragSourceAndParamsList,a))},a.prototype.clearDragSourceParamsList=function(){var e=this;this.dragSourceAndParamsList.forEach((function(a){return e.dragService.removeDragSource(a.params)})),this.dragSourceAndParamsList.length=0,this.dropTargets.length=0},a.prototype.nudge=function(){this.dragging&&this.onDragging(this.eventLastTime,!0)},a.prototype.onDragStart=function(e,a){this.dragging=!0,this.dragSource=e,this.eventLastTime=a,this.dragItem=this.dragSource.getDragItem(),this.lastDropTarget=this.dragSource.dragSourceDropTarget,this.dragSource.onDragStarted&&this.dragSource.onDragStarted(),this.createGhost()},a.prototype.onDragStop=function(e){if(this.eventLastTime=null,this.dragging=!1,this.dragSource.onDragStopped&&this.dragSource.onDragStopped(),this.lastDropTarget&&this.lastDropTarget.onDragStop){var a=this.createDropTargetEvent(this.lastDropTarget,e,null,null,!1);this.lastDropTarget.onDragStop(a)}this.lastDropTarget=null,this.dragItem=null,this.removeGhost()},a.prototype.onDragging=function(e,a){var d,t,i,s,o=this,l=this.getHorizontalDirection(e),m=this.getVerticalDirection(e);this.eventLastTime=e,this.positionGhost(e);var u=this.dropTargets.filter((function(a){return o.isMouseOnDropTarget(e,a)})),n=this.findCurrentDropTarget(e,u);if(n!==this.lastDropTarget)this.leaveLastTargetIfExists(e,l,m,a),null!==this.lastDropTarget&&null===n&&(null===(t=(d=this.dragSource).onGridExit)||void 0===t||t.call(d,this.dragItem)),null===this.lastDropTarget&&null!==n&&(null===(s=(i=this.dragSource).onGridEnter)||void 0===s||s.call(i,this.dragItem)),this.enterDragTargetIfExists(n,e,l,m,a),this.lastDropTarget=n;else if(n&&n.onDragging){var r=this.createDropTargetEvent(n,e,l,m,a);n.onDragging(r)}},a.prototype.getAllContainersFromDropTarget=function(e){var a=e.getSecondaryContainers?e.getSecondaryContainers():null,d=[[e.getContainer()]];return a?d.concat(a):d},a.prototype.allContainersIntersect=function(e,a){var d,t;try{for(var i=No(a),s=i.next();!s.done;s=i.next()){var o=s.value.getBoundingClientRect();if(0===o.width||0===o.height)return!1;var l=e.clientX>=o.left&&e.clientX=o.top&&e.clientYd?Rs.Left:Rs.Right},a.prototype.getVerticalDirection=function(e){var a=this.eventLastTime&&this.eventLastTime.clientY,d=e.clientY;return a===d?null:a>d?Es.Up:Es.Down},a.prototype.createDropTargetEvent=function(e,a,d,t,i){var s=e.getContainer(),o=s.getBoundingClientRect(),l=this,m=l.gridApi,u=l.columnApi,n=l.dragItem,r=l.dragSource;return{event:a,x:a.clientX-o.left,y:a.clientY-o.top,vDirection:t,hDirection:d,dragSource:r,fromNudge:i,dragItem:n,api:m,columnApi:u,dropZoneTarget:s}},a.prototype.positionGhost=function(e){var a=this.eGhost;if(a){var d=a.getBoundingClientRect().height,t=Md()-2,i=kd()-2,s=rt(a.offsetParent),o=e.clientY,l=e.clientX,m=o-s.top-d/2,u=l-s.left-10,n=this.gridOptionsService.getDocument(),r=n.defaultView||window,f=r.pageYOffset||n.documentElement.scrollTop,c=r.pageXOffset||n.documentElement.scrollLeft;t>0&&u+a.clientWidth>t+c&&(u=t+c-a.clientWidth),u<0&&(u=0),i>0&&m+a.clientHeight>i+f&&(m=i+f-a.clientHeight),m<0&&(m=0),a.style.left="".concat(u,"px"),a.style.top="".concat(m,"px")}},a.prototype.removeGhost=function(){this.eGhost&&this.eGhostParent&&this.eGhostParent.removeChild(this.eGhost),this.eGhost=null},a.prototype.createGhost=function(){this.eGhost=bt(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 a=this.eGhost.querySelector(".ag-dnd-ghost-label"),t=this.dragSource.dragItemName;k(t)&&(t=t()),a.innerHTML=oa(t)||"",this.eGhost.style.height="25px",this.eGhost.style.top="20px",this.eGhost.style.left="20px";var i=this.gridOptionsService.getDocument(),s=null,o=null;try{s=i.fullscreenElement}catch(m){}finally{s||(s=this.gridOptionsService.getRootNode());var l=s.querySelector("body");o=l||(s instanceof ShadowRoot?s:s instanceof Document?null===s||void 0===s?void 0:s.documentElement:s)}this.eGhostParent=o,this.eGhostParent?this.eGhostParent.appendChild(this.eGhost):console.warn("AG Grid: could not find document body, it is needed for dragging columns")},a.prototype.setGhostIcon=function(e,a){void 0===a&&(a=!1),_t(this.eGhostIcon);var t=null;switch(e||(e=this.dragSource.getDefaultIconName?this.dragSource.getDefaultIconName():d.ICON_NOT_ALLOWED),e){case d.ICON_PINNED:t=this.ePinnedIcon;break;case d.ICON_MOVE:t=this.eMoveIcon;break;case d.ICON_LEFT:t=this.eLeftIcon;break;case d.ICON_RIGHT:t=this.eRightIcon;break;case d.ICON_GROUP:t=this.eGroupIcon;break;case d.ICON_AGGREGATE:t=this.eAggregateIcon;break;case d.ICON_PIVOT:t=this.ePivotIcon;break;case d.ICON_NOT_ALLOWED:t=this.eDropNotAllowedIcon;break;case d.ICON_HIDE:t=this.eHideIcon}this.eGhostIcon.classList.toggle("ag-shake-left-to-right",a),t===this.eHideIcon&&this.gridOptionsService.get("suppressDragLeaveHidesColumns")||t&&this.eGhostIcon.appendChild(t)},a.ICON_PINNED="pinned",a.ICON_MOVE="move",a.ICON_LEFT="left",a.ICON_RIGHT="right",a.ICON_GROUP="group",a.ICON_AGGREGATE="aggregate",a.ICON_PIVOT="pivot",a.ICON_NOT_ALLOWED="notAllowed",a.ICON_HIDE="hide",a.GHOST_TEMPLATE='
\n \n
\n
',Ro([de("dragService")],a.prototype,"dragService",void 0),Ro([de("mouseEventService")],a.prototype,"mouseEventService",void 0),Ro([de("columnApi")],a.prototype,"columnApi",void 0),Ro([de("gridApi")],a.prototype,"gridApi",void 0),Ro([Z],a.prototype,"init",null),Ro([ee],a.prototype,"clearDragSourceParamsList",null),a=d=Ro([ae("dragAndDropService")],a)}(je),Wo=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),jo=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Uo=function(e){function a(a,d,t,i,s,o){var l=e.call(this)||this;return l.cellValueFn=a,l.rowNode=d,l.column=t,l.customGui=i,l.dragStartPixels=s,l.suppressVisibilityChange=o,l.dragSource=null,l}return Wo(a,e),a.prototype.isCustomGui=function(){return null!=this.customGui},a.prototype.postConstruct=function(){if(this.customGui?this.setDragElement(this.customGui,this.dragStartPixels):(this.setTemplate(''),this.getGui().appendChild(jt("rowDrag",this.gridOptionsService,null)),this.addDragSource()),this.checkCompatibility(),!this.suppressVisibilityChange){var e=this.gridOptionsService.get("rowDragManaged")?new Yo(this,this.beans,this.rowNode,this.column):new Ko(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)}},a.prototype.setDragElement=function(e,a){this.setTemplateFromElement(e),this.addDragSource(a)},a.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]},a.prototype.checkCompatibility=function(){var e=this.gridOptionsService.get("rowDragManaged");this.gridOptionsService.get("treeData")&&e&&w("If using row drag with tree data, you cannot have rowDragManaged=true")},a.prototype.getDragItem=function(){return{rowNode:this.rowNode,rowNodes:this.getSelectedNodes(),columns:this.column?[this.column]:void 0,defaultTextValue:this.cellValueFn()}},a.prototype.getRowDragText=function(e){if(e){var a=e.getColDef();if(a.rowDragText)return a.rowDragText}return this.gridOptionsService.get("rowDragText")},a.prototype.addDragSource=function(e){var a=this;void 0===e&&(e=4),this.dragSource&&this.removeDragSource();var d=this.localeService.getLocaleTextFunc();this.dragSource={type:Fo.RowDrag,eElement:this.getGui(),dragItemName:function(){var e,t=a.getDragItem(),i=(null===(e=t.rowNodes)||void 0===e?void 0:e.length)||1,s=a.getRowDragText(a.column);return s?s(t,i):1===i?a.cellValueFn():"".concat(i," ").concat(d("rowDragRows","rows"))},getDragItem:function(){return a.getDragItem()},dragStartPixels:e,dragSourceDomDataKey:this.gridOptionsService.getDomDataKey()},this.beans.dragAndDropService.addDragSource(this.dragSource,!0)},a.prototype.removeDragSource=function(){this.dragSource&&this.beans.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null},jo([de("beans")],a.prototype,"beans",void 0),jo([Z],a.prototype,"postConstruct",null),jo([ee],a.prototype,"removeDragSource",null),a}(hi),zo=function(e){function a(a,d,t){var i=e.call(this)||this;return i.parent=a,i.rowNode=d,i.column=t,i}return Wo(a,e),a.prototype.setDisplayedOrVisible=function(e){var a={skipAriaHidden:!0};if(e)this.parent.setDisplayed(!1,a);else{var d=!0,t=!1;this.column&&(d=this.column.isRowDrag(this.rowNode)||this.parent.isCustomGui(),t=k(this.column.getColDef().rowDrag)),t?(this.parent.setDisplayed(!0,a),this.parent.setVisible(d,a)):(this.parent.setDisplayed(d,a),this.parent.setVisible(!0,a))}},a}(je),Ko=function(e){function a(a,d,t,i){var s=e.call(this,a,t,i)||this;return s.beans=d,s}return Wo(a,e),a.prototype.postConstruct=function(){this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,Je.EVENT_NEW_COLUMNS_LOADED,this.workOutVisibility.bind(this)),this.workOutVisibility()},a.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},a.prototype.workOutVisibility=function(){var e=this.gridOptionsService.get("suppressRowDrag");this.setDisplayedOrVisible(e)},jo([Z],a.prototype,"postConstruct",null),a}(zo),Yo=function(e){function a(a,d,t,i){var s=e.call(this,a,t,i)||this;return s.beans=d,s}return Wo(a,e),a.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,Mo.EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedPropertyListener("suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},a.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},a.prototype.workOutVisibility=function(){var e=this.beans.ctrlsService.getGridBodyCtrl().getRowDragFeature(),a=e&&e.shouldPreventRowMove(),d=this.gridOptionsService.get("suppressRowDrag"),t=this.beans.dragAndDropService.hasExternalDropZones(),i=a&&!t||d;this.setDisplayedOrVisible(i)},jo([Z],a.prototype,"postConstruct",null),a}(zo),$o=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Xo=function(){return Xo=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Zo=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return $o(a,e),a.prototype.init=function(e,a,d,t,i,s,o){var l,m,u,n;this.params=o,this.eGui=a,this.eCheckbox=d,this.eExpanded=t,this.eContracted=i,this.comp=e,this.compClass=s;var r=o.node;o.value;var f=o.colDef,c=this.isTopLevelFooter();if(!c){if(this.isEmbeddedRowMismatch())return;if(r.footer&&this.gridOptionsService.get("groupHideOpenParents"))if((f&&f.showRowGroup)!==(r.rowGroupColumn&&r.rowGroupColumn.getColId()))return}if(this.setupShowingValueForOpenedParent(),this.findDisplayedGroupNode(),!c){var p=o.node.footer&&o.node.rowGroupIndex===this.columnModel.getRowGroupColumns().findIndex((function(e){var a;return e.getColId()===(null===(a=o.colDef)||void 0===a?void 0:a.showRowGroup)})),_="multipleColumns"!=this.gridOptionsService.get("groupDisplayType")||this.gridOptionsService.get("treeData")||this.gridOptionsService.get("showOpenedGroup")&&!o.node.footer&&(!o.node.group||null!=o.node.rowGroupIndex&&o.node.rowGroupIndex>this.columnModel.getRowGroupColumns().findIndex((function(e){var a;return e.getColId()===(null===(a=o.colDef)||void 0===a?void 0:a.showRowGroup)}))),y=!r.group&&((null===(l=this.params.colDef)||void 0===l?void 0:l.field)||(null===(m=this.params.colDef)||void 0===m?void 0:m.valueGetter)),q=this.isExpandable(),b=this.columnModel.isPivotMode()&&r.leafGroup&&(null===(u=r.rowGroupColumn)||void 0===u?void 0:u.getColId())===(null===(n=o.column)||void 0===n?void 0:n.getColDef().showRowGroup);if(!this.showingValueForOpenedParent&&!q&&!y&&!_&&!p&&!b)return}this.addExpandAndContract(),this.addFullWidthRowDraggerIfNeeded(),this.addCheckboxIfNeeded(),this.addValueElement(),this.setupIndent(),this.refreshAriaExpanded()},a.prototype.getCellAriaRole=function(){var e,a,d=null===(e=this.params.colDef)||void 0===e?void 0:e.cellAriaRole,t=null===(a=this.params.column)||void 0===a?void 0:a.getColDef().cellAriaRole;return d||t||"gridcell"},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.expandListener=null},a.prototype.refreshAriaExpanded=function(){var e=this.params,a=e.node,d=e.eParentOfValue;if(this.expandListener&&(this.expandListener=this.expandListener()),this.isExpandable()){var t=function(){ed(d,!!a.expanded)};this.expandListener=this.addManagedListener(a,Mo.EVENT_EXPANDED_CHANGED,t)||null,t()}else ad(d)},a.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 a=this.columnModel.getRowGroupColumns();return!a||0===a.length||a[0].getId()===e.showRowGroup},a.prototype.isEmbeddedRowMismatch=function(){if(!this.params.fullWidth||!this.gridOptionsService.get("embedFullWidthRows"))return!1;var e="left"===this.params.pinned,a="right"===this.params.pinned,d=!e&&!a;return this.gridOptionsService.get("enableRtl")?this.columnModel.isPinningLeft()?!a:!d:this.columnModel.isPinningLeft()?!e:!d},a.prototype.findDisplayedGroupNode=function(){var e=this.params.column,a=this.params.node;if(this.showingValueForOpenedParent)for(var d=a.parent;null!=d;){if(d.rowGroupColumn&&e.isRowGroupDisplayed(d.rowGroupColumn.getId())){this.displayedGroupNode=d;break}d=d.parent}s(this.displayedGroupNode)&&(this.displayedGroupNode=a)},a.prototype.setupShowingValueForOpenedParent=function(){var e=this.params.node,a=this.params.column;if(this.gridOptionsService.get("groupHideOpenParents"))if(e.groupData){if(null!=e.rowGroupColumn){var d=e.rowGroupColumn.getId();if(a.isRowGroupDisplayed(d))return void(this.showingValueForOpenedParent=!1)}var t=null!=e.groupData[a.getId()];this.showingValueForOpenedParent=t}else this.showingValueForOpenedParent=!1;else this.showingValueForOpenedParent=!1},a.prototype.addValueElement=function(){this.displayedGroupNode.footer?this.addFooterValue():(this.addGroupValue(),this.addChildCount())},a.prototype.addGroupValue=function(){var e,a=this.adjustParamsWithDetailsFromRelatedColumn(),d=this.getInnerCompDetails(a),t=a.valueFormatted,i=a.value,s=t;if(null==s){var o=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&&o)s=this.localeService.getLocaleTextFunc()("blanks","(Blanks)");else s=null!==i&&void 0!==i?i:null}this.comp.setInnerRenderer(d,s)},a.prototype.adjustParamsWithDetailsFromRelatedColumn=function(){var e=this.displayedGroupNode.rowGroupColumn,a=this.params.column;if(!e)return this.params;if(null!=a&&!a.isRowGroupDisplayed(e.getId()))return this.params;var d=this.params,t=this.params,i=t.value,s=t.node,o=this.valueFormatterService.formatValue(e,s,i);return Xo(Xo({},d),{valueFormatted:o})},a.prototype.addFooterValue=function(){var e=this.params.footerValueGetter,a="";if(e){var d=q(this.params);d.value=this.params.value,"function"===typeof e?a=e(d):"string"===typeof e?a=this.expressionService.evaluate(e,d):console.warn("AG Grid: footerValueGetter should be either a function or a string (expression)")}else a="Total "+(null!=this.params.value?this.params.value:"");var t=this.getInnerCompDetails(this.params);this.comp.setInnerRenderer(t,a)},a.prototype.getInnerCompDetails=function(e){var a=this;if(e.fullWidth)return this.userComponentFactory.getFullWidthGroupRowInnerCellRenderer(this.gridOptionsService.get("groupRowRendererParams"),e);var d=this.userComponentFactory.getInnerRendererDetails(e,e),t=function(e){return e&&e.componentClass==a.compClass};if(d&&!t(d))return d;var i=this.displayedGroupNode.rowGroupColumn,s=i?i.getColDef():void 0;if(s){var o=this.userComponentFactory.getCellRendererDetails(s,e);if(o&&!t(o))return o;if(t(o)&&s.cellRendererParams&&s.cellRendererParams.innerRenderer)return this.userComponentFactory.getInnerRendererDetails(s.cellRendererParams,e)}},a.prototype.addChildCount=function(){this.params.suppressCount||(this.addManagedListener(this.displayedGroupNode,Mo.EVENT_ALL_CHILDREN_COUNT_CHANGED,this.updateChildCount.bind(this)),this.updateChildCount())},a.prototype.updateChildCount=function(){var e=this.displayedGroupNode.allChildrenCount,a=this.isShowRowGroupForThisRow()&&null!=e&&e>=0?"(".concat(e,")"):"";this.comp.setChildCount(a)},a.prototype.isShowRowGroupForThisRow=function(){if(this.gridOptionsService.get("treeData"))return!0;var e=this.displayedGroupNode.rowGroupColumn;if(!e)return!1;var a=this.params.column;return null==a||a.isRowGroupDisplayed(e.getId())},a.prototype.addExpandAndContract=function(){var e,a=this.params,d=jt("groupExpanded",this.gridOptionsService,null),t=jt("groupContracted",this.gridOptionsService,null);d&&this.eExpanded.appendChild(d),t&&this.eContracted.appendChild(t);var i=a.eGridCell;(null===(e=this.params.column)||void 0===e?void 0:e.isCellEditable(a.node))&&this.gridOptionsService.get("enableGroupEdit")||!this.isExpandable()||a.suppressDoubleClickExpand||this.addManagedListener(i,"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(i,"keydown",this.onKeyDown.bind(this)),this.addManagedListener(a.node,Mo.EVENT_EXPANDED_CHANGED,this.showExpandAndContractIcons.bind(this)),this.showExpandAndContractIcons();var s=this.onRowNodeIsExpandableChanged.bind(this);this.addManagedListener(this.displayedGroupNode,Mo.EVENT_ALL_CHILDREN_COUNT_CHANGED,s),this.addManagedListener(this.displayedGroupNode,Mo.EVENT_MASTER_CHANGED,s),this.addManagedListener(this.displayedGroupNode,Mo.EVENT_GROUP_CHANGED,s),this.addManagedListener(this.displayedGroupNode,Mo.EVENT_HAS_CHILDREN_CHANGED,s)},a.prototype.onExpandClicked=function(e){Qe(e)||(xe(e),this.onExpandOrContract(e))},a.prototype.onExpandOrContract=function(e){var a=this.displayedGroupNode,d=!a.expanded;!d&&a.sticky&&this.scrollToStickyNode(a),a.setExpanded(d,e)},a.prototype.scrollToStickyNode=function(e){this.ctrlsService.getGridBodyCtrl().getScrollFeature().setVerticalScrollPosition(e.rowTop-e.stickyRowTop)},a.prototype.isExpandable=function(){if(this.showingValueForOpenedParent)return!0;var e=this.displayedGroupNode,a=this.columnModel.isPivotMode()&&e.leafGroup;if(!(e.isExpandable()&&!e.footer&&!a))return!1;var d=this.params.column;return null==d||"string"!==typeof d.getColDef().showRowGroup||this.isShowRowGroupForThisRow()},a.prototype.showExpandAndContractIcons=function(){var e=this,a=e.params,d=e.displayedGroupNode,t=e.columnModel,i=a.node,s=this.isExpandable();if(s){var o=!!this.showingValueForOpenedParent||i.expanded;this.comp.setExpandedDisplayed(o),this.comp.setContractedDisplayed(!o)}else this.comp.setExpandedDisplayed(!1),this.comp.setContractedDisplayed(!1);var l=t.isPivotMode(),m=l&&d.leafGroup,u=s&&!m,n=i.footer&&-1===i.level;this.comp.addOrRemoveCssClass("ag-cell-expandable",u),this.comp.addOrRemoveCssClass("ag-row-group",u),l?this.comp.addOrRemoveCssClass("ag-pivot-leaf-group",m):n||this.comp.addOrRemoveCssClass("ag-row-group-leaf-indent",!u)},a.prototype.onRowNodeIsExpandableChanged=function(){this.showExpandAndContractIcons(),this.setIndent(),this.refreshAriaExpanded()},a.prototype.setupIndent=function(){var e=this.params.node;this.params.suppressPadding||(this.addManagedListener(e,Mo.EVENT_UI_LEVEL_CHANGED,this.setIndent.bind(this)),this.setIndent())},a.prototype.setIndent=function(){if(!this.gridOptionsService.get("groupHideOpenParents")){var e=this.params,a=e.node,d=!!e.colDef,t=this.gridOptionsService.get("treeData"),i=!d||t||!0===e.colDef.showRowGroup?a.uiLevel:0;this.indentClass&&this.comp.addOrRemoveCssClass(this.indentClass,!1),this.indentClass="ag-row-group-indent-"+i,this.comp.addOrRemoveCssClass(this.indentClass,!0)}},a.prototype.addFullWidthRowDraggerIfNeeded=function(){var e=this;if(this.params.fullWidth&&this.params.rowDrag){var a=new Uo((function(){return e.params.value}),this.params.node);this.createManagedBean(a,this.context),this.eGui.insertAdjacentElement("afterbegin",a.getGui())}},a.prototype.isUserWantsSelected=function(){var e=this.params.checkbox;return"function"===typeof e||!0===e},a.prototype.addCheckboxIfNeeded=function(){var e=this,a=this.displayedGroupNode,d=this.isUserWantsSelected()&&!a.footer&&!a.rowPinned&&!a.detail;if(d){var t=new Vo;this.getContext().createBean(t),t.init({rowNode:this.params.node,column:this.params.column,overrides:{isVisible:this.params.checkbox,callbackParams:this.params,removeHidden:!0}}),this.eCheckbox.appendChild(t.getGui()),this.addDestroyFunc((function(){return e.getContext().destroyBean(t)}))}this.comp.setCheckboxVisible(d)},a.prototype.onKeyDown=function(e){e.key!==zt.ENTER||this.params.suppressEnterExpand||(this.params.column&&this.params.column.isCellEditable(this.params.node)||this.onExpandOrContract(e))},a.prototype.onCellDblClicked=function(e){Qe(e)||(Ee(this.eExpanded,e)||Ee(this.eContracted,e)||this.onExpandOrContract(e))},Jo([de("expressionService")],a.prototype,"expressionService",void 0),Jo([de("valueFormatterService")],a.prototype,"valueFormatterService",void 0),Jo([de("columnModel")],a.prototype,"columnModel",void 0),Jo([de("userComponentFactory")],a.prototype,"userComponentFactory",void 0),Jo([de("ctrlsService")],a.prototype,"ctrlsService",void 0),a}(je),el=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),al=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},dl=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return el(a,e),a.prototype.init=function(e){var a=this,d={setInnerRenderer:function(e,d){return a.setRenderDetails(e,d)},setChildCount:function(e){return a.eChildCount.innerHTML=e},addOrRemoveCssClass:function(e,d){return a.addOrRemoveCssClass(e,d)},setContractedDisplayed:function(e){return dt(a.eContracted,e)},setExpandedDisplayed:function(e){return dt(a.eExpanded,e)},setCheckboxVisible:function(e){return a.eCheckbox.classList.toggle("ag-invisible",!e)}},t=this.createManagedBean(new Zo),i=!e.colDef,s=this.getGui();t.init(d,s,this.eCheckbox,this.eExpanded,this.eContracted,this.constructor,e),i&&Na(s,t.getCellAriaRole())},a.prototype.setRenderDetails=function(e,a){var d=this;if(e){var t=e.newAgStackInstance();if(!t)return;t.then((function(e){if(e){var a=function(){return d.context.destroyBean(e)};d.isAlive()?(d.eValue.appendChild(e.getGui()),d.addDestroyFunc(a)):a()}}))}else this.eValue.innerText=a},a.prototype.destroy=function(){this.getContext().destroyBean(this.innerCellRenderer),e.prototype.destroy.call(this)},a.prototype.refresh=function(){return!1},a.TEMPLATE='\n \n \n \n \n \n ',al([Li("eExpanded")],a.prototype,"eExpanded",void 0),al([Li("eContracted")],a.prototype,"eContracted",void 0),al([Li("eCheckbox")],a.prototype,"eCheckbox",void 0),al([Li("eValue")],a.prototype,"eValue",void 0),al([Li("eChildCount")],a.prototype,"eChildCount",void 0),a}(hi),tl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),il=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},sl=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return tl(a,e),a.prototype.init=function(e){e.node.failedLoad?this.setupFailed():this.setupLoading()},a.prototype.setupFailed=function(){var e=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=e("loadingError","ERR")},a.prototype.setupLoading=function(){var e=jt("groupLoading",this.gridOptionsService,null);e&&this.eLoadingIcon.appendChild(e);var a=this.localeService.getLocaleTextFunc();this.eLoadingText.innerText=a("loadingOoo","Loading")},a.prototype.refresh=function(e){return!1},a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.TEMPLATE='
\n \n \n
',il([Li("eLoadingIcon")],a.prototype,"eLoadingIcon",void 0),il([Li("eLoadingText")],a.prototype,"eLoadingText",void 0),a}(hi),ol=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ll=function(e){function a(){return e.call(this)||this}return ol(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(e){var d,t=null!==(d=this.gridOptionsService.get("overlayLoadingTemplate"))&&void 0!==d?d:a.DEFAULT_LOADING_OVERLAY_TEMPLATE,i=this.localeService.getLocaleTextFunc(),s=t.replace("[LOADING...]",i("loadingOoo","Loading..."));this.setTemplate(s)},a.DEFAULT_LOADING_OVERLAY_TEMPLATE='[LOADING...]',a}(hi),ml=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ul=function(e){function a(){return e.call(this)||this}return ml(a,e),a.prototype.destroy=function(){e.prototype.destroy.call(this)},a.prototype.init=function(e){var d,t=null!==(d=this.gridOptionsService.get("overlayNoRowsTemplate"))&&void 0!==d?d:a.DEFAULT_NO_ROWS_TEMPLATE,i=this.localeService.getLocaleTextFunc(),s=t.replace("[NO_ROWS_TO_SHOW]",i("noRowsToShow","No Rows To Show"));this.setTemplate(s)},a.DEFAULT_NO_ROWS_TEMPLATE='[NO_ROWS_TO_SHOW]',a}(hi),nl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),rl=function(e){function a(){return e.call(this,'
')||this}return nl(a,e),a.prototype.init=function(e){var a=e.value;this.getGui().innerHTML=oa(a)},a}(co),fl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),cl=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,a){this.eInput=e,this.params=a,null!=a.max&&e.setMax(a.max),null!=a.min&&e.setMin(a.min),null!=a.precision&&e.setPrecision(a.precision),null!=a.step&&e.setStep(a.step);var d=e.getInputElement();a.preventStepping?e.addManagedListener(d,"keydown",this.preventStepping):a.showStepperButtons&&d.classList.add("ag-number-field-input-stepper")},e.prototype.preventStepping=function(e){e.key!==zt.UP&&e.key!==zt.DOWN||e.preventDefault()},e.prototype.getValue=function(){var e=this.eInput.getValue();if(!i(e)&&!i(this.params.value))return this.params.value;var a=this.params.parseValue(e);if(null==a)return a;if("string"===typeof a){if(""===a)return null;a=Number(a)}return isNaN(a)?null:a},e.prototype.getStartValue=function(){return this.params.value},e}(),pl=function(e){function a(){return e.call(this,new cl)||this}return fl(a,e),a}(To),_l=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),yl=function(){function e(){}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,a){this.eInput=e,this.params=a,null!=a.min&&e.setMin(a.min),null!=a.max&&e.setMax(a.max),null!=a.step&&e.setStep(a.step)},e.prototype.getValue=function(){var e=this.eInput.getDate();return i(e)||i(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 Wd(e,!1)},e}(),ql=function(e){function a(){return e.call(this,new yl)||this}return _l(a,e),a}(To),bl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Cl=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Pl=function(){function e(e){this.getDataTypeService=e}return e.prototype.getTemplate=function(){return''},e.prototype.init=function(e,a){this.eInput=e,this.params=a,null!=a.min&&e.setMin(a.min),null!=a.max&&e.setMax(a.max),null!=a.step&&e.setStep(a.step)},e.prototype.getValue=function(){var e=this.formatDate(this.eInput.getDate());return i(e)||i(this.params.value)?this.params.parseValue(null!==e&&void 0!==e?e:""):this.params.value},e.prototype.getStartValue=function(){var e,a;return Wd(null!==(a=this.parseDate(null!==(e=this.params.value)&&void 0!==e?e:void 0))&&void 0!==a?a: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 a(){var a=e.call(this,new Pl((function(){return a.dataTypeService})))||this;return a}return bl(a,e),Cl([de("dataTypeService")],a.prototype,"dataTypeService",void 0),a}(To),Tl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ll=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Il=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return Tl(a,e),a.prototype.init=function(e){var a=this;this.params=e,this.updateCheckbox(e);var d=this.eCheckbox.getInputElement();d.setAttribute("tabindex","-1"),Ya(d,"polite"),this.addManagedListener(d,"click",(function(e){if(xe(e),!a.eCheckbox.isDisabled()){var d=a.eCheckbox.getValue();a.onCheckboxChanged(d)}})),this.addManagedListener(d,"dblclick",(function(e){xe(e)}));var t=this.gridOptionsService.getDocument();this.addManagedListener(this.params.eGridCell,"keydown",(function(e){if(e.key===zt.SPACE&&!a.eCheckbox.isDisabled()){a.params.eGridCell===t.activeElement&&a.eCheckbox.toggle();var d=a.eCheckbox.getValue();a.onCheckboxChanged(d),e.preventDefault()}}))},a.prototype.refresh=function(e){return this.params=e,this.updateCheckbox(e),!0},a.prototype.updateCheckbox=function(e){var a,d,t,i,s=!0;if(e.node.group&&e.column){var o=e.column.getColId();o.startsWith(da)?i=null==e.value||""===e.value?void 0:"true"===e.value:e.node.aggData&&void 0!==e.node.aggData[o]?i=null!==(a=e.value)&&void 0!==a?a:void 0:s=!1}else i=null!==(d=e.value)&&void 0!==d?d:void 0;if(s){this.eCheckbox.setValue(i);var l=null!=e.disabled?e.disabled:!(null===(t=e.column)||void 0===t?void 0:t.isCellEditable(e.node));this.eCheckbox.setDisabled(l);var m=this.localeService.getLocaleTextFunc(),u=pd(m,i),n=l?u:"".concat(m("ariaToggleCellValue","Press SPACE to toggle cell value")," (").concat(u,")");this.eCheckbox.setInputAriaLabel(n)}else this.eCheckbox.setDisplayed(!1)},a.prototype.onCheckboxChanged=function(e){var a=this.params,d=a.column,t=a.node,i=a.rowIndex,s=a.value,o={type:Je.EVENT_CELL_EDITING_STARTED,column:d,colDef:null===d||void 0===d?void 0:d.getColDef(),data:t.data,node:t,rowIndex:i,rowPinned:t.rowPinned,value:s};this.eventService.dispatchEvent(o);var l=this.params.node.setDataValue(this.params.column,e,"edit"),m={type:Je.EVENT_CELL_EDITING_STOPPED,column:d,colDef:null===d||void 0===d?void 0:d.getColDef(),data:t.data,node:t,rowIndex:i,rowPinned:t.rowPinned,value:s,oldValue:s,newValue:e,valueChanged:l};this.eventService.dispatchEvent(m)},a.TEMPLATE='\n ',Ll([Li("eCheckbox")],a.prototype,"eCheckbox",void 0),a}(hi),Ol=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Bl=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Sl=function(e){function a(){return e.call(this,'\n
\n \n
')||this}return Ol(a,e),a.prototype.init=function(e){var a,d=this;this.params=e;var t=null!==(a=e.value)&&void 0!==a?a:void 0;this.eCheckbox.setValue(t),this.eCheckbox.getInputElement().setAttribute("tabindex","-1"),this.setAriaLabel(t),this.addManagedListener(this.eCheckbox,Je.EVENT_FIELD_VALUE_CHANGED,(function(e){return d.setAriaLabel(e.selected)}))},a.prototype.getValue=function(){return this.eCheckbox.getValue()},a.prototype.focusIn=function(){this.eCheckbox.getFocusableElement().focus()},a.prototype.afterGuiAttached=function(){this.params.cellStartedEdit&&this.focusIn()},a.prototype.isPopup=function(){return!1},a.prototype.setAriaLabel=function(e){var a=this.localeService.getLocaleTextFunc(),d=pd(a,e),t=a("ariaToggleCellValue","Press SPACE to toggle cell value");this.eCheckbox.setInputAriaLabel("".concat(t," (").concat(d,")"))},Bl([Li("eCheckbox")],a.prototype,"eCheckbox",void 0),a}(co),Dl=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),gl=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Gl=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},wl=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i0&&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/")))},gl([de("gridOptions")],a.prototype,"gridOptions",void 0),gl([Z],a.prototype,"init",null),a=gl([ae("userComponentRegistry")],a)}(je),Ml={propertyName:"dateComponent",cellRenderer:!1},kl={propertyName:"headerComponent",cellRenderer:!1},xl={propertyName:"headerGroupComponent",cellRenderer:!1},Ql={propertyName:"cellRenderer",cellRenderer:!0},Vl={propertyName:"cellEditor",cellRenderer:!1},Fl={propertyName:"innerRenderer",cellRenderer:!0},El={propertyName:"loadingOverlayComponent",cellRenderer:!1},Rl={propertyName:"noRowsOverlayComponent",cellRenderer:!1},Nl={propertyName:"tooltipComponent",cellRenderer:!1},Al={propertyName:"filter",cellRenderer:!1},Hl={propertyName:"floatingFilterComponent",cellRenderer:!1},Wl={propertyName:"toolPanel",cellRenderer:!1},jl={propertyName:"statusPanel",cellRenderer:!1},Ul={propertyName:"fullWidthCellRenderer",cellRenderer:!0},zl={propertyName:"loadingCellRenderer",cellRenderer:!0},Kl={propertyName:"groupRowRenderer",cellRenderer:!0},Yl={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(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Jl=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Zl=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Xl(a,e),a.prototype.getHeaderCompDetails=function(e,a){return this.getCompDetails(e,kl,"agColumnHeader",a)},a.prototype.getHeaderGroupCompDetails=function(e){var a=e.columnGroup.getColGroupDef();return this.getCompDetails(a,xl,"agColumnGroupHeader",e)},a.prototype.getFullWidthCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Ul,null,e,!0)},a.prototype.getFullWidthLoadingCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,zl,"agLoadingCellRenderer",e,!0)},a.prototype.getFullWidthGroupCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Kl,"agGroupRowRenderer",e,!0)},a.prototype.getFullWidthDetailCellRendererDetails=function(e){return this.getCompDetails(this.gridOptions,Yl,"agDetailCellRenderer",e,!0)},a.prototype.getInnerRendererDetails=function(e,a){return this.getCompDetails(e,Fl,null,a)},a.prototype.getFullWidthGroupRowInnerCellRenderer=function(e,a){return this.getCompDetails(e,Fl,null,a)},a.prototype.getCellRendererDetails=function(e,a){return this.getCompDetails(e,Ql,null,a)},a.prototype.getCellEditorDetails=function(e,a){return this.getCompDetails(e,Vl,"agCellEditor",a,!0)},a.prototype.getFilterDetails=function(e,a,d){return this.getCompDetails(e,Al,d,a,!0)},a.prototype.getDateCompDetails=function(e){return this.getCompDetails(this.gridOptions,Ml,"agDateInput",e,!0)},a.prototype.getLoadingOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,El,"agLoadingOverlay",e,!0)},a.prototype.getNoRowsOverlayCompDetails=function(e){return this.getCompDetails(this.gridOptions,Rl,"agNoRowsOverlay",e,!0)},a.prototype.getTooltipCompDetails=function(e){return this.getCompDetails(e.colDef,Nl,"agTooltipComponent",e,!0)},a.prototype.getSetFilterCellRendererDetails=function(e,a){return this.getCompDetails(e,Ql,null,a)},a.prototype.getFloatingFilterCompDetails=function(e,a,d){return this.getCompDetails(e,Hl,d,a)},a.prototype.getToolPanelCompDetails=function(e,a){return this.getCompDetails(e,Wl,null,a,!0)},a.prototype.getStatusPanelCompDetails=function(e,a){return this.getCompDetails(e,jl,null,a,!0)},a.prototype.getCompDetails=function(e,a,d,t,i){var s=this;void 0===i&&(i=!1);var o=a.propertyName,l=a.cellRenderer,m=this.getCompKeys(e,a,t),u=m.compName,n=m.jsComp,r=m.fwComp,f=m.paramsFromSelector,c=m.popupFromSelector,p=m.popupPositionFromSelector,_=function(e){var a=s.userComponentRegistry.retrieve(o,e);a&&(n=a.componentFromFramework?void 0:a.component,r=a.componentFromFramework?a.component:void 0)};if(null!=u&&_(u),null==n&&null==r&&null!=d&&_(d),n&&l&&!this.agComponentUtils.doesImplementIComponent(n)&&(n=this.agComponentUtils.adaptFunction(o,n)),n||r){var y=this.mergeParamsWithApplicationProvidedParams(e,a,t,f),q=null==n,b=n||r;return{componentFromFramework:q,componentClass:b,params:y,type:a,popupFromSelector:c,popupPositionFromSelector:p,newAgStackInstance:function(){return s.newAgStackInstance(b,q,y,a)}}}i&&console.error("AG Grid: Could not find component ".concat(u,", did you forget to configure this component?"))},a.prototype.getCompKeys=function(e,a,d){var t,i,s,o,l,m,u=this,n=a.propertyName;if(e){var r=e,f=r[n+"Selector"],c=f?f(d):null,p=function(e){if("string"===typeof e)t=e;else if(null!=e&&!0!==e){u.getFrameworkOverrides().isFrameworkComponent(e)?s=e:i=e}};c?(p(c.component),o=c.params,l=c.popup,m=c.popupPosition):p(r[n])}return{compName:t,jsComp:i,fwComp:s,paramsFromSelector:o,popupFromSelector:l,popupPositionFromSelector:m}},a.prototype.newAgStackInstance=function(e,a,d,t){var i,s=t.propertyName;if(!a)i=new e;else{var o=this.componentMetadataProvider.retrieve(s);i=this.frameworkComponentWrapper.wrap(e,o.mandatoryMethodList,o.optionalMethodList,t)}var l=this.initComponent(i,d);return null==l?ri.resolve(i):l.then((function(){return i}))},a.prototype.mergeParamsWithApplicationProvidedParams=function(e,a,d,t){void 0===t&&(t=null);var i={context:this.gridOptionsService.context,columnApi:this.gridOptionsService.columnApi,api:this.gridOptionsService.api};I(i,d);var s=e&&e[a.propertyName+"Params"];"function"===typeof s?I(i,s(d)):"object"===typeof s&&I(i,s);return I(i,t),i},a.prototype.initComponent=function(e,a){if(this.context.createBean(e),null!=e.init)return e.init(a)},a.prototype.getDefaultFloatingFilterType=function(e,a){if(null==e)return null;var d=null,t=this.getCompKeys(e,Al),i=t.compName,s=t.jsComp,o=t.fwComp;i?d=$l.getFloatingFilterType(i):null==s&&null==o&&!0===e.filter&&(d=a());return d},Jl([de("gridOptions")],a.prototype,"gridOptions",void 0),Jl([de("agComponentUtils")],a.prototype,"agComponentUtils",void 0),Jl([de("componentMetadataProvider")],a.prototype,"componentMetadataProvider",void 0),Jl([de("userComponentRegistry")],a.prototype,"userComponentRegistry",void 0),Jl([te("frameworkComponentWrapper")],a.prototype,"frameworkComponentWrapper",void 0),a=Jl([ae("userComponentFactory")],a)}(je),em=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"}(Ao||(Ao={}));var am,dm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),tm=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},im=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.dragEndFunctions=[],a.dragSources=[],a}return dm(a,e),a.prototype.removeAllListeners=function(){this.dragSources.forEach(this.removeListener.bind(this)),this.dragSources.length=0},a.prototype.removeListener=function(e){var a=e.dragSource.eElement,d=e.mouseDownListener;if(a.removeEventListener("mousedown",d),e.touchEnabled){var t=e.touchStartListener;a.removeEventListener("touchstart",t,{passive:!0})}},a.prototype.removeDragSource=function(e){var a=this.dragSources.find((function(a){return a.dragSource===e}));a&&(this.removeListener(a),Le(this.dragSources,a))},a.prototype.isDragging=function(){return this.dragging},a.prototype.addDragSource=function(e){var a=this,d=this.onMouseDown.bind(this,e),t=e.eElement,i=e.includeTouch,s=e.stopPropagationForTouch;t.addEventListener("mousedown",d);var o=null,l=this.gridOptionsService.get("suppressTouch");i&&!l&&(o=function(d){at(d.target)||(d.cancelable&&(d.preventDefault(),s&&d.stopPropagation()),a.onTouchStart(e,d))},t.addEventListener("touchstart",o,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:d,touchStartListener:o,touchEnabled:!!i})},a.prototype.getStartTarget=function(){return this.startTarget},a.prototype.onTouchStart=function(e,a){var d=this;this.currentDragParams=e,this.dragging=!1;var t=a.touches[0];this.touchLastTime=t,this.touchStart=t;var i=function(a){return d.onTouchUp(a,e.eElement)},s=a.target,o=[{target:this.gridOptionsService.getRootNode(),type:"touchmove",listener:function(e){e.cancelable&&e.preventDefault()},options:{passive:!1}},{target:s,type:"touchmove",listener:function(a){return d.onTouchMove(a,e.eElement)},options:{passive:!0}},{target:s,type:"touchend",listener:i,options:{passive:!0}},{target:s,type:"touchcancel",listener:i,options:{passive:!0}}];this.addTemporaryEvents(o),0===e.dragStartPixels&&this.onCommonMove(t,this.touchStart,e.eElement)},a.prototype.onMouseDown=function(e,a){var d=this,t=a;if((!e.skipMouseEvent||!e.skipMouseEvent(a))&&!t._alreadyProcessedByDragService&&(t._alreadyProcessedByDragService=!0,0===a.button)){this.shouldPreventMouseEvent(a)&&a.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=a,this.startTarget=a.target;var i=this.gridOptionsService.getRootNode(),s=[{target:i,type:"mousemove",listener:function(a){return d.onMouseMove(a,e.eElement)}},{target:i,type:"mouseup",listener:function(a){return d.onMouseUp(a,e.eElement)}},{target:i,type:"contextmenu",listener:function(e){return e.preventDefault()}}];this.addTemporaryEvents(s),0===e.dragStartPixels&&this.onMouseMove(a,e.eElement)}},a.prototype.addTemporaryEvents=function(e){e.forEach((function(e){var a=e.target,d=e.type,t=e.listener,i=e.options;a.addEventListener(d,t,i)})),this.dragEndFunctions.push((function(){e.forEach((function(e){var a=e.target,d=e.type,t=e.listener,i=e.options;a.removeEventListener(d,t,i)}))}))},a.prototype.isEventNearStartEvent=function(e,a){var d=this.currentDragParams.dragStartPixels;return ei(e,a,i(d)?d:4)},a.prototype.getFirstActiveTouch=function(e){for(var a=0;at.right-i,this.tickUp=e.clientYt.bottom-i&&!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 a=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(a-e),this.tickDown&&this.setVerticalPosition(a+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}(),om=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),lm=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},mm="ag-list-item-hovered",um=function(e){function a(a,d,t){var i=e.call(this)||this;return i.comp=a,i.virtualList=d,i.params=t,i.currentDragValue=null,i.lastHoveredListItem=null,i}return om(a,e),a.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()},a.prototype.listItemDragStart=function(e){this.currentDragValue=this.params.getCurrentDragValue(e),this.moveBlocked=this.params.isMoveBlocked(this.currentDragValue)},a.prototype.listItemDragEnd=function(){var e=this;window.setTimeout((function(){e.currentDragValue=null,e.moveBlocked=!1}),10)},a.prototype.createDropTarget=function(){var e=this,a={isInterestedIn:function(a){return a===e.params.dragSourceType},getIconName:function(){return Ho[e.moveBlocked?"ICON_NOT_ALLOWED":"ICON_MOVE"]},getContainer:function(){return e.comp.getGui()},onDragging:function(a){return e.onDragging(a)},onDragStop:function(){return e.onDragStop()},onDragLeave:function(){return e.onDragLeave()}};this.dragAndDropService.addDropTarget(a)},a.prototype.createAutoScrollService=function(){var e=this.virtualList.getGui();this.autoScrollService=new sm({scrollContainer:e,scrollAxis:"y",getVerticalPosition:function(){return e.scrollTop},setVerticalPosition:function(a){return e.scrollTop=a}})},a.prototype.onDragging=function(e){if(this.currentDragValue&&!this.moveBlocked){var a=this.getListDragItem(e),d=this.virtualList.getComponentAt(a.rowIndex);if(d){var t=d.getGui().parentElement;this.lastHoveredListItem&&this.lastHoveredListItem.rowIndex===a.rowIndex&&this.lastHoveredListItem.position===a.position||(this.autoScrollService.check(e.event),this.clearHoveredItems(),this.lastHoveredListItem=a,Jd(t,mm),Jd(t,"ag-item-highlight-".concat(a.position)))}}},a.prototype.getListDragItem=function(e){var a=this.virtualList.getGui(),d=parseFloat(window.getComputedStyle(a).paddingTop),t=this.virtualList.getRowHeight(),i=this.virtualList.getScrollTop(),s=Math.max(0,(e.y-d+i)/t),o=this.params.getNumRows(this.comp)-1,l=0|Math.min(o,s);return{rowIndex:l,position:Math.round(s)>s||s>o?"bottom":"top",component:this.virtualList.getComponentAt(l)}},a.prototype.onDragStop=function(){this.moveBlocked||(this.params.moveItem(this.currentDragValue,this.lastHoveredListItem),this.clearHoveredItems(),this.autoScrollService.ensureCleared())},a.prototype.onDragLeave=function(){this.clearHoveredItems(),this.autoScrollService.ensureCleared()},a.prototype.clearHoveredItems=function(){this.virtualList.getGui().querySelectorAll(".".concat(mm)).forEach((function(e){[mm,"ag-item-highlight-top","ag-item-highlight-bottom"].forEach((function(a){e.classList.remove(a)}))})),this.lastHoveredListItem=null},lm([de("dragAndDropService")],a.prototype,"dragAndDropService",void 0),lm([Z],a.prototype,"postConstruct",null),a}(je);!function(e){e[e.Above=0]="Above",e[e.Below=1]="Below"}(am||(am={}));var nm=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};function rm(e){var a=e;return null!=a&&null!=a.getFrameworkComponentInstance?a.getFrameworkComponentInstance():e}var fm,cm=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,a){this.detailGridInfoMap[e]=a},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 a=0;y(this.detailGridInfoMap,(function(d,t){i(t)&&(e(t,a),a++)}))},e.prototype.getDataAsCsv=function(e){if(K.__assertRegistered(W.CsvExportModule,"api.getDataAsCsv",this.context.getGridId()))return this.csvCreator.getDataAsCsv(e)},e.prototype.exportDataAsCsv=function(e){K.__assertRegistered(W.CsvExportModule,"api.exportDataAsCSv",this.context.getGridId())&&this.csvCreator.exportDataAsCsv(e)},e.prototype.assertNotExcelMultiSheet=function(e,a){return!!K.__assertRegistered(W.ExcelExportModule,"api."+e,this.context.getGridId())&&(this.excelCreator.getFactoryMode()!==Ao.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(K.__assertRegistered(W.ExcelExportModule,"api.getSheetDataForExcel",this.context.getGridId()))return this.excelCreator.setFactoryMode(Ao.MULTI_SHEET),this.excelCreator.getSheetDataForExcel(e)},e.prototype.getMultipleSheetsAsExcel=function(e){if(K.__assertRegistered(W.ExcelExportModule,"api.getMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.getMultipleSheetsAsExcel(e)},e.prototype.exportMultipleSheetsAsExcel=function(e){if(K.__assertRegistered(W.ExcelExportModule,"api.exportMultipleSheetsAsExcel",this.context.getGridId()))return this.excelCreator.exportMultipleSheetsAsExcel(e)},e.prototype.setGridAriaProperty=function(e,a){if(e){var d=this.ctrlsService.getGridBodyCtrl().getGui(),t="aria-".concat(e);null===a?d.removeAttribute(t):d.setAttribute(t,a)}},e.prototype.logMissingRowModel=function(e){for(var a=[],d=1;d= 0")):this.serverSideRowModel?this.serverSideRowModel.applyRowData(e.successParams,t,i):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,a){this.clientSideRowModel?this.clientSideRowModel.batchUpdateRowData(e,a):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,a){this.columnModel.setColumnGroupOpened(e,a,"api")},e.prototype.getColumnGroup=function(e,a){return this.columnModel.getColumnGroup(e,a)},e.prototype.getProvidedColumnGroup=function(e){return this.columnModel.getProvidedColumnGroup(e)},e.prototype.getDisplayNameForColumn=function(e,a){return this.columnModel.getDisplayNameForColumn(e,a)||""},e.prototype.getDisplayNameForColumnGroup=function(e,a){return this.columnModel.getDisplayNameForColumnGroup(e,a)||""},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,a){this.columnModel.setColumnVisible(e,a,"api")},e.prototype.setColumnsVisible=function(e,a){this.columnModel.setColumnsVisible(e,a,"api")},e.prototype.setColumnPinned=function(e,a){this.columnModel.setColumnPinned(e,a,"api")},e.prototype.setColumnsPinned=function(e,a){this.columnModel.setColumnsPinned(e,a,"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,a){this.columnModel.moveColumn(e,a,"api")},e.prototype.moveColumnByIndex=function(e,a){this.columnModel.moveColumnByIndex(e,a,"api")},e.prototype.moveColumns=function(e,a){this.columnModel.moveColumns(e,a,"api")},e.prototype.moveRowGroupColumn=function(e,a){this.columnModel.moveRowGroupColumn(e,a)},e.prototype.setColumnAggFunc=function(e,a){this.columnModel.setColumnAggFunc(e,a)},e.prototype.setColumnWidth=function(e,a,d,t){void 0===d&&(d=!0),this.columnModel.setColumnWidths([{key:e,newWidth:a}],!1,d,t)},e.prototype.setColumnWidths=function(e,a,d){void 0===a&&(a=!0),this.columnModel.setColumnWidths(e,!1,a,d)},e.prototype.isPivotMode=function(){return this.columnModel.isPivotMode()},e.prototype.getPivotResultColumn=function(e,a){return this.columnModel.getSecondaryPivotColumn(e,a)},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,a){return this.columnModel.autoSizeColumn(e,a,"api")},e.prototype.autoSizeColumns=function(e,a){this.columnModel.autoSizeColumns({columns:e,skipHeader:a})},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,a){var d;this.updateGridOptions(((d={})[e]=a,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,a){w("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,a)},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){w("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,a){void 0===a&&(a="api"),w("setColumnDefs is deprecated. Please use 'api.setGridOption('columnDefs', newValue)' or 'api.updateGridOptions({ columnDefs: newValue })' instead."),this.gos.updateGridOptions({options:{columnDefs:e},source:a})},e.prototype.setAutoGroupColumnDef=function(e,a){void 0===a&&(a="api"),w("setAutoGroupColumnDef is deprecated. Please use 'api.setGridOption('autoGroupColumnDef', newValue)' or 'api.updateGridOptions({ autoGroupColumnDef: newValue })' instead."),this.gos.updateGridOptions({options:{autoGroupColumnDef:e},source:a})},e.prototype.setDefaultColDef=function(e,a){void 0===a&&(a="api"),w("setDefaultColDef is deprecated. Please use 'api.setGridOption('defaultColDef', newValue)' or 'api.updateGridOptions({ defaultColDef: newValue })' instead."),this.gos.updateGridOptions({options:{defaultColDef:e},source:a})},e.prototype.setColumnTypes=function(e,a){void 0===a&&(a="api"),w("setColumnTypes is deprecated. Please use 'api.setGridOption('columnTypes', newValue)' or 'api.updateGridOptions({ columnTypes: newValue })' instead."),this.gos.updateGridOptions({options:{columnTypes:e},source:a})},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){w("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)},nm([te("csvCreator")],e.prototype,"csvCreator",void 0),nm([te("excelCreator")],e.prototype,"excelCreator",void 0),nm([de("rowRenderer")],e.prototype,"rowRenderer",void 0),nm([de("navigationService")],e.prototype,"navigationService",void 0),nm([de("filterManager")],e.prototype,"filterManager",void 0),nm([de("columnModel")],e.prototype,"columnModel",void 0),nm([de("selectionService")],e.prototype,"selectionService",void 0),nm([de("gridOptionsService")],e.prototype,"gos",void 0),nm([de("valueService")],e.prototype,"valueService",void 0),nm([de("alignedGridsService")],e.prototype,"alignedGridsService",void 0),nm([de("eventService")],e.prototype,"eventService",void 0),nm([de("pinnedRowModel")],e.prototype,"pinnedRowModel",void 0),nm([de("context")],e.prototype,"context",void 0),nm([de("rowModel")],e.prototype,"rowModel",void 0),nm([de("sortController")],e.prototype,"sortController",void 0),nm([de("paginationProxy")],e.prototype,"paginationProxy",void 0),nm([de("focusService")],e.prototype,"focusService",void 0),nm([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),nm([te("rangeService")],e.prototype,"rangeService",void 0),nm([te("clipboardService")],e.prototype,"clipboardService",void 0),nm([te("aggFuncService")],e.prototype,"aggFuncService",void 0),nm([de("menuFactory")],e.prototype,"menuFactory",void 0),nm([te("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),nm([de("valueCache")],e.prototype,"valueCache",void 0),nm([de("animationFrameService")],e.prototype,"animationFrameService",void 0),nm([te("statusBarService")],e.prototype,"statusBarService",void 0),nm([te("chartService")],e.prototype,"chartService",void 0),nm([te("undoRedoService")],e.prototype,"undoRedoService",void 0),nm([te("rowNodeBlockLoader")],e.prototype,"rowNodeBlockLoader",void 0),nm([te("ssrmTransactionManager")],e.prototype,"serverSideTransactionManager",void 0),nm([de("ctrlsService")],e.prototype,"ctrlsService",void 0),nm([de("overlayService")],e.prototype,"overlayService",void 0),nm([te("sideBarService")],e.prototype,"sideBarService",void 0),nm([de("stateService")],e.prototype,"stateService",void 0),nm([de("expansionService")],e.prototype,"expansionService",void 0),nm([de("apiEventService")],e.prototype,"apiEventService",void 0),nm([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),nm([Z],e.prototype,"init",null),e=nm([ae("gridApi")],e)}(),pm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),_m=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ym=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.quickFilter=null,a.quickFilterParts=null,a}var d;return pm(a,e),d=a,a.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(a){return e.setQuickFilter(a.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()}))},a.prototype.isQuickFilterPresent=function(){return null!==this.quickFilter},a.prototype.doesRowPassQuickFilter=function(e){var a=this,d=this.gridOptionsService.get("cacheQuickFilter");return this.matcher?this.doesRowPassQuickFilterMatcher(d,e):this.quickFilterParts.every((function(t){return d?a.doesRowPassQuickFilterCache(e,t):a.doesRowPassQuickFilterNoCache(e,t)}))},a.prototype.resetQuickFilterCache=function(){this.rowModel.forEachNode((function(e){return e.quickFilterAggregateText=null}))},a.prototype.setQuickFilterParts=function(){var e=this.quickFilter,a=this.parser;this.quickFilterParts=e?a?a(e):e.split(" "):null},a.prototype.parseQuickFilter=function(e){return i(e)?this.gridOptionsService.isRowModelType("clientSide")?e.toUpperCase():(console.warn("AG Grid - Quick filtering only works with the Client-Side Row Model"),null):null},a.prototype.setQuickFilter=function(e){if(null==e||"string"===typeof e){var a=this.parseQuickFilter(e);this.quickFilter!==a&&(this.quickFilter=a,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))},a.prototype.setQuickFilterParserAndMatcher=function(){var e=this.gridOptionsService.get("quickFilterParser"),a=this.gridOptionsService.get("quickFilterMatcher"),t=e!==this.parser||a!==this.matcher;this.parser=e,this.matcher=a,t&&(this.setQuickFilterParts(),this.dispatchEvent({type:d.EVENT_QUICK_FILTER_CHANGED}))},a.prototype.onIncludeHiddenColumnsInQuickFilterChanged=function(){this.columnModel.refreshQuickFilterColumns(),this.resetQuickFilterCache(),this.isQuickFilterPresent()&&this.dispatchEvent({type:d.EVENT_QUICK_FILTER_CHANGED})},a.prototype.doesRowPassQuickFilterNoCache=function(e,a){var d=this;return this.columnModel.getAllColumnsForQuickFilter().some((function(t){var s=d.getQuickFilterTextForColumn(t,e);return i(s)&&s.indexOf(a)>=0}))},a.prototype.doesRowPassQuickFilterCache=function(e,a){return this.checkGenerateQuickFilterAggregateText(e),e.quickFilterAggregateText.indexOf(a)>=0},a.prototype.doesRowPassQuickFilterMatcher=function(e,a){var d;e?(this.checkGenerateQuickFilterAggregateText(a),d=a.quickFilterAggregateText):d=this.getQuickFilterAggregateText(a);var t=this.quickFilterParts;return(0,this.matcher)(t,d)},a.prototype.checkGenerateQuickFilterAggregateText=function(e){e.quickFilterAggregateText||(e.quickFilterAggregateText=this.getQuickFilterAggregateText(e))},a.prototype.getQuickFilterTextForColumn=function(e,a){var d=this.valueService.getValue(e,a,!0),t=e.getColDef();if(t.getQuickFilterText){var s={value:d,node:a,data:a.data,column:e,colDef:t,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context};d=t.getQuickFilterText(s)}return i(d)?d.toString().toUpperCase():null},a.prototype.getQuickFilterAggregateText=function(e){var a=this,t=[];return this.columnModel.getAllColumnsForQuickFilter().forEach((function(d){var s=a.getQuickFilterTextForColumn(d,e);i(s)&&t.push(s)})),t.join(d.QUICK_FILTER_SEPARATOR)},a.EVENT_QUICK_FILTER_CHANGED="quickFilterChanged",a.QUICK_FILTER_SEPARATOR="\n",_m([de("valueService")],a.prototype,"valueService",void 0),_m([de("columnModel")],a.prototype,"columnModel",void 0),_m([de("rowModel")],a.prototype,"rowModel",void 0),_m([Z],a.prototype,"postConstruct",null),a=d=_m([ae("quickFilterService")],a)}(je),qm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),bm=function(){return bm=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Pm=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.allColumnFilters=new Map,a.allColumnListeners=new Map,a.activeAggregateFilters=[],a.activeColumnFilters=[],a.processingFilterChange=!1,a.filterModelUpdateQueue=[],a.advancedFilterModelUpdateQueue=[],a}return qm(a,e),a.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(a){return e.setAdvancedFilterModel(a.currentValue)})),this.addManagedListener(this.eventService,Je.EVENT_ADVANCED_FILTER_ENABLED_CHANGED,(function(a){var d=a.enabled;return e.onAdvancedFilterEnabledChanged(d)})),this.addManagedListener(this.eventService,Je.EVENT_DATA_TYPES_INFERRED,(function(){return e.processFilterModelUpdateQueue()})),this.addManagedListener(this.quickFilterService,ym.EVENT_QUICK_FILTER_CHANGED,(function(){return e.onFilterChanged({source:"quickFilter"})}))},a.prototype.isExternalFilterPresentCallback=function(){var e=this.gridOptionsService.getCallback("isExternalFilterPresent");return"function"===typeof e&&e({})},a.prototype.doesExternalFilterPass=function(e){var a=this.gridOptionsService.get("doesExternalFilterPass");return"function"===typeof a&&a(e)},a.prototype.setFilterModel=function(e,a){var d=this;if(void 0===a&&(a="api"),this.isAdvancedFilterEnabled())this.warnAdvancedFilters();else if(this.dataTypeService.isPendingInference())this.filterModelUpdateQueue.push({model:e,source:a});else{var t=[],i=this.getFilterModel();if(e){var s=ti(Object.keys(e));this.allColumnFilters.forEach((function(a,i){var o=e[i];t.push(d.setModelOnFilterWrapper(a.filterPromise,o)),s.delete(i)})),s.forEach((function(a){var i=d.columnModel.getPrimaryColumn(a)||d.columnModel.getGridColumn(a);if(i)if(i.isFilterAllowed()){var s=d.getOrCreateFilterWrapper(i,"NO_UI");s?t.push(d.setModelOnFilterWrapper(s.filterPromise,e[a])):console.warn("AG-Grid: setFilterModel() - unable to fully apply model, unable to create filter for colId: "+a)}else console.warn("AG Grid: setFilterModel() - unable to fully apply model, filtering disabled for colId: "+a);else console.warn("AG Grid: setFilterModel() - no column found for colId: "+a)}))}else this.allColumnFilters.forEach((function(e){t.push(d.setModelOnFilterWrapper(e.filterPromise,null))}));ri.all(t).then((function(){var e=d.getFilterModel(),t=[];d.allColumnFilters.forEach((function(a,d){var s=i?i[d]:null,o=e?e[d]:null;li.jsonEquals(s,o)||t.push(a.column)})),t.length>0&&d.onFilterChanged({columns:t,source:a})}))}},a.prototype.setModelOnFilterWrapper=function(e,a){return new ri((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(a)||ri.resolve()).then((function(){return d()}))}))}))},a.prototype.getFilterModel=function(){var e={};return this.allColumnFilters.forEach((function(a,d){var t=a.filterPromise.resolveNow(null,(function(e){return e}));if(null==t)return null;if("function"===typeof t.getModel){var s=t.getModel();i(s)&&(e[d]=s)}else console.warn("AG Grid: filter API missing getModel method, which is needed for getFilterModel")})),e},a.prototype.isColumnFilterPresent=function(){return this.activeColumnFilters.length>0},a.prototype.isAggregateFilterPresent=function(){return!!this.activeAggregateFilters.length},a.prototype.isExternalFilterPresent=function(){return this.externalFilterPresent},a.prototype.isChildFilterPresent=function(){return this.isColumnFilterPresent()||this.isQuickFilterPresent()||this.isExternalFilterPresent()||this.isAdvancedFilterPresent()},a.prototype.isAdvancedFilterPresent=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isFilterPresent()},a.prototype.onAdvancedFilterEnabledChanged=function(e){var a,d=this;e?this.allColumnFilters.size&&(this.allColumnFilters.forEach((function(e){return d.disposeFilterWrapper(e,"advancedFilterEnabled")})),this.onFilterChanged({source:"advancedFilter"})):(null===(a=this.advancedFilterService)||void 0===a?void 0:a.isFilterPresent())&&(this.advancedFilterService.setModel(null),this.onFilterChanged({source:"advancedFilter"}))},a.prototype.isAdvancedFilterEnabled=function(){var e;return null===(e=this.advancedFilterService)||void 0===e?void 0:e.isEnabled()},a.prototype.isAdvancedFilterHeaderActive=function(){return this.isAdvancedFilterEnabled()&&this.advancedFilterService.isHeaderActive()},a.prototype.doAggregateFiltersPass=function(e,a){return this.doColumnFiltersPass(e,a,!0)},a.prototype.updateActiveFilters=function(){var e=this;this.activeColumnFilters.length=0,this.activeAggregateFilters.length=0;var a=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(t){if(t.filterPromise.resolveNow(!1,a)){var i=t.filterPromise.resolveNow(null,(function(e){return e}));!function(a){if(!a.isPrimary())return!0;var t=!e.columnModel.isPivotActive();return!(!a.isValueActive()||!t)&&(!!e.columnModel.isPivotMode()||d)}(t.column)?e.activeColumnFilters.push(i):e.activeAggregateFilters.push(i)}}))},a.prototype.updateFilterFlagInColumns=function(e,a){this.allColumnFilters.forEach((function(d){var t=d.filterPromise.resolveNow(!1,(function(e){return e.isFilterActive()}));d.column.setFilterActive(t,e,a)}))},a.prototype.isAnyFilterPresent=function(){return this.isQuickFilterPresent()||this.isColumnFilterPresent()||this.isAggregateFilterPresent()||this.isExternalFilterPresent()},a.prototype.doColumnFiltersPass=function(e,a,d){for(var t=e.data,i=e.aggData,s=d?this.activeAggregateFilters:this.activeColumnFilters,o=d?i:t,l=0;l0?this.onFilterChanged({columns:a,source:"api"}):this.updateDependantFilters()},a.prototype.updateDependantFilters=function(){var e=this,a=this.columnModel.getGroupAutoColumns();null===a||void 0===a||a.forEach((function(a){"agGroupColumnFilter"===a.getColDef().filter&&e.getOrCreateFilterWrapper(a,"NO_UI")}))},a.prototype.isFilterAllowed=function(e){var a,d;if(this.isAdvancedFilterEnabled())return!1;if(!e.isFilterAllowed())return!1;var t=this.allColumnFilters.get(e.getColId());return null===(d=null===(a=null===t||void 0===t?void 0:t.filterPromise)||void 0===a?void 0:a.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},a.prototype.getFloatingFilterCompDetails=function(e,a){var d=this,t=e.getColDef(),i=this.createFilterParams(e,t),s=this.userComponentFactory.mergeParamsWithApplicationProvidedParams(t,Al,i),o=this.userComponentFactory.getDefaultFloatingFilterType(t,(function(){return d.getDefaultFloatingFilter(e)}));null==o&&(o="agReadOnlyFloatingFilter");var l={column:e,filterParams:s,currentParentModel:function(){return d.getCurrentFloatingFilterParentModel(e)},parentFilterInstance:function(a){var t=d.getFilterComponent(e,"NO_UI");null!=t&&t.then((function(e){a(rm(e))}))},showParentFilter:a,suppressFilterButton:!1};return this.userComponentFactory.getFloatingFilterCompDetails(t,l,o)},a.prototype.getCurrentFloatingFilterParentModel=function(e){var a=this.getFilterComponent(e,"NO_UI",!1);return a?a.resolveNow(null,(function(e){return e&&e.getModel()})):null},a.prototype.destroyFilter=function(e,a){void 0===a&&(a="api");var d=e.getColId(),t=this.allColumnFilters.get(d);this.disposeColumnListener(d),t&&(this.disposeFilterWrapper(t,a),this.onFilterChanged({columns:[e],source:"api"}))},a.prototype.disposeColumnListener=function(e){var a=this.allColumnListeners.get(e);a&&(this.allColumnListeners.delete(e),a())},a.prototype.disposeFilterWrapper=function(e,a){var d=this;e.filterPromise.then((function(t){d.getContext().destroyBean(t),e.column.setFilterActive(!1,"filterDestroyed"),d.allColumnFilters.delete(e.column.getColId());var i={type:Je.EVENT_FILTER_DESTROYED,source:a,column:e.column};d.eventService.dispatchEvent(i)}))},a.prototype.filterModifiedCallbackFactory=function(e,a){var d=this;return function(){var t={type:Je.EVENT_FILTER_MODIFIED,column:a,filterInstance:e};d.eventService.dispatchEvent(t)}},a.prototype.filterChangedCallbackFactory=function(e,a){var d=this;return function(t){var i,s=null!==(i=null===t||void 0===t?void 0:t.source)&&void 0!==i?i:"api",o={filter:e,additionalEventAttributes:t,columns:[a],source:s};d.callOnFilterChangedOutsideRenderCycle(o)}},a.prototype.checkDestroyFilter=function(e){var a=this,d=this.allColumnFilters.get(e);if(d){var t=d.column,i=(t.isFilterAllowed()?this.createFilterInstance(t):{compDetails:null}).compDetails;if(this.areFilterCompsDifferent(d.compDetails,i))this.destroyFilter(t,"columnChanged");else{var s=t.getColDef().filterParams;d.filterPromise?d.filterPromise.then((function(e){!(null===e||void 0===e?void 0:e.refresh)||e.refresh(bm(bm(bm({},a.createFilterParams(t,t.getColDef())),{filterModifiedCallback:a.filterModifiedCallbackFactory(e,t),filterChangedCallback:a.filterChangedCallbackFactory(e,t),doesRowPassOtherFilter:function(d){return a.doesRowPassOtherFilters(e,d)}}),s))||a.destroyFilter(t,"columnChanged")})):this.destroyFilter(t,"columnChanged")}}},a.prototype.setColumnFilterWrapper=function(e,a){var d=this,t=e.getColId();this.allColumnFilters.set(t,a),this.allColumnListeners.set(t,this.addManagedListener(e,pe.EVENT_COL_DEF_CHANGED,(function(){return d.checkDestroyFilter(t)})))},a.prototype.areFilterCompsDifferent=function(e,a){if(!a||!e)return!0;var d=e.componentClass,t=a.componentClass;return!(d===t||(null===d||void 0===d?void 0:d.render)&&(null===t||void 0===t?void 0:t.render)&&d.render===t.render)},a.prototype.getAdvancedFilterModel=function(){return this.isAdvancedFilterEnabled()?this.advancedFilterService.getModel():null},a.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"})))},a.prototype.showAdvancedFilterBuilder=function(e){this.isAdvancedFilterEnabled()&&this.advancedFilterService.getCtrl().toggleFilterBuilder(e,!0)},a.prototype.updateAdvancedFilterColumns=function(){this.isAdvancedFilterEnabled()&&this.advancedFilterService.updateValidity()&&this.onFilterChanged({source:"advancedFilter"})},a.prototype.hasFloatingFilters=function(){return!this.isAdvancedFilterEnabled()&&this.columnModel.getAllGridColumns().some((function(e){return e.getColDef().floatingFilter}))},a.prototype.getFilterInstance=function(e,a){if(!this.isAdvancedFilterEnabled()){var d=this.getFilterInstanceImpl(e,(function(e){if(a){var d=rm(e);a(d)}}));return rm(d)}this.warnAdvancedFilters()},a.prototype.getFilterInstanceImpl=function(e,a){var d=this.columnModel.getPrimaryColumn(e);if(d){var t=this.getFilterComponent(d,"NO_UI"),i=t&&t.resolveNow(null,(function(e){return e}));return i?setTimeout(a,0,i):t&&t.then((function(e){a(e)})),i}},a.prototype.warnAdvancedFilters=function(){w("Column Filter API methods have been disabled as Advanced Filters are enabled.")},a.prototype.setupAdvancedFilterHeaderComp=function(e){var a;null===(a=this.advancedFilterService)||void 0===a||a.getCtrl().setupHeaderComp(e)},a.prototype.getHeaderRowCount=function(){return this.isAdvancedFilterHeaderActive()?1:0},a.prototype.getHeaderHeight=function(){return this.isAdvancedFilterHeaderActive()?this.advancedFilterService.getCtrl().getHeaderHeight():0},a.prototype.processFilterModelUpdateQueue=function(){var e=this;this.filterModelUpdateQueue.forEach((function(a){var d=a.model,t=a.source;return e.setFilterModel(d,t)})),this.filterModelUpdateQueue=[],this.advancedFilterModelUpdateQueue.forEach((function(a){return e.setAdvancedFilterModel(a)})),this.advancedFilterModelUpdateQueue=[]},a.prototype.destroy=function(){var a=this;e.prototype.destroy.call(this),this.allColumnFilters.forEach((function(e){return a.disposeFilterWrapper(e,"gridDestroyed")})),this.allColumnListeners.clear()},Cm([de("valueService")],a.prototype,"valueService",void 0),Cm([de("columnModel")],a.prototype,"columnModel",void 0),Cm([de("rowModel")],a.prototype,"rowModel",void 0),Cm([de("userComponentFactory")],a.prototype,"userComponentFactory",void 0),Cm([de("rowRenderer")],a.prototype,"rowRenderer",void 0),Cm([de("dataTypeService")],a.prototype,"dataTypeService",void 0),Cm([de("quickFilterService")],a.prototype,"quickFilterService",void 0),Cm([te("advancedFilterService")],a.prototype,"advancedFilterService",void 0),Cm([Z],a.prototype,"init",null),a=Cm([ae("filterManager")],a)}(je),hm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Tm=function(e){function a(a,d){var t=e.call(this,a)||this;return t.ctrl=d,t}return hm(a,e),a.prototype.getCtrl=function(){return this.ctrl},a}(hi),Lm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Im=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Om=function(e){function a(d){return e.call(this,a.TEMPLATE,d)||this}return Lm(a,e),a.prototype.postConstruct=function(){var e=this,a=this.getGui(),d={addOrRemoveCssClass:function(a,d){return e.addOrRemoveCssClass(a,d)},addOrRemoveBodyCssClass:function(a,d){return e.eFloatingFilterBody.classList.toggle(a,d)},setButtonWrapperDisplayed:function(a){return dt(e.eButtonWrapper,a)},setCompDetails:function(a){return e.setCompDetails(a)},getFloatingFilterComp:function(){return e.compPromise},setWidth:function(e){return a.style.width=e},setMenuIcon:function(a){return e.eButtonShowMainFilter.appendChild(a)}};this.ctrl.setComp(d,a,this.eButtonShowMainFilter,this.eFloatingFilterBody)},a.prototype.setCompDetails=function(e){var a=this;if(!e)return this.destroyFloatingFilterComp(),void(this.compPromise=null);this.compPromise=e.newAgStackInstance(),this.compPromise.then((function(e){return a.afterCompCreated(e)}))},a.prototype.destroyFloatingFilterComp=function(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))},a.prototype.afterCompCreated=function(e){e&&(this.isAlive()?(this.destroyFloatingFilterComp(),this.floatingFilterComp=e,this.eFloatingFilterBody.appendChild(e.getGui()),e.afterGuiAttached&&e.afterGuiAttached()):this.destroyBean(e))},a.TEMPLATE='
\n
\n \n
',Im([Li("eFloatingFilterBody")],a.prototype,"eFloatingFilterBody",void 0),Im([Li("eButtonWrapper")],a.prototype,"eButtonWrapper",void 0),Im([Li("eButtonShowMainFilter")],a.prototype,"eButtonShowMainFilter",void 0),Im([Z],a.prototype,"postConstruct",null),Im([ee],a.prototype,"destroyFloatingFilterComp",null),a}(Tm),Bm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Sm=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e.AUTO_HEIGHT="ag-layout-auto-height",e.NORMAL="ag-layout-normal",e.PRINT="ag-layout-print"}(fm||(fm={}));var Dm,gm,Gm=function(e){function a(a){var d=e.call(this)||this;return d.view=a,d}return Bm(a,e),a.prototype.postConstruct=function(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()},a.prototype.updateLayoutClasses=function(){var e=this.getDomLayout(),a={autoHeight:"autoHeight"===e,normal:"normal"===e,print:"print"===e},d=a.autoHeight?fm.AUTO_HEIGHT:a.print?fm.PRINT:fm.NORMAL;this.view.updateLayoutClasses(d,a)},a.prototype.getDomLayout=function(){var e,a=null!==(e=this.gridOptionsService.get("domLayout"))&&void 0!==e?e:"normal";return-1===["normal","print","autoHeight"].indexOf(a)?(w("".concat(a," is not valid for DOM Layout, valid values are 'normal', 'autoHeight', 'print'.")),"normal"):a},Sm([Z],a.prototype,"postConstruct",null),a}(je),wm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),vm=function(){return vm=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e[e.Vertical=0]="Vertical",e[e.Horizontal=1]="Horizontal"}(Dm||(Dm={})),function(e){e[e.Container=0]="Container",e[e.FakeContainer=1]="FakeContainer"}(gm||(gm={}));var km,xm=function(e){function a(a){var d=e.call(this)||this;return d.lastScrollSource=[null,null],d.scrollLeft=-1,d.nextScrollTop=-1,d.scrollTop=-1,d.eBodyViewport=a,d.resetLastHScrollDebounced=R((function(){return d.lastScrollSource[Dm.Horizontal]=null}),500),d.resetLastVScrollDebounced=R((function(){return d.lastScrollSource[Dm.Vertical]=null}),500),d}return wm(a,e),a.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(a){e.centerRowContainerCtrl=a.centerRowContainerCtrl,e.onDisplayedColumnsWidthChanged(),e.addScrollListener()}))},a.prototype.addScrollListener=function(){var e=this.ctrlsService.getFakeHScrollComp(),a=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"),t=d?R(this.onVScroll.bind(this),100):this.onVScroll.bind(this),i=d?R(this.onFakeVScroll.bind(this),100):this.onFakeVScroll.bind(this);this.addManagedListener(this.eBodyViewport,"scroll",t),a.onScrollCallback(i)},a.prototype.onDisplayedColumnsWidthChanged=function(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()},a.prototype.horizontallyScrollHeaderCenterAndFloatingCenter=function(e){if(!(null==this.centerRowContainerCtrl)){void 0===e&&(e=this.centerRowContainerCtrl.getCenterViewportScrollLeft());var a=this.enableRtl?e:-e,d=this.ctrlsService.getTopCenterRowContainerCtrl(),t=this.ctrlsService.getStickyTopCenterRowContainerCtrl(),i=this.ctrlsService.getBottomCenterRowContainerCtrl(),s=this.ctrlsService.getFakeHScrollComp();this.ctrlsService.getHeaderRowContainerCtrl().setHorizontalScroll(-a),i.setContainerTranslateX(a),d.setContainerTranslateX(a),t.setContainerTranslateX(a);var o=this.centerRowContainerCtrl.getViewportElement(),l=this.lastScrollSource[Dm.Horizontal]===gm.Container;e=Math.abs(e),l?s.setScrollPosition(e):pt(o,e,this.enableRtl)}},a.prototype.isControllingScroll=function(e,a){return null==this.lastScrollSource[a]?(this.lastScrollSource[a]=e,!0):this.lastScrollSource[a]===e},a.prototype.onFakeHScroll=function(){this.isControllingScroll(gm.FakeContainer,Dm.Horizontal)&&this.onHScrollCommon(gm.FakeContainer)},a.prototype.onHScroll=function(){this.isControllingScroll(gm.Container,Dm.Horizontal)&&this.onHScrollCommon(gm.Container)},a.prototype.onHScrollCommon=function(e){var a,d=this.centerRowContainerCtrl.getViewportElement(),t=d.scrollLeft;this.shouldBlockScrollUpdate(Dm.Horizontal,t,!0)||(a=e===gm.Container?ct(d,this.enableRtl):this.ctrlsService.getFakeHScrollComp().getScrollPosition(),this.doHorizontalScroll(Math.round(a)),this.resetLastHScrollDebounced())},a.prototype.onFakeVScroll=function(){this.isControllingScroll(gm.FakeContainer,Dm.Vertical)&&this.onVScrollCommon(gm.FakeContainer)},a.prototype.onVScroll=function(){this.isControllingScroll(gm.Container,Dm.Vertical)&&this.onVScrollCommon(gm.Container)},a.prototype.onVScrollCommon=function(e){var a;a=e===gm.Container?this.eBodyViewport.scrollTop:this.ctrlsService.getFakeVScrollComp().getScrollPosition(),this.shouldBlockScrollUpdate(Dm.Vertical,a,!0)||(this.animationFrameService.setScrollTop(a),this.nextScrollTop=a,e===gm.Container?this.ctrlsService.getFakeVScrollComp().setScrollPosition(a):this.eBodyViewport.scrollTop=a,this.gridOptionsService.get("suppressAnimationFrame")?this.scrollGridIfNeeded():this.animationFrameService.schedule(),this.resetLastVScrollDebounced())},a.prototype.doHorizontalScroll=function(e){var a=this.ctrlsService.getFakeHScrollComp().getScrollPosition();this.scrollLeft===e&&e===a||(this.scrollLeft=e,this.fireScrollEvent(Dm.Horizontal),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowContainerCtrl.onHorizontalViewportChanged(!0))},a.prototype.fireScrollEvent=function(e){var a=this,d={type:Je.EVENT_BODY_SCROLL,direction:e===Dm.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=vm(vm({},d),{type:Je.EVENT_BODY_SCROLL_END});a.eventService.dispatchEvent(e)}),100)},a.prototype.shouldBlockScrollUpdate=function(e,a,d){return void 0===d&&(d=!1),!(d&&!gd())&&(e===Dm.Vertical?this.shouldBlockVerticalScroll(a):this.shouldBlockHorizontalScroll(a))},a.prototype.shouldBlockVerticalScroll=function(e){var a=lt(this.eBodyViewport),d=this.eBodyViewport.scrollHeight;return e<0||e+a>d},a.prototype.shouldBlockHorizontalScroll=function(e){var a=this.centerRowContainerCtrl.getCenterWidth(),d=this.centerRowContainerCtrl.getViewportElement().scrollWidth;if(this.enableRtl&&ft()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+a>d},a.prototype.redrawRowsAfterScroll=function(){this.fireScrollEvent(Dm.Vertical)},a.prototype.checkScrollLeft=function(){this.scrollLeft!==this.centerRowContainerCtrl.getCenterViewportScrollLeft()&&this.onHScrollCommon(gm.Container)},a.prototype.scrollGridIfNeeded=function(){var e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e},a.prototype.setHorizontalScrollPosition=function(e,a){void 0===a&&(a=!1);var d=this.centerRowContainerCtrl.getViewportElement().scrollWidth-this.centerRowContainerCtrl.getCenterWidth();!a&&this.shouldBlockScrollUpdate(Dm.Horizontal,e)&&(e=this.enableRtl&&ft()?e>0?0:d:Math.min(Math.max(e,0),d)),pt(this.centerRowContainerCtrl.getViewportElement(),Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)},a.prototype.setVerticalScrollPosition=function(e){this.eBodyViewport.scrollTop=e},a.prototype.getVScrollPosition=function(){return{top:this.eBodyViewport.scrollTop,bottom:this.eBodyViewport.scrollTop+this.eBodyViewport.offsetHeight}},a.prototype.getHScrollPosition=function(){return this.centerRowContainerCtrl.getHScrollPosition()},a.prototype.isHorizontalScrollShowing=function(){return this.centerRowContainerCtrl.isHorizontalScrollShowing()},a.prototype.scrollHorizontally=function(e){var a=this.centerRowContainerCtrl.getViewportElement().scrollLeft;return this.setHorizontalScrollPosition(a+e),this.centerRowContainerCtrl.getViewportElement().scrollLeft-a},a.prototype.scrollToTop=function(){this.eBodyViewport.scrollTop=0},a.prototype.ensureNodeVisible=function(e,a){void 0===a&&(a=null);for(var d=this.rowModel.getRowCount(),t=-1,i=0;i=0&&this.ensureIndexVisible(t,a)},a.prototype.ensureIndexVisible=function(e,a){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 t,i=this.ctrlsService.getGridBodyCtrl().getStickyTopHeight(),s=this.paginationProxy.getRow(e);do{var o=s.rowTop,l=s.rowHeight,m=this.paginationProxy.getPixelOffset(),u=s.rowTop-m,n=u+s.rowHeight,r=this.getVScrollPosition(),f=this.heightScaler.getDivStretchOffset(),c=r.top+f,p=r.bottom+f,_=p-c,y=this.heightScaler.getScrollPositionForPixel(u),q=this.heightScaler.getScrollPositionForPixel(n-_),b=Math.min((y+q)/2,u),C=null;"top"===a?C=y:"bottom"===a?C=q:"middle"===a?C=b:c+i>u?C=y-i:po:ts}},a.prototype.getColumnBounds=function(e){var a=this.enableRtl,d=this.columnModel.getBodyContainerWidth(),t=e.getActualWidth(),i=e.getLeft(),s=a?-1:1,o=a?d-i:i;return{colLeft:o,colMiddle:o+t/2*s,colRight:o+t*s}},a.prototype.getViewportBounds=function(){var e=this.centerRowContainerCtrl.getCenterWidth(),a=this.centerRowContainerCtrl.getCenterViewportScrollLeft();return{start:a,end:e+a,width:e}},Mm([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Mm([de("animationFrameService")],a.prototype,"animationFrameService",void 0),Mm([de("paginationProxy")],a.prototype,"paginationProxy",void 0),Mm([de("rowModel")],a.prototype,"rowModel",void 0),Mm([de("rowContainerHeightService")],a.prototype,"heightScaler",void 0),Mm([de("rowRenderer")],a.prototype,"rowRenderer",void 0),Mm([de("columnModel")],a.prototype,"columnModel",void 0),Mm([Z],a.prototype,"postConstruct",null),a}(je),Qm=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Vm=function(){return Vm=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Em=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Rm=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;ithis.paginationProxy.getCurrentPageHeight()||(s=this.rowModel.getRowIndexAtPixel(i),d=this.rowModel.getRow(s)),a.vDirection){case Es.Down:t="down";break;case Es.Up:t="up";break;default:t=null}return{type:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,event:a.event,node:a.dragItem.rowNode,nodes:a.dragItem.rowNodes,overIndex:s,overNode:d,y:i,vDirection:t}},a.prototype.dispatchGridEvent=function(e,a){var d=this.draggingToRowDragEvent(e,a);this.eventService.dispatchEvent(d)},a.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)},a.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)},a.prototype.stopDragging=function(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach((function(e){e.setDragging(!1)}))},Fm([de("dragAndDropService")],a.prototype,"dragAndDropService",void 0),Fm([de("rowModel")],a.prototype,"rowModel",void 0),Fm([de("paginationProxy")],a.prototype,"paginationProxy",void 0),Fm([de("columnModel")],a.prototype,"columnModel",void 0),Fm([de("focusService")],a.prototype,"focusService",void 0),Fm([de("sortController")],a.prototype,"sortController",void 0),Fm([de("filterManager")],a.prototype,"filterManager",void 0),Fm([de("selectionService")],a.prototype,"selectionService",void 0),Fm([de("mouseEventService")],a.prototype,"mouseEventService",void 0),Fm([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Fm([te("rangeService")],a.prototype,"rangeService",void 0),Fm([Z],a.prototype,"postConstruct",null),a}(je),Am=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Hm=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e.ANIMATION_ON="ag-row-animation",e.ANIMATION_OFF="ag-row-no-animation"}(km||(km={}));var Wm,jm,Um="ag-force-vertical-scroll",zm=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.stickyTopHeight=0,a}return Am(a,e),a.prototype.getScrollFeature=function(){return this.bodyScrollFeature},a.prototype.getBodyViewportElement=function(){return this.eBodyViewport},a.prototype.setComp=function(e,a,d,t,i,s){var o=this;this.comp=e,this.eGridBody=a,this.eBodyViewport=d,this.eTop=t,this.eBottom=i,this.eStickyTop=s,this.setCellTextSelection(this.gridOptionsService.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",(function(e){return o.setCellTextSelection(e.currentValue)})),this.createManagedBean(new Gm(this.comp)),this.bodyScrollFeature=this.createManagedBean(new xm(this.eBodyViewport)),this.addRowDragListener(),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([t,d,i,s]),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.filterManager.setupAdvancedFilterHeaderComp(t),this.ctrlsService.registerGridBodyCtrl(this)},a.prototype.getComp=function(){return this.comp},a.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))},a.prototype.addFocusListeners=function(e){var a=this;e.forEach((function(e){a.addManagedListener(e,"focusin",(function(a){var d=st(a.target,"ag-root",e);e.classList.toggle("ag-has-focus",!d)})),a.addManagedListener(e,"focusout",(function(a){var d=a.target,t=a.relatedTarget,i=e.contains(t),s=st(t,"ag-root",e);st(d,"ag-root",e)||i&&!s||e.classList.remove("ag-has-focus")}))}))},a.prototype.setColumnMovingCss=function(e){this.comp.setColumnMovingCss("ag-column-moving",e)},a.prototype.setCellTextSelection=function(e){void 0===e&&(e=!1),this.comp.setCellSelectableCss("ag-selectable",e)},a.prototype.onScrollVisibilityChanged=function(){var e=this,a=this.scrollVisibleService.isVerticalScrollShowing();this.setVerticalScrollPaddingVisible(a),this.setStickyTopWidth(a);var d=a&&this.gridOptionsService.getScrollbarWidth()||0,t=Vd()?16:0,i="calc(100% + ".concat(d+t,"px)");this.animationFrameService.requestAnimationFrame((function(){return e.comp.setBodyViewportWidth(i)}))},a.prototype.onGridColumnsChanged=function(){var e=this.columnModel.getAllGridColumns();this.comp.setColumnCount(e.length)},a.prototype.disableBrowserDragging=function(){this.addManagedListener(this.eGridBody,"dragstart",(function(e){if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}))},a.prototype.addStopEditingWhenGridLosesFocus=function(){var e=this;if(this.gridOptionsService.get("stopEditingWhenCellsLoseFocus")){var a=function(a){var t=a.relatedTarget;if(null!==wd(t)){var i=d.some((function(e){return e.contains(t)}))&&e.mouseEventService.isElementInThisGrid(t);if(!i){var s=e.popupService;i=s.getActivePopups().some((function(e){return e.contains(t)}))||s.isElementWithinCustomPopup(t)}i||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",a)}))}},a.prototype.updateRowCount=function(){var e=this.headerNavigationService.getHeaderRowCount()+this.filterManager.getHeaderRowCount(),a=this.rowModel.isLastRowIndexKnown()?this.rowModel.getRowCount():-1,d=-1===a?-1:e+a;this.comp.setRowCount(d)},a.prototype.registerBodyViewportResizeListener=function(e){this.comp.registerBodyViewportResizeListener(e)},a.prototype.setVerticalScrollPaddingVisible=function(e){var a=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(a)},a.prototype.isVerticalScrollShowing=function(){var e=this.gridOptionsService.get("alwaysShowVerticalScroll"),a=e?Um:null,d=this.gridOptionsService.isDomLayout("normal");return this.comp.setAlwaysVerticalScrollClass(a,e),e||d&&Bt(this.eBodyViewport)},a.prototype.setupRowAnimationCssClass=function(){var e=this,a=function(){var a=e.gridOptionsService.isAnimateRows()&&!e.rowContainerHeightService.isStretching(),d=a?km.ANIMATION_ON:km.ANIMATION_OFF;e.comp.setRowAnimationCssOnBodyViewport(d,a)};a(),this.addManagedListener(this.eventService,Je.EVENT_HEIGHT_SCALE_CHANGED,a),this.addManagedPropertyListener("animateRows",a)},a.prototype.getGridBodyElement=function(){return this.eGridBody},a.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()},a.prototype.addFullWidthContainerWheelListener=function(){var e=this,a=this.eBodyViewport.querySelector(".ag-full-width-container"),d=this.eBodyViewport.querySelector(".ag-center-cols-viewport");a&&d&&this.addManagedListener(a,"wheel",(function(a){return e.onFullWidthContainerWheel(a,d)}))},a.prototype.onFullWidthContainerWheel=function(e,a){!e.deltaX||Math.abs(e.deltaY)>Math.abs(e.deltaX)||!this.mouseEventService.isEventFromThisGrid(e)||(e.preventDefault(),a.scrollBy({left:e.deltaX}))},a.prototype.onBodyViewportContextMenu=function(e,a,d){if(e||d){if(this.gridOptionsService.get("preventDefaultOnContextMenu"))(e||d).preventDefault();var t=(e||a).target;if(t===this.eBodyViewport||t===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)}}},a.prototype.mockContextMenuForIPad=function(e){if(gd()){var a=new ao(this.eBodyViewport);this.addManagedListener(a,ao.EVENT_LONG_TAP,(function(a){e(void 0,a.touchStart,a.touchEvent)})),this.addDestroyFunc((function(){return a.destroy()}))}},a.prototype.onBodyViewportWheel=function(e){this.gridOptionsService.get("suppressScrollWhenPopupsAreOpen")&&this.popupService.hasAnchoredPopup()&&e.preventDefault()},a.prototype.onStickyTopWheel=function(e){e.preventDefault(),e.offsetY&&this.scrollVertically(e.deltaY)},a.prototype.getGui=function(){return this.eGridBody},a.prototype.scrollVertically=function(e){var a=this.eBodyViewport.scrollTop;return this.bodyScrollFeature.setVerticalScrollPosition(a+e),this.eBodyViewport.scrollTop-a},a.prototype.addRowDragListener=function(){this.rowDragFeature=this.createManagedBean(new Nm(this.eBodyViewport)),this.dragAndDropService.addDropTarget(this.rowDragFeature)},a.prototype.getRowDragFeature=function(){return this.rowDragFeature},a.prototype.onPinnedRowDataChanged=function(){this.setFloatingHeights()},a.prototype.setFloatingHeights=function(){var e=this.pinnedRowModel,a=e.getPinnedTopTotalHeight();a&&(a+=1);var d=e.getPinnedBottomTotalHeight();d&&(d+=1),this.comp.setTopHeight(a),this.comp.setBottomHeight(d),this.comp.setTopDisplay(a?"inherit":"none"),this.comp.setBottomDisplay(d?"inherit":"none"),this.setStickyTopOffsetTop()},a.prototype.setStickyTopHeight=function(e){void 0===e&&(e=0),this.comp.setStickyTopHeight("".concat(e,"px")),this.stickyTopHeight=e},a.prototype.getStickyTopHeight=function(){return this.stickyTopHeight},a.prototype.setStickyTopWidth=function(e){if(e){var a=this.gridOptionsService.getScrollbarWidth();this.comp.setStickyTopWidth("calc(100% - ".concat(a,"px)"))}else this.comp.setStickyTopWidth("100%")},a.prototype.onHeaderHeightChanged=function(){this.setStickyTopOffsetTop()},a.prototype.setStickyTopOffsetTop=function(){var e=this.ctrlsService.getGridHeaderCtrl().getHeaderHeight()+this.filterManager.getHeaderHeight(),a=this.pinnedRowModel.getPinnedTopTotalHeight(),d=0;e>0&&(d+=e+1),a>0&&(d+=a+1),this.comp.setStickyTopTop("".concat(d,"px"))},a.prototype.sizeColumnsToFit=function(e,a){var d=this,t=this.isVerticalScrollShowing()?this.gridOptionsService.getScrollbarWidth():0,i=mt(this.eGridBody)-t;i>0?this.columnModel.sizeColumnsToFit(i,"sizeColumnsToFit",!1,e):void 0===a?window.setTimeout((function(){d.sizeColumnsToFit(e,100)}),0):100===a?window.setTimeout((function(){d.sizeColumnsToFit(e,500)}),100):500===a?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?")},a.prototype.addScrollEventListener=function(e){this.eBodyViewport.addEventListener("scroll",e,{passive:!0})},a.prototype.removeScrollEventListener=function(e){this.eBodyViewport.removeEventListener("scroll",e)},Hm([de("animationFrameService")],a.prototype,"animationFrameService",void 0),Hm([de("rowContainerHeightService")],a.prototype,"rowContainerHeightService",void 0),Hm([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Hm([de("columnModel")],a.prototype,"columnModel",void 0),Hm([de("scrollVisibleService")],a.prototype,"scrollVisibleService",void 0),Hm([te("contextMenuFactory")],a.prototype,"contextMenuFactory",void 0),Hm([de("headerNavigationService")],a.prototype,"headerNavigationService",void 0),Hm([de("dragAndDropService")],a.prototype,"dragAndDropService",void 0),Hm([de("pinnedRowModel")],a.prototype,"pinnedRowModel",void 0),Hm([de("rowRenderer")],a.prototype,"rowRenderer",void 0),Hm([de("popupService")],a.prototype,"popupService",void 0),Hm([de("mouseEventService")],a.prototype,"mouseEventService",void 0),Hm([de("rowModel")],a.prototype,"rowModel",void 0),Hm([de("filterManager")],a.prototype,"filterManager",void 0),a}(je);!function(e){e[e.FILL=0]="FILL",e[e.RANGE=1]="RANGE"}(Wm||(Wm={})),function(e){e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION"}(jm||(jm={}));var Km,Ym="ag-cell-range-selected",$m=function(){function e(e,a){this.beans=e,this.cellCtrl=a}return e.prototype.setComp=function(e,a){this.cellComp=e,this.eGui=a,this.onRangeSelectionChanged()},e.prototype.onRangeSelectionChanged=function(){this.cellComp&&(this.rangeCount=this.beans.rangeService.getCellRangeCount(this.cellCtrl.getCellPosition()),this.hasChartRange=this.getHasChartRange(),this.cellComp.addOrRemoveCssClass(Ym,0!==this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Ym,"-1"),1===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Ym,"-2"),2===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Ym,"-3"),3===this.rangeCount),this.cellComp.addOrRemoveCssClass("".concat(Ym,"-4"),this.rangeCount>=4),this.cellComp.addOrRemoveCssClass("ag-cell-range-chart",this.hasChartRange),fd(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(),a=this.isSingleCell(),d=!a&&e.top,t=!a&&e.right,i=!a&&e.bottom,s=!a&&e.left;this.cellComp.addOrRemoveCssClass("ag-cell-range-top",d),this.cellComp.addOrRemoveCssClass("ag-cell-range-right",t),this.cellComp.addOrRemoveCssClass("ag-cell-range-bottom",i),this.cellComp.addOrRemoveCssClass("ag-cell-range-left",s)},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 a=e.getCellRanges();return a.length>0&&a.every((function(e){return De([jm.DIMENSION,jm.VALUE],e.type)}))},e.prototype.updateRangeBordersIfRangeCount=function(){this.rangeCount>0&&(this.updateRangeBorders(),this.refreshHandle())},e.prototype.getRangeBorders=function(){var e,a,d=this,t=this.beans.gridOptionsService.get("enableRtl"),i=!1,s=!1,o=!1,l=!1,m=this.cellCtrl.getCellPosition().column,u=this.beans,n=u.rangeService,r=u.columnModel;t?(e=r.getDisplayedColAfter(m),a=r.getDisplayedColBefore(m)):(e=r.getDisplayedColBefore(m),a=r.getDisplayedColAfter(m));var f=n.getCellRanges().filter((function(e){return n.isCellInSpecificRange(d.cellCtrl.getCellPosition(),e)}));e||(l=!0),a||(s=!0);for(var c=0;c=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},iu=function(){function e(){}return e.prototype.postConstruct=function(){this.gridOptionsService.isRowModelType("clientSide")&&(this.clientSideRowModel=this.rowModel),this.gridOptionsService.isRowModelType("serverSide")&&(this.serverSideRowModel=this.rowModel)},tu([de("resizeObserverService")],e.prototype,"resizeObserverService",void 0),tu([de("paginationProxy")],e.prototype,"paginationProxy",void 0),tu([de("context")],e.prototype,"context",void 0),tu([de("columnApi")],e.prototype,"columnApi",void 0),tu([de("gridApi")],e.prototype,"gridApi",void 0),tu([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),tu([de("expressionService")],e.prototype,"expressionService",void 0),tu([de("environment")],e.prototype,"environment",void 0),tu([de("rowRenderer")],e.prototype,"rowRenderer",void 0),tu([de("templateService")],e.prototype,"templateService",void 0),tu([de("valueService")],e.prototype,"valueService",void 0),tu([de("eventService")],e.prototype,"eventService",void 0),tu([de("columnModel")],e.prototype,"columnModel",void 0),tu([de("headerNavigationService")],e.prototype,"headerNavigationService",void 0),tu([de("navigationService")],e.prototype,"navigationService",void 0),tu([de("columnAnimationService")],e.prototype,"columnAnimationService",void 0),tu([te("rangeService")],e.prototype,"rangeService",void 0),tu([de("focusService")],e.prototype,"focusService",void 0),tu([te("contextMenuFactory")],e.prototype,"contextMenuFactory",void 0),tu([de("popupService")],e.prototype,"popupService",void 0),tu([de("valueFormatterService")],e.prototype,"valueFormatterService",void 0),tu([de("stylingService")],e.prototype,"stylingService",void 0),tu([de("columnHoverService")],e.prototype,"columnHoverService",void 0),tu([de("userComponentFactory")],e.prototype,"userComponentFactory",void 0),tu([de("userComponentRegistry")],e.prototype,"userComponentRegistry",void 0),tu([de("animationFrameService")],e.prototype,"animationFrameService",void 0),tu([de("dragService")],e.prototype,"dragService",void 0),tu([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),tu([de("sortController")],e.prototype,"sortController",void 0),tu([de("filterManager")],e.prototype,"filterManager",void 0),tu([de("rowContainerHeightService")],e.prototype,"rowContainerHeightService",void 0),tu([de("frameworkOverrides")],e.prototype,"frameworkOverrides",void 0),tu([de("cellPositionUtils")],e.prototype,"cellPositionUtils",void 0),tu([de("rowPositionUtils")],e.prototype,"rowPositionUtils",void 0),tu([de("selectionService")],e.prototype,"selectionService",void 0),tu([te("selectionHandleFactory")],e.prototype,"selectionHandleFactory",void 0),tu([de("rowCssClassCalculator")],e.prototype,"rowCssClassCalculator",void 0),tu([de("rowModel")],e.prototype,"rowModel",void 0),tu([de("ctrlsService")],e.prototype,"ctrlsService",void 0),tu([de("ctrlsFactory")],e.prototype,"ctrlsFactory",void 0),tu([de("agStackComponentsRegistry")],e.prototype,"agStackComponentsRegistry",void 0),tu([de("valueCache")],e.prototype,"valueCache",void 0),tu([de("rowNodeEventThrottle")],e.prototype,"rowNodeEventThrottle",void 0),tu([de("localeService")],e.prototype,"localeService",void 0),tu([de("valueParserService")],e.prototype,"valueParserService",void 0),tu([de("syncService")],e.prototype,"syncService",void 0),tu([Z],e.prototype,"postConstruct",null),e=tu([ae("beans")],e)}(),su=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ou=function(e){function a(a,d,t){var i=e.call(this)||this;return i.cellCtrl=a,i.beans=d,i.column=t,i}return su(a,e),a.prototype.onMouseEvent=function(e,a){if(!Qe(a))switch(e){case"click":this.onCellClicked(a);break;case"mousedown":case"touchstart":this.onMouseDown(a);break;case"dblclick":this.onCellDoubleClicked(a);break;case"mouseout":this.onMouseOut(a);break;case"mouseover":this.onMouseOver(a)}},a.prototype.onCellClicked=function(e){if(this.isDoubleClickOnIPad())return this.onCellDoubleClicked(e),void e.preventDefault();var a=this.beans,d=a.eventService,t=a.rangeService,i=a.gridOptionsService,s=e.ctrlKey||e.metaKey;t&&s&&t.getCellRangeCount(this.cellCtrl.getCellPosition())>1&&t.intersectLastRange(!0);var o=this.cellCtrl.createEvent(e,Je.EVENT_CELL_CLICKED);d.dispatchEvent(o);var l=this.column.getColDef();l.onCellClicked&&window.setTimeout((function(){return l.onCellClicked(o)}),0),!((i.get("singleClickEdit")||l.singleClickEdit)&&!i.get("suppressClickEdit"))||e.shiftKey&&0!=(null===t||void 0===t?void 0:t.getCellRanges().length)||this.cellCtrl.startRowOrCellEdit()},a.prototype.isDoubleClickOnIPad=function(){if(!gd()||Ve("dblclick"))return!1;var e=(new Date).getTime(),a=e-this.lastIPadMouseClickEvent<200;return this.lastIPadMouseClickEvent=e,a},a.prototype.onCellDoubleClicked=function(e){var a=this.column.getColDef(),d=this.cellCtrl.createEvent(e,Je.EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(d),"function"===typeof a.onCellDoubleClicked&&window.setTimeout((function(){return a.onCellDoubleClicked(d)}),0),!this.beans.gridOptionsService.get("singleClickEdit")&&!this.beans.gridOptionsService.get("suppressClickEdit")&&this.cellCtrl.startRowOrCellEdit(null,e)},a.prototype.onMouseDown=function(e){var a=e.ctrlKey,d=e.metaKey,t=e.shiftKey,i=e.target,s=this.cellCtrl,o=this.beans,l=o.eventService,m=o.rangeService,u=o.focusService;if(!this.isRightClickInExistingRange(e)){var n=m&&0!=m.getCellRanges().length;if(!t||!n){var r=Id()&&!s.isEditing()&&!at(i);s.focusCell(r)}if(t&&n&&!u.isCellFocused(s.getCellPosition())){e.preventDefault();var f=u.getFocusedCell();if(f){var c=f.column,p=f.rowIndex,_=f.rowPinned,y=o.rowRenderer.getRowByPosition({rowIndex:p,rowPinned:_}),q=null===y||void 0===y?void 0:y.getCellCtrl(c);(null===q||void 0===q?void 0:q.isEditing())&&q.stopEditing(),u.setFocusedCell({column:c,rowIndex:p,rowPinned:_,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!this.containsWidget(i)){if(m){var b=this.cellCtrl.getCellPosition();if(t)m.extendLatestRangeToCell(b);else{var C=a||d;m.setRangeToCell(b,C)}}l.dispatchEvent(this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_DOWN))}}},a.prototype.isRightClickInExistingRange=function(e){var a=this.beans.rangeService;if(a){var d=a.isCellInAnyRange(this.cellCtrl.getCellPosition()),t=2===e.button||e.ctrlKey&&this.beans.gridOptionsService.get("allowContextMenuWithControlKey");if(d&&t)return!0}return!1},a.prototype.containsWidget=function(e){return st(e,"ag-selection-checkbox",3)},a.prototype.onMouseOut=function(e){if(!this.mouseStayingInsideCell(e)){var a=this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(a),this.beans.columnHoverService.clearMouseOver()}},a.prototype.onMouseOver=function(e){if(!this.mouseStayingInsideCell(e)){var a=this.cellCtrl.createEvent(e,Je.EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(a),this.beans.columnHoverService.setMouseOver([this.column])}},a.prototype.mouseStayingInsideCell=function(e){if(!e.target||!e.relatedTarget)return!1;var a=this.cellCtrl.getGui(),d=a.contains(e.target),t=a.contains(e.relatedTarget);return d&&t},a.prototype.destroy=function(){},a}(iu),lu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),mu=function(e){function a(a,d,t,i,s){var o=e.call(this)||this;return o.cellCtrl=a,o.beans=d,o.rowNode=i,o.rowCtrl=s,o}return lu(a,e),a.prototype.setComp=function(e){this.eGui=e},a.prototype.onKeyDown=function(e){var a=e.key;switch(a){case zt.ENTER:this.onEnterKeyDown(e);break;case zt.F2:this.onF2KeyDown(e);break;case zt.ESCAPE:this.onEscapeKeyDown(e);break;case zt.TAB:this.onTabKeyDown(e);break;case zt.BACKSPACE:case zt.DELETE:this.onBackspaceOrDeleteKeyDown(a,e);break;case zt.DOWN:case zt.UP:case zt.RIGHT:case zt.LEFT:this.onNavigationKeyDown(e,a)}},a.prototype.onNavigationKeyDown=function(e,a){this.cellCtrl.isEditing()||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):this.beans.navigationService.navigateToNextCell(e,a,this.cellCtrl.getCellPosition(),!0),e.preventDefault())},a.prototype.onShiftRangeSelect=function(e){if(this.beans.rangeService){var a=this.beans.rangeService.extendLatestRangeInDirection(e);a&&this.beans.navigationService.ensureCellVisible(a)}},a.prototype.onTabKeyDown=function(e){this.beans.navigationService.onTabKeyDown(this.cellCtrl,e)},a.prototype.onBackspaceOrDeleteKeyDown=function(e,a){var d=this,t=d.cellCtrl,i=d.beans,s=d.rowNode,o=i.gridOptionsService,l=i.rangeService,m=i.eventService;t.isEditing()||(m.dispatchEvent({type:Je.EVENT_KEY_SHORTCUT_CHANGED_CELL_START}),Jt(e,o.get("enableCellEditingOnBackspace"))?l&&o.get("enableRangeSelection")?l.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"}):t.isCellEditable()&&s.setDataValue(t.getColumn(),null,"cellClear"):t.startRowOrCellEdit(e,a),m.dispatchEvent({type:Je.EVENT_KEY_SHORTCUT_CHANGED_CELL_END}))},a.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 a=e.shiftKey?zt.UP:zt.DOWN;this.beans.navigationService.navigateToNextCell(null,a,this.cellCtrl.getCellPosition(),!1)}else this.cellCtrl.startRowOrCellEdit(zt.ENTER,e),this.cellCtrl.isEditing()&&e.preventDefault()},a.prototype.onF2KeyDown=function(e){this.cellCtrl.isEditing()||this.cellCtrl.startRowOrCellEdit(zt.F2,e)},a.prototype.onEscapeKeyDown=function(e){this.cellCtrl.isEditing()&&(this.cellCtrl.stopRowOrCellEdit(!0),this.cellCtrl.focusCell(!0))},a.prototype.processCharacter=function(e){if(!(e.target!==this.eGui)&&!this.cellCtrl.isEditing()){var a=e.key;" "===a?this.onSpaceKeyDown(e):(this.cellCtrl.startRowOrCellEdit(a,e),e.preventDefault())}},a.prototype.onSpaceKeyDown=function(e){var a=this.beans.gridOptionsService;if(!this.cellCtrl.isEditing()&&a.isRowSelection()){var d=this.rowNode.isSelected(),t=!d;if(t||!a.get("suppressRowDeselection")){var i=this.beans.gridOptionsService.get("groupSelectsFiltered"),s=this.rowNode.setSelectedParams({newValue:t,rangeSelect:e.shiftKey,groupSelectsFiltered:i,event:e,source:"spaceKey"});void 0===d&&0===s&&this.rowNode.setSelectedParams({newValue:!1,rangeSelect:e.shiftKey,groupSelectsFiltered:i,event:e,source:"spaceKey"})}}e.preventDefault()},a.prototype.destroy=function(){e.prototype.destroy.call(this)},a}(je),uu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),nu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ru=function(e){function a(a,d,t){var i=e.call(this,'
')||this;return i.rowNode=a,i.column=d,i.eCell=t,i}return uu(a,e),a.prototype.postConstruct=function(){this.getGui().appendChild(jt("rowDrag",this.gridOptionsService,null)),this.addGuiEventListener("mousedown",(function(e){e.stopPropagation()})),this.addDragSource(),this.checkVisibility()},a.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},a.prototype.onDragStart=function(e){var a=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(a.rowNode.data);e.dataTransfer.setData("application/json",d),e.dataTransfer.setData("text/plain",d)}catch(t){}}()},a.prototype.checkVisibility=function(){var e=this.column.isDndSource(this.rowNode);this.setDisplayed(e)},nu([Z],a.prototype,"postConstruct",null),a}(hi),fu=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},cu=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},hu=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Tu=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=0)&&d}return d},a.prototype.getDomOrder=function(){return this.gridOptionsService.get("ensureDomOrder")||this.gridOptionsService.isDomLayout("print")},a.prototype.listenOnDomOrder=function(e){var a=this,d=function(){e.rowComp.setDomOrder(a.getDomOrder())};this.addManagedPropertyListener("domLayout",d),this.addManagedPropertyListener("ensureDomOrder",d)},a.prototype.setAnimateFlags=function(e){if(!this.isSticky()&&e){var a=i(this.rowNode.oldRowTop),d=this.beans.columnModel.isPinningLeft(),t=this.beans.columnModel.isPinningRight();if(a){if(this.isFullWidth()&&!this.gridOptionsService.get("embedFullWidthRows"))return void(this.slideInAnimation.fullWidth=!0);this.slideInAnimation.center=!0,this.slideInAnimation.left=d,this.slideInAnimation.right=t}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=t}}},a.prototype.isEditing=function(){return this.editingRow},a.prototype.stopRowEditing=function(e){this.stopEditing(e)},a.prototype.isFullWidth=function(){return this.rowType!==Km.Normal},a.prototype.getRowType=function(){return this.rowType},a.prototype.refreshFullWidth=function(){var e=this,a=function(a,d){if(!a)return!0;var t=a.rowComp.getFullWidthCellRenderer();if(!t)return!1;if(!t.refresh)return!1;var i=e.createFullWidthParams(a.element,d);return t.refresh(i)},d=a(this.fullWidthGui,null),t=a(this.centerGui,null),i=a(this.leftGui,"left"),s=a(this.rightGui,"right");return d&&t&&i&&s},a.prototype.addListeners=function(){var e=this;this.addManagedListener(this.rowNode,Mo.EVENT_HEIGHT_CHANGED,(function(){return e.onRowHeightChanged()})),this.addManagedListener(this.rowNode,Mo.EVENT_ROW_SELECTED,(function(){return e.onRowSelected()})),this.addManagedListener(this.rowNode,Mo.EVENT_ROW_INDEX_CHANGED,this.onRowIndexChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_TOP_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_EXPANDED_CHANGED,this.updateExpandedCss.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_HAS_CHILDREN_CHANGED,this.updateExpandedCss.bind(this)),this.rowNode.detail&&this.addManagedListener(this.rowNode.parent,Mo.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_DATA_CHANGED,this.onRowNodeDataChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,this.onRowNodeCellChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_HIGHLIGHT_CHANGED,this.onRowNodeHighlightChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_DRAGGING_CHANGED,this.onRowNodeDraggingChanged.bind(this)),this.addManagedListener(this.rowNode,Mo.EVENT_UI_LEVEL_CHANGED,this.onUiLevelChanged.bind(this));var a=this.beans.eventService;this.addManagedListener(a,Je.EVENT_PAGINATION_PIXEL_OFFSET_CHANGED,this.onPaginationPixelOffsetChanged.bind(this)),this.addManagedListener(a,Je.EVENT_HEIGHT_SCALE_CHANGED,this.onTopChanged.bind(this)),this.addManagedListener(a,Je.EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayedColumnsChanged.bind(this)),this.addManagedListener(a,Je.EVENT_VIRTUAL_COLUMNS_CHANGED,this.onVirtualColumnsChanged.bind(this)),this.addManagedListener(a,Je.EVENT_CELL_FOCUSED,this.onCellFocused.bind(this)),this.addManagedListener(a,Je.EVENT_CELL_FOCUS_CLEARED,this.onCellFocusCleared.bind(this)),this.addManagedListener(a,Je.EVENT_PAGINATION_CHANGED,this.onPaginationChanged.bind(this)),this.addManagedListener(a,Je.EVENT_MODEL_UPDATED,this.onModelUpdated.bind(this)),this.addManagedListener(a,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(a){e.addRowDraggerToRow(a)})):(e.destroyBeans(e.rowDragComps,e.beans.context),e.rowDragComps=[])})),this.addListenersForCellComps()},a.prototype.onColumnMoved=function(){this.updateColumnLists()},a.prototype.addListenersForCellComps=function(){var e=this;this.addManagedListener(this.rowNode,Mo.EVENT_ROW_INDEX_CHANGED,(function(){e.getAllCellCtrls().forEach((function(e){return e.onRowIndexChanged()}))})),this.addManagedListener(this.rowNode,Mo.EVENT_CELL_CHANGED,(function(a){e.getAllCellCtrls().forEach((function(e){return e.onCellChanged(a)}))}))},a.prototype.onRowNodeDataChanged=function(e){var a=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(a){return a.refreshCell({suppressFlash:!e.update,newData:!e.update})})),this.allRowGuis.forEach((function(e){a.setRowCompRowId(e.rowComp),a.updateRowBusinessKey(),a.setRowCompRowBusinessKey(e.rowComp)})),this.onRowSelected(),this.postProcessCss())},a.prototype.onRowNodeCellChanged=function(){this.postProcessCss()},a.prototype.postProcessCss=function(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()},a.prototype.onRowNodeHighlightChanged=function(){var e=this.rowNode.highlighted;this.allRowGuis.forEach((function(a){var d=e===am.Above,t=e===am.Below;a.rowComp.addOrRemoveCssClass("ag-row-highlight-above",d),a.rowComp.addOrRemoveCssClass("ag-row-highlight-below",t)}))},a.prototype.onRowNodeDraggingChanged=function(){this.postProcessRowDragging()},a.prototype.postProcessRowDragging=function(){var e=this.rowNode.dragging;this.allRowGuis.forEach((function(a){return a.rowComp.addOrRemoveCssClass("ag-row-dragging",e)}))},a.prototype.updateExpandedCss=function(){var e=this.rowNode.isExpandable(),a=1==this.rowNode.expanded;this.allRowGuis.forEach((function(d){d.rowComp.addOrRemoveCssClass("ag-row-group",e),d.rowComp.addOrRemoveCssClass("ag-row-group-expanded",e&&a),d.rowComp.addOrRemoveCssClass("ag-row-group-contracted",e&&!a),ed(d.element,e&&a)}))},a.prototype.onDisplayedColumnsChanged=function(){this.updateColumnLists(!0),this.beans.columnModel.wasAutoRowHeightEverActive()&&this.rowNode.checkAutoHeights()},a.prototype.onVirtualColumnsChanged=function(){this.updateColumnLists(!1,!0)},a.prototype.getRowPosition=function(){return{rowPinned:t(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}},a.prototype.onKeyboardNavigate=function(e){var a=this.allRowGuis.find((function(a){return a.element.contains(e.target)}));if((a?a.element:null)===e.target){var d=this.rowNode,t=this.beans.focusService.getFocusedCell(),i={rowIndex:d.rowIndex,rowPinned:d.rowPinned,column:t&&t.column};this.beans.navigationService.navigateToNextCell(e,e.key,i,!0),e.preventDefault()}},a.prototype.onTabKeyDown=function(e){if(!e.defaultPrevented&&!Qe(e)){var a=this.allRowGuis.find((function(a){return a.element.contains(e.target)})),d=a?a.element:null,t=d===e.target,i=null;t||(i=this.beans.focusService.findNextFocusableElement(d,!1,e.shiftKey)),(this.isFullWidth()&&t||!i)&&this.beans.navigationService.onTabKeyDown(this,e)}},a.prototype.onFullWidthRowFocused=function(e){var a,d=this.rowNode,t=!!e&&(this.isFullWidth()&&e.rowIndex===d.rowIndex&&e.rowPinned==d.rowPinned),i=this.fullWidthGui?this.fullWidthGui.element:null===(a=this.centerGui)||void 0===a?void 0:a.element;i&&(i.classList.toggle("ag-full-width-focus",t),t&&i.focus({preventScroll:!0}))},a.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()},a.prototype.removeCellCtrl=function(e,a){var d={list:[],map:{}};return e.list.forEach((function(e){e!==a&&(d.list.push(e),d.map[e.getInstanceId()]=e)})),d},a.prototype.onMouseEvent=function(e,a){switch(e){case"dblclick":this.onRowDblClick(a);break;case"click":this.onRowClick(a);break;case"touchstart":case"mousedown":this.onRowMouseDown(a)}},a.prototype.createRowEvent=function(e,a){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:a}},a.prototype.createRowEventWithSource=function(e,a){var d=this.createRowEvent(e,a);return d.source=this,d},a.prototype.onRowDblClick=function(e){if(!Qe(e)){var a=this.createRowEventWithSource(Je.EVENT_ROW_DOUBLE_CLICKED,e);this.beans.eventService.dispatchEvent(a)}},a.prototype.onRowMouseDown=function(e){if(this.lastMouseDownOnDragger=st(e.target,"ag-row-drag",3),this.isFullWidth()){var a=this.rowNode,d=this.beans.columnModel;this.beans.rangeService&&this.beans.rangeService.removeAllCellRanges(),this.beans.focusService.setFocusedCell({rowIndex:a.rowIndex,column:d.getAllDisplayedColumns()[0],rowPinned:a.rowPinned,forceBrowserFocus:!0})}},a.prototype.onRowClick=function(e){if(!(Qe(e)||this.lastMouseDownOnDragger)){var a=this.createRowEventWithSource(Je.EVENT_ROW_CLICKED,e);this.beans.eventService.dispatchEvent(a);var d=e.ctrlKey||e.metaKey,t=e.shiftKey;if(!(this.gridOptionsService.get("groupSelectsChildren")&&this.rowNode.group||!this.rowNode.selectable||this.rowNode.rowPinned||!this.gridOptionsService.isRowSelection()||this.gridOptionsService.get("suppressRowClickSelection"))){var i=this.gridOptionsService.get("rowMultiSelectWithClick"),s=!this.gridOptionsService.get("suppressRowDeselection"),o="rowClicked";if(this.rowNode.isSelected())i?this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):d?s&&this.rowNode.setSelectedParams({newValue:!1,event:e,source:o}):this.rowNode.setSelectedParams({newValue:!0,clearSelection:!t,rangeSelect:t,event:e,source:o});else{var l=!i&&!d;this.rowNode.setSelectedParams({newValue:!0,clearSelection:l,rangeSelect:t,event:e,source:o})}}}},a.prototype.setupDetailRowAutoHeight=function(e){var a=this;if(this.rowType===Km.FullWidthDetail&&this.gridOptionsService.get("detailRowAutoHeight")){var d=function(){var d=e.clientHeight;if(null!=d&&d>0){a.beans.frameworkOverrides.setTimeout((function(){a.rowNode.setRowHeight(d),a.beans.clientSideRowModel?a.beans.clientSideRowModel.onRowHeightChanged():a.beans.serverSideRowModel&&a.beans.serverSideRowModel.onRowHeightChanged()}),0)}},t=this.beans.resizeObserverService.observeResize(e,d);this.addDestroyFunc(t),d()}},a.prototype.createFullWidthParams=function(e,a){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:a,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:function(e,a,t,i){return d.addFullWidthRowDragging(e,a,t,i)}}},a.prototype.addFullWidthRowDragging=function(e,a,d,t){if(void 0===d&&(d=""),this.isFullWidth()){var i=new Uo((function(){return d}),this.rowNode,void 0,e,a,t);this.createManagedBean(i,this.beans.context)}},a.prototype.onUiLevelChanged=function(){var e=this.beans.rowCssClassCalculator.calculateRowLevel(this.rowNode);if(this.rowLevel!=e){var a="ag-row-level-"+e,d="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach((function(e){e.rowComp.addOrRemoveCssClass(a,!0),e.rowComp.addOrRemoveCssClass(d,!1)}))}this.rowLevel=e},a.prototype.isFirstRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageFirstRow()},a.prototype.isLastRowOnPage=function(){return this.rowNode.rowIndex===this.beans.paginationProxy.getPageLastRow()},a.prototype.onModelUpdated=function(){this.refreshFirstAndLastRowStyles()},a.prototype.refreshFirstAndLastRowStyles=function(){var e=this.isFirstRowOnPage(),a=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach((function(a){return a.rowComp.addOrRemoveCssClass("ag-row-first",e)}))),this.lastRowOnPage!==a&&(this.lastRowOnPage=a,this.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass("ag-row-last",a)})))},a.prototype.stopEditing=function(e){var a,d;if(void 0===e&&(e=!1),!this.stoppingRowEdit){var t=this.getAllCellCtrls(),i=this.editingRow;this.stoppingRowEdit=!0;var s=!1;try{for(var o=Pu(t),l=o.next();!l.done;l=o.next()){var m=l.value.stopEditing(e);i&&!e&&!s&&m&&(s=!0)}}catch(n){a={error:n}}finally{try{l&&!l.done&&(d=o.return)&&d.call(o)}finally{if(a)throw a.error}}if(s){var u=this.createRowEvent(Je.EVENT_ROW_VALUE_CHANGED);this.beans.eventService.dispatchEvent(u)}i&&this.setEditingRow(!1),this.stoppingRowEdit=!1}},a.prototype.setInlineEditingCss=function(e){this.allRowGuis.forEach((function(a){a.rowComp.addOrRemoveCssClass("ag-row-inline-editing",e),a.rowComp.addOrRemoveCssClass("ag-row-not-inline-editing",!e)}))},a.prototype.setEditingRow=function(e){this.editingRow=e,this.allRowGuis.forEach((function(a){return a.rowComp.addOrRemoveCssClass("ag-row-editing",e)}));var a=e?this.createRowEvent(Je.EVENT_ROW_EDITING_STARTED):this.createRowEvent(Je.EVENT_ROW_EDITING_STOPPED);this.beans.eventService.dispatchEvent(a)},a.prototype.startRowEditing=function(e,a,d){(void 0===e&&(e=null),void 0===a&&(a=null),void 0===d&&(d=null),this.editingRow)||this.getAllCellCtrls().reduce((function(t,i){var s=i===a;return s?i.startEditing(e,s,d):i.startEditing(null,s,d),!!t||i.isEditing()}),!1)&&this.setEditingRow(!0)},a.prototype.getAllCellCtrls=function(){return 0===this.leftCellCtrls.list.length&&0===this.rightCellCtrls.list.length?this.centerCellCtrls.list:Tu(Tu(Tu([],hu(this.centerCellCtrls.list),!1),hu(this.leftCellCtrls.list),!1),hu(this.rightCellCtrls.list),!1)},a.prototype.postProcessClassesFromGridOptions=function(){var e=this,a=this.beans.rowCssClassCalculator.processClassesFromGridOptions(this.rowNode);a&&a.length&&a.forEach((function(a){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(a,!0)}))}))},a.prototype.postProcessRowClassRules=function(){var e=this;this.beans.rowCssClassCalculator.processRowClassRules(this.rowNode,(function(a){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(a,!0)}))}),(function(a){e.allRowGuis.forEach((function(e){return e.rowComp.addOrRemoveCssClass(a,!1)}))}))},a.prototype.setStylesFromGridOptions=function(e,a){var d=this;e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(a,(function(e){return e.rowComp.setUserStyles(d.rowStyles)}))},a.prototype.getPinnedForContainer=function(e){return e===Iu.LEFT?"left":e===Iu.RIGHT?"right":null},a.prototype.getInitialRowClasses=function(e){var a=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:a};return this.beans.rowCssClassCalculator.getInitialRowClasses(d)},a.prototype.processStylesFromGridOptions=function(){var e=this.gridOptionsService.get("rowStyle");if(!e||"function"!==typeof e){var a,d=this.gridOptionsService.getCallback("getRowStyle");if(d)a=d({data:this.rowNode.data,node:this.rowNode,rowIndex:this.rowNode.rowIndex});return a||e?Object.assign({},e,a):this.emptyStyle}console.warn("AG Grid: rowStyle should be an object of key/value styles, not be a function, use getRowStyle() instead")},a.prototype.onRowSelected=function(e){var a=this,d=!!this.rowNode.isSelected();this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-selected",d),fd(e.element,!!d||void 0);var t=a.createAriaLabel();Ua(e.element,null==t?"":t)}))},a.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."))},a.prototype.isUseAnimationFrameForCreate=function(){return this.useAnimationFrameForCreate},a.prototype.addHoverFunctionality=function(e){var a=this;this.active&&(this.addManagedListener(e,"mouseenter",(function(){return a.rowNode.onMouseEnter()})),this.addManagedListener(e,"mouseleave",(function(){return a.rowNode.onMouseLeave()})),this.addManagedListener(this.rowNode,Mo.EVENT_MOUSE_ENTER,(function(){a.beans.dragService.isDragging()||a.gridOptionsService.get("suppressRowHoverHighlight")||(e.classList.add("ag-row-hover"),a.rowNode.setHovered(!0))})),this.addManagedListener(this.rowNode,Mo.EVENT_MOUSE_LEAVE,(function(){e.classList.remove("ag-row-hover"),a.rowNode.setHovered(!1)})))},a.prototype.roundRowTopToBounds=function(e){var a=this.beans.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.applyPaginationOffset(a.top,!0)-100,t=this.applyPaginationOffset(a.bottom,!0)+100;return Math.min(Math.max(d,e),t)},a.prototype.getFrameworkOverrides=function(){return this.beans.frameworkOverrides},a.prototype.forEachGui=function(e,a){e?a(e):this.allRowGuis.forEach(a)},a.prototype.onRowHeightChanged=function(e){if(null!=this.rowNode.rowHeight){var a=this.rowNode.rowHeight,d=this.beans.environment.getDefaultRowHeight(),t=this.gridOptionsService.isGetRowHeightFunction()?this.gridOptionsService.getRowHeightForNode(this.rowNode).height:void 0,i=t?"".concat(Math.min(d,t)-2,"px"):void 0;this.forEachGui(e,(function(e){e.element.style.height="".concat(a,"px"),i&&e.element.style.setProperty("--ag-line-height",i)}))}},a.prototype.addEventListener=function(a,d){e.prototype.addEventListener.call(this,a,d)},a.prototype.removeEventListener=function(a,d){e.prototype.removeEventListener.call(this,a,d)},a.prototype.destroyFirstPass=function(){this.active=!1,this.gridOptionsService.isAnimateRows()&&this.setupRemoveAnimation(),this.rowNode.setHovered(!1);var a=this.createRowEvent(Je.EVENT_VIRTUAL_ROW_REMOVED);this.dispatchEvent(a),this.beans.eventService.dispatchEvent(a),e.prototype.destroy.call(this)},a.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)}))},a.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)},a.prototype.setFocusedClasses=function(e){var a=this;this.forEachGui(e,(function(e){e.rowComp.addOrRemoveCssClass("ag-row-focus",a.rowFocused),e.rowComp.addOrRemoveCssClass("ag-row-no-focus",!a.rowFocused)}))},a.prototype.onCellFocused=function(){this.onCellFocusChanged()},a.prototype.onCellFocusCleared=function(){this.onCellFocusChanged()},a.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)},a.prototype.onPaginationChanged=function(){var e=this.beans.paginationProxy.getCurrentPage();this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()},a.prototype.onTopChanged=function(){this.setRowTop(this.rowNode.rowTop)},a.prototype.onPaginationPixelOffsetChanged=function(){this.onTopChanged()},a.prototype.applyPaginationOffset=function(e,a){return void 0===a&&(a=!1),this.rowNode.isRowPinned()||this.rowNode.sticky?e:e+this.beans.paginationProxy.getPixelOffset()*(a?1:-1)},a.prototype.setRowTop=function(e){if(!this.printLayout&&i(e)){var a=this.applyPaginationOffset(e),d=this.rowNode.isRowPinned()||this.rowNode.sticky?a:this.beans.rowContainerHeightService.getRealPixelPosition(a),t="".concat(d,"px");this.setRowTopStyle(t)}},a.prototype.getInitialRowTop=function(e){return this.gridOptionsService.get("suppressRowTransform")?this.getInitialRowTopShared(e):void 0},a.prototype.getInitialTransform=function(e){return this.gridOptionsService.get("suppressRowTransform")?void 0:"translateY(".concat(this.getInitialRowTopShared(e),")")},a.prototype.getInitialRowTopShared=function(e){if(this.printLayout)return"";var a;if(this.isSticky())a=this.rowNode.stickyRowTop;else{var d=this.slideInAnimation[e]?this.roundRowTopToBounds(this.rowNode.oldRowTop):this.rowNode.rowTop,t=this.applyPaginationOffset(d);a=this.rowNode.isRowPinned()?t:this.beans.rowContainerHeightService.getRealPixelPosition(t)}return a+"px"},a.prototype.setRowTopStyle=function(e){var a=this.gridOptionsService.get("suppressRowTransform");this.allRowGuis.forEach((function(d){return a?d.rowComp.setTop(e):d.rowComp.setTransform("translateY(".concat(e,")"))}))},a.prototype.getRowNode=function(){return this.rowNode},a.prototype.getCellCtrl=function(e){var a=null;return this.getAllCellCtrls().forEach((function(d){d.getColumn()==e&&(a=d)})),null!=a||this.getAllCellCtrls().forEach((function(d){d.getColSpanningList().indexOf(e)>=0&&(a=d)})),a},a.prototype.onRowIndexChanged=function(){null!=this.rowNode.rowIndex&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())},a.prototype.getRowIndex=function(){return this.rowNode.getRowIndexString()},a.prototype.updateRowIndexes=function(e){var a=this.rowNode.getRowIndexString(),d=this.beans.headerNavigationService.getHeaderRowCount()+this.beans.filterManager.getHeaderRowCount(),t=this.rowNode.rowIndex%2===0,i=d+this.rowNode.rowIndex+1;this.forEachGui(e,(function(e){e.rowComp.setRowIndex(a),e.rowComp.addOrRemoveCssClass("ag-row-even",t),e.rowComp.addOrRemoveCssClass("ag-row-odd",!t),od(e.element,i)}))},a.prototype.getPinnedLeftRowElement=function(){return this.leftGui?this.leftGui.element:void 0},a.prototype.getPinnedRightRowElement=function(){return this.rightGui?this.rightGui.element:void 0},a.prototype.getBodyRowElement=function(){return this.centerGui?this.centerGui.element:void 0},a.prototype.getFullWidthRowElement=function(){return this.fullWidthGui?this.fullWidthGui.element:void 0},a.DOM_DATA_KEY_ROW_CTRL="renderedRow",a}(je),Su=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Du=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},gu=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Gu=function(e){function a(a){var d=e.call(this)||this;return d.element=a,d}return Su(a,e),a.prototype.postConstruct=function(){this.addKeyboardListeners(),this.addMouseListeners(),this.mockContextMenuForIPad()},a.prototype.addKeyboardListeners=function(){var e="keydown",a=this.processKeyboardEvent.bind(this,e);this.addManagedListener(this.element,e,a)},a.prototype.addMouseListeners=function(){var e=this;["dblclick","contextmenu","mouseover","mouseout","click",Ve("touchstart")?"touchstart":"mousedown"].forEach((function(a){var d=e.processMouseEvent.bind(e,a);e.addManagedListener(e.element,a,d)}))},a.prototype.processMouseEvent=function(e,a){if(this.mouseEventService.isEventFromThisGrid(a)&&!Qe(a)){var d=this.getRowForEvent(a),t=this.mouseEventService.getRenderedCellForEvent(a);"contextmenu"===e?this.handleContextMenuMouseEvent(a,null,d,t):(t&&t.onMouseEvent(e,a),d&&d.onMouseEvent(e,a))}},a.prototype.mockContextMenuForIPad=function(){var e=this;if(gd()){var a=new ao(this.element);this.addManagedListener(a,ao.EVENT_LONG_TAP,(function(a){var d=e.getRowForEvent(a.touchEvent),t=e.mouseEventService.getRenderedCellForEvent(a.touchEvent);e.handleContextMenuMouseEvent(null,a.touchEvent,d,t)})),this.addDestroyFunc((function(){return a.destroy()}))}},a.prototype.getRowForEvent=function(e){for(var a=e.target;a;){var d=this.gridOptionsService.getDomData(a,Bu.DOM_DATA_KEY_ROW_CTRL);if(d)return d;a=a.parentElement}return null},a.prototype.handleContextMenuMouseEvent=function(e,a,d,t){var i=d?d.getRowNode():null,s=t?t.getColumn():null,o=null;if(s){var l=e||a;t.dispatchCellContextMenuEvent(l),o=this.valueService.getValue(s,i)}var m=this.ctrlsService.getGridBodyCtrl(),u=t?t.getGui():m.getGridBodyElement();this.contextMenuFactory&&this.contextMenuFactory.onContextMenu(e,a,i,s,o,u)},a.prototype.getControlsForEventTarget=function(e){return{cellCtrl:Fe(this.gridOptionsService,e,bu.DOM_DATA_KEY_CELL_CTRL),rowCtrl:Fe(this.gridOptionsService,e,Bu.DOM_DATA_KEY_ROW_CTRL)}},a.prototype.processKeyboardEvent=function(e,a){var d=this.getControlsForEventTarget(a.target),t=d.cellCtrl,i=d.rowCtrl;a.defaultPrevented||(t?this.processCellKeyboardEvent(t,e,a):i&&i.isFullWidth()&&this.processFullWidthRowKeyboardEvent(i,e,a))},a.prototype.processCellKeyboardEvent=function(e,a,d){var t=e.getRowNode(),i=e.getColumn(),s=e.isEditing();Yt(this.gridOptionsService,d,t,i,s)||"keydown"===a&&(!s&&this.navigationService.handlePageScrollingKey(d)||e.onKeyDown(d),this.doGridOperations(d,e.isEditing()),Kt(d)&&e.processCharacter(d));if("keydown"===a){var o=e.createEvent(d,Je.EVENT_CELL_KEY_DOWN);this.eventService.dispatchEvent(o)}},a.prototype.processFullWidthRowKeyboardEvent=function(e,a,d){var t=e.getRowNode(),i=this.focusService.getFocusedCell(),s=i&&i.column;if(!Yt(this.gridOptionsService,d,t,s,!1)){var o=d.key;if("keydown"===a)switch(o){case zt.PAGE_HOME:case zt.PAGE_END:case zt.PAGE_UP:case zt.PAGE_DOWN:this.navigationService.handlePageScrollingKey(d,!0);break;case zt.UP:case zt.DOWN:e.onKeyboardNavigate(d);break;case zt.TAB:e.onTabKeyDown(d)}}if("keydown"===a){var l=e.createRowEvent(Je.EVENT_CELL_KEY_DOWN,d);this.eventService.dispatchEvent(l)}},a.prototype.doGridOperations=function(e,a){if((e.ctrlKey||e.metaKey)&&!a&&this.mouseEventService.isEventFromThisGrid(e)){var d=Xt(e);return d===zt.A?this.onCtrlAndA(e):d===zt.C?this.onCtrlAndC(e):d===zt.D?this.onCtrlAndD(e):d===zt.V?this.onCtrlAndV(e):d===zt.X?this.onCtrlAndX(e):d===zt.Y?this.onCtrlAndY():d===zt.Z?this.onCtrlAndZ(e):void 0}},a.prototype.onCtrlAndA=function(e){var a=this,d=a.pinnedRowModel,t=a.paginationProxy,i=a.rangeService;if(i&&t.isRowsToRender()){var s=gu([d.isEmpty("top"),d.isEmpty("bottom")],2),l=s[0]?null:"top",m=void 0,u=void 0;s[1]?(m=null,u=this.paginationProxy.getRowCount()-1):(m="bottom",u=d.getPinnedBottomRowData().length-1);var n=this.columnModel.getAllDisplayedColumns();if(o(n))return;i.setCellRange({rowStartIndex:0,rowStartPinned:l,rowEndIndex:u,rowEndPinned:m,columnStart:n[0],columnEnd:Ce(n)})}e.preventDefault()},a.prototype.onCtrlAndC=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")){var a=this.getControlsForEventTarget(e.target),d=a.cellCtrl,t=a.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===t||void 0===t?void 0:t.isEditing())||(e.preventDefault(),this.clipboardService.copyToClipboard())}},a.prototype.onCtrlAndX=function(e){if(this.clipboardService&&!this.gridOptionsService.get("enableCellTextSelection")&&!this.gridOptionsService.get("suppressCutToClipboard")){var a=this.getControlsForEventTarget(e.target),d=a.cellCtrl,t=a.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===t||void 0===t?void 0:t.isEditing())||(e.preventDefault(),this.clipboardService.cutToClipboard(void 0,"ui"))}},a.prototype.onCtrlAndV=function(e){var a=this.getControlsForEventTarget(e.target),d=a.cellCtrl,t=a.rowCtrl;(null===d||void 0===d?void 0:d.isEditing())||(null===t||void 0===t?void 0:t.isEditing())||this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.pasteFromClipboard()},a.prototype.onCtrlAndD=function(e){this.clipboardService&&!this.gridOptionsService.get("suppressClipboardPaste")&&this.clipboardService.copyRangeDown(),e.preventDefault()},a.prototype.onCtrlAndZ=function(e){this.gridOptionsService.get("undoRedoCellEditing")&&(e.preventDefault(),e.shiftKey?this.undoRedoService.redo("ui"):this.undoRedoService.undo("ui"))},a.prototype.onCtrlAndY=function(){this.undoRedoService.redo("ui")},Du([de("mouseEventService")],a.prototype,"mouseEventService",void 0),Du([de("valueService")],a.prototype,"valueService",void 0),Du([te("contextMenuFactory")],a.prototype,"contextMenuFactory",void 0),Du([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Du([de("navigationService")],a.prototype,"navigationService",void 0),Du([de("focusService")],a.prototype,"focusService",void 0),Du([de("undoRedoService")],a.prototype,"undoRedoService",void 0),Du([de("columnModel")],a.prototype,"columnModel",void 0),Du([de("paginationProxy")],a.prototype,"paginationProxy",void 0),Du([de("pinnedRowModel")],a.prototype,"pinnedRowModel",void 0),Du([te("rangeService")],a.prototype,"rangeService",void 0),Du([te("clipboardService")],a.prototype,"clipboardService",void 0),Du([Z],a.prototype,"postConstruct",null),a}(je),wu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),vu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Mu=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},ku=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i0;){var m;if(i0)l-=(m=d[s++]).getActualWidth(),o.push(m)}return o},a.prototype.checkViewportAndScrolls=function(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.getScrollFeature().checkScrollLeft()},a.prototype.getBodyHeight=function(){return this.bodyHeight},a.prototype.checkBodyHeight=function(){var e=lt(this.gridBodyCtrl.getBodyViewportElement());if(this.bodyHeight!==e){this.bodyHeight=e;var a={type:Je.EVENT_BODY_HEIGHT_CHANGED};this.eventService.dispatchEvent(a)}},a.prototype.updateScrollVisibleService=function(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)},a.prototype.updateScrollVisibleServiceImpl=function(){var e={horizontalScrollShowing:this.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleService.setScrollsVisible(e)},a.prototype.isHorizontalScrollShowing=function(){return this.centerContainerCtrl.isHorizontalScrollShowing()},a.prototype.onHorizontalViewportChanged=function(){var e=this.centerContainerCtrl.getCenterWidth(),a=this.centerContainerCtrl.getViewportScrollLeft();this.columnModel.setViewportPosition(e,a)},vu([de("ctrlsService")],a.prototype,"ctrlsService",void 0),vu([de("pinnedWidthService")],a.prototype,"pinnedWidthService",void 0),vu([de("columnModel")],a.prototype,"columnModel",void 0),vu([de("scrollVisibleService")],a.prototype,"scrollVisibleService",void 0),vu([Z],a.prototype,"postConstruct",null),a}(je),Qu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Vu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Fu=function(e){function a(a){var d=e.call(this)||this;return d.element=a,d}return Qu(a,e),a.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_LEFT_PINNED_WIDTH_CHANGED,this.onPinnedLeftWidthChanged.bind(this))},a.prototype.onPinnedLeftWidthChanged=function(){var e=this.pinnedWidthService.getPinnedLeftWidth(),a=e>0;dt(this.element,a),Dt(this.element,e)},a.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedLeftWidth()},Vu([de("pinnedWidthService")],a.prototype,"pinnedWidthService",void 0),Vu([Z],a.prototype,"postConstruct",null),a}(je),Eu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ru=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Nu=function(e){function a(a){var d=e.call(this)||this;return d.element=a,d}return Eu(a,e),a.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_RIGHT_PINNED_WIDTH_CHANGED,this.onPinnedRightWidthChanged.bind(this))},a.prototype.onPinnedRightWidthChanged=function(){var e=this.pinnedWidthService.getPinnedRightWidth(),a=e>0;dt(this.element,a),Dt(this.element,e)},a.prototype.getWidth=function(){return this.pinnedWidthService.getPinnedRightWidth()},Ru([de("pinnedWidthService")],a.prototype,"pinnedWidthService",void 0),Ru([Z],a.prototype,"postConstruct",null),a}(je),Au=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Hu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Wu=function(e){function a(a,d){var t=e.call(this)||this;return t.eContainer=a,t.eViewport=d,t}return Au(a,e),a.prototype.postConstruct=function(){this.addManagedListener(this.eventService,Je.EVENT_ROW_CONTAINER_HEIGHT_CHANGED,this.onHeightChanged.bind(this))},a.prototype.onHeightChanged=function(){var e=this.maxDivHeightScaler.getUiContainerHeight(),a=null!=e?"".concat(e,"px"):"";this.eContainer.style.height=a,this.eViewport&&(this.eViewport.style.height=a)},Hu([de("rowContainerHeightService")],a.prototype,"maxDivHeightScaler",void 0),Hu([Z],a.prototype,"postConstruct",null),a}(je),ju=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Uu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},zu=function(e){function a(a){var d=e.call(this)||this;return d.eContainer=a,d}return ju(a,e),a.prototype.postConstruct=function(){var e=this;s(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(a){a.currentValue?e.enableFeature():e.disableFeature()})),this.addDestroyFunc((function(){return e.disableFeature()})),this.gridOptionsService.get("enableRangeSelection")&&this.enableFeature())},a.prototype.enableFeature=function(){this.dragService.addDragSource(this.params)},a.prototype.disableFeature=function(){this.dragService.removeDragSource(this.params)},Uu([te("rangeService")],a.prototype,"rangeService",void 0),Uu([de("dragService")],a.prototype,"dragService",void 0),Uu([Z],a.prototype,"postConstruct",null),a}(je),Ku=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Yu=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},$u=function(e){function a(a,d){void 0===d&&(d=!1);var t=e.call(this)||this;return t.callback=a,t.addSpacer=d,t}return Ku(a,e),a.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()},a.prototype.setWidth=function(){var e,a=this.columnModel,d=this.gridOptionsService.isDomLayout("print"),t=a.getBodyContainerWidth(),i=a.getDisplayedColumnsLeftWidth(),s=a.getDisplayedColumnsRightWidth();d?e=t+i+s:(e=t,this.addSpacer&&0===(this.gridOptionsService.get("enableRtl")?i:s)&&this.scrollVisibleService.isVerticalScrollShowing()&&(e+=this.gridOptionsService.getScrollbarWidth()));this.callback(e)},Yu([de("columnModel")],a.prototype,"columnModel",void 0),Yu([de("scrollVisibleService")],a.prototype,"scrollVisibleService",void 0),Yu([Z],a.prototype,"postConstruct",null),a}(je),Xu=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ju=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Zu=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},en=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=0&&a()},a.prototype.getContainerElement=function(){return this.eContainer},a.prototype.getViewportSizeFeature=function(){return this.viewportSizeFeature},a.prototype.setComp=function(e,a,d){var t=this;this.comp=e,this.eContainer=a,this.eViewport=d,this.createManagedBean(new Gu(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder(),this.stopHScrollOnPinnedRows();var i=[Lu.TOP_CENTER,Lu.TOP_LEFT,Lu.TOP_RIGHT],s=[Lu.STICKY_TOP_CENTER,Lu.STICKY_TOP_LEFT,Lu.STICKY_TOP_RIGHT],o=[Lu.BOTTOM_CENTER,Lu.BOTTOM_LEFT,Lu.BOTTOM_RIGHT],l=[Lu.CENTER,Lu.LEFT,Lu.RIGHT],m=en(en(en(en([],Zu(i),!1),Zu(o),!1),Zu(l),!1),Zu(s),!1),u=[Lu.CENTER,Lu.LEFT,Lu.RIGHT,Lu.FULL_WIDTH],n=[Lu.CENTER,Lu.TOP_CENTER,Lu.STICKY_TOP_CENTER,Lu.BOTTOM_CENTER],r=[Lu.LEFT,Lu.BOTTOM_LEFT,Lu.TOP_LEFT,Lu.STICKY_TOP_LEFT],f=[Lu.RIGHT,Lu.BOTTOM_RIGHT,Lu.TOP_RIGHT,Lu.STICKY_TOP_RIGHT];this.forContainers(r,(function(){t.pinnedWidthFeature=t.createManagedBean(new Fu(t.eContainer)),t.addManagedListener(t.eventService,Je.EVENT_LEFT_PINNED_WIDTH_CHANGED,(function(){return t.onPinnedWidthChanged()}))})),this.forContainers(f,(function(){t.pinnedWidthFeature=t.createManagedBean(new Nu(t.eContainer)),t.addManagedListener(t.eventService,Je.EVENT_RIGHT_PINNED_WIDTH_CHANGED,(function(){return t.onPinnedWidthChanged()}))})),this.forContainers(u,(function(){return t.createManagedBean(new Wu(t.eContainer,t.name===Lu.CENTER?d:void 0))})),this.forContainers(m,(function(){return t.createManagedBean(new zu(t.eContainer))})),this.forContainers(n,(function(){return t.createManagedBean(new $u((function(e){return t.comp.setContainerWidth("".concat(e,"px"))})))})),this.addListeners(),this.registerWithCtrlsService()},a.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(a){return e.onDisplayedRowsChanged(a.afterScroll)})),this.onDisplayedColumnsChanged(),this.onDisplayedColumnsWidthChanged(),this.onDisplayedRowsChanged()},a.prototype.listenOnDomOrder=function(){var e=this;if([Lu.STICKY_TOP_CENTER,Lu.STICKY_TOP_LEFT,Lu.STICKY_TOP_RIGHT,Lu.STICKY_TOP_FULL_WIDTH].indexOf(this.name)>=0)this.comp.setDomOrder(!0);else{var a=function(){var a=e.gridOptionsService.get("ensureDomOrder"),d=e.gridOptionsService.isDomLayout("print");e.comp.setDomOrder(a||d)};this.addManagedPropertyListener("domLayout",a),a()}},a.prototype.stopHScrollOnPinnedRows=function(){var e=this;this.forContainers([Lu.TOP_CENTER,Lu.STICKY_TOP_CENTER,Lu.BOTTOM_CENTER],(function(){e.addManagedListener(e.eViewport,"scroll",(function(){return e.eViewport.scrollLeft=0}))}))},a.prototype.onDisplayedColumnsChanged=function(){var e=this;this.forContainers([Lu.CENTER],(function(){return e.onHorizontalViewportChanged()}))},a.prototype.onDisplayedColumnsWidthChanged=function(){var e=this;this.forContainers([Lu.CENTER],(function(){return e.onHorizontalViewportChanged()}))},a.prototype.addPreventScrollWhileDragging=function(){var e=this,a=function(a){e.dragService.isDragging()&&a.cancelable&&a.preventDefault()};this.eContainer.addEventListener("touchmove",a,{passive:!1}),this.addDestroyFunc((function(){return e.eContainer.removeEventListener("touchmove",a)}))},a.prototype.onHorizontalViewportChanged=function(e){void 0===e&&(e=!1);var a=this.getCenterWidth(),d=this.getCenterViewportScrollLeft();this.columnModel.setViewportPosition(a,d,e)},a.prototype.getCenterWidth=function(){return mt(this.eViewport)},a.prototype.getCenterViewportScrollLeft=function(){return ct(this.eViewport,this.enableRtl)},a.prototype.registerViewportResizeListener=function(e){var a=this.resizeObserverService.observeResize(this.eViewport,e);this.addDestroyFunc((function(){return a()}))},a.prototype.isViewportVisible=function(){return qt(this.eViewport)},a.prototype.getViewportScrollLeft=function(){return ct(this.eViewport,this.enableRtl)},a.prototype.isHorizontalScrollShowing=function(){return this.gridOptionsService.get("alwaysShowHorizontalScroll")||Ot(this.eViewport)},a.prototype.getViewportElement=function(){return this.eViewport},a.prototype.setContainerTranslateX=function(e){this.eContainer.style.transform="translateX(".concat(e,"px)")},a.prototype.getHScrollPosition=function(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}},a.prototype.setCenterViewportScrollLeft=function(e){pt(this.eViewport,e,this.enableRtl)},a.prototype.isContainerVisible=function(){return!a.getPinned(this.name)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0},a.prototype.onPinnedWidthChanged=function(){var e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())},a.prototype.onDisplayedRowsChanged=function(e){var a=this;if(void 0===e&&(e=!1),this.visible){var d=this.gridOptionsService.isDomLayout("print"),t=this.gridOptionsService.get("embedFullWidthRows")||d,i=this.getRowCtrls().filter((function(e){var d=e.isFullWidth();return a.isFullWithContainer?!t&&d:t||!d}));this.comp.setRowCtrls(i,e)}else this.comp.setRowCtrls(this.EMPTY_CTRLS,!1)},a.prototype.getRowCtrls=function(){switch(this.name){case Lu.TOP_CENTER:case Lu.TOP_LEFT:case Lu.TOP_RIGHT:case Lu.TOP_FULL_WIDTH:return this.rowRenderer.getTopRowCtrls();case Lu.STICKY_TOP_CENTER:case Lu.STICKY_TOP_LEFT:case Lu.STICKY_TOP_RIGHT:case Lu.STICKY_TOP_FULL_WIDTH:return this.rowRenderer.getStickyTopRowCtrls();case Lu.BOTTOM_CENTER:case Lu.BOTTOM_LEFT:case Lu.BOTTOM_RIGHT:case Lu.BOTTOM_FULL_WIDTH:return this.rowRenderer.getBottomRowCtrls();default:return this.rowRenderer.getCentreRowCtrls()}},Ju([de("scrollVisibleService")],a.prototype,"scrollVisibleService",void 0),Ju([de("dragService")],a.prototype,"dragService",void 0),Ju([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Ju([de("columnModel")],a.prototype,"columnModel",void 0),Ju([de("resizeObserverService")],a.prototype,"resizeObserverService",void 0),Ju([de("animationFrameService")],a.prototype,"animationFrameService",void 0),Ju([de("rowRenderer")],a.prototype,"rowRenderer",void 0),Ju([Z],a.prototype,"postConstruct",null),a}(je),on=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),ln=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},mn='
\n \n \n \n \n \n \n \n
'),un=function(e){function a(){return e.call(this,mn)||this}return on(a,e),a.prototype.init=function(){var e=this,a=function(e,a){var d="".concat(e,"px");a.style.minHeight=d,a.style.height=d},d={setRowAnimationCssOnBodyViewport:function(a,d){return e.setRowAnimationCssOnBodyViewport(a,d)},setColumnCount:function(a){return ld(e.getGui(),a)},setRowCount:function(a){return sd(e.getGui(),a)},setTopHeight:function(d){return a(d,e.eTop)},setBottomHeight:function(d){return a(d,e.eBottom)},setTopDisplay:function(a){return e.eTop.style.display=a},setBottomDisplay:function(a){return e.eBottom.style.display=a},setStickyTopHeight:function(a){return e.eStickyTop.style.height=a},setStickyTopTop:function(a){return e.eStickyTop.style.top=a},setStickyTopWidth:function(a){return e.eStickyTop.style.width=a},setColumnMovingCss:function(a,d){return e.addOrRemoveCssClass(a,d)},updateLayoutClasses:function(a,d){[e.eBodyViewport.classList,e.eBody.classList].forEach((function(e){e.toggle(fm.AUTO_HEIGHT,d.autoHeight),e.toggle(fm.NORMAL,d.normal),e.toggle(fm.PRINT,d.print)})),e.addOrRemoveCssClass(fm.AUTO_HEIGHT,d.autoHeight),e.addOrRemoveCssClass(fm.NORMAL,d.normal),e.addOrRemoveCssClass(fm.PRINT,d.print)},setAlwaysVerticalScrollClass:function(a,d){return e.eBodyViewport.classList.toggle(Um,d)},registerBodyViewportResizeListener:function(a){var d=e.resizeObserverService.observeResize(e.eBodyViewport,a);e.addDestroyFunc((function(){return d()}))},setPinnedTopBottomOverflowY:function(a){return e.eTop.style.overflowY=e.eBottom.style.overflowY=a},setCellSelectableCss:function(a,d){[e.eTop,e.eBodyViewport,e.eBottom].forEach((function(e){return e.classList.toggle(a,d)}))},setBodyViewportWidth:function(a){return e.eBodyViewport.style.width=a}};this.ctrl=this.createManagedBean(new zm),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"))&&id(this.getGui(),!0)},a.prototype.setRowAnimationCssOnBodyViewport=function(e,a){var d=this.eBodyViewport.classList;d.toggle(km.ANIMATION_ON,a),d.toggle(km.ANIMATION_OFF,!a)},a.prototype.getFloatingTopBottom=function(){return[this.eTop,this.eBottom]},ln([de("resizeObserverService")],a.prototype,"resizeObserverService",void 0),ln([te("rangeService")],a.prototype,"rangeService",void 0),ln([Li("eBodyViewport")],a.prototype,"eBodyViewport",void 0),ln([Li("eStickyTop")],a.prototype,"eStickyTop",void 0),ln([Li("eTop")],a.prototype,"eTop",void 0),ln([Li("eBottom")],a.prototype,"eBottom",void 0),ln([Li("gridHeader")],a.prototype,"headerRootComp",void 0),ln([Li("eBody")],a.prototype,"eBody",void 0),ln([Z],a.prototype,"init",null),a}(hi),nn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),rn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},fn=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return nn(a,e),a.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))},a.prototype.onDisplayedColumnsChanged=function(){this.update()},a.prototype.onDisplayedColumnsWidthChanged=function(){this.update()},a.prototype.update=function(){this.updateImpl(),setTimeout(this.updateImpl.bind(this),500)},a.prototype.updateImpl=function(){var e=this.ctrlsService.getCenterRowContainerCtrl();if(e){var a={horizontalScrollShowing:e.isHorizontalScrollShowing(),verticalScrollShowing:this.isVerticalScrollShowing()};this.setScrollsVisible(a)}},a.prototype.setScrollsVisible=function(e){if(this.horizontalScrollShowing!==e.horizontalScrollShowing||this.verticalScrollShowing!==e.verticalScrollShowing){this.horizontalScrollShowing=e.horizontalScrollShowing,this.verticalScrollShowing=e.verticalScrollShowing;var a={type:Je.EVENT_SCROLL_VISIBILITY_CHANGED};this.eventService.dispatchEvent(a)}},a.prototype.isHorizontalScrollShowing=function(){return this.horizontalScrollShowing},a.prototype.isVerticalScrollShowing=function(){return this.verticalScrollShowing},rn([de("ctrlsService")],a.prototype,"ctrlsService",void 0),rn([Z],a.prototype,"postConstruct",null),a=rn([ae("scrollVisibleService")],a)}(je),cn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),pn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},_n=function(e){function a(){var a=null!==e&&e.apply(this,arguments)||this;return a.gridInstanceId=d.gridInstanceSequence.next(),a}var d;return cn(a,e),d=a,a.prototype.stampTopLevelGridCompWithGridInstance=function(e){e[d.GRID_DOM_KEY]=this.gridInstanceId},a.prototype.getRenderedCellForEvent=function(e){return Fe(this.gridOptionsService,e.target,bu.DOM_DATA_KEY_CELL_CTRL)},a.prototype.isEventFromThisGrid=function(e){return this.isElementInThisGrid(e.target)},a.prototype.isElementInThisGrid=function(e){for(var a=e;a;){var t=a[d.GRID_DOM_KEY];if(i(t))return t===this.gridInstanceId;a=a.parentElement}return!1},a.prototype.getCellPositionForEvent=function(e){var a=this.getRenderedCellForEvent(e);return a?a.getCellPosition():null},a.prototype.getNormalisedPosition=function(e){var a,d,t=this.gridOptionsService.isDomLayout("normal"),i=e;if(null!=i.clientX||null!=i.clientY?(a=i.clientX,d=i.clientY):(a=i.x,d=i.y),t){var s=this.ctrlsService.getGridBodyCtrl(),o=s.getScrollFeature().getVScrollPosition();a+=s.getScrollFeature().getHScrollPosition().left,d+=o.top}return{x:a,y:d}},a.gridInstanceSequence=new mi,a.GRID_DOM_KEY="__ag_grid_instance",pn([de("ctrlsService")],a.prototype,"ctrlsService",void 0),a=d=pn([ae("mouseEventService")],a)}(je),yn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),qn=function(){return qn=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Cn=function(e){function a(){var a=e.call(this)||this;return a.onPageDown=N(a.onPageDown,100),a.onPageUp=N(a.onPageUp,100),a}return yn(a,e),a.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(a){e.gridBodyCon=a.gridBodyCtrl}))},a.prototype.handlePageScrollingKey=function(e,a){void 0===a&&(a=!1);var d=e.key,t=e.altKey,i=e.ctrlKey||e.metaKey,s=!!this.rangeService&&e.shiftKey,o=this.mouseEventService.getCellPositionForEvent(e),l=!1;switch(d){case zt.PAGE_HOME:case zt.PAGE_END:i||t||(this.onHomeOrEndKey(d),l=!0);break;case zt.LEFT:case zt.RIGHT:case zt.UP:case zt.DOWN:if(!o)return!1;!i||t||s||(this.onCtrlUpDownLeftRight(d,o),l=!0);break;case zt.PAGE_DOWN:case zt.PAGE_UP:i||t||(l=this.handlePageUpDown(d,o,a))}return l&&e.preventDefault(),l},a.prototype.handlePageUpDown=function(e,a,d){return d&&(a=this.focusService.getFocusedCell()),!!a&&(e===zt.PAGE_UP?this.onPageUp(a):this.onPageDown(a),!0)},a.prototype.navigateTo=function(e){var a=e.scrollIndex,d=e.scrollType,t=e.scrollColumn,s=e.focusIndex,o=e.focusColumn;if(i(t)&&!t.isPinned()&&this.gridBodyCon.getScrollFeature().ensureColumnVisible(t),i(a)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(a,d),e.isAsync||this.gridBodyCon.getScrollFeature().ensureIndexVisible(s),this.focusService.setFocusedCell({rowIndex:s,column:o,rowPinned:null,forceBrowserFocus:!0}),this.rangeService){var l={rowIndex:s,rowPinned:null,column:o};this.rangeService.setRangeToCell(l)}},a.prototype.onPageDown=function(e){var a=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.getViewportHeight(),t=this.paginationProxy.getPixelOffset(),i=a.top+d,s=this.paginationProxy.getRowIndexAtPixel(i+t);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,s):this.navigateToNextPage(e,s)},a.prototype.onPageUp=function(e){var a=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),d=this.paginationProxy.getPixelOffset(),t=a.top,i=this.paginationProxy.getRowIndexAtPixel(t+d);this.columnModel.isAutoRowHeightActive()?this.navigateToNextPageWithAutoHeight(e,i,!0):this.navigateToNextPage(e,i,!0)},a.prototype.navigateToNextPage=function(e,a,d){void 0===d&&(d=!1);var t,i=this.getViewportHeight(),s=this.paginationProxy.getPageFirstRow(),o=this.paginationProxy.getPageLastRow(),l=this.paginationProxy.getPixelOffset(),m=this.paginationProxy.getRow(e.rowIndex),u=d?(null===m||void 0===m?void 0:m.rowHeight)-i-l:i-l,n=(null===m||void 0===m?void 0:m.rowTop)+u,r=this.paginationProxy.getRowIndexAtPixel(n+l);if(r===e.rowIndex){var f=d?-1:1;a=r=e.rowIndex+f}d?(t="bottom",ro&&(r=o),a>o&&(a=o)),this.isRowTallerThanView(r)&&(a=r,t="top"),this.navigateTo({scrollIndex:a,scrollType:t,scrollColumn:null,focusIndex:r,focusColumn:e.column})},a.prototype.navigateToNextPageWithAutoHeight=function(e,a,d){var t=this;void 0===d&&(d=!1),this.navigateTo({scrollIndex:a,scrollType:d?"bottom":"top",scrollColumn:null,focusIndex:a,focusColumn:e.column}),setTimeout((function(){var i=t.getNextFocusIndexForAutoHeight(e,d);t.navigateTo({scrollIndex:a,scrollType:d?"bottom":"top",scrollColumn:null,focusIndex:i,focusColumn:e.column,isAsync:!0})}),50)},a.prototype.getNextFocusIndexForAutoHeight=function(e,a){var d;void 0===a&&(a=!1);for(var t=a?-1:1,i=this.getViewportHeight(),s=this.paginationProxy.getPageLastRow(),o=0,l=e.rowIndex;l>=0&&l<=s;){var m=this.paginationProxy.getRow(l);if(m){var u=null!==(d=m.rowHeight)&&void 0!==d?d:0;if(o+u>i)break;o+=u}l+=t}return Math.max(0,Math.min(l,s))},a.prototype.getViewportHeight=function(){var e=this.ctrlsService.getGridBodyCtrl().getScrollFeature().getVScrollPosition(),a=this.gridOptionsService.getScrollbarWidth(),d=e.bottom-e.top;return this.ctrlsService.getCenterRowContainerCtrl().isHorizontalScrollShowing()&&(d-=a),d},a.prototype.isRowTallerThanView=function(e){var a=this.paginationProxy.getRow(e);if(!a)return!1;var d=a.rowHeight;return"number"===typeof d&&d>this.getViewportHeight()},a.prototype.onCtrlUpDownLeftRight=function(e,a){var d=this.cellNavigationService.getNextCellToFocus(e,a,!0),t=d.rowIndex,i=d.column;this.navigateTo({scrollIndex:t,scrollType:null,scrollColumn:i,focusIndex:t,focusColumn:i})},a.prototype.onHomeOrEndKey=function(e){var a=e===zt.PAGE_HOME,d=this.columnModel.getAllDisplayedColumns(),t=a?d[0]:Ce(d),i=a?this.paginationProxy.getPageFirstRow():this.paginationProxy.getPageLastRow();this.navigateTo({scrollIndex:i,scrollType:null,scrollColumn:t,focusIndex:i,focusColumn:t})},a.prototype.onTabKeyDown=function(e,a){var d=a.shiftKey;if(this.tabToNextCellCommon(e,d,a))a.preventDefault();else if(d){var t=e.getRowPosition(),i=t.rowIndex;(t.rowPinned?0===i:i===this.paginationProxy.getPageFirstRow())&&(0===this.gridOptionsService.get("headerHeight")?this.focusService.focusNextGridCoreContainer(!0,!0):(a.preventDefault(),this.focusService.focusPreviousFromFirstCell(a)))}else e instanceof bu&&e.focusCell(!0),this.focusService.focusNextGridCoreContainer(d)&&a.preventDefault()},a.prototype.tabToNextCell=function(e,a){var d=this.focusService.getFocusedCell();if(!d)return!1;var t=this.getCellByPosition(d);return!!(t||(t=this.rowRenderer.getRowByPosition(d))&&t.isFullWidth())&&this.tabToNextCellCommon(t,e,a)},a.prototype.tabToNextCellCommon=function(e,a,d){var t=e.isEditing();if(!t&&e instanceof bu){var i=e.getRowCtrl();i&&(t=i.isEditing())}return(t?"fullRow"===this.gridOptionsService.get("editType")?this.moveToNextEditingRow(e,a,d):this.moveToNextEditingCell(e,a,d):this.moveToNextCellNotEditing(e,a))||!!this.focusService.getFocusedHeader()},a.prototype.moveToNextEditingCell=function(e,a,d){void 0===d&&(d=null);var t=e.getCellPosition();e.getGui().focus(),e.stopEditing();var i=this.findNextCellToFocusOn(t,a,!0);return null!=i&&(i.startEditing(null,!0,d),i.focusCell(!1),!0)},a.prototype.moveToNextEditingRow=function(e,a,d){void 0===d&&(d=null);var t=e.getCellPosition(),i=this.findNextCellToFocusOn(t,a,!0);if(null==i)return!1;var s=i.getCellPosition(),o=this.isCellEditable(t),l=this.isCellEditable(s),m=s&&t.rowIndex===s.rowIndex&&t.rowPinned===s.rowPinned;(o&&e.setFocusOutOnEditor(),m)||(e.getRowCtrl().stopEditing(),i.getRowCtrl().startRowEditing(void 0,void 0,d));return l?(i.setFocusInOnEditor(),i.focusCell()):i.focusCell(!0),!0},a.prototype.moveToNextCellNotEditing=function(e,a){var d,t=this.columnModel.getAllDisplayedColumns();d=e instanceof Bu?qn(qn({},e.getRowPosition()),{column:a?t[0]:Ce(t)}):e.getCellPosition();var s=this.findNextCellToFocusOn(d,a,!1);if(s instanceof bu)s.focusCell(!0);else if(s)return this.tryToFocusFullWidthRow(s.getRowPosition(),a);return i(s)},a.prototype.findNextCellToFocusOn=function(e,a,d){for(var t=e;;){e!==t&&(e=t),a||(t=this.getLastCellOfColSpan(t)),t=this.cellNavigationService.getNextTabbedCell(t,a);var s=this.gridOptionsService.getCallback("tabToNextCell");if(i(s)){var o=s({backwards:a,editing:d,previousCellPosition:e,nextCellPosition:t||null});i(o)?(o.floating&&(w("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),o.rowPinned=o.floating),t={rowIndex:o.rowIndex,column:o.column,rowPinned:o.rowPinned}):t=null}if(!t)return null;if(t.rowIndex<0){var l=this.headerNavigationService.getHeaderRowCount();return this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l+t.rowIndex,column:t.column},fromCell:!0}),null}var m="fullRow"===this.gridOptionsService.get("editType");if(d&&!m)if(!this.isCellEditable(t))continue;this.ensureCellVisible(t);var u=this.getCellByPosition(t);if(!u){var n=this.rowRenderer.getRowByPosition(t);if(!n||!n.isFullWidth()||d)continue;return n}if(!u.isSuppressNavigable())return this.rangeService&&this.rangeService.setRangeToCell(t),u}},a.prototype.isCellEditable=function(e){var a=this.lookupRowNodeForCell(e);return!!a&&e.column.isCellEditable(a)},a.prototype.getCellByPosition=function(e){var a=this.rowRenderer.getRowByPosition(e);return a?a.getCellCtrl(e.column):null},a.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)},a.prototype.navigateToNextCell=function(e,a,d,t){for(var o=d,l=!1;o&&(o===d||!this.isValidNavigateCell(o));)this.gridOptionsService.get("enableRtl")?a===zt.LEFT&&(o=this.getLastCellOfColSpan(o)):a===zt.RIGHT&&(o=this.getLastCellOfColSpan(o)),l=s(o=this.cellNavigationService.getNextCellToFocus(a,o));if(l&&e&&e.key===zt.UP&&(o={rowIndex:-1,rowPinned:null,column:d.column}),t){var m=this.gridOptionsService.getCallback("navigateToNextCell");if(i(m)){var u=m({key:a,previousCellPosition:d,nextCellPosition:o||null,event:e});i(u)?(u.floating&&(w("tabToNextCellFunc return type should have attributes: rowIndex, rowPinned, column. However you had 'floating', maybe you meant 'rowPinned'?"),u.rowPinned=u.floating),o={rowPinned:u.rowPinned,rowIndex:u.rowIndex,column:u.column}):o=null}}if(o)if(o.rowIndex<0){var n=this.headerNavigationService.getHeaderRowCount();this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:n+o.rowIndex,column:d.column},event:e||void 0,fromCell:!0})}else{var r=this.getNormalisedPosition(o);r?this.focusPosition(r):this.tryToFocusFullWidthRow(o)}},a.prototype.getNormalisedPosition=function(e){this.ensureCellVisible(e);var a=this.getCellByPosition(e);return a?(e=a.getCellPosition(),this.ensureCellVisible(e),e):null},a.prototype.tryToFocusFullWidthRow=function(e,a){void 0===a&&(a=!1);var d=this.columnModel.getAllDisplayedColumns(),t=this.rowRenderer.getRowByPosition(e);if(!t||!t.isFullWidth())return!1;var i=this.focusService.getFocusedCell(),s={rowIndex:e.rowIndex,rowPinned:e.rowPinned,column:e.column||(a?Ce(d):d[0])};this.focusPosition(s);var o=null!=i&&this.rowPositionUtils.before(s,i),l={type:Je.EVENT_FULL_WIDTH_ROW_FOCUSED,rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:s.column,isFullWidthCell:!0,floating:s.rowPinned,fromBelow:o};return this.eventService.dispatchEvent(l),!0},a.prototype.focusPosition=function(e){this.focusService.setFocusedCell({rowIndex:e.rowIndex,column:e.column,rowPinned:e.rowPinned,forceBrowserFocus:!0}),this.rangeService&&this.rangeService.setRangeToCell(e)},a.prototype.isValidNavigateCell=function(e){return!!this.rowPositionUtils.getRowNode(e)},a.prototype.getLastCellOfColSpan=function(e){var a=this.getCellByPosition(e);if(!a)return e;var d=a.getColSpanningList();return 1===d.length?e:{rowIndex:e.rowIndex,column:Ce(d),rowPinned:e.rowPinned}},a.prototype.ensureCellVisible=function(e){var a=this.gridOptionsService.isGroupRowsSticky(),d=this.rowModel.getRow(e.rowIndex);!(a&&(null===d||void 0===d?void 0:d.sticky))&&s(e.rowPinned)&&this.gridBodyCon.getScrollFeature().ensureIndexVisible(e.rowIndex),e.column.isPinned()||this.gridBodyCon.getScrollFeature().ensureColumnVisible(e.column)},bn([de("mouseEventService")],a.prototype,"mouseEventService",void 0),bn([de("paginationProxy")],a.prototype,"paginationProxy",void 0),bn([de("focusService")],a.prototype,"focusService",void 0),bn([te("rangeService")],a.prototype,"rangeService",void 0),bn([de("columnModel")],a.prototype,"columnModel",void 0),bn([de("rowModel")],a.prototype,"rowModel",void 0),bn([de("ctrlsService")],a.prototype,"ctrlsService",void 0),bn([de("rowRenderer")],a.prototype,"rowRenderer",void 0),bn([de("headerNavigationService")],a.prototype,"headerNavigationService",void 0),bn([de("rowPositionUtils")],a.prototype,"rowPositionUtils",void 0),bn([de("cellNavigationService")],a.prototype,"cellNavigationService",void 0),bn([de("pinnedRowModel")],a.prototype,"pinnedRowModel",void 0),bn([Z],a.prototype,"postConstruct",null),a=bn([ae("navigationService")],a)}(je),Pn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),hn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Tn=function(e){function a(a){var d=e.call(this,'
')||this;return d.params=a,d}return Pn(a,e),a.prototype.postConstruct=function(){this.gridOptionsService.setDomData(this.getGui(),a.DOM_KEY_POPUP_EDITOR_WRAPPER,!0),this.addKeyDownListener()},a.prototype.addKeyDownListener=function(){var e=this,a=this.getGui(),d=this.params;this.addManagedListener(a,"keydown",(function(a){Yt(e.gridOptionsService,a,d.node,d.column,!0)||d.onKeyDown(a)}))},a.DOM_KEY_POPUP_EDITOR_WRAPPER="popupEditorWrapper",hn([Z],a.prototype,"postConstruct",null),a}(co),Ln=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),In=function(e){function a(a,d,t,i,s){var o=e.call(this)||this;o.rendererVersion=0,o.editorVersion=0,o.beans=a,o.column=d.getColumn(),o.rowNode=d.getRowNode(),o.rowCtrl=d.getRowCtrl(),o.eRow=i,o.cellCtrl=d,o.setTemplate('
'));var l=o.getGui();o.forceWrapper=d.isForceWrapper(),o.refreshWrapper(!1);var m=function(e,a){null!=a&&""!=a?l.setAttribute(e,a):l.removeAttribute(e)};Na(l,d.getCellAriaRole()),m("col-id",d.getColumnIdSanitised());var u=d.getTabIndex();void 0!==u&&m("tabindex",u.toString());var n={addOrRemoveCssClass:function(e,a){return o.addOrRemoveCssClass(e,a)},setUserStyles:function(e){return It(l,e)},getFocusableElement:function(){return o.getFocusableElement()},setIncludeSelection:function(e){return o.includeSelection=e},setIncludeRowDrag:function(e){return o.includeRowDrag=e},setIncludeDndSource:function(e){return o.includeDndSource=e},setRenderDetails:function(e,a,d){return o.setRenderDetails(e,a,d)},setEditDetails:function(e,a,d){return o.setEditDetails(e,a,d)},getCellEditor:function(){return o.cellEditor||null},getCellRenderer:function(){return o.cellRenderer||null},getParentOfValue:function(){return o.getParentOfValue()}};return d.setComp(n,o.getGui(),o.eCellWrapper,t,s),o}return Ln(a,e),a.prototype.getParentOfValue=function(){return this.eCellValue?this.eCellValue:this.eCellWrapper?this.eCellWrapper:this.getGui()},a.prototype.setRenderDetails=function(e,a,d){if(!(this.cellEditor&&!this.cellEditorPopupWrapper)){this.firstRender=null==this.firstRender;var t=this.refreshWrapper(!1);if(this.refreshEditStyles(!1),e)!(d||t)&&this.refreshCellRenderer(e)||(this.destroyRenderer(),this.createCellRendererInstance(e));else this.destroyRenderer(),this.insertValueWithoutCellRenderer(a)}},a.prototype.setEditDetails=function(e,a,d){e?this.createCellEditorInstance(e,a,d):this.destroyEditor()},a.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)},a.prototype.refreshWrapper=function(e){var a=this.includeRowDrag||this.includeDndSource||this.includeSelection,d=a||this.forceWrapper,t=d&&null==this.eCellWrapper;t&&(this.eCellWrapper=bt(''),this.getGui().appendChild(this.eCellWrapper));var i=!d&&null!=this.eCellWrapper;i&&(yt(this.eCellWrapper),this.eCellWrapper=void 0),this.addOrRemoveCssClass("ag-cell-value",!d);var s=!e&&d,o=s&&null==this.eCellValue;o&&(this.eCellValue=bt(''),this.eCellWrapper.appendChild(this.eCellValue));var l=!s&&null!=this.eCellValue;l&&(yt(this.eCellValue),this.eCellValue=void 0);var m=t||i||o||l;return m&&this.removeControls(),e||a&&this.addControls(),m},a.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))},a.prototype.createCellEditorInstance=function(e,a,d){var t=this,i=this.editorVersion,o=e.newAgStackInstance();if(o){var l=e.params;o.then((function(e){return t.afterCellEditorCreated(i,e,l,a,d)})),s(this.cellEditor)&&l.cellStartedEdit&&this.cellCtrl.focusCell(!0)}},a.prototype.insertValueWithoutCellRenderer=function(e){var a=this.getParentOfValue();_t(a);var d=null!=e?oa(e):null;null!=d&&(a.innerHTML=d)},a.prototype.destroyEditorAndRenderer=function(){this.destroyRenderer(),this.destroyEditor()},a.prototype.destroyRenderer=function(){var e=this.beans.context;this.cellRenderer=e.destroyBean(this.cellRenderer),yt(this.cellRendererGui),this.cellRendererGui=null,this.rendererVersion++},a.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),yt(this.cellEditorGui),this.cellEditorGui=null,this.editorVersion++},a.prototype.refreshCellRenderer=function(e){if(null==this.cellRenderer||null==this.cellRenderer.refresh)return!1;if(this.cellRendererClass!==e.componentClass)return!1;var a=this.cellRenderer.refresh(e.params);return!0===a||void 0===a},a.prototype.createCellRendererInstance=function(e){var a=this,d=!this.beans.gridOptionsService.get("suppressAnimationFrame"),t=this.rendererVersion,i=e.componentClass,s=function(){if(!(a.rendererVersion!==t||!a.isAlive())){var d=e.newAgStackInstance(),s=a.afterCellRendererCreated.bind(a,t,i);d&&d.then(s)}};d&&this.firstRender?this.beans.animationFrameService.createTask(s,this.rowNode.rowIndex,"createTasksP2"):s()},a.prototype.getCtrl=function(){return this.cellCtrl},a.prototype.getRowCtrl=function(){return this.rowCtrl},a.prototype.getCellRenderer=function(){return this.cellRenderer},a.prototype.getCellEditor=function(){return this.cellEditor},a.prototype.afterCellRendererCreated=function(e,a,d){if(!this.isAlive()||e!==this.rendererVersion)this.beans.context.destroyBean(d);else if(this.cellRenderer=d,this.cellRendererClass=a,this.cellRendererGui=this.cellRenderer.getGui(),null!=this.cellRendererGui){var t=this.getParentOfValue();_t(t),t.appendChild(this.cellRendererGui)}},a.prototype.afterCellEditorCreated=function(e,a,d,t,i){if(e!==this.editorVersion)this.beans.context.destroyBean(a);else{if(a.isCancelBeforeStart&&a.isCancelBeforeStart())return this.beans.context.destroyBean(a),void this.cellCtrl.stopEditing(!0);if(!a.getGui)return console.warn("AG Grid: cellEditor for column ".concat(this.column.getId()," is missing getGui() method")),void this.beans.context.destroyBean(a);this.cellEditor=a,this.cellEditorGui=a.getGui();var s=t||void 0!==a.isPopup&&a.isPopup();s?this.addPopupCellEditor(d,i):this.addInCellEditor(),this.refreshEditStyles(!0,s),a.afterGuiAttached&&a.afterGuiAttached()}},a.prototype.refreshEditStyles=function(e,a){var d;this.addOrRemoveCssClass("ag-cell-inline-editing",e&&!a),this.addOrRemoveCssClass("ag-cell-popup-editing",e&&!!a),this.addOrRemoveCssClass("ag-cell-not-inline-editing",!e||!!a),null===(d=this.rowCtrl)||void 0===d||d.setInlineEditingCss(e)},a.prototype.addInCellEditor=function(){var e=this.getGui(),a=this.beans.gridOptionsService.getDocument();(e.contains(a.activeElement)&&e.focus(),this.destroyRenderer(),this.refreshWrapper(!0),this.clearParentOfValue(),this.cellEditorGui)&&this.getParentOfValue().appendChild(this.cellEditorGui)},a.prototype.addPopupCellEditor=function(e,a){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 t=this.cellEditor;this.cellEditorPopupWrapper=this.beans.context.createBean(new Tn(e));var i=this.cellEditorPopupWrapper.getGui();this.cellEditorGui&&i.appendChild(this.cellEditorGui);var s=this.beans.popupService,o=this.beans.gridOptionsService.get("stopEditingWhenCellsLoseFocus"),l=null!=a?a:t.getPopupPosition?t.getPopupPosition():"over",m=this.beans.gridOptionsService.get("enableRtl"),u={ePopup:i,column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),position:l,alignSide:m?"right":"left",keepWithinBounds:!0},n=s.positionPopupByComponent.bind(s,u),r=this.beans.localeService.getLocaleTextFunc(),f=s.addPopup({modal:o,eChild:i,closeOnEsc:!0,closedCallback:function(){d.cellCtrl.onPopupEditorClosed()},anchorToElement:this.getGui(),positionCallback:n,ariaLabel:r("ariaLabelCellEditor","Cell Editor")});f&&(this.hideEditorPopup=f.hideFunc)},a.prototype.detach=function(){this.eRow.removeChild(this.getGui())},a.prototype.destroy=function(){this.cellCtrl.stopEditing(),this.destroyEditorAndRenderer(),this.removeControls(),e.prototype.destroy.call(this)},a.prototype.clearParentOfValue=function(){var e=this.getGui(),a=this.beans.gridOptionsService.getDocument();e.contains(a.activeElement)&&Gd()&&e.focus({preventScroll:!0}),_t(this.getParentOfValue())},a}(hi),On=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Bn=function(e){function a(a,d,t){var i=e.call(this)||this;i.cellComps={},i.beans=d,i.rowCtrl=a,i.setTemplate('
'));var s=i.getGui(),o=s.style;i.domOrder=i.rowCtrl.getDomOrder(),Na(s,"row");var l=i.rowCtrl.getTabIndex();null!=l&&s.setAttribute("tabindex",l.toString());var m={setDomOrder:function(e){return i.domOrder=e},setCellCtrls:function(e){return i.setCellCtrls(e)},showFullWidth:function(e){return i.showFullWidth(e)},getFullWidthCellRenderer:function(){return i.getFullWidthCellRenderer()},addOrRemoveCssClass:function(e,a){return i.addOrRemoveCssClass(e,a)},setUserStyles:function(e){return It(s,e)},setTop:function(e){return o.top=e},setTransform:function(e){return o.transform=e},setRowIndex:function(e){return s.setAttribute("row-index",e)},setRowId:function(e){return s.setAttribute("row-id",e)},setRowBusinessKey:function(e){return s.setAttribute("row-business-key",e)}};return a.setComp(m,i.getGui(),t),i.addDestroyFunc((function(){a.unsetComp(t)})),i}return On(a,e),a.prototype.getInitialStyle=function(e){var a=this.rowCtrl.getInitialTransform(e),d=this.rowCtrl.getInitialRowTop(e);return a?"transform: ".concat(a):"top: ".concat(d)},a.prototype.showFullWidth=function(e){var a=this,d=e.newAgStackInstance();d&&d.then((function(e){if(a.isAlive()){var d=e.getGui();a.getGui().appendChild(d),a.rowCtrl.setupDetailRowAutoHeight(d),a.setFullWidthRowComp(e)}else a.beans.context.destroyBean(e)}))},a.prototype.setCellCtrls=function(e){var a=this,d=Object.assign({},this.cellComps);e.forEach((function(e){var t=e.getInstanceId();null==a.cellComps[t]?a.newCellComp(e):d[t]=null}));var t=L(d).filter((function(e){return null!=e}));this.destroyCells(t),this.ensureDomOrder(e)},a.prototype.ensureDomOrder=function(e){var a=this;if(this.domOrder){var d=[];e.forEach((function(e){var t=a.cellComps[e.getInstanceId()];t&&d.push(t.getGui())})),Tt(this.getGui(),d)}},a.prototype.newCellComp=function(e){var a=new In(this.beans,e,this.rowCtrl.isPrintLayout(),this.getGui(),this.rowCtrl.isEditing());this.cellComps[e.getInstanceId()]=a,this.getGui().appendChild(a.getGui())},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.destroyAllCells()},a.prototype.destroyAllCells=function(){var e=L(this.cellComps).filter((function(e){return null!=e}));this.destroyCells(e)},a.prototype.setFullWidthRowComp=function(e){var a=this;this.fullWidthCellRenderer&&console.error("AG Grid - should not be setting fullWidthRowComponent twice"),this.fullWidthCellRenderer=e,this.addDestroyFunc((function(){a.fullWidthCellRenderer=a.beans.context.destroyBean(a.fullWidthCellRenderer)}))},a.prototype.getFullWidthCellRenderer=function(){return this.fullWidthCellRenderer},a.prototype.destroyCells=function(e){var a=this;e.forEach((function(e){if(e){var d=e.getCtrl().getInstanceId();a.cellComps[d]===e&&(e.detach(),e.destroy(),a.cellComps[d]=null)}}))},a}(hi),Sn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Dn=function(){return Dn=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};var Gn,wn=function(e){function a(){var a=e.call(this,function(){var e=hi.elementGettingCreated.getAttribute("name"),a=sn.getRowContainerCssClasses(e);return e===Lu.CENTER||e===Lu.TOP_CENTER||e===Lu.STICKY_TOP_CENTER||e===Lu.BOTTOM_CENTER?''):'
')}())||this;return a.rowComps={},a.name=hi.elementGettingCreated.getAttribute("name"),a.type=an(a.name),a}return Sn(a,e),a.prototype.postConstruct=function(){var e=this,a={setViewportHeight:function(a){return e.eViewport.style.height=a},setRowCtrls:function(a){return e.setRowCtrls(a)},setDomOrder:function(a){e.domOrder=a},setContainerWidth:function(a){return e.eContainer.style.width=a}};this.createManagedBean(new sn(this.name)).setComp(a,this.eContainer,this.eViewport)},a.prototype.preDestroy=function(){this.setRowCtrls([])},a.prototype.setRowCtrls=function(e){var a=this,d=Dn({},this.rowComps);this.rowComps={},this.lastPlacedElement=null;e.forEach((function(e){var t=e.getInstanceId(),i=d[t];if(i)a.rowComps[t]=i,delete d[t],a.ensureDomOrder(i.getGui());else{if(!e.getRowNode().displayed)return;var s=new Bn(e,a.beans,a.type);a.rowComps[t]=s,a.appendRow(s.getGui())}})),L(d).forEach((function(e){a.eContainer.removeChild(e.getGui()),e.destroy()})),Na(this.eContainer,e.length?"rowgroup":"presentation")},a.prototype.appendRow=function(e){this.domOrder?Lt(this.eContainer,e,this.lastPlacedElement):this.eContainer.appendChild(e),this.lastPlacedElement=e},a.prototype.ensureDomOrder=function(e){this.domOrder&&(ht(this.eContainer,e,this.lastPlacedElement),this.lastPlacedElement=e)},gn([de("beans")],a.prototype,"beans",void 0),gn([Li("eViewport")],a.prototype,"eViewport",void 0),gn([Li("eContainer")],a.prototype,"eContainer",void 0),gn([Z],a.prototype,"postConstruct",null),gn([ee],a.prototype,"preDestroy",null),a}(hi),vn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Mn=function(){function e(e){this.columnsToAggregate=[],this.columnsToGroup=[],this.columnsToPivot=[],this.pinned=e}return e.prototype.onDragEnter=function(e){var a=this;if(this.clearColumnsList(),!this.gridOptionsService.get("functionsReadOnly")){var d=e.dragItem.columns;d&&d.forEach((function(e){e.isPrimary()&&(e.isAnyFunctionActive()||(e.isAllowValue()?a.columnsToAggregate.push(e):e.isAllowRowGroup()?a.columnsToGroup.push(e):e.isAllowPivot()&&a.columnsToPivot.push(e)))}))}},e.prototype.getIconName=function(){return this.columnsToAggregate.length+this.columnsToGroup.length+this.columnsToPivot.length>0?this.pinned?Ho.ICON_PINNED:Ho.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")},vn([de("columnModel")],e.prototype,"columnModel",void 0),vn([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),e}(),kn=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},xn=function(){function e(){}return e.attemptMoveColumns=function(e){var a=e.isFromHeader,d=e.hDirection,t=e.xPosition,i=e.fromEnter,s=e.fakeEvent,o=e.pinned,l=e.gridOptionsService,m=e.columnModel,u=d===Rs.Left,n=d===Rs.Right,r=e.allMovingColumns;if(a){var f=[];r.forEach((function(e){for(var a,d=null,t=e.getParent();null!=t&&1===t.getDisplayedLeafColumns().length;)d=t,t=t.getParent();null!=d?(!!(null===(a=d.getColGroupDef())||void 0===a?void 0:a.marryChildren)?d.getProvidedColumnGroup().getLeafColumns():d.getLeafColumns()).forEach((function(e){f.includes(e)||f.push(e)})):f.includes(e)||f.push(e)})),r=f}var c=r.slice();m.sortColumnsLikeGridColumns(c);var p=this.calculateValidMoves({movingCols:c,draggingRight:n,xPosition:t,pinned:o,gridOptionsService:l,columnModel:m}),_=this.calculateOldIndex(c,m);if(0!==p.length){var y=p[0],q=null!==_&&!i;if(a&&(q=null!==_),q&&!s){if(u&&y>=_)return;if(n&&y<=_)return}for(var b=m.getAllDisplayedColumns(),C=[],P=null,h=0;ho.length?[s,o]:[o,s],2))[0],o=i[1],s.forEach((function(e){-1===o.indexOf(e)&&d++}))},i=0;i0){for(var q=0;q0){var b=f[p-1];m=c.indexOf(b)+1}else-1===(m=c.indexOf(f[0]))&&(m=0);var C=[m],P=function(e,a){return e-a};if(d){for(var h=m+1,T=n.length-1;h<=T;)C.push(h),h++;C.sort(P)}else{h=m,T=n.length-1;for(var L=n[h];h<=T&&u.indexOf(L)<0;)h++,C.push(h),L=n[h];h=m-1;for(;h>=0;)C.push(h),h--;C.sort(P).reverse()}return C},e.normaliseX=function(e,a,d,t,i){var s=i.getHeaderRowContainerCtrl(a).getViewport();(d&&(e-=s.getBoundingClientRect().left),t.get("enableRtl"))&&(e=s.clientWidth-e);return null==a&&(e+=i.getCenterRowContainerCtrl().getCenterViewportScrollLeft()),e},e}(),Qn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Vn=function(){function e(e,a){this.needToMoveLeft=!1,this.needToMoveRight=!1,this.lastMovedInfo=null,this.pinned=e,this.eContainer=a,this.centerContainer=!i(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?Ho.ICON_PINNED:Ho.ICON_MOVE},e.prototype.onDragEnter=function(e){var a=e.dragItem.columns;if(e.dragSource.type===Fo.ToolPanel)this.setColumnsVisible(a,!0,"uiColumnDragged");else{var d=e.dragItem.visibleState,t=(a||[]).filter((function(e){return d[e.getId()]}));this.setColumnsVisible(t,!0,"uiColumnDragged")}this.setColumnsPinned(a,this.pinned,"uiColumnDragged"),this.onDragging(e,!0,!0)},e.prototype.onDragLeave=function(){this.ensureIntervalCleared(),this.lastMovedInfo=null},e.prototype.setColumnsVisible=function(e,a,d){if(void 0===d&&(d="api"),e){var t=e.filter((function(e){return!e.getColDef().lockVisible}));this.columnModel.setColumnsVisible(t,a,d)}},e.prototype.setColumnsPinned=function(e,a,d){if(void 0===d&&(d="api"),e){var t=e.filter((function(e){return!e.getColDef().lockPinned}));this.columnModel.setColumnsPinned(t,a,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 a=this.ctrlsService.getCenterRowContainerCtrl().getCenterViewportScrollLeft(),d=a+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,a,d,t){var i,o=this;if(void 0===e&&(e=this.lastDraggingEvent),void 0===a&&(a=!1),void 0===d&&(d=!1),void 0===t&&(t=!1),t){if(this.lastMovedInfo){var l=this.lastMovedInfo,m=l.columns,u=l.toIndex;xn.moveColumns(m,u,"uiColumnMoved",!0,this.columnModel)}}else if(this.lastDraggingEvent=e,!s(e.hDirection)){var n=xn.normaliseX(e.x,this.pinned,!1,this.gridOptionsService,this.ctrlsService);a||this.checkCenterForScrolling(n);var r=this.normaliseDirection(e.hDirection),f=e.dragSource.type,c=(null===(i=e.dragSource.getDragItem().columns)||void 0===i?void 0:i.filter((function(e){return!e.getColDef().lockPinned||e.getPinned()==o.pinned})))||[],p=xn.attemptMoveColumns({allMovingColumns:c,isFromHeader:f===Fo.HeaderCell,hDirection:r,xPosition:n,pinned:this.pinned,fromEnter:a,fakeEvent:d,gridOptionsService:this.gridOptionsService,columnModel:this.columnModel});p&&(this.lastMovedInfo=p)}},e.prototype.normaliseDirection=function(e){if(!this.gridOptionsService.get("enableRtl"))return e;switch(e){case Rs.Left:return Rs.Right;case Rs.Right:return Rs.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(Ho.ICON_LEFT,!0):this.dragAndDropService.setGhostIcon(Ho.ICON_RIGHT,!0))},e.prototype.ensureIntervalCleared=function(){this.movingIntervalId&&(window.clearInterval(this.movingIntervalId),this.movingIntervalId=null,this.dragAndDropService.setGhostIcon(Ho.ICON_MOVE))},e.prototype.moveInterval=function(){var e;this.intervalCount++,(e=10+5*this.intervalCount)>100&&(e=100);var a=null,d=this.gridBodyCon.getScrollFeature();if(this.needToMoveLeft?a=d.scrollHorizontally(-e):this.needToMoveRight&&(a=d.scrollHorizontally(e)),0!==a)this.onDragging(this.lastDraggingEvent),this.failedMoveAttempts=0;else{this.failedMoveAttempts++;var t=this.lastDraggingEvent.dragItem.columns.filter((function(e){return!e.getColDef().lockPinned}));if(t.length>0&&(this.dragAndDropService.setGhostIcon(Ho.ICON_PINNED),this.failedMoveAttempts>7)){var i=this.needToMoveLeft?"left":"right";this.setColumnsPinned(t,i,"uiColumnDragged"),this.dragAndDropService.nudge()}}},Qn([de("columnModel")],e.prototype,"columnModel",void 0),Qn([de("dragAndDropService")],e.prototype,"dragAndDropService",void 0),Qn([de("gridOptionsService")],e.prototype,"gridOptionsService",void 0),Qn([de("ctrlsService")],e.prototype,"ctrlsService",void 0),Qn([Z],e.prototype,"init",null),e}(),Fn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),En=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Rn=function(e){function a(a,d){var t=e.call(this)||this;return t.pinned=a,t.eContainer=d,t}return Fn(a,e),a.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(a){switch(e.pinned){case"left":e.eSecondaryContainers=[[a.gridBodyCtrl.getBodyViewportElement(),a.leftRowContainerCtrl.getContainerElement()],[a.bottomLeftRowContainerCtrl.getContainerElement()],[a.topLeftRowContainerCtrl.getContainerElement()]];break;case"right":e.eSecondaryContainers=[[a.gridBodyCtrl.getBodyViewportElement(),a.rightRowContainerCtrl.getContainerElement()],[a.bottomRightRowContainerCtrl.getContainerElement()],[a.topRightRowContainerCtrl.getContainerElement()]];break;default:e.eSecondaryContainers=[[a.gridBodyCtrl.getBodyViewportElement(),a.centerRowContainerCtrl.getViewportElement()],[a.bottomCenterRowContainerCtrl.getViewportElement()],[a.topCenterRowContainerCtrl.getViewportElement()]]}}))},a.prototype.isInterestedIn=function(e){return e===Fo.HeaderCell||e===Fo.ToolPanel&&this.gridOptionsService.get("allowDragFromColumnsToolPanel")},a.prototype.getSecondaryContainers=function(){return this.eSecondaryContainers},a.prototype.getContainer=function(){return this.eContainer},a.prototype.init=function(){this.moveColumnFeature=this.createManagedBean(new Vn(this.pinned,this.eContainer)),this.bodyDropPivotTarget=this.createManagedBean(new Mn(this.pinned)),this.dragAndDropService.addDropTarget(this)},a.prototype.getIconName=function(){return this.currentDropListener.getIconName()},a.prototype.isDropColumnInPivotMode=function(e){return this.columnModel.isPivotMode()&&e.dragSource.type===Fo.ToolPanel},a.prototype.onDragEnter=function(e){this.currentDropListener=this.isDropColumnInPivotMode(e)?this.bodyDropPivotTarget:this.moveColumnFeature,this.currentDropListener.onDragEnter(e)},a.prototype.onDragLeave=function(e){this.currentDropListener.onDragLeave(e)},a.prototype.onDragging=function(e){this.currentDropListener.onDragging(e)},a.prototype.onDragStop=function(e){this.currentDropListener.onDragStop(e)},En([de("dragAndDropService")],a.prototype,"dragAndDropService",void 0),En([de("columnModel")],a.prototype,"columnModel",void 0),En([de("ctrlsService")],a.prototype,"ctrlsService",void 0),En([Z],a.prototype,"postConstruct",null),En([Z],a.prototype,"init",null),a}(je),Nn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),An=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Hn=function(e){function a(d){var t=e.call(this,a.TEMPLATE,d)||this;return t.headerCompVersion=0,t.column=d.getColumnGroupChild(),t.pinned=d.getPinned(),t}return Nn(a,e),a.prototype.postConstruct=function(){var e,a,d=this,t=this.getGui();e="col-id",null!=(a=this.column.getColId())&&""!=a?t.setAttribute(e,a):t.removeAttribute(e);var i={setWidth:function(e){return t.style.width=e},addOrRemoveCssClass:function(e,a){return d.addOrRemoveCssClass(e,a)},setAriaDescription:function(e){return Ka(t,e)},setAriaSort:function(e){return e?nd(t,e):rd(t)},setUserCompDetails:function(e){return d.setUserCompDetails(e)},getUserCompInstance:function(){return d.headerComp}};this.ctrl.setComp(i,this.getGui(),this.eResize,this.eHeaderCompWrapper);var s=this.ctrl.getSelectAllGui();this.eResize.insertAdjacentElement("afterend",s)},a.prototype.destroyHeaderComp=function(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)},a.prototype.setUserCompDetails=function(e){var a=this;this.headerCompVersion++;var d=this.headerCompVersion;e.newAgStackInstance().then((function(e){return a.afterCompCreated(d,e)}))},a.prototype.afterCompCreated=function(e,a){e==this.headerCompVersion&&this.isAlive()?(this.destroyHeaderComp(),this.headerComp=a,this.headerCompGui=a.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())):this.destroyBean(a)},a.TEMPLATE='
\n \n \n
',An([Li("eResize")],a.prototype,"eResize",void 0),An([Li("eHeaderCompWrapper")],a.prototype,"eHeaderCompWrapper",void 0),An([Z],a.prototype,"postConstruct",null),An([ee],a.prototype,"destroyHeaderComp",null),a}(Tm),Wn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),jn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Un=function(e){function a(d){return e.call(this,a.TEMPLATE,d)||this}return Wn(a,e),a.prototype.postConstruct=function(){var e=this,a=this.getGui();a.setAttribute("col-id",this.ctrl.getColId());var d={addOrRemoveCssClass:function(a,d){return e.addOrRemoveCssClass(a,d)},setResizableDisplayed:function(a){return dt(e.eResize,a)},setWidth:function(e){return a.style.width=e},setAriaExpanded:function(e){return d="aria-expanded",void 0!=(t=e)?a.setAttribute(d,t):a.removeAttribute(d);var d,t},setUserCompDetails:function(a){return e.setUserCompDetails(a)},getUserCompInstance:function(){return e.headerGroupComp}};this.ctrl.setComp(d,a,this.eResize)},a.prototype.setUserCompDetails=function(e){var a=this;e.newAgStackInstance().then((function(e){return a.afterHeaderCompCreated(e)}))},a.prototype.afterHeaderCompCreated=function(e){var a=this,d=function(){return a.destroyBean(e)};if(this.isAlive()){var t=this.getGui(),i=e.getGui();t.appendChild(i),this.addDestroyFunc(d),this.headerGroupComp=e,this.ctrl.setDragSource(t)}else d()},a.TEMPLATE='
\n \n
',jn([de("userComponentFactory")],a.prototype,"userComponentFactory",void 0),jn([Li("eResize")],a.prototype,"eResize",void 0),jn([Z],a.prototype,"postConstruct",null),a}(Tm),zn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Kn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e.COLUMN_GROUP="group",e.COLUMN="column",e.FLOATING_FILTER="filter"}(Gn||(Gn={}));var Yn,$n=function(e){function a(a){var d=e.call(this)||this;return d.headerComps={},d.ctrl=a,d.setTemplate('
')),d}return zn(a,e),a.prototype.init=function(){var e=this;this.getGui().style.transform=this.ctrl.getTransform(),od(this.getGui(),this.ctrl.getAriaRowIndex());var a={setHeight:function(a){return e.getGui().style.height=a},setTop:function(a){return e.getGui().style.top=a},setHeaderCtrls:function(a,d){return e.setHeaderCtrls(a,d)},setWidth:function(a){return e.getGui().style.width=a}};this.ctrl.setComp(a)},a.prototype.destroyHeaderCtrls=function(){this.setHeaderCtrls([],!1)},a.prototype.setHeaderCtrls=function(e,a){var d=this;if(this.isAlive()){var t=this.headerComps;if(this.headerComps={},e.forEach((function(e){var a=e.getInstanceId(),i=t[a];delete t[a],null==i&&(i=d.createHeaderComp(e),d.getGui().appendChild(i.getGui())),d.headerComps[a]=i})),y(t,(function(e,a){d.getGui().removeChild(a.getGui()),d.destroyBean(a)})),a){var i=L(this.headerComps);i.sort((function(e,a){return e.getCtrl().getColumnGroupChild().getLeft()-a.getCtrl().getColumnGroupChild().getLeft()}));var s=i.map((function(e){return e.getGui()}));Tt(this.getGui(),s)}}},a.prototype.createHeaderComp=function(e){var a;switch(this.ctrl.getType()){case Gn.COLUMN_GROUP:a=new Un(e);break;case Gn.FLOATING_FILTER:a=new Om(e);break;default:a=new Hn(e)}return this.createBean(a),a.setParentComponent(this),a},Kn([Z],a.prototype,"init",null),Kn([ee],a.prototype,"destroyHeaderCtrls",null),a}(hi),Xn=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Jn=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Zn=0,er=function(e){function a(a,d){var t=e.call(this)||this;return t.resizeToggleTimeout=0,t.resizeMultiplier=1,t.resizeFeature=null,t.lastFocusEvent=null,t.dragSource=null,t.columnGroupChild=a,t.parentRowCtrl=d,t.instanceId=a.getUniqueId()+"-"+Zn++,t}return Xn(a,e),a.prototype.shouldStopEventPropagation=function(e){var a=this.focusService.getFocusedHeader(),d=a.headerRowIndex,t=a.column;return $t(this.gridOptionsService,e,d,t)},a.prototype.getWrapperHasFocus=function(){return this.gridOptionsService.getDocument().activeElement===this.eGui},a.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()},a.prototype.onDisplayedColumnsChanged=function(){this.comp&&this.column&&(this.refreshFirstAndLastStyles(),this.refreshAriaColIndex())},a.prototype.refreshFirstAndLastStyles=function(){var e=this,a=e.comp,d=e.column,t=e.beans;pu.refreshFirstAndLastStyles(a,d,t.columnModel)},a.prototype.refreshAriaColIndex=function(){var e=this.beans,a=this.column,d=e.columnModel.getAriaColumnIndex(a);md(this.eGui,d)},a.prototype.addResizeAndMoveKeyboardListeners=function(){this.resizeFeature&&(this.addManagedListener(this.eGui,"keydown",this.onGuiKeyDown.bind(this)),this.addManagedListener(this.eGui,"keyup",this.onGuiKeyUp.bind(this)))},a.prototype.onGuiKeyDown=function(e){var a,d=this.gridOptionsService.getDocument().activeElement,t=e.key===zt.LEFT||e.key===zt.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),d===this.eGui&&(e.shiftKey||e.altKey)&&((this.isResizing||t)&&(e.preventDefault(),e.stopImmediatePropagation()),t)){var i=e.key===zt.LEFT!==this.gridOptionsService.get("enableRtl"),s=Rs[i?"Left":"Right"];e.altKey?(this.isResizing=!0,this.resizeMultiplier+=1,this.resizeHeader(s,e.shiftKey),null===(a=this.resizeFeature)||void 0===a||a.toggleColumnResizing(!0)):this.moveHeader(s)}},a.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 a;null===(a=e.resizeFeature)||void 0===a||a.toggleColumnResizing(!1)}),150))},a.prototype.handleKeyDown=function(e){var a=this.getWrapperHasFocus();switch(e.key){case zt.PAGE_DOWN:case zt.PAGE_UP:case zt.PAGE_HOME:case zt.PAGE_END:a&&e.preventDefault()}},a.prototype.addDomData=function(){var e=this,d=a.DOM_DATA_KEY_HEADER_CTRL;this.gridOptionsService.setDomData(this.eGui,d,this),this.addDestroyFunc((function(){return e.gridOptionsService.setDomData(e.eGui,d,null)}))},a.prototype.getGui=function(){return this.eGui},a.prototype.focus=function(e){return!!this.eGui&&(this.lastFocusEvent=e||null,this.eGui.focus(),!0)},a.prototype.getRowIndex=function(){return this.parentRowCtrl.getRowIndex()},a.prototype.getParentRowCtrl=function(){return this.parentRowCtrl},a.prototype.getPinned=function(){return this.parentRowCtrl.getPinned()},a.prototype.getInstanceId=function(){return this.instanceId},a.prototype.getColumnGroupChild=function(){return this.columnGroupChild},a.prototype.removeDragSource=function(){this.dragSource&&(this.dragAndDropService.removeDragSource(this.dragSource),this.dragSource=null)},a.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},a.DOM_DATA_KEY_HEADER_CTRL="headerCtrl",Jn([de("focusService")],a.prototype,"focusService",void 0),Jn([de("beans")],a.prototype,"beans",void 0),Jn([de("userComponentFactory")],a.prototype,"userComponentFactory",void 0),Jn([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Jn([de("dragAndDropService")],a.prototype,"dragAndDropService",void 0),a}(je),ar=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),dr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},tr=function(e){function a(a,d,t,i){var s=e.call(this)||this;return s.columnOrGroup=a,s.eCell=d,s.ariaEl=s.eCell.querySelector("[role=columnheader]")||s.eCell,s.colsSpanning=i,s.beans=t,s}return ar(a,e),a.prototype.setColsSpanning=function(e){this.colsSpanning=e,this.onLeftChanged()},a.prototype.getColumnOrGroup=function(){return this.beans.gridOptionsService.get("enableRtl")&&this.colsSpanning?Ce(this.colsSpanning):this.columnOrGroup},a.prototype.postConstruct=function(){this.addManagedListener(this.columnOrGroup,pe.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))},a.prototype.setLeftFirstTime=function(){var e=this.beans.gridOptionsService.get("suppressColumnMoveAnimation"),a=i(this.columnOrGroup.getOldLeft());this.beans.columnAnimationService.isActive()&&a&&!e?this.animateInLeft():this.onLeftChanged()},a.prototype.animateInLeft=function(){var e=this,a=this.getColumnOrGroup(),d=a.getLeft(),t=a.getOldLeft(),i=this.modifyLeftForPrintLayout(a,t),s=this.modifyLeftForPrintLayout(a,d);this.setLeft(i),this.actualLeft=s,this.beans.columnAnimationService.executeNextVMTurn((function(){e.actualLeft===s&&e.setLeft(s)}))},a.prototype.onLeftChanged=function(){var e=this.getColumnOrGroup(),a=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,a),this.setLeft(this.actualLeft)},a.prototype.modifyLeftForPrintLayout=function(e,a){if(!this.beans.gridOptionsService.isDomLayout("print"))return a;if("left"===e.getPinned())return a;var d=this.beans.columnModel.getDisplayedColumnsLeftWidth();return"right"===e.getPinned()?d+this.beans.columnModel.getBodyContainerWidth()+a:d+a},a.prototype.setLeft=function(e){if(i(e)&&(this.eCell.style.left="".concat(e,"px")),this.columnOrGroup instanceof pe)this.columnOrGroup;else{var a=this.columnOrGroup.getLeafColumns();if(!a.length)return;a.length>1&&ud(this.ariaEl,a.length),a[0]}},dr([Z],a.prototype,"postConstruct",null),a}(je),ir=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),sr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},or=function(e){function a(a,d){var t=e.call(this)||this;return t.columns=a,t.element=d,t}return ir(a,e),a.prototype.postConstruct=function(){this.gridOptionsService.get("columnHoverHighlight")&&this.addMouseHoverListeners()},a.prototype.addMouseHoverListeners=function(){this.addManagedListener(this.element,"mouseout",this.onMouseOut.bind(this)),this.addManagedListener(this.element,"mouseover",this.onMouseOver.bind(this))},a.prototype.onMouseOut=function(){this.columnHoverService.clearMouseOver()},a.prototype.onMouseOver=function(){this.columnHoverService.setMouseOver(this.columns)},sr([de("columnHoverService")],a.prototype,"columnHoverService",void 0),sr([Z],a.prototype,"postConstruct",null),a}(je),lr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),mr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ur=function(e){function a(a,d){var t=e.call(this,a,d)||this;return t.iconCreated=!1,t.column=a,t}return lr(a,e),a.prototype.setComp=function(e,a,d,t){this.comp=e,this.eButtonShowMainFilter=d,this.eFloatingFilterBody=t,this.setGui(a),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,pe.EVENT_COL_DEF_CHANGED,this.onColDefChanged.bind(this))},a.prototype.resizeHeader=function(){},a.prototype.moveHeader=function(){},a.prototype.setupActive=function(){var e=this.column.getColDef(),a=!!e.filter,d=!!e.floatingFilter;this.active=a&&d},a.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=jt("filter",this.gridOptionsService,this.column);e&&(this.iconCreated=!0,this.eButtonShowMainFilter.appendChild(e))}},a.prototype.setupFocus=function(){this.createManagedBean(new ki(this.eGui,{shouldStopEventPropagation:this.shouldStopEventPropagation.bind(this),onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this)}))},a.prototype.setupAria=function(){var e=this.localeService.getLocaleTextFunc();Ua(this.eButtonShowMainFilter,e("ariaFilterMenuOpen","Open Filter Menu"))},a.prototype.onTabKeyDown=function(e){if(!(this.gridOptionsService.getDocument().activeElement===this.eGui)){var a=this.focusService.findNextFocusableElement(this.eGui,null,e.shiftKey);if(a)return this.beans.headerNavigationService.scrollToColumn(this.column),e.preventDefault(),void a.focus();var d=this.findNextColumnWithFloatingFilter(e.shiftKey);d&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:this.getParentRowCtrl().getRowIndex(),column:d},event:e})&&e.preventDefault()}},a.prototype.findNextColumnWithFloatingFilter=function(e){var a=this.beans.columnModel,d=this.column;do{if(!(d=e?a.getDisplayedColBefore(d):a.getDisplayedColAfter(d)))break}while(!d.getColDef().filter||!d.getColDef().floatingFilter);return d},a.prototype.handleKeyDown=function(a){e.prototype.handleKeyDown.call(this,a);var d=this.getWrapperHasFocus();switch(a.key){case zt.UP:case zt.DOWN:d||a.preventDefault();case zt.LEFT:case zt.RIGHT:if(d)return;a.stopPropagation();case zt.ENTER:d&&this.focusService.focusInto(this.eGui)&&a.preventDefault();break;case zt.ESCAPE:d||this.eGui.focus()}},a.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var a=!!e.relatedTarget&&!e.relatedTarget.classList.contains("ag-floating-filter"),d=!!e.relatedTarget&&st(e.relatedTarget,"ag-floating-filter");if(a&&d&&e.target===this.eGui){var t=this.lastFocusEvent,i=!(!t||t.key!==zt.TAB);if(t&&i){var s=t.shiftKey;this.focusService.focusInto(this.eGui,s)}}var o=this.getRowIndex();this.beans.focusService.setFocusedHeader(o,this.column)}},a.prototype.setupHover=function(){var e=this;this.createManagedBean(new or([this.column],this.eGui));var a=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var a=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",a)}};this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HOVER_CHANGED,a),a()},a.prototype.setupLeft=function(){var e=new tr(this.column,this.eGui,this.beans);this.createManagedBean(e)},a.prototype.setupFilterButton=function(){var e=this.column.getColDef();this.suppressFilterButton=!!e.floatingFilterComponentParams&&!!e.floatingFilterComponentParams.suppressFilterButton},a.prototype.setupUserComp=function(){var e=this;if(this.active){var a=this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return e.showParentFilter()}));a&&this.setCompDetails(a)}},a.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setCompDetails(e)},a.prototype.showParentFilter=function(){var e=this.suppressFilterButton?this.eFloatingFilterBody:this.eButtonShowMainFilter;this.menuFactory.showMenuAfterButtonClick(this.column,e,"floatingFilter","filterMenuTab",["filterMenuTab"])},a.prototype.setupSyncWithFilter=function(){var e=this;if(this.active){var a=function(a){var d=e.comp.getFloatingFilterComp();d&&d.then((function(d){if(d){var t=e.filterManager.getCurrentFloatingFilterParentModel(e.column);d.onParentModelChanged(t,a)}}))};this.destroySyncListener=this.addManagedListener(this.column,pe.EVENT_FILTER_CHANGED,a),this.filterManager.isFilterActive(this.column)&&a(null)}},a.prototype.setupWidth=function(){var e=this,a=function(){var a="".concat(e.column.getActualWidth(),"px");e.comp.setWidth(a)};this.addManagedListener(this.column,pe.EVENT_WIDTH_CHANGED,a),a()},a.prototype.setupFilterChangedListener=function(){this.active&&(this.destroyFilterChangedListener=this.addManagedListener(this.column,pe.EVENT_FILTER_CHANGED,this.updateFilterButton.bind(this)))},a.prototype.updateFilterButton=function(){!this.suppressFilterButton&&this.comp&&this.comp.setButtonWrapperDisplayed(this.filterManager.isFilterAllowed(this.column))},a.prototype.onColDefChanged=function(){var e,a,d=this,t=this.active;this.setupActive();var i=!t&&this.active;t&&!this.active&&(null===(e=this.destroySyncListener)||void 0===e||e.call(this),null===(a=this.destroyFilterChangedListener)||void 0===a||a.call(this));var s=this.active?this.filterManager.getFloatingFilterCompDetails(this.column,(function(){return d.showParentFilter()})):null,o=this.comp.getFloatingFilterComp();o&&s?o.then((function(e){var a;!e||d.filterManager.areFilterCompsDifferent(null!==(a=d.userCompDetails)&&void 0!==a?a:null,s)?d.updateCompDetails(s,i):d.updateFloatingFilterParams(s)})):this.updateCompDetails(s,i)},a.prototype.updateCompDetails=function(e,a){this.setCompDetails(e),this.setupFilterButton(),this.setupUi(),a&&(this.setupSyncWithFilter(),this.setupFilterChangedListener())},a.prototype.updateFloatingFilterParams=function(e){var a;if(e){var d=e.params;null===(a=this.comp.getFloatingFilterComp())||void 0===a||a.then((function(e){(null===e||void 0===e?void 0:e.onParamsUpdated)&&"function"===typeof e.onParamsUpdated&&e.onParamsUpdated(d)}))}},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.eButtonShowMainFilter=null,this.eFloatingFilterBody=null,this.userCompDetails=null,this.destroySyncListener=null,this.destroyFilterChangedListener=null},mr([de("filterManager")],a.prototype,"filterManager",void 0),mr([de("columnHoverService")],a.prototype,"columnHoverService",void 0),mr([de("menuFactory")],a.prototype,"menuFactory",void 0),a}(er),nr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),rr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},fr=function(e){function a(a,d,t,i,s){var o=e.call(this)||this;return o.pinned=a,o.column=d,o.eResize=t,o.comp=i,o.ctrl=s,o}return nr(a,e),a.prototype.postConstruct=function(){var e,a,d=this,t=[],i=function(){t.forEach((function(e){return e()})),t.length=0},s=function(){var s=d.column.isResizable(),o=!d.gridOptionsService.get("suppressAutoSize")&&!d.column.getColDef().suppressAutoSize;(s!==e||o!==a)&&(e=s,a=o,i(),function(){if(dt(d.eResize,e),e){var i=d.horizontalResizeService.addResizeBar({eResizeBar:d.eResize,onResizeStart:d.onResizeStart.bind(d),onResizing:d.onResizing.bind(d,!1),onResizeEnd:d.onResizing.bind(d,!0)});if(t.push(i),a){var s=d.gridOptionsService.get("skipHeaderOnAutoSize"),o=function(){d.columnModel.autoSizeColumn(d.column,s,"uiColumnResized")};d.eResize.addEventListener("dblclick",o);var l=new ao(d.eResize);l.addEventListener(ao.EVENT_DOUBLE_TAP,o),t.push((function(){d.eResize.removeEventListener("dblclick",o),l.removeEventListener(ao.EVENT_DOUBLE_TAP,o),l.destroy()}))}}}())};s(),this.addDestroyFunc(i),this.ctrl.addRefreshFunction(s)},a.prototype.onResizing=function(e,a){var d=this,t=d.column,i=d.lastResizeAmount,s=d.resizeStartWidth,o=this.normaliseResizeAmount(a),l=[{key:t,newWidth:s+o}];if(this.column.getPinned()&&this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+(o-i)>mt(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return;this.lastResizeAmount=o,this.columnModel.setColumnWidths(l,this.resizeWithShiftKey,e,"uiColumnResized"),e&&this.toggleColumnResizing(!1)},a.prototype.onResizeStart=function(e){this.resizeStartWidth=this.column.getActualWidth(),this.lastResizeAmount=0,this.resizeWithShiftKey=e,this.toggleColumnResizing(!0)},a.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},a.prototype.normaliseResizeAmount=function(e){var a=e,d="left"!==this.pinned,t="right"===this.pinned;return this.gridOptionsService.get("enableRtl")?d&&(a*=-1):t&&(a*=-1),a},rr([de("horizontalResizeService")],a.prototype,"horizontalResizeService",void 0),rr([de("pinnedWidthService")],a.prototype,"pinnedWidthService",void 0),rr([de("ctrlsService")],a.prototype,"ctrlsService",void 0),rr([de("columnModel")],a.prototype,"columnModel",void 0),rr([Z],a.prototype,"postConstruct",null),a}(je),cr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),pr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},_r=function(e){function a(a){var d=e.call(this)||this;return d.cbSelectAllVisible=!1,d.processingEventFromCheckbox=!1,d.column=a,d}return cr(a,e),a.prototype.onSpaceKeyDown=function(e){var a=this.cbSelectAll,d=this.gridOptionsService.getDocument();a.isDisplayed()&&!a.getGui().contains(d.activeElement)&&(e.preventDefault(),a.setValue(!a.getValue()))},a.prototype.getCheckboxGui=function(){return this.cbSelectAll.getGui()},a.prototype.setComp=function(e){this.headerCellCtrl=e,this.cbSelectAll=this.createManagedBean(new ls),this.cbSelectAll.addCssClass("ag-header-select-all"),Na(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)),Ja(this.cbSelectAll.getGui(),!0),this.cbSelectAll.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()},a.prototype.onNewColumnsLoaded=function(){this.showOrHideSelectAll()},a.prototype.onDisplayedColumnsChanged=function(){this.isAlive()&&this.showOrHideSelectAll()},a.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()},a.prototype.onModelChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},a.prototype.onSelectionChanged=function(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()},a.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}},a.prototype.refreshSelectAllLabel=function(){var e=this.localeService.getLocaleTextFunc(),a=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(a,")")):this.headerCellCtrl.setAriaDescriptionProperty("selectAll",null),this.cbSelectAll.setInputAriaLabel("".concat(d," (").concat(a,")")),this.headerCellCtrl.refreshAriaDescription()},a.prototype.checkSelectionType=function(e){return!("multiple"!==this.gridOptionsService.get("rowSelection"))||(console.warn("AG Grid: ".concat(e," is only available if using 'multiple' rowSelection.")),!1)},a.prototype.checkRightRowModelType=function(e){var a=this.rowModel.getType();return!("clientSide"!==a&&"serverSide"!==a)||(console.warn("AG Grid: ".concat(e," is only available if using 'clientSide' or 'serverSide' rowModelType, you are using ").concat(a,".")),!1)},a.prototype.onCbSelectAll=function(){if(!this.processingEventFromCheckbox&&this.cbSelectAllVisible){var e=this.cbSelectAll.getValue(),a=this.isFilteredOnly(),d=this.isCurrentPageOnly(),t="uiSelectAll";d?t="uiSelectAllCurrentPage":a&&(t="uiSelectAllFiltered");var i={source:t,justFiltered:a,justCurrentPage:d};e?this.selectionService.selectAllRowNodes(i):this.selectionService.deselectAllRowNodes(i)}},a.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"))},a.prototype.isFilteredOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionFilteredOnly},a.prototype.isCurrentPageOnly=function(){return!!this.column.getColDef().headerCheckboxSelectionCurrentPageOnly},pr([de("rowModel")],a.prototype,"rowModel",void 0),pr([de("selectionService")],a.prototype,"selectionService",void 0),a}(je),yr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),qr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},br=function(e){var a="function"===typeof Symbol&&Symbol.iterator,d=a&&e[a],t=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},Cr=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Pr=function(e){function a(a,d){var t=e.call(this,a,d)||this;return t.refreshFunctions=[],t.userHeaderClasses=new Set,t.ariaDescriptionProperties=new Map,t.column=a,t}return yr(a,e),a.prototype.setComp=function(e,a,d,t){var i=this;this.comp=e,this.setGui(a),this.updateState(),this.setupWidth(),this.setupMovingCss(),this.setupMenuClass(),this.setupSortableClass(),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight(t),this.addColumnHoverListener(),this.setupFilterClass(),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(),this.setupSelectAll(),this.setupUserComp(),this.refreshAria(),this.resizeFeature=this.createManagedBean(new fr(this.getPinned(),this.column,d,e,this)),this.createManagedBean(new or([this.column],a)),this.createManagedBean(new tr(this.column,a,this.beans)),this.createManagedBean(new ki(a,{shouldStopEventPropagation:function(e){return i.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,pe.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))},a.prototype.resizeHeader=function(e,a){var d,t;if(this.column.isResizable()){var i=this.column.getPinned(),s=this.gridOptionsService.get("enableRtl"),o=this.column.getActualWidth(),l=null!==(d=this.column.getMinWidth())&&void 0!==d?d:0,m=null!==(t=this.column.getMaxWidth())&&void 0!==t?t:Number.MAX_SAFE_INTEGER,u=e===Rs.Left;i&&s!==("right"===i)&&(u=!u);var n=(u?-1:1)*this.resizeMultiplier,r=Math.min(Math.max(o+n,l),m);if(i)if(this.pinnedWidthService.getPinnedLeftWidth()+this.pinnedWidthService.getPinnedRightWidth()+n>mt(this.ctrlsService.getGridBodyCtrl().getBodyViewportElement())-50)return;this.columnModel.setColumnWidths([{key:this.column,newWidth:r}],a,!0)}},a.prototype.moveHeader=function(e){var a=this,d=a.eGui,t=a.column,i=a.columnModel,s=a.gridOptionsService,o=a.ctrlsService,l=this.getPinned(),m=d.getBoundingClientRect().left,u=t.getActualWidth(),n=s.get("enableRtl"),r=e===Rs.Left!==n,f=xn.normaliseX(r?m-20:m+u+20,l,!0,s,o);xn.attemptMoveColumns({allMovingColumns:[t],isFromHeader:!0,hDirection:e,xPosition:f,pinned:l,fromEnter:!1,fakeEvent:!1,gridOptionsService:s,columnModel:i}),o.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(t,"auto")},a.prototype.setupUserComp=function(){var e=this.lookupUserCompDetails();this.setCompDetails(e)},a.prototype.setCompDetails=function(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)},a.prototype.lookupUserCompDetails=function(){var e=this.createParams(),a=this.column.getColDef();return this.userComponentFactory.getHeaderCompDetails(a,e)},a.prototype.createParams=function(){var e=this;return{column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,showColumnMenu:function(a){e.gridApi.showColumnMenuAfterButtonClick(e.column,a)},progressSort:function(a){e.sortController.progressSort(e.column,!!a,"uiColumnSorted")},setSort:function(a,d){e.sortController.setSortForColumn(e.column,a,!!d,"uiColumnSorted")},api:this.gridApi,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context,eGridHeader:this.getGui()}},a.prototype.setupSelectAll=function(){this.selectAllFeature=this.createManagedBean(new _r(this.column)),this.selectAllFeature.setComp(this)},a.prototype.getSelectAllGui=function(){return this.selectAllFeature.getCheckboxGui()},a.prototype.handleKeyDown=function(a){e.prototype.handleKeyDown.call(this,a),a.key===zt.SPACE&&this.selectAllFeature.onSpaceKeyDown(a),a.key===zt.ENTER&&this.onEnterKeyDown(a)},a.prototype.onEnterKeyDown=function(e){var a=this.comp.getUserCompInstance();if(a)if(e.ctrlKey||e.metaKey)this.menuEnabled&&a.showMenu&&(e.preventDefault(),a.showMenu());else if(this.sortable){var d=e.shiftKey;this.sortController.progressSort(this.column,d,"uiColumnSorted")}},a.prototype.isMenuEnabled=function(){return this.menuEnabled},a.prototype.onFocusIn=function(e){if(!this.getGui().contains(e.relatedTarget)){var a=this.getRowIndex();this.focusService.setFocusedHeader(a,this.column)}this.setActiveHeader(!0)},a.prototype.onFocusOut=function(e){this.getGui().contains(e.relatedTarget)||this.setActiveHeader(!1)},a.prototype.setupTooltip=function(){var e=this,a={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 du(a,this.beans));d.setComp(this.eGui),this.refreshFunctions.push((function(){return d.refreshToolTip()}))},a.prototype.setupClassesFromColDef=function(){var e=this,a=function(){var a=e.column.getColDef(),d=pu.getHeaderClassesFromColDef(a,e.gridOptionsService,e.column,null),t=e.userHeaderClasses;e.userHeaderClasses=new Set(d),d.forEach((function(a){t.has(a)?t.delete(a):e.comp.addOrRemoveCssClass(a,!0)})),t.forEach((function(a){return e.comp.addOrRemoveCssClass(a,!1)}))};this.refreshFunctions.push(a),a()},a.prototype.setDragSource=function(e){var a=this;if(this.dragSourceElement=e,this.removeDragSource(),e&&this.draggable){var d=this,t=d.column,i=d.columnModel,s=d.displayName,o=d.dragAndDropService,l=d.gridOptionsService,m=!this.gridOptionsService.get("suppressDragLeaveHidesColumns"),u=this.dragSource={type:Fo.HeaderCell,eElement:e,getDefaultIconName:function(){return m?Ho.ICON_HIDE:Ho.ICON_NOT_ALLOWED},getDragItem:function(){return a.createDragItem(t)},dragItemName:s,onDragStarted:function(){m=!l.get("suppressDragLeaveHidesColumns"),t.setMoving(!0,"uiColumnMoved")},onDragStopped:function(){return t.setMoving(!1,"uiColumnMoved")},onGridEnter:function(e){var a;if(m){var d=(null===(a=null===e||void 0===e?void 0:e.columns)||void 0===a?void 0:a.filter((function(e){return!e.getColDef().lockVisible})))||[];i.setColumnsVisible(d,!0,"uiColumnMoved")}},onGridExit:function(e){var a;if(m){var d=(null===(a=null===e||void 0===e?void 0:e.columns)||void 0===a?void 0:a.filter((function(e){return!e.getColDef().lockVisible})))||[];i.setColumnsVisible(d,!1,"uiColumnMoved")}}};o.addDragSource(u,!0)}},a.prototype.createDragItem=function(e){var a={};return a[e.getId()]=e.isVisible(),{columns:[e],visibleState:a}},a.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()},a.prototype.addRefreshFunction=function(e){this.refreshFunctions.push(e)},a.prototype.refresh=function(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),this.refreshFunctions.forEach((function(e){return e()}))},a.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)},a.prototype.attemptHeaderCompRefresh=function(e){var a=this.comp.getUserCompInstance();return!!a&&(!!a.refresh&&a.refresh(e))},a.prototype.calculateDisplayName=function(){return this.columnModel.getDisplayNameForColumn(this.column,"header",!0)},a.prototype.checkDisplayName=function(){this.displayName!==this.calculateDisplayName()&&this.refresh()},a.prototype.workOutDraggable=function(){var e=this.column.getColDef();return!!(!this.gridOptionsService.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot},a.prototype.onColumnRowGroupChanged=function(){this.checkDisplayName()},a.prototype.onColumnPivotChanged=function(){this.checkDisplayName()},a.prototype.onColumnValueChanged=function(){this.checkDisplayName()},a.prototype.setupWidth=function(){var e=this,a=function(){var a=e.column.getActualWidth();e.comp.setWidth("".concat(a,"px"))};this.addManagedListener(this.column,pe.EVENT_WIDTH_CHANGED,a),a()},a.prototype.setupMovingCss=function(){var e=this,a=function(){e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};this.addManagedListener(this.column,pe.EVENT_MOVING_CHANGED,a),a()},a.prototype.setupMenuClass=function(){var e=this,a=function(){e.comp.addOrRemoveCssClass("ag-column-menu-visible",e.column.isMenuVisible())};this.addManagedListener(this.column,pe.EVENT_MENU_VISIBLE_CHANGED,a),a()},a.prototype.setupSortableClass=function(){var e=this,a=function(){e.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!e.sortable)};a(),this.addRefreshFunction(a),this.addManagedListener(this.eventService,pe.EVENT_SORT_CHANGED,this.refreshAriaSort.bind(this))},a.prototype.setupFilterClass=function(){var e=this,a=function(){var a=e.column.isFilterActive();e.comp.addOrRemoveCssClass("ag-header-cell-filtered",a),e.refreshAria()};this.addManagedListener(this.column,pe.EVENT_FILTER_ACTIVE_CHANGED,a),a()},a.prototype.setupWrapTextClass=function(){var e=this,a=function(){var a=!!e.column.getColDef().wrapHeaderText;e.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",a)};a(),this.addRefreshFunction(a)},a.prototype.onDisplayedColumnsChanged=function(){e.prototype.onDisplayedColumnsChanged.call(this),this.isAlive()&&this.onHeaderHeightChanged()},a.prototype.onHeaderHeightChanged=function(){this.refreshSpanHeaderHeight()},a.prototype.refreshSpanHeaderHeight=function(){var e=this,a=e.eGui,d=e.column,t=e.comp,i=e.columnModel;if(e.gridOptionsService,!d.isSpanHeaderHeight())return a.style.removeProperty("top"),a.style.removeProperty("height"),t.addOrRemoveCssClass("ag-header-span-height",!1),void t.addOrRemoveCssClass("ag-header-span-total",!1);var s=this.getColumnGroupPaddingInfo(),o=s.numberOfParents,l=s.isSpanningTotal;t.addOrRemoveCssClass("ag-header-span-height",o>0);var m=i.getColumnHeaderRowHeight();if(0===o)return t.addOrRemoveCssClass("ag-header-span-total",!1),a.style.setProperty("top","0px"),void a.style.setProperty("height","".concat(m,"px"));t.addOrRemoveCssClass("ag-header-span-total",l);var u=o*(i.isPivotMode()?i.getPivotGroupHeaderHeight():i.getGroupHeaderHeight());a.style.setProperty("top","".concat(-u,"px")),a.style.setProperty("height","".concat(m+u,"px"))},a.prototype.getColumnGroupPaddingInfo=function(){var e=this.column.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var a=e.getPaddingLevel()+1,d=!0;e;){if(!e.isPadding()){d=!1;break}e=e.getParent()}return{numberOfParents:a,isSpanningTotal:d}},a.prototype.setupAutoHeight=function(e){var a,d=this,t=function(a){if(d.isAlive()){var i=ot(d.getGui()),s=i.paddingTop+i.paddingBottom+i.borderBottomWidth+i.borderTopWidth,o=e.offsetHeight+s;if(a<5){var l=d.beans.gridOptionsService.getDocument();if(!l||!l.contains(e)||0==o)return void d.beans.frameworkOverrides.setTimeout((function(){return t(a+1)}),0)}d.columnModel.setColumnHeaderHeight(d.column,o)}},i=!1,s=function(){var e=d.column.isAutoHeaderHeight();e&&!i&&o(),!e&&i&&l()},o=function(){i=!0,t(0),d.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=d.resizeObserverService.observeResize(e,(function(){return t(0)}))},l=function(){i=!1,a&&a(),d.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};s(),this.addDestroyFunc((function(){return l()})),this.addManagedListener(this.column,pe.EVENT_WIDTH_CHANGED,(function(){return i&&t(0)})),this.addManagedListener(this.eventService,pe.EVENT_SORT_CHANGED,(function(){i&&d.beans.frameworkOverrides.setTimeout((function(){return t(0)}))})),this.addRefreshFunction(s)},a.prototype.refreshAriaSort=function(){if(this.sortable){var e=this.localeService.getLocaleTextFunc(),a=this.sortController.getDisplaySortForColumn(this.column)||null;this.comp.setAriaSort(Aa(a)),this.setAriaDescriptionProperty("sort",e("ariaSortableColumn","Press ENTER to sort."))}else this.comp.setAriaSort(),this.setAriaDescriptionProperty("sort",null)},a.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)},a.prototype.refreshAriaFiltered=function(){var e=this.localeService.getLocaleTextFunc();this.column.isFilterActive()?this.setAriaDescriptionProperty("filter",e("ariaColumnFiltered","Column Filtered")):this.setAriaDescriptionProperty("filter",null)},a.prototype.setAriaDescriptionProperty=function(e,a){null!=a?this.ariaDescriptionProperties.set(e,a):this.ariaDescriptionProperties.delete(e)},a.prototype.refreshAriaDescription=function(){var e,a,d=null;try{for(var t=br(this.ariaDescriptionProperties),i=t.next();!i.done;i=t.next()){var s=Cr(i.value,2),o=s[0],l=s[1];d="filter"===o?"".concat(l," ").concat(d||""):"".concat(d||""," ").concat(l)}}catch(m){e={error:m}}finally{try{i&&!i.done&&(a=t.return)&&a.call(t)}finally{if(e)throw e.error}}this.comp.setAriaDescription(null!==d&&void 0!==d?d:void 0)},a.prototype.refreshAria=function(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFiltered(),this.refreshAriaDescription()},a.prototype.addColumnHoverListener=function(){var e=this,a=function(){if(e.gridOptionsService.get("columnHoverHighlight")){var a=e.columnHoverService.isHovered(e.column);e.comp.addOrRemoveCssClass("ag-column-hover",a)}};this.addManagedListener(this.eventService,Je.EVENT_COLUMN_HOVER_CHANGED,a),a()},a.prototype.getColId=function(){return this.column.getColId()},a.prototype.addActiveHeaderMouseListeners=function(){var e=this,a=function(a){return e.setActiveHeader("mouseenter"===a.type)};this.addManagedListener(this.getGui(),"mouseenter",a),this.addManagedListener(this.getGui(),"mouseleave",a)},a.prototype.setActiveHeader=function(e){this.comp.addOrRemoveCssClass("ag-header-active",e)},a.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},qr([de("columnModel")],a.prototype,"columnModel",void 0),qr([de("pinnedWidthService")],a.prototype,"pinnedWidthService",void 0),qr([de("columnHoverService")],a.prototype,"columnHoverService",void 0),qr([de("sortController")],a.prototype,"sortController",void 0),qr([de("menuFactory")],a.prototype,"menuFactory",void 0),qr([de("resizeObserverService")],a.prototype,"resizeObserverService",void 0),qr([de("gridApi")],a.prototype,"gridApi",void 0),a}(er),hr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Tr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Lr=function(e){function a(a,d,t,i){var s=e.call(this)||this;return s.eResize=d,s.comp=a,s.pinned=t,s.columnGroup=i,s}return hr(a,e),a.prototype.postConstruct=function(){var e=this;if(this.columnGroup.isResizable()){var a=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(a),!this.gridOptionsService.get("suppressAutoSize")){var d=this.gridOptionsService.get("skipHeaderOnAutoSize");this.eResize.addEventListener("dblclick",(function(){var a=[];e.columnGroup.getDisplayedLeafColumns().forEach((function(e){e.getColDef().suppressAutoSize||a.push(e.getColId())})),a.length>0&&e.columnModel.autoSizeColumns({columns:a,skipHeader:d,stopAtGroup:e.columnGroup,source:"uiColumnResized"}),e.resizeLeafColumnsToFit("uiColumnResized")}))}}else this.comp.setResizableDisplayed(!1)},a.prototype.onResizeStart=function(e){var a=this.getInitialValues(e);this.storeLocalValues(a),this.toggleColumnResizing(!0)},a.prototype.onResizing=function(e,a,d){void 0===d&&(d="uiColumnResized");var t=this.normaliseDragChange(a),i=this.resizeStartWidth+t;this.resizeColumnsFromLocalValues(i,d,e)},a.prototype.getInitialValues=function(e){var a=this.getColumnsToResize(),d=this.getInitialSizeOfColumns(a),t={columnsToResize:a,resizeStartWidth:d,resizeRatios:this.getSizeRatiosOfColumns(a,d)},i=null;if(e&&(i=this.columnModel.getDisplayedGroupAfter(this.columnGroup)),i){var s=i.getDisplayedLeafColumns(),o=t.groupAfterColumns=s.filter((function(e){return e.isResizable()})),l=t.groupAfterStartWidth=this.getInitialSizeOfColumns(o);t.groupAfterRatios=this.getSizeRatiosOfColumns(o,l)}else t.groupAfterColumns=void 0,t.groupAfterStartWidth=void 0,t.groupAfterRatios=void 0;return t},a.prototype.storeLocalValues=function(e){var a=e.columnsToResize,d=e.resizeStartWidth,t=e.resizeRatios,i=e.groupAfterColumns,s=e.groupAfterStartWidth,o=e.groupAfterRatios;this.resizeCols=a,this.resizeStartWidth=d,this.resizeRatios=t,this.resizeTakeFromCols=i,this.resizeTakeFromStartWidth=s,this.resizeTakeFromRatios=o},a.prototype.clearLocalValues=function(){this.resizeCols=void 0,this.resizeRatios=void 0,this.resizeTakeFromCols=void 0,this.resizeTakeFromRatios=void 0},a.prototype.resizeLeafColumnsToFit=function(e){var a=this.autoWidthCalculator.getPreferredWidthForColumnGroup(this.columnGroup),d=this.getInitialValues();a>d.resizeStartWidth&&this.resizeColumns(d,a,e,!0)},a.prototype.resizeColumnsFromLocalValues=function(e,a,d){var t,i,s;if(void 0===d&&(d=!0),this.resizeCols&&this.resizeRatios){var o={columnsToResize:this.resizeCols,resizeStartWidth:this.resizeStartWidth,resizeRatios:this.resizeRatios,groupAfterColumns:null!==(t=this.resizeTakeFromCols)&&void 0!==t?t:void 0,groupAfterStartWidth:null!==(i=this.resizeTakeFromStartWidth)&&void 0!==i?i:void 0,groupAfterRatios:null!==(s=this.resizeTakeFromRatios)&&void 0!==s?s:void 0};this.resizeColumns(o,e,a,d)}},a.prototype.resizeColumns=function(e,a,d,t){void 0===t&&(t=!0);var i=e.columnsToResize,s=e.resizeStartWidth,o=e.resizeRatios,l=e.groupAfterColumns,m=e.groupAfterStartWidth,u=e.groupAfterRatios,n=[];if(n.push({columns:i,ratios:o,width:a}),l){var r=a-s;n.push({columns:l,ratios:u,width:m-r})}this.columnModel.resizeColumnSets({resizeSets:n,finished:t,source:d}),t&&this.toggleColumnResizing(!1)},a.prototype.toggleColumnResizing=function(e){this.comp.addOrRemoveCssClass("ag-column-resizing",e)},a.prototype.getColumnsToResize=function(){return this.columnGroup.getDisplayedLeafColumns().filter((function(e){return e.isResizable()}))},a.prototype.getInitialSizeOfColumns=function(e){return e.reduce((function(e,a){return e+a.getActualWidth()}),0)},a.prototype.getSizeRatiosOfColumns=function(e,a){return e.map((function(e){return e.getActualWidth()/a}))},a.prototype.normaliseDragChange=function(e){var a=e;return this.gridOptionsService.get("enableRtl")?"left"!==this.pinned&&(a*=-1):"right"===this.pinned&&(a*=-1),a},a.prototype.destroy=function(){e.prototype.destroy.call(this),this.clearLocalValues()},Tr([de("horizontalResizeService")],a.prototype,"horizontalResizeService",void 0),Tr([de("autoWidthCalculator")],a.prototype,"autoWidthCalculator",void 0),Tr([de("columnModel")],a.prototype,"columnModel",void 0),Tr([Z],a.prototype,"postConstruct",null),a}(je),Ir=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Or=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Br=function(e){function a(a,d){var t=e.call(this)||this;return t.removeChildListenersFuncs=[],t.columnGroup=d,t.comp=a,t}return Ir(a,e),a.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))},a.prototype.addListenersToChildrenColumns=function(){var e=this;this.removeListenersOnChildrenColumns();var a=this.onWidthChanged.bind(this);this.columnGroup.getLeafColumns().forEach((function(d){d.addEventListener("widthChanged",a),d.addEventListener("visibleChanged",a),e.removeChildListenersFuncs.push((function(){d.removeEventListener("widthChanged",a),d.removeEventListener("visibleChanged",a)}))}))},a.prototype.removeListenersOnChildrenColumns=function(){this.removeChildListenersFuncs.forEach((function(e){return e()})),this.removeChildListenersFuncs=[]},a.prototype.onDisplayedChildrenChanged=function(){this.addListenersToChildrenColumns(),this.onWidthChanged()},a.prototype.onWidthChanged=function(){var e=this.columnGroup.getActualWidth();this.comp.setWidth("".concat(e,"px")),this.comp.addOrRemoveCssClass("ag-hidden",0===e)},Or([Z],a.prototype,"postConstruct",null),a}(je),Sr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Dr=function(){return Dr=Object.assign||function(e){for(var a,d=1,t=arguments.length;d=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Gr=function(e){function a(a,d){var t=e.call(this,a,d)||this;return t.onSuppressColMoveChange=function(){if(t.isSuppressMoving())t.removeDragSource();else if(!t.dragSource){var e=t.getGui();t.setDragSource(e)}},t.column=a,t}return Sr(a,e),a.prototype.setComp=function(e,a,d){this.comp=e,this.setGui(a),this.displayName=this.columnModel.getDisplayNameForColumnGroup(this.column,"header"),this.addClasses(),this.setupMovingCss(),this.setupExpandable(),this.setupTooltip(),this.setupUserComp();var t=this.getParentRowCtrl().getPinned(),i=this.column.getProvidedColumnGroup().getLeafColumns();this.createManagedBean(new or(i,a)),this.createManagedBean(new tr(this.column,a,this.beans)),this.createManagedBean(new Br(e,this.column)),this.resizeFeature=this.createManagedBean(new Lr(e,d,t,this.column)),this.createManagedBean(new ki(a,{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()},a.prototype.resizeHeader=function(e,a){if(this.resizeFeature){var d=(e===Rs.Left?-1:1)*this.resizeMultiplier,t=this.resizeFeature.getInitialValues(a);this.resizeFeature.resizeColumns(t,t.resizeStartWidth+d,"uiColumnResized",!0)}},a.prototype.moveHeader=function(e){var a=this,d=a.eGui,t=a.column,i=a.columnModel,s=a.gridOptionsService,o=a.ctrlsService,l=s.get("enableRtl"),m=e===Rs.Left,u=this.getPinned(),n=d.getBoundingClientRect(),r=n.left,f=n.width,c=xn.normaliseX(m!==l?r-20:r+f+20,u,!0,s,o),p=t.getGroupId(),_=this.focusService.getFocusedHeader();xn.attemptMoveColumns({allMovingColumns:this.column.getLeafColumns(),isFromHeader:!0,hDirection:e,xPosition:c,pinned:u,fromEnter:!1,fakeEvent:!1,gridOptionsService:s,columnModel:i});var y=t.getDisplayedLeafColumns(),q=m?y[0]:Ce(y);this.ctrlsService.getGridBodyCtrl().getScrollFeature().ensureColumnVisible(q,"auto"),!this.isAlive()&&_&&this.restoreFocus(p,t,_)},a.prototype.restoreFocus=function(e,a,d){var t=a.getLeafColumns();if(t.length){var i=t[0].getParent();if(i){var s=this.findGroupWidthId(i,e);s&&this.focusService.focusHeaderPosition({headerPosition:Dr(Dr({},d),{column:s})})}}},a.prototype.findGroupWidthId=function(e,a){for(;e;){if(e.getGroupId()===a)return e;e=e.getParent()}return null},a.prototype.resizeLeafColumnsToFit=function(e){this.resizeFeature&&this.resizeFeature.resizeLeafColumnsToFit(e)},a.prototype.setupUserComp=function(){var e=this,a={displayName:this.displayName,columnGroup:this.column,setExpanded:function(a){e.columnModel.setColumnGroupOpened(e.column.getProvidedColumnGroup(),a,"gridInitializing")},api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context},d=this.userComponentFactory.getHeaderGroupCompDetails(a);this.comp.setUserCompDetails(d)},a.prototype.setupTooltip=function(){var e=this,a=this.column.getColGroupDef(),d={getColumn:function(){return e.column},getGui:function(){return e.eGui},getLocation:function(){return"headerGroup"},getTooltipValue:function(){return a&&a.headerTooltip}};a&&(d.getColDef=function(){return a}),this.createManagedBean(new du(d,this.beans)).setComp(this.eGui)},a.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))},a.prototype.refreshExpanded=function(){var e=this.column;this.expandable=e.isExpandable();var a=e.isExpanded();this.expandable?this.comp.setAriaExpanded(a?"true":"false"):this.comp.setAriaExpanded(void 0)},a.prototype.getColId=function(){return this.column.getUniqueId()},a.prototype.addClasses=function(){var e=this,a=this.column.getColGroupDef(),d=pu.getHeaderClassesFromColDef(a,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(a){return e.comp.addOrRemoveCssClass(a,!0)}))},a.prototype.setupMovingCss=function(){var e=this,a=this.column.getProvidedColumnGroup().getLeafColumns(),d=function(){return e.comp.addOrRemoveCssClass("ag-header-cell-moving",e.column.isMoving())};a.forEach((function(a){e.addManagedListener(a,pe.EVENT_MOVING_CHANGED,d)})),d()},a.prototype.onFocusIn=function(e){if(!this.eGui.contains(e.relatedTarget)){var a=this.getRowIndex();this.beans.focusService.setFocusedHeader(a,this.column)}},a.prototype.handleKeyDown=function(a){e.prototype.handleKeyDown.call(this,a);var d=this.getWrapperHasFocus();if(this.expandable&&d&&a.key===zt.ENTER){var t=this.column,i=!t.isExpanded();this.columnModel.setColumnGroupOpened(t.getProvidedColumnGroup(),i,"uiColumnExpanded")}},a.prototype.setDragSource=function(e){var a=this;if(!this.isSuppressMoving()&&(this.removeDragSource(),e)){var d=this,t=d.column,i=d.columnModel,s=d.displayName,o=d.gridOptionsService,l=d.dragAndDropService,m=t.getProvidedColumnGroup().getLeafColumns(),u=!o.get("suppressDragLeaveHidesColumns"),n=this.dragSource={type:Fo.HeaderCell,eElement:e,getDefaultIconName:function(){return u?Ho.ICON_HIDE:Ho.ICON_NOT_ALLOWED},dragItemName:s,getDragItem:function(){return a.getDragItemForGroup(t)},onDragStarted:function(){u=!o.get("suppressDragLeaveHidesColumns"),m.forEach((function(e){return e.setMoving(!0,"uiColumnDragged")}))},onDragStopped:function(){return m.forEach((function(e){return e.setMoving(!1,"uiColumnDragged")}))},onGridEnter:function(e){var a;if(u){var d=(null===(a=null===e||void 0===e?void 0:e.columns)||void 0===a?void 0:a.filter((function(e){return!e.getColDef().lockVisible})))||[];i.setColumnsVisible(d,!0,"uiColumnMoved")}},onGridExit:function(e){var a;if(u){var d=(null===(a=null===e||void 0===e?void 0:e.columns)||void 0===a?void 0:a.filter((function(e){return!e.getColDef().lockVisible})))||[];i.setColumnsVisible(d,!1,"uiColumnMoved")}}};l.addDragSource(n,!0)}},a.prototype.getDragItemForGroup=function(e){var a=e.getProvidedColumnGroup().getLeafColumns(),d={};a.forEach((function(e){return d[e.getId()]=e.isVisible()}));var t=[];return this.columnModel.getAllDisplayedColumns().forEach((function(e){a.indexOf(e)>=0&&(t.push(e),Le(a,e))})),a.forEach((function(e){return t.push(e)})),{columns:t,visibleState:d}},a.prototype.isSuppressMoving=function(){var e=!1;return this.column.getLeafColumns().forEach((function(a){(a.getColDef().suppressMovable||a.getColDef().lockPosition)&&(e=!0)})),e||this.gridOptionsService.get("suppressMovableColumns")},gr([de("columnModel")],a.prototype,"columnModel",void 0),a}(er),wr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),vr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Mr=function(e){var a="function"===typeof Symbol&&Symbol.iterator,d=a&&e[a],t=0;if(d)return d.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}};throw new TypeError(a?"Object is not iterable.":"Symbol.iterator is not defined.")},kr=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},xr=0,Qr=function(e){function a(a,d,t){var i=e.call(this)||this;i.instanceId=xr++,i.rowIndex=a,i.pinned=d,i.type=t;var s=t==Gn.COLUMN_GROUP?"ag-header-row-column-group":t==Gn.FLOATING_FILTER?"ag-header-row-column-filter":"ag-header-row-column";return i.headerRowClass="ag-header-row ".concat(s),i}return wr(a,e),a.prototype.postConstruct=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.isEnsureDomOrder=this.gridOptionsService.get("ensureDomOrder")},a.prototype.getInstanceId=function(){return this.instanceId},a.prototype.setComp=function(e,a){void 0===a&&(a=!0),this.comp=e,a&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners()},a.prototype.getHeaderRowClass=function(){return this.headerRowClass},a.prototype.getAriaRowIndex=function(){return this.rowIndex+1},a.prototype.getTransform=function(){if(Id())return"translateZ(0)"},a.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(a){return e.onVirtualColumnsChanged(a.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(a){return e.isEnsureDomOrder=a.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))},a.prototype.getHeaderCellCtrl=function(e){if(this.headerCellCtrls)return r(this.headerCellCtrls).find((function(a){return a.getColumnGroupChild()===e}))},a.prototype.onDisplayedColumnsChanged=function(){this.isPrintLayout=this.gridOptionsService.isDomLayout("print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()},a.prototype.getType=function(){return this.type},a.prototype.onColumnResized=function(){this.setWidth()},a.prototype.setWidth=function(){var e=this.getWidthForRow();this.comp.setWidth("".concat(e,"px"))},a.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)},a.prototype.onRowHeightChanged=function(){var e=this.getTopAndHeight(),a=e.topOffset,d=e.rowHeight;this.comp.setTop(a+"px"),this.comp.setHeight(d+"px")},a.prototype.getTopAndHeight=function(){var e=this.columnModel.getHeaderRowCount(),a=[],d=0;this.filterManager.hasFloatingFilters()&&(e++,d=1);for(var t=this.columnModel.getColumnGroupHeaderRowHeight(),i=this.columnModel.getColumnHeaderRowHeight(),s=e-(1+d),o=0;o=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Er=function(e,a){var d="function"===typeof Symbol&&e[Symbol.iterator];if(!d)return e;var t,i,s=d.call(e),o=[];try{for(;(void 0===a||a-- >0)&&!(t=s.next()).done;)o.push(t.value)}catch(l){i={error:l}}finally{try{t&&!t.done&&(d=s.return)&&d.call(s)}finally{if(i)throw i.error}}return o},Rr=function(e,a,d){if(d||2===arguments.length)for(var t,i=0,s=a.length;i=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Wr=function(e){function a(a){var d=e.call(this)||this;return d.headerRowComps={},d.rowCompsList=[],d.pinned=a,d}return Ar(a,e),a.prototype.init=function(){var e=this;this.selectAndSetTemplate();var a={setDisplayed:function(a){return e.setDisplayed(a)},setCtrls:function(a){return e.setCtrls(a)},setCenterWidth:function(a){return e.eCenterContainer.style.width=a},setViewportScrollLeft:function(a){return e.getGui().scrollLeft=a},setPinnedContainerWidth:function(a){var d=e.getGui();d.style.width=a,d.style.maxWidth=a,d.style.minWidth=a}};this.createManagedBean(new Nr(this.pinned)).setComp(a,this.getGui())},a.prototype.selectAndSetTemplate=function(){var e="left"==this.pinned,d="right"==this.pinned,t=e?a.PINNED_LEFT_TEMPLATE:d?a.PINNED_RIGHT_TEMPLATE:a.CENTER_TEMPLATE;this.setTemplate(t),this.eRowContainer=this.eCenterContainer?this.eCenterContainer:this.getGui()},a.prototype.destroyRowComps=function(){this.setCtrls([])},a.prototype.destroyRowComp=function(e){this.destroyBean(e),this.eRowContainer.removeChild(e.getGui())},a.prototype.setCtrls=function(e){var a,d=this,t=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];e.forEach((function(e){var i=e.getInstanceId(),s=t[i];delete t[i];var o=s||d.createBean(new $n(e));d.headerRowComps[i]=o,d.rowCompsList.push(o),function(e){var t=e.getGui();t.parentElement!=d.eRowContainer&&d.eRowContainer.appendChild(t),a&&ht(d.eRowContainer,t,a),a=t}(o)})),L(t).forEach((function(e){return d.destroyRowComp(e)}))},a.PINNED_LEFT_TEMPLATE='',a.PINNED_RIGHT_TEMPLATE='',a.CENTER_TEMPLATE='',Hr([Li("eCenterContainer")],a.prototype,"eCenterContainer",void 0),Hr([Z],a.prototype,"init",null),Hr([ee],a.prototype,"destroyRowComps",null),a}(hi),jr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Ur=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o};!function(e){e[e.UP=0]="UP",e[e.DOWN=1]="DOWN",e[e.LEFT=2]="LEFT",e[e.RIGHT=3]="RIGHT"}(Yn||(Yn={}));var zr,Kr=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return jr(a,e),a.prototype.postConstruct=function(){var e=this;this.ctrlsService.whenReady((function(a){e.gridBodyCon=a.gridBodyCtrl}))},a.prototype.getHeaderRowCount=function(){var e=this.ctrlsService.getHeaderRowContainerCtrl();return e?e.getRowCount():0},a.prototype.navigateVertically=function(e,a,d){if(a||(a=this.focusService.getFocusedHeader()),!a)return!1;var t=a.headerRowIndex,i=a.column,s=this.getHeaderRowCount(),o=e===Yn.UP?this.headerPositionUtils.getColumnVisibleParent(i,t):this.headerPositionUtils.getColumnVisibleChild(i,t),l=o.nextRow,m=o.nextFocusColumn,u=!1;return l<0&&(l=0,m=i,u=!0),l>=s&&(l=-1),!(!u&&!m)&&this.focusService.focusHeaderPosition({headerPosition:{headerRowIndex:l,column:m},allowUserOverride:!0,event:d})},a.prototype.navigateHorizontally=function(e,a,d){void 0===a&&(a=!1);var t,i,s=this.focusService.getFocusedHeader();return e===Yn.LEFT!==this.gridOptionsService.get("enableRtl")?(i="Before",t=this.headerPositionUtils.findHeader(s,i)):(i="After",t=this.headerPositionUtils.findHeader(s,i)),t||!a?this.focusService.focusHeaderPosition({headerPosition:t,direction:i,fromTab:a,allowUserOverride:!0,event:d}):this.focusNextHeaderRow(s,i,d)},a.prototype.focusNextHeaderRow=function(e,a,d){var t,i=e.headerRowIndex,s=null;return"Before"===a?i>0&&(t=i-1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(t,"end")):(t=i+1,s=this.headerPositionUtils.findColAtEdgeForHeaderRow(t,"start")),this.focusService.focusHeaderPosition({headerPosition:s,direction:a,fromTab:!0,allowUserOverride:!0,event:d})},a.prototype.scrollToColumn=function(e,a){if(void 0===a&&(a="After"),!e.getPinned()){var d;if(e instanceof Xe){var t=e.getDisplayedLeafColumns();d="Before"===a?Ce(t):t[0]}else d=e;this.gridBodyCon.getScrollFeature().ensureColumnVisible(d)}},Ur([de("focusService")],a.prototype,"focusService",void 0),Ur([de("headerPositionUtils")],a.prototype,"headerPositionUtils",void 0),Ur([de("ctrlsService")],a.prototype,"ctrlsService",void 0),Ur([Z],a.prototype,"postConstruct",null),a=Ur([ae("headerNavigationService")],a)}(je),Yr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),$r=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},Xr=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return Yr(a,e),a.prototype.setComp=function(e,a,d){this.comp=e,this.eGui=a,this.createManagedBean(new ki(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)},a.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)},a.prototype.getHeaderHeight=function(){return this.headerHeight},a.prototype.setHeaderHeight=function(){var e,a=this.columnModel,d=0,t=a.getHeaderRowCount();this.filterManager.hasFloatingFilters()&&(t++,d=1);var i=this.columnModel.getColumnGroupHeaderRowHeight(),s=this.columnModel.getColumnHeaderRowHeight(),o=t-(1+d);if(e=d*a.getFloatingFiltersHeight(),e+=o*i,e+=s,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})}},a.prototype.onPivotModeChanged=function(){var e=this.columnModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",e),this.comp.addOrRemoveCssClass("ag-pivot-off",!e)},a.prototype.onDisplayedColumnsChanged=function(){var e=this.columnModel.getAllDisplayedColumns().some((function(e){return e.isSpanHeaderHeight()}));this.comp.addOrRemoveCssClass("ag-header-allow-overflow",e)},a.prototype.onTabKeyDown=function(e){var a=this.gridOptionsService.get("enableRtl"),d=e.shiftKey!==a?Yn.LEFT:Yn.RIGHT;(this.headerNavigationService.navigateHorizontally(d,!0,e)||this.focusService.focusNextGridCoreContainer(e.shiftKey))&&e.preventDefault()},a.prototype.handleKeyDown=function(e){var a=null;switch(e.key){case zt.LEFT:a=Yn.LEFT;case zt.RIGHT:i(a)||(a=Yn.RIGHT),this.headerNavigationService.navigateHorizontally(a,!1,e);break;case zt.UP:a=Yn.UP;case zt.DOWN:i(a)||(a=Yn.DOWN),this.headerNavigationService.navigateVertically(a,null,e)&&e.preventDefault();break;default:return}},a.prototype.onFocusOut=function(e){var a=this.gridOptionsService.getDocument(),d=e.relatedTarget;!d&&this.eGui.contains(a.activeElement)||this.eGui.contains(d)||this.focusService.clearFocusedHeader()},$r([de("headerNavigationService")],a.prototype,"headerNavigationService",void 0),$r([de("focusService")],a.prototype,"focusService",void 0),$r([de("columnModel")],a.prototype,"columnModel",void 0),$r([de("ctrlsService")],a.prototype,"ctrlsService",void 0),$r([de("filterManager")],a.prototype,"filterManager",void 0),a}(je),Jr=function(){var e=function(a,d){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(e[d]=a[d])},e(a,d)};return function(a,d){if("function"!==typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function t(){this.constructor=a}e(a,d),a.prototype=null===d?Object.create(d):(t.prototype=d.prototype,new t)}}(),Zr=function(e,a,d,t){var i,s=arguments.length,o=s<3?a:null===t?t=Object.getOwnPropertyDescriptor(a,d):t;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,a,d,t);else for(var l=e.length-1;l>=0;l--)(i=e[l])&&(o=(s<3?i(o):s>3?i(a,d,o):i(a,d))||o);return s>3&&o&&Object.defineProperty(a,d,o),o},ef=function(e){function a(){return e.call(this,a.TEMPLATE)||this}return Jr(a,e),a.prototype.postConstruct=function(){var e=this,a={addOrRemoveCssClass:function(a,d){return e.addOrRemoveCssClass(a,d)},setHeightAndMinHeight:function(a){e.getGui().style.height=a,e.getGui().style.minHeight=a}};this.createManagedBean(new Xr).setComp(a,this.getGui(),this.getFocusableElement());var d=function(a){e.createManagedBean(a),e.appendChild(a)};d(new Wr("left")),d(new Wr(null)),d(new Wr("right"))},a.TEMPLATE='