ag-grid-community
Version:
Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue
12 lines (11 loc) • 1.21 MB
JavaScript
/**
* ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @link https://www.ag-grid.com/
' * @license MIT
*/
/**
* ag-grid-community - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v30.2.1
* @link https://www.ag-grid.com/
' * @license MIT
*/
"use strict";function t(t){return null==t||""===t?null:t}function e(t,e){return void 0===e&&(e=!1),null!=t&&(""!==t||e)}function o(t){return!e(t)}function r(t){return null==t||0===t.length}function i(t){return null!=t&&"function"==typeof t.toString?t.toString():null}function n(t){if(void 0!==t){if(null===t||""===t)return null;if("number"==typeof t)return isNaN(t)?void 0:t;var e=parseInt(t,10);return isNaN(e)?void 0:e}}function s(t){if(void 0!==t)return null!==t&&""!==t&&("boolean"==typeof t?t:/true/i.test(t))}function a(t){if(t instanceof Set||t instanceof Map){var e=[];return t.forEach((function(t){return e.push(t)})),e}return Object.values(t)}Object.defineProperty(exports,"__esModule",{value:!0});var l=Object.freeze({makeNull:t,exists:e,missing:o,missingOrEmpty:r,toStringOrNull:i,attrToNumber:n,attrToBoolean:s,attrToString:function(t){if(null!=t&&""!==t)return t},referenceCompare:function(t,e){return null==t&&null==e||(null!=t||null==e)&&((null==t||null!=e)&&t===e)},jsonEquals:function(t,e){return(t?JSON.stringify(t):null)===(e?JSON.stringify(e):null)},defaultComparator:function(t,e,o){void 0===o&&(o=!1);var r=null==t,i=null==e;if(t&&t.toNumber&&(t=t.toNumber()),e&&e.toNumber&&(e=e.toNumber()),r&&i)return 0;if(r)return-1;if(i)return 1;function n(t,e){return t>e?1:t<e?-1:0}if("string"!=typeof t)return n(t,e);if(!o)return n(t,e);try{return t.localeCompare(e)}catch(o){return n(t,e)}},values:a}),u=function(){function t(){this.existingKeys={}}return t.prototype.addExistingKeys=function(t){for(var e=0;e<t.length;e++)this.existingKeys[t[e]]=!0},t.prototype.getUniqueKey=function(t,e){t=i(t);for(var o=0;;){var r=void 0;if(t?(r=t,0!==o&&(r+="_"+o)):e?(r=e,0!==o&&(r+="_"+o)):r=o,!this.existingKeys[r])return this.existingKeys[r]=!0,String(r);o++}},t}(),c=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],r=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},p=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return s};function d(t,e){var o,r;if(null!=t)if(Array.isArray(t))for(var i=0;i<t.length;i++)e(i.toString(),t[i]);else try{for(var n=c(Object.entries(t)),s=n.next();!s.done;s=n.next()){var a=p(s.value,2);e(a[0],a[1])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}}function h(t){for(var e={},o=Object.keys(t),r=0;r<o.length;r++){var i=o[r],n=t[i];e[i]=n}return e}function f(t,e){if(t){var o=t,r={};return Object.keys(o).forEach((function(t){if(!(e&&e.indexOf(t)>=0)){var i=o[t],n=R(i)&&i.constructor===Object;r[t]=n?f(i):i}})),r}}function g(t,e){return t[e]}function v(t,e,o){t[e]=o}function y(t,e,o,r){var i=g(t,o);void 0!==i&&v(e,o,r?r(i):i)}function m(t){var e={};return t.filter((function(t){return null!=t})).forEach((function(t){Object.keys(t).forEach((function(t){return e[t]=null}))})),Object.keys(e)}function C(t){if(!t)return[];var e=Object;if("function"==typeof e.values)return e.values(t);var o=[];for(var r in t)t.hasOwnProperty(r)&&t.propertyIsEnumerable(r)&&o.push(t[r]);return o}function w(t,o,r,i){void 0===r&&(r=!0),void 0===i&&(i=!1),e(o)&&d(o,(function(e,o){var n=t[e];if(n!==o){if(i)if(null==n&&null!=o)"object"==typeof o&&o.constructor===Object&&(n={},t[e]=n);R(o)&&R(n)&&!Array.isArray(n)?w(n,o,r,i):(r||void 0!==o)&&(t[e]=o)}}))}function S(t,e,o){if(e&&t){if(!o)return t[e];for(var r=e.split("."),i=t,n=0;n<r.length;n++){if(null==i)return;i=i[r[n]]}return i}}function E(t,e){Object.keys(t).forEach((function(e){"object"==typeof t[e]&&(t[e]=void 0)}));var o=Object.getPrototypeOf(t),r={};Object.keys(o).forEach((function(t){if("function"==typeof o[t]){r[t]={value:function(){console.warn("AG Grid: "+e+" function "+t+"() cannot be called as the grid has been destroyed.\n Please don't call grid API functions on destroyed grids - as a matter of fact you shouldn't\n be keeping the API reference, your application has a memory leak! Remove the API reference\n when the grid is destroyed.")},writable:!0}}})),Object.defineProperties(t,r)}function R(t){return"object"==typeof t&&null!==t}var b=Object.freeze({iterateObject:d,cloneObject:h,deepCloneObject:function(t){return JSON.parse(JSON.stringify(t))},deepCloneDefinition:f,getProperty:g,setProperty:v,copyPropertiesIfPresent:function(t,e){for(var o=[],r=2;r<arguments.length;r++)o[r-2]=arguments[r];o.forEach((function(o){return y(t,e,o)}))},copyPropertyIfPresent:y,getAllKeysInObjects:m,getAllValuesInObject:C,mergeDeep:w,missingOrEmptyObject:function(t){return o(t)||0===Object.keys(t).length},get:function(t,e,o){if(null==t)return o;for(var r=e.split("."),i=t;r.length>1;)if(null==(i=i[r.shift()]))return o;var n=i[r[0]];return null!=n?n:o},set:function(t,e,o){if(null!=t){var r=e.split("."),i=t;r.forEach((function(t,e){i[t]||(i[t]={}),e<r.length-1&&(i=i[t])})),i[r[r.length-1]]=o}},getValueUsingField:S,removeAllReferences:E,isNonNullObject:R}),O={};function T(t,e){O[e]||(t(),O[e]=!0)}function D(t){if(t.name)return t.name;var e=/function\s+([^\(]+)/.exec(t.toString());return e&&2===e.length?e[1].trim():null}function P(t){return!!(t&&t.constructor&&t.call&&t.apply)}function _(t){L(t,400)}var A=[],F=!1;function N(t){A.push(t),F||(F=!0,window.setTimeout((function(){var t=A.slice();A.length=0,F=!1,t.forEach((function(t){return t()}))}),0))}function L(t,e){void 0===e&&(e=0),t.length>0&&window.setTimeout((function(){return t.forEach((function(t){return t()}))}),e)}function x(t,e){var o;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=this;window.clearTimeout(o),o=window.setTimeout((function(){t.apply(n,r)}),e)}}function M(t,e){var o=0;return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var n=this,s=(new Date).getTime();s-o<e||(o=s,t.apply(n,r))}}function I(t,e,o,r){void 0===o&&(o=100);var i=(new Date).getTime(),n=null,s=!1,a=function(){var a=(new Date).getTime()-i>o;(t()||a)&&(e(),s=!0,null!=n&&(window.clearInterval(n),n=null),a&&r&&console.warn(r))};a(),s||(n=window.setInterval(a,10))}function G(t){t&&t()}var V,H=Object.freeze({doOnce:T,getFunctionName:D,isFunction:P,executeInAWhile:_,executeNextVMTurn:N,executeAfter:L,debounce:x,throttle:M,waitUntil:I,compose:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return t.reduce((function(t,e){return e(t)}),e)}},callIfPresent:G,noop:function(){}});(V=exports.ModuleNames||(exports.ModuleNames={})).CommunityCoreModule="@ag-grid-community/core",V.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",V.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",V.CsvExportModule="@ag-grid-community/csv-export",V.EnterpriseCoreModule="@ag-grid-enterprise/core",V.RowGroupingModule="@ag-grid-enterprise/row-grouping",V.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",V.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",V.MenuModule="@ag-grid-enterprise/menu",V.SetFilterModule="@ag-grid-enterprise/set-filter",V.MultiFilterModule="@ag-grid-enterprise/multi-filter",V.StatusBarModule="@ag-grid-enterprise/status-bar",V.SideBarModule="@ag-grid-enterprise/side-bar",V.RangeSelectionModule="@ag-grid-enterprise/range-selection",V.MasterDetailModule="@ag-grid-enterprise/master-detail",V.RichSelectModule="@ag-grid-enterprise/rich-select",V.GridChartsModule="@ag-grid-enterprise/charts",V.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",V.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",V.ExcelExportModule="@ag-grid-enterprise/excel-export",V.ClipboardModule="@ag-grid-enterprise/clipboard",V.SparklinesModule="@ag-grid-enterprise/sparklines",V.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",V.AngularModule="@ag-grid-community/angular",V.ReactModule="@ag-grid-community/react",V.VueModule="@ag-grid-community/vue";var k=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return s},B=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},j=function(){function t(){}return t.register=function(e){t.__register(e,!0,void 0)},t.registerModules=function(e){t.__registerModules(e,!0,void 0)},t.__register=function(e,o,r){t.runVersionChecks(e),void 0!==r?(t.areGridScopedModules=!0,void 0===t.gridModulesMap[r]&&(t.gridModulesMap[r]={}),t.gridModulesMap[r][e.moduleName]=e):t.globalModulesMap[e.moduleName]=e,t.setModuleBased(o)},t.__unRegisterGridModules=function(e){delete t.gridModulesMap[e]},t.__registerModules=function(e,o,r){t.setModuleBased(o),e&&e.forEach((function(e){return t.__register(e,o,r)}))},t.isValidModuleVersion=function(e){var o=k(e.version.split(".")||[],2),r=o[0],i=o[1],n=k(t.currentModuleVersion.split(".")||[],2),s=n[0],a=n[1];return r===s&&i===a},t.runVersionChecks=function(e){if(t.currentModuleVersion||(t.currentModuleVersion=e.version),e.version?t.isValidModuleVersion(e)||console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '"+e.moduleName+"' is version "+e.version+" but the other modules are version "+this.currentModuleVersion+". Please update all modules to the same version."):console.error("AG Grid: You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. '"+e.moduleName+"' is incompatible. Please update all modules to the same version."),e.validate){var o=e.validate();if(!o.isValid){var r=o;console.error("AG Grid: "+r.message)}}},t.setModuleBased=function(e){void 0===t.moduleBased?t.moduleBased=e:t.moduleBased!==e&&T((function(){console.warn("AG Grid: You are mixing modules (i.e. @ag-grid-community/core) and packages (ag-grid-community) - you can only use one or the other of these mechanisms."),console.warn("Please see https://www.ag-grid.com/javascript-grid/packages-modules/ for more information.")}),"ModulePackageCheck")},t.__setIsBundled=function(){t.isBundled=!0},t.__assertRegistered=function(e,o,r){var i;if(this.__isRegistered(e,r))return!0;var n,s=o+e;if(t.isBundled)n="AG Grid: unable to use "+o+" as 'ag-grid-enterprise' has not been loaded. Check you are using the Enterprise bundle:\n \n <script src=\"https://cdn.jsdelivr.net/npm/ag-grid-enterprise@AG_GRID_VERSION/dist/ag-grid-enterprise.min.js\"><\/script>\n \nFor more info see: https://ag-grid.com/javascript-data-grid/getting-started/#getting-started-with-ag-grid-enterprise";else if(t.moduleBased||void 0===t.moduleBased){var a=null===(i=Object.entries(exports.ModuleNames).find((function(t){var o=k(t,2);o[0];return o[1]===e})))||void 0===i?void 0:i[0];n="AG Grid: unable to use "+o+" as the "+a+" is not registered"+(t.areGridScopedModules?" for gridId: "+r:"")+". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { "+a+" } from '"+e+"';\n \n ModuleRegistry.registerModules([ "+a+" ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/"}else n="AG Grid: unable to use "+o+" 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 T((function(){console.warn(n)}),s),!1},t.__isRegistered=function(e,o){var r;return!!t.globalModulesMap[e]||!!(null===(r=t.gridModulesMap[o])||void 0===r?void 0:r[e])},t.__getRegisteredModules=function(e){return B(B([],k(a(t.globalModulesMap))),k(a(t.gridModulesMap[e]||{})))},t.__getGridRegisteredModules=function(e){var o;return a(null!==(o=t.gridModulesMap[e])&&void 0!==o?o:{})||[]},t.__isPackageBased=function(){return!t.moduleBased},t.globalModulesMap={},t.gridModulesMap={},t.areGridScopedModules=!1,t}(),W=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return s},U=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},z=function(){function t(t,e){if(this.beanWrappers={},this.destroyed=!1,t&&t.beanClasses){this.contextParams=t,this.logger=e,this.logger.log(">> creating ag-Application Context"),this.createBeans();var o=this.getBeanInstances();this.wireBeans(o),this.logger.log(">> ag-Application Context ready - component is alive")}}return t.prototype.getBeanInstances=function(){return a(this.beanWrappers).map((function(t){return t.beanInstance}))},t.prototype.createBean=function(t,e){if(!t)throw Error("Can't wire to bean since it is null");return this.wireBeans([t],e),t},t.prototype.wireBeans=function(t,o){this.autoWireBeans(t),this.methodWireBeans(t),this.callLifeCycleMethods(t,"preConstructMethods"),e(o)&&t.forEach(o),this.callLifeCycleMethods(t,"postConstructMethods")},t.prototype.createBeans=function(){var t=this;this.contextParams.beanClasses.forEach(this.createBeanWrapper.bind(this)),d(this.beanWrappers,(function(e,o){var r;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(r=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var i=t.getBeansForParameters(r,o.bean.name),n=new(o.bean.bind.apply(o.bean,U([null],W(i))));o.beanInstance=n}));var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: "+e)},t.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var o=void 0;return o=t.prototype.constructor?D(t.prototype.constructor):""+t,void console.error("Context item "+o+" is not a bean")}var r={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=r},t.prototype.autoWireBeans=function(t){var e=this;t.forEach((function(t){e.forEachMetaDataInHierarchy(t,(function(o,r){var i=o.agClassAttributes;i&&i.forEach((function(o){var i=e.lookupBeanInstance(r,o.beanName,o.optional);t[o.attributeName]=i}))}))}))},t.prototype.methodWireBeans=function(t){var e=this;t.forEach((function(t){e.forEachMetaDataInHierarchy(t,(function(o,r){d(o.autowireMethods,(function(o,i){if("agConstructor"!==o){var n=e.getBeansForParameters(i,r);t[o].apply(t,n)}}))}))}))},t.prototype.forEachMetaDataInHierarchy=function(t,e){for(var o=Object.getPrototypeOf(t);null!=o;){var r=o.constructor;if(r.hasOwnProperty("__agBeanMetaData"))e(r.__agBeanMetaData,this.getBeanName(r));o=Object.getPrototypeOf(o)}},t.prototype.getBeanName=function(t){if(t.__agBeanMetaData&&t.__agBeanMetaData.beanName)return t.__agBeanMetaData.beanName;var e=t.toString();return e.substring(9,e.indexOf("("))},t.prototype.getBeansForParameters=function(t,e){var o=this,r=[];return t&&d(t,(function(t,i){var n=o.lookupBeanInstance(e,i);r[Number(t)]=n})),r},t.prototype.lookupBeanInstance=function(t,e,o){if(void 0===o&&(o=!1),this.destroyed)return this.logger.log("AG Grid: bean reference "+e+" is used after the grid is destroyed!"),null;if("context"===e)return this;if(this.contextParams.providedBeanInstances&&this.contextParams.providedBeanInstances.hasOwnProperty(e))return this.contextParams.providedBeanInstances[e];var r=this.beanWrappers[e];return r?r.beanInstance:(o||console.error("AG Grid: unable to find bean reference "+e+" while initialising "+t),null)},t.prototype.callLifeCycleMethods=function(t,e){var o=this;t.forEach((function(t){return o.callLifeCycleMethodsOnBean(t,e)}))},t.prototype.callLifeCycleMethodsOnBean=function(t,e,o){var r={};this.forEachMetaDataInHierarchy(t,(function(t){var i=t[e];i&&i.forEach((function(t){t!=o&&(r[t]=!0)}))})),Object.keys(r).forEach((function(e){return t[e]()}))},t.prototype.getBean=function(t){return this.lookupBeanInstance("getBean",t,!0)},t.prototype.destroy=function(){if(!this.destroyed){this.destroyed=!0,this.logger.log(">> Shutting down ag-Application Context");var t=this.getBeanInstances();this.destroyBeans(t),this.contextParams.providedBeanInstances=null,j.__unRegisterGridModules(this.contextParams.gridId),this.logger.log(">> ag-Application Context shut down - component is dead")}},t.prototype.destroyBean=function(t){t&&this.destroyBeans([t])},t.prototype.destroyBeans=function(t){var e=this;return t?(t.forEach((function(t){e.callLifeCycleMethodsOnBean(t,"preDestroyMethods","destroy");var o=t;"function"==typeof o.destroy&&o.destroy()})),[]):[]},t.prototype.isDestroyed=function(){return this.destroyed},t.prototype.getGridId=function(){return this.contextParams.gridId},t}();function K(t,e,o){var r=tt(t.constructor);r.preConstructMethods||(r.preConstructMethods=[]),r.preConstructMethods.push(e)}function Y(t,e,o){var r=tt(t.constructor);r.postConstructMethods||(r.postConstructMethods=[]),r.postConstructMethods.push(e)}function q(t,e,o){var r=tt(t.constructor);r.preDestroyMethods||(r.preDestroyMethods=[]),r.preDestroyMethods.push(e)}function Q(t){return function(e){tt(e).beanName=t}}function X(t){return function(e,o,r){Z(e,t,!1,e,o,null)}}function J(t){return function(e,o,r){Z(e,t,!0,e,o,null)}}function Z(t,e,o,r,i,n){if(null!==e)if("number"!=typeof n){var s=tt(t.constructor);s.agClassAttributes||(s.agClassAttributes=[]),s.agClassAttributes.push({attributeName:i,beanName:e,optional:o})}else console.error("AG Grid: Autowired should be on an attribute");else console.error("AG Grid: Autowired name should not be null")}function $(t){return function(e,o,r){var i,n="function"==typeof e?e:e.constructor;if("number"==typeof r){var s=void 0;o?(i=tt(n),s=o):(i=tt(n),s="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[s]||(i.autowireMethods[s]={}),i.autowireMethods[s][r]=t}}}function tt(t){return t.hasOwnProperty("__agBeanMetaData")||(t.__agBeanMetaData={}),t.__agBeanMetaData}var et=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},ot=function(t,e){return function(o,r){e(o,r,t)}},rt=function(){function t(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}return t.prototype.setBeans=function(t,e,o,r,i){if(void 0===r&&(r=null),void 0===i&&(i=null),this.frameworkOverrides=o,this.gridOptionsService=e,r){var n=e.useAsyncEvents();this.addGlobalListener(r,n)}i&&this.addGlobalListener(i,!1)},t.prototype.getListeners=function(t,e,o){var r=e?this.allAsyncListeners:this.allSyncListeners,i=r.get(t);return!i&&o&&(i=new Set,r.set(t,i)),i},t.prototype.noRegisteredListenersExist=function(){return 0===this.allSyncListeners.size&&0===this.allAsyncListeners.size&&0===this.globalSyncListeners.size&&0===this.globalAsyncListeners.size},t.prototype.addEventListener=function(t,e,o){void 0===o&&(o=!1),this.getListeners(t,o,!0).add(e)},t.prototype.removeEventListener=function(t,e,o){void 0===o&&(o=!1);var r=this.getListeners(t,o,!1);r&&(r.delete(e),0===r.size&&(o?this.allAsyncListeners:this.allSyncListeners).delete(t))},t.prototype.addGlobalListener=function(t,e){void 0===e&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).add(t)},t.prototype.removeGlobalListener=function(t,e){void 0===e&&(e=!1),(e?this.globalAsyncListeners:this.globalSyncListeners).delete(t)},t.prototype.dispatchEvent=function(t){var e=t;if(this.gridOptionsService){var o=this.gridOptionsService,r=o.api,i=o.columnApi,n=o.context;e.api=r,e.columnApi=i,e.context=n}this.dispatchToListeners(e,!0),this.dispatchToListeners(e,!1),this.firedEvents[e.type]=!0},t.prototype.dispatchEventOnce=function(t){this.firedEvents[t.type]||this.dispatchEvent(t)},t.prototype.dispatchToListeners=function(t,e){var o=this,r=t.type;if(e&&"event"in t){var i=t.event;i instanceof Event&&(t.eventPath=i.composedPath())}var n=new Set(this.getListeners(r,e,!1));n.size>0&&function(r){r.forEach((function(r){e?o.dispatchAsync((function(){return r(t)})):r(t)}))}(n),new Set(e?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(i){e?o.dispatchAsync((function(){return o.frameworkOverrides.dispatchEvent(r,(function(){return i(r,t)}),!0)})):o.frameworkOverrides.dispatchEvent(r,(function(){return i(r,t)}),!0)}))},t.prototype.dispatchAsync=function(t){this.asyncFunctionsQueue.push(t),this.scheduled||(window.setTimeout(this.flushAsyncQueue.bind(this),0),this.scheduled=!0)},t.prototype.flushAsyncQueue=function(){this.scheduled=!1;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach((function(t){return t()}))},et([ot(0,$("loggerFactory")),ot(1,$("gridOptionsService")),ot(2,$("frameworkOverrides")),ot(3,$("globalEventListener")),ot(4,$("globalSyncEventListener"))],t.prototype,"setBeans",null),t=et([Q("eventService")],t)}(),it=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},nt=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var r,i,n=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=n.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(o=n.return)&&o.call(n)}finally{if(i)throw i.error}}return s},st=function(t,e){for(var o=0,r=e.length,i=t.length;o<r;o++,i++)t[i]=e[o];return t},at=0;function lt(){return at++}var ut=function(){function t(t,e,o,r){this.instanceId=lt(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new rt,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=e,this.colId=o,this.primary=r,this.setState(t)}return t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setState=function(t){void 0!==t.sort?"asc"!==t.sort&&"desc"!==t.sort||(this.sort=t.sort):"asc"!==t.initialSort&&"desc"!==t.initialSort||(this.sort=t.initialSort);var e=n(t.sortIndex),o=n(t.initialSortIndex);void 0!==e?null!==e&&(this.sortIndex=e):null!==o&&(this.sortIndex=o);var r=s(t.hide),i=s(t.initialHide);this.visible=void 0!==r?!r:!i,void 0!==t.pinned?this.setPinned(t.pinned):this.setPinned(t.initialPinned);var a=n(t.flex),l=n(t.initialFlex);void 0!==a?this.flex=a:void 0!==l&&(this.flex=l)},t.prototype.setColDef=function(t,e){this.colDef=t,this.userProvidedColDef=e,this.initMinAndMaxWidths(),this.initDotNotation(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged","api"))},t.prototype.getUserProvidedColDef=function(){return this.userProvidedColDef},t.prototype.setParent=function(t){this.parent=t},t.prototype.getParent=function(){return this.parent},t.prototype.setOriginalParent=function(t){this.originalParent=t},t.prototype.getOriginalParent=function(){return this.originalParent},t.prototype.initialise=function(){this.initMinAndMaxWidths(),this.resetActualWidth("gridInitializing"),this.initDotNotation(),this.initTooltip(),this.validate()},t.prototype.initDotNotation=function(){var t=this.gridOptionsService.is("suppressFieldDotNotation");this.fieldContainsDots=e(this.colDef.field)&&this.colDef.field.indexOf(".")>=0&&!t,this.tooltipFieldContainsDots=e(this.colDef.tooltipField)&&this.colDef.tooltipField.indexOf(".")>=0&&!t},t.prototype.initMinAndMaxWidths=function(){var t=this.colDef;this.minWidth=this.columnUtils.calculateColMinWidth(t),this.maxWidth=this.columnUtils.calculateColMaxWidth(t)},t.prototype.initTooltip=function(){this.tooltipEnabled=e(this.colDef.tooltipField)||e(this.colDef.tooltipValueGetter)||e(this.colDef.tooltipComponent)},t.prototype.resetActualWidth=function(t){void 0===t&&(t="api");var e=this.columnUtils.calculateColInitialWidth(this.colDef);this.setActualWidth(e,t,!0)},t.prototype.isEmptyGroup=function(){return!1},t.prototype.isRowGroupDisplayed=function(t){if(o(this.colDef)||o(this.colDef.showRowGroup))return!1;var e=!0===this.colDef.showRowGroup,r=this.colDef.showRowGroup===t;return e||r},t.prototype.isPrimary=function(){return this.primary},t.prototype.isFilterAllowed=function(){return!!this.colDef.filter},t.prototype.isFieldContainsDots=function(){return this.fieldContainsDots},t.prototype.isTooltipEnabled=function(){return this.tooltipEnabled},t.prototype.isTooltipFieldContainsDots=function(){return this.tooltipFieldContainsDots},t.prototype.validate=function(){var t=this.colDef;function o(t,e,o){T((function(){o?console.warn(t,o):T((function(){return console.warn(t)}),e)}),e)}if(this.gridOptionsService.isRowModelType("clientSide")&&!j.__isRegistered(exports.ModuleNames.RowGroupingModule,this.gridOptionsService.getGridId())){(r=["enableRowGroup","rowGroup","rowGroupIndex","enablePivot","enableValue","pivot","pivotIndex","aggFunc"].filter((function(o){return e(t[o])}))).length>0&&j.__assertRegistered(exports.ModuleNames.RowGroupingModule,r.map((function(t){return"colDef."+t})).join(", "),this.gridOptionsService.getGridId())}if("agRichSelect"!==this.colDef.cellEditor&&"agRichSelectCellEditor"!==this.colDef.cellEditor||j.__assertRegistered(exports.ModuleNames.RichSelectModule,this.colDef.cellEditor,this.gridOptionsService.getGridId()),this.gridOptionsService.is("treeData")){(r=["rowGroup","rowGroupIndex","pivot","pivotIndex"].filter((function(o){return e(t[o])}))).length>0&&o("AG Grid: "+r.join()+" is not possible when doing tree data, your column definition should not have "+r.join(),"TreeDataCannotRowGroup")}if(e(t.menuTabs))if(Array.isArray(t.menuTabs)){var r,i=["filterMenuTab"],n=["columnsMenuTab","generalMenuTab"];(r=n.filter((function(e){return t.menuTabs.includes(e)}))).length>0&&j.__assertRegistered(exports.ModuleNames.MenuModule,"menuTab(s): "+r.map((function(t){return"'"+t+"'"})).join(),this.gridOptionsService.getGridId()),t.menuTabs.forEach((function(t){n.includes(t)||i.includes(t)||o("AG Grid: '"+t+"' is not valid for 'colDef.menuTabs'. Valid values are: "+st(st([],nt(i)),nt(n)).map((function(t){return"'"+t+"'"})).join()+".","wrongValue_menuTabs_"+t)}))}else o("AG Grid: The typeof 'colDef.menuTabs' should be an array not:"+typeof t.menuTabs,"wrongType_menuTabs");e(t.columnsMenuParams)&&j.__assertRegistered(exports.ModuleNames.MenuModule,"columnsMenuParams",this.gridOptionsService.getGridId()),e(t.columnsMenuParams)&&j.__assertRegistered(exports.ModuleNames.ColumnsToolPanelModule,"columnsMenuParams",this.gridOptionsService.getGridId()),e(this.colDef.width)&&"number"!=typeof this.colDef.width&&o("AG Grid: colDef.width should be a number, not "+typeof this.colDef.width,"ColumnCheck"),e(t.columnGroupShow)&&"closed"!==t.columnGroupShow&&"open"!==t.columnGroupShow&&o("AG Grid: '"+t.columnGroupShow+"' is not valid for columnGroupShow. Valid values are 'open', 'closed', undefined, null","columnGroupShow_invalid")},t.prototype.addEventListener=function(t,e){this.eventService.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventService.removeEventListener(t,e)},t.prototype.createColumnFunctionCallbackParams=function(t){return{node:t,data:t.data,column:this,colDef:this.colDef,context:this.gridOptionsService.context,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi}},t.prototype.isSuppressNavigable=function(t){if("boolean"==typeof this.colDef.suppressNavigable)return this.colDef.suppressNavigable;if("function"==typeof this.colDef.suppressNavigable){var e=this.createColumnFunctionCallbackParams(t);return(0,this.colDef.suppressNavigable)(e)}return!1},t.prototype.isCellEditable=function(t){return!(t.group&&!this.gridOptionsService.is("enableGroupEdit"))&&this.isColumnFunc(t,this.colDef.editable)},t.prototype.isSuppressFillHandle=function(){return!!s(this.colDef.suppressFillHandle)},t.prototype.isAutoHeight=function(){return!!s(this.colDef.autoHeight)},t.prototype.isAutoHeaderHeight=function(){return!!s(this.colDef.autoHeaderHeight)},t.prototype.isRowDrag=function(t){return this.isColumnFunc(t,this.colDef.rowDrag)},t.prototype.isDndSource=function(t){return this.isColumnFunc(t,this.colDef.dndSource)},t.prototype.isCellCheckboxSelection=function(t){return this.isColumnFunc(t,this.colDef.checkboxSelection)},t.prototype.isSuppressPaste=function(t){return this.isColumnFunc(t,this.colDef?this.colDef.suppressPaste:null)},t.prototype.isResizable=function(){return!!s(this.colDef.resizable)},t.prototype.isColumnFunc=function(t,e){return"boolean"==typeof e?e:"function"==typeof e&&e(this.createColumnFunctionCallbackParams(t))},t.prototype.setMoving=function(t,e){void 0===e&&(e="api"),this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",e))},t.prototype.createColumnEvent=function(t,e){return{type:t,column:this,columns:[this],source:e,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},t.prototype.isMoving=function(){return this.moving},t.prototype.getSort=function(){return this.sort},t.prototype.setSort=function(t,e){void 0===e&&(e="api"),this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")},t.prototype.setMenuVisible=function(t,e){void 0===e&&(e="api"),this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))},t.prototype.isMenuVisible=function(){return this.menuVisible},t.prototype.isSortAscending=function(){return"asc"===this.sort},t.prototype.isSortDescending=function(){return"desc"===this.sort},t.prototype.isSortNone=function(){return o(this.sort)},t.prototype.isSorting=function(){return e(this.sort)},t.prototype.getSortIndex=function(){return this.sortIndex},t.prototype.setSortIndex=function(t){this.sortIndex=t,this.dispatchStateUpdatedEvent("sortIndex")},t.prototype.setAggFunc=function(t){this.aggFunc=t,this.dispatchStateUpdatedEvent("aggFunc")},t.prototype.getAggFunc=function(){return this.aggFunc},t.prototype.getLeft=function(){return this.left},t.prototype.getOldLeft=function(){return this.oldLeft},t.prototype.getRight=function(){return this.left+this.actualWidth},t.prototype.setLeft=function(t,e){void 0===e&&(e="api"),this.oldLeft=this.left,this.left!==t&&(this.left=t,this.eventService.dispatchEvent(this.createColumnEvent("leftChanged",e)))},t.prototype.isFilterActive=function(){return this.filterActive},t.prototype.setFilterActive=function(t,e,o){void 0===e&&(e="api"),this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));var r=this.createColumnEvent("filterChanged",e);o&&w(r,o),this.eventService.dispatchEvent(r)},t.prototype.isHovered=function(){return this.columnHoverService.isHovered(this)},t.prototype.setPinned=function(t){this.pinned=!0===t||"left"===t?"left":"right"===t?"right":null,this.dispatchStateUpdatedEvent("pinned")},t.prototype.setFirstRightPinned=function(t,e){void 0===e&&(e="api"),this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))},t.prototype.setLastLeftPinned=function(t,e){void 0===e&&(e="api"),this.lastLeftPinned!==t&&(this.lastLeftPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("lastLeftPinnedChanged",e)))},t.prototype.isFirstRightPinned=function(){return this.firstRightPinned},t.prototype.isLastLeftPinned=function(){return this.lastLeftPinned},t.prototype.isPinned=function(){return"left"===this.pinned||"right"===this.pinned},t.prototype.isPinnedLeft=function(){return"left"===this.pinned},t.prototype.isPinnedRight=function(){return"right"===this.pinned},t.prototype.getPinned=function(){return this.pinned},t.prototype.setVisible=function(t,e){void 0===e&&(e="api");var o=!0===t;this.visible!==o&&(this.visible=o,this.eventService.dispatchEvent(this.createColumnEvent("visibleChanged",e))),this.dispatchStateUpdatedEvent("hide")},t.prototype.isVisible=function(){return this.visible},t.prototype.isSpanHeaderHeight=function(){var t=this.getColDef();return!t.suppressSpanHeaderHeight&&!t.autoHeaderHeight},t.prototype.getColDef=function(){return this.colDef},t.prototype.getColumnGroupShow=function(){return this.colDef.columnGroupShow},t.prototype.getColId=function(){return this.colId},t.prototype.getId=function(){return this.colId},t.prototype.getUniqueId=function(){return this.colId},t.prototype.getDefinition=function(){return this.colDef},t.prototype.getActualWidth=function(){return this.actualWidth},t.prototype.getAutoHeaderHeight=function(){return this.autoHeaderHeight},t.prototype.setAutoHeaderHeight=function(t){var e=t!==this.autoHeaderHeight;return this.autoHeaderHeight=t,e},t.prototype.createBaseColDefParams=function(t){return{node:t,data:t.data,colDef:this.colDef,column:this,api:this.gridOptionsService.api,columnApi:this.gridOptionsService.columnApi,context:this.gridOptionsService.context}},t.prototype.getColSpan=function(t){if(o(this.colDef.colSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.colSpan(e);return Math.max(r,1)},t.prototype.getRowSpan=function(t){if(o(this.colDef.rowSpan))return 1;var e=this.createBaseColDefParams(t),r=this.colDef.rowSpan(e);return Math.max(r,1)},t.prototype.setActualWidth=function(t,e,o){void 0===e&&(e="api"),void 0===o&&(o=!1),null!=this.minWidth&&(t=Math.max(t,this.minWidth)),null!=this.maxWidth&&(t=Math.min(t,this.maxWidth)),this.actualWidth!==t&&(this.actualWidth=t,this.flex&&"flex"!==e&&"gridInitializing"!==e&&(this.flex=null),o||this.fireColumnWidthChangedEvent(e)),this.dispatchStateUpdatedEvent("width")},t.prototype.fireColumnWidthChangedEvent=function(t){this.eventService.dispatchEvent(this.createColumnEvent("widthChanged",t))},t.prototype.isGreaterThanMax=function(t){return null!=this.maxWidth&&t>this.maxWidth},t.prototype.getMinWidth=function(){return this.minWidth},t.prototype.getMaxWidth=function(){return this.maxWidth},t.prototype.getFlex=function(){return this.flex||0},t.prototype.setFlex=function(t){this.flex!==t&&(this.flex=t),this.dispatchStateUpdatedEvent("flex")},t.prototype.setMinimum=function(t){void 0===t&&(t="api"),e(this.minWidth)&&this.setActualWidth(this.minWidth,t)},t.prototype.setRowGroupActive=function(t,e){void 0===e&&(e="api"),this.rowGroupActive!==t&&(this.rowGroupActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnRowGroupChanged",e))),this.dispatchStateUpdatedEvent("rowGroup")},t.prototype.isRowGroupActive=function(){return this.rowGroupActive},t.prototype.setPivotActive=function(t,e){void 0===e&&(e="api"),this.pivotActive!==t&&(this.pivotActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnPivotChanged",e))),this.dispatchStateUpdatedEvent("pivot")},t.prototype.isPivotActive=function(){return this.pivotActive},t.prototype.isAnyFunctionActive=function(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()},t.prototype.isAnyFunctionAllowed=function(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()},t.prototype.setValueActive=function(t,e){void 0===e&&(e="api"),this.aggregationActive!==t&&(this.aggregationActive=t,this.eventService.dispatchEvent(this.createColumnEvent("columnValueChanged",e)))},t.prototype.isValueActive=function(){return this.aggregationActive},t.prototype.isAllowPivot=function(){return!0===this.colDef.enablePivot},t.prototype.isAllowValue=function(){return!0===this.colDef.enableValue},t.prototype.isAllowRowGroup=function(){return!0===this.colDef.enableRowGroup},t.prototype.getMenuTabs=function(t){var e=this.getColDef().menuTabs;return null==e&&(e=t),e},t.prototype.dispatchStateUpdatedEvent=function(e){this.eventService.dispatchEvent({type:t.EVENT_STATE_UPDATED,key:e})},t.EVENT_MOVING_CHANGED="movingChanged",t.EVENT_LEFT_CHANGED="leftChanged",t.EVENT_WIDTH_CHANGED="widthChanged",t.EVENT_LAST_LEFT_PINNED_CHANGED="lastLeftPinnedChanged",t.EVENT_FIRST_RIGHT_PINNED_CHANGED="firstRightPinnedChanged",t.EVENT_VISIBLE_CHANGED="visibleChanged",t.EVENT_FILTER_CHANGED="filterChanged",t.EVENT_FILTER_ACTIVE_CHANGED="filterActiveChanged",t.EVENT_SORT_CHANGED="sortChanged",t.EVENT_COL_DEF_CHANGED="colDefChanged",t.EVENT_MENU_VISIBLE_CHANGED="menuVisibleChanged",t.EVENT_ROW_GROUP_CHANGED="columnRowGroupChanged",t.EVENT_PIVOT_CHANGED="columnPivotChanged",t.EVENT_VALUE_CHANGED="columnValueChanged",t.EVENT_STATE_UPDATED="columnStateUpdated",it([X("gridOptionsService")],t.prototype,"gridOptionsService",void 0),it([X("columnUtils")],t.prototype,"columnUtils",void 0),it([X("columnHoverService")],t.prototype,"columnHoverService",void 0),it([Y],t.prototype,"initialise",null),t}(),ct=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},pt=function(){function t(t,e,o,r){this.localEventService=new rt,this.expandable=!1,this.instanceId=lt(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=o,this.level=r}return t.prototype.destroy=function(){this.expandableListenerRemoveCallback&&this.reset(null,void 0)},t.prototype.reset=function(t,e){this.colGroupDef=t,this.level=e,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0},t.prototype.getInstanceId=function(){return this.instanceId},t.prototype.setOriginalParent=function(t){this.originalParent=t},t.prototype.getOriginalParent=function(){return this.originalParent},t.prototype.getLevel=function(){return this.level},t.prototype.isVisible=function(){return!!this.children&&this.children.some((function(t){return t.isVisible()}))},t.prototype.isPadding=function(){return this.padding},t.prototype.setExpanded=function(e){this.expanded=void 0!==e&&e;var o={type:t.EVENT_EXPANDED_CHANGED};this.localEventService.dispatchEvent(o)},t.prototype.isExpandable=function(){return this.expandable},t.prototype.isExpanded=function(){return this.expanded},t.prototype.getGroupId=function(){return this.groupId},t.prototype.getId=function(){return this.getGroupId()},t.prototype.setChildren=function(t){this.children=t},t.prototype.getChildren=function(){return this.children},t.prototype.getColGroupDef=function(){return this.colGroupDef},t.prototype.getLeafColumns=function(){var t=[];return this.addLeafColumns(t),t},t.prototype.addLeafColumns=function(e){this.children&&this.children.forEach((function(o){o instanceof ut?e.push(o):o instanceof t&&o.addLeafColumns(e)}))},t.prototype.getColumnGroupShow=function(){var t=this.colGroupDef;if(t)return t.columnGroupShow},t.prototype.setupExpandable=function(){var t=this;this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();var e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach((function(t){return t.addEventListener("visibleChanged",e)})),this.expandableListenerRemoveCallback=function(){t.getLeafColumns().forEach((function(t){return t.removeEventListener("visibleChanged",e)})),t.expandableListenerRemoveCallback=null}},t.prototype.setExpandable=function(){if(!this.isPadding()){for(var e=!1,o=!1,r=!1,i=this.findChildrenRemovingPadding(),n=0,s=i.length;n<s;n++){var a=i[n];if(a.isVisible()){var l=a.getColumnGroupShow();"open"===l?(e=!0,r=!0):"closed"===l?(o=!0,r=!0):(e=!0,o=!0)}}var u=e&&o&&r;if(this.expandable!==u){this.expandable=u;var c={type:t.EVENT_EXPANDABLE_CHANGED};this.localEventService.dispatchEvent(c)}}},t.prototype.findChildrenRemovingPadding=function(){var e=[],o=function(r){r.forEach((function(r){r instanceof t&&r.isPadding()?o(r.children):e.push(r)}))};return o(this.children),e},t.prototype.onColumnVisibilityChanged=function(){this.setExpandable()},t.prototype.addEventListener=function(t,e){this.localEventService.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.localEventService.removeEventListener(t,e)},t.EVENT_EXPANDED_CHANGED="expandedChanged",t.EVENT_EXPANDABLE_CHANGED="expandableChanged",ct([q],t.prototype,"destroy",null),t}(),dt={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function ht(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];for(var r=0;r<t.length;r++){var i=t[r];if(e(i))return i}return null}function ft(t){if(t&&t.length)return t[t.length-1]}function gt(t,e,o){return null==t&&null==e||null!=t&&null!=e&&t.length===e.length&&t.every((function(t,r){return o?o(t,e[r]):e[r]===t}))}function vt(t){return t.sort((function(t,e){return t-e}))}function yt(t,e){var o=t.indexOf(e);o>=0&&(t[o]=t[t.length-1],t.pop())}function mt(t,e){var o=t.indexOf(e);o>=0&&t.splice(o,1)}function Ct(t,e){for(var o=0;o<e.length;o++)yt(t,e[o])}function wt(t,e){for(var o=0;o<e.length;o++)mt(t,e[o])}function St(t,e,o){t.splice(o,0,e)}function Et(t,e,o){wt(t,e),e.slice().reverse().forEach((function(e){return St(t,e,o)}))}function Rt(t,e){return t.indexOf(e)>-1}function bt(t){return[].concat.apply([],t)}function Ot(t,e){null!=e&&null!=t&&e.forEach((function(e){return t.push(e)}))}var Tt=Object.freeze({firstExistingValue:ht,existsAndNotEmpty:function(t){return null!=t&&t.length>0},last:ft,areEqual:gt,shallowCompare:function(t,e){return gt(t,e)},sortNumerically:vt,removeRepeatsFromArray:function(t,e){if(t)for(var o=t.length-2;o>=0;o--){var r=t[o]===e,i=t[o+1]===e;r&&i&&t.splice(o+1,1)}},removeFromUnorderedArray:yt,removeFromArray:mt,removeAllFromUnorderedArray:Ct,removeAllFromArray:wt,insertIntoArray:St,insertArrayIntoArray:function(t,e,o){if(null!=t&&null!=e)for(var r=e.length-1;r>=0;r--){St(t,e[r],o)}},moveInArray:Et,includes:Rt,flatten:bt,pushAll:Ot,toStrings:function(t){return t.map(i)},forEachReverse:function(t,e){if(null!=t)for(var o=t.length-1;o>=0;o--)e(t[o],o)}}),Dt=["touchstart","touchend","touchmove","touchcancel","scroll"],Pt={};function _t(t){t.__ag_Grid_Stop_Propagation=!0}function At(t){return!0===t.__ag_Grid_Stop_Propagation}var Ft,Nt=(Ft={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(t){if("boolean"==typeof Pt[t])return Pt[t];var e=document.createElement(Ft[t]||"div");return Pt[t="on"+t]=t in e});function Lt(t,e,o){for(var r=e;r;){var i=t.getDomData(r,o);if(i)return i;r=r.parentElement}return null}function xt(t,e){return!(!e||!t)&&It(e).indexOf(t)>=0}function Mt(t){for(var e=[],o=t.target;o;)e.push(o),o=o.parentElement;return e}function It(t){var e=t;return e.path?e.path:e.composedPath?e.composedPath():Mt(e)}function Gt(t,e,o,r){var i=Rt(Dt,o)?{passive:!0}:void 0;t&&t.addEventListener&&t.addEventListener(e,o,r,i)}var Vt,Ht=Object.freeze({stopPropagationForAgGrid:_t,isStopPropagationForAgGrid:At,isEventSupported:Nt,getCtrlForEventTarget:Lt,isElementInEventPath:xt,createEventPath:Mt,getEventPath:It,addSafePassiveEventListener:Gt}),kt=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},Bt=function(){function t(){var t=this;this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.lastChangeSetIdLookup={},this.propertyListenerId=0,this.isAlive=function(){return!t.destroyed}}return t.prototype.getFrameworkOverrides=function(){return this.frameworkOverrides},t.prototype.getContext=function(){return this.context},t.prototype.destroy=function(){this.destroyFunctions.forEach((function(t){return t()})),this.destroyFunctions.length=0,this.destroyed=!0,this.dispatchEvent({type:t.EVENT_DESTROYED})},t.prototype.addEventListener=function(t,e){this.localEventService||(this.localEventService=new rt),this.localEventService.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)},t.prototype.dispatchEventAsync=function(t){var e=this;window.setTimeout((function(){return e.dispatchEvent(t)}),0)},t.prototype.dispatchEvent=function(t){this.localEventService&&this.localEventService.dispatchEvent(t)},t.prototype.addManagedListener=function(t,e,o){var r=this;if(!this.destroyed){t instanceof HTMLElement?Gt(this.getFrameworkOverrides(),t,e,o):t.addEventListener(e,o);var i=function(){return t.removeEventListener(e,o),r.destroyFunctions=r.destroyFunctions.filter((function(t){return t!==i})),null};return this.destroyFunctions.push(i),i}},t.prototype.setupGridOptionListener=function(t,e){var o=this;this.gridOptionsService.addEventListener(t,e);var r=function(){return o.gridOptionsService.removeEventListener(t,e),o.destroyFunctions=o.destroyFunctions.filter((function(t){return t!==r})),null};this.destroyFunctions.push(r)},t.prototype.addManagedPropertyListener=function(t,e){this.destroyed||this.setupGridOptionListener(t,e)},t.prototype.addManagedPropertyListeners=function(t,e){var o=this;if(!this.destroyed){var r=t.join("-")+this.propertyListenerId++,i=function(t){if(t.changeSet){if(t.changeSet&&t.changeSet.id===o.lastChangeSetIdLookup[r])return;o.lastChangeSetIdLookup[r]=t.changeSet.id}var i={type:"gridPropertyChanged",changeSet:t.changeSet};e(i)};t.forEach((function(t){return o.setupGridOptionListener(t,i)}))}},t.prototype.addDestroyFunc=function(t){this.isAlive()?this.destroyFunctions.push(t):t()},t.prototype.createManagedBean=function(t,e){var o=this.createBean(t,e);return this.addDestroyFunc(this.destroyBean.bind(this,t,e)),o},t.prototype.createBean=function(t,e,o){return(e||this.getContext()).createBean(t,o)},t.prototype.destroyBean=function(t,e){return(e||this.getContext()).destroyBean(t)},t.prototype.destroyBeans=function(t,e){var o=this;return t&&t.forEach((function(t){return o.destroyBean(t,e)})),[]},t.EVENT_DESTROYED="destroyed",kt([X("frameworkOverrides")],t.prototype,"frameworkOverrides",void 0),kt([X("context")],t.prototype,"context",void 0),kt([X("eventService")],t.prototype,"eventService",void 0),kt([X("gridOptionsService")],t.prototype,"gridOptionsService",void 0),kt([X("localeService")],t.prototype,"localeService",void 0),kt([X("environment")],t.prototype,"environment",void 0),kt([q],t.prototype,"destroy",null),t}(),jt=(Vt=function(t,e){return(Vt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}Vt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),Wt=function(t,e,o,r){var i,n=arguments.length,s=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(n<3?i(s):n>3?i(e,o,s):i(e,o))||s);return n>3&&s&&Object.defineProperty(e,o,s),s},Ut=function(t,e){return function(o,r){e(o,r,t)}},zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return jt(e,t),e.prototype.setBeans=function(t){this.logger=t.create("ColumnFactory")},e.prototype.createColumnTree=function(t,e,o){var r=new u,i=this.extractExistingTreeData(o),n=i.existingCols,s=i.existingGroups,a=i.existingColKeys;r.addExistingKeys(a);var l=this.recursivelyCreateColumns(t,0,e,n,r,s),c=this.findMaxDept(l,0);this.logger.log("Number of levels for grouped columns is "+c);var p=this.balanceColumnTree(l,0,c,r);return this.columnUtils.depthFirstOriginalTreeSearch(null,p,(function(t,e){t instanceof pt&&t.setupExpandable(),t.setOriginalParent(e)})),{columnTree:p,treeDept:c}},e.prototype.extractExistingTreeData=function(t){var e=[],o=[],r=[];return t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(t){if(t instanceof pt){var i=t;o.push(i)}else{var n=t;r.push(n.getId()),e.push(n)}})),{existingCols:e,existingGroups:o,existingColKeys:r}},e.prototype.createForAutoGroups=function(t,e){var o=this;return t.map((function(t){return o.createAutoGroupTreeItem(e,t)}))},e.prototype.createAutoGroupTreeItem=function(t,e){for(var o=this.findDepth(t),r=e,i=o-1;i>=0;i--){var n=new pt(null,"FAKE_PATH_"+e.getId()+"}_"+i,!0,i);this.createBean(n),n.setChildren([r]),r.setOriginalParent(n),r=n}return 0===o&&e.setOriginalParent(null),r},e.prototype.findDepth=function(t){for(var e=0,o=t;o&&o[0]&&o[0]instanceof pt;)e++,o=o[0].getChildren();return e},e.prototype.balanceColumnTree=function(t,e,o,r){for(var i=[],n=0;n<t.length;n++){var s=t[n];i