UNPKG

ag-grid-community

Version:

Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue

11 lines 1.31 MB
/** * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1 * @link https://www.ag-grid.com/ * @license MIT */ /** * @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v31.1.1 * @link https://www.ag-grid.com/ * @license MIT */ 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 n(t){return null==t||0===t.length}function i(t){return null!=t&&"function"==typeof t.toString?t.toString():null}function r(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,e){return(t?JSON.stringify(t):null)===(e?JSON.stringify(e):null)}function l(t){if(t instanceof Set||t instanceof Map){var e=[];return t.forEach((function(t){return e.push(t)})),e}return Object.values(t)}var u=Object.freeze({__proto__:null,makeNull:t,exists:e,missing:o,missingOrEmpty:n,toStringOrNull:i,attrToNumber:r,attrToBoolean:s,attrToString:function(t){if(null!=t&&""!==t)return t},jsonEquals:a,defaultComparator:function(t,e,o){void 0===o&&(o=!1);var n=null==t,i=null==e;if(t&&t.toNumber&&(t=t.toNumber()),e&&e.toNumber&&(e=e.toNumber()),n&&i)return 0;if(n)return-1;if(i)return 1;function r(t,e){return t>e?1:t<e?-1:0}if("string"!=typeof t)return r(t,e);if(!o)return r(t,e);try{return t.localeCompare(e)}catch(o){return r(t,e)}},values:l}),c=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 n=void 0;if(t?(n=t,0!==o&&(n+="_"+o)):e?(n=e,0!==o&&(n+="_"+o)):n=o,!this.existingKeys[n])return this.existingKeys[n]=!0,String(n);o++}},t}(),p=function(t){var e="function"==typeof Symbol&&Symbol.iterator,o=e&&t[e],n=0;if(o)return o.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},d=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,r=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s};function h(t,e){var o,n;if(null!=t)if(Array.isArray(t))for(var i=0;i<t.length;i++)e(i.toString(),t[i]);else try{for(var r=p(Object.entries(t)),s=r.next();!s.done;s=r.next()){var a=d(s.value,2);e(a[0],a[1])}}catch(t){o={error:t}}finally{try{s&&!s.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}}function f(t){for(var e={},o=Object.keys(t),n=0;n<o.length;n++){var i=o[n],r=t[i];e[i]=r}return e}function g(t,e){if(t){var o=t,n={};return Object.keys(o).forEach((function(t){if(!(e&&e.indexOf(t)>=0)){var i=o[t],r=w(i)&&i.constructor===Object;n[t]=r?g(i):i}})),n}}function v(t){if(!t)return[];var e=Object;if("function"==typeof e.values)return e.values(t);var o=[];for(var n in t)t.hasOwnProperty(n)&&t.propertyIsEnumerable(n)&&o.push(t[n]);return o}function y(t,o,n,i){void 0===n&&(n=!0),void 0===i&&(i=!1),e(o)&&h(o,(function(e,o){var r=t[e];if(r!==o){if(i)if(null==r&&null!=o)"object"==typeof o&&o.constructor===Object&&(r={},t[e]=r);w(o)&&w(r)&&!Array.isArray(r)?y(r,o,n,i):(n||void 0!==o)&&(t[e]=o)}}))}function m(t,e,o){if(e&&t){if(!o)return t[e];for(var n=e.split("."),i=t,r=0;r<n.length;r++){if(null==i)return;i=i[n[r]]}return i}}function C(t,e,o){void 0===e&&(e=[]),Object.keys(t).forEach((function(o){"object"!=typeof t[o]||e.includes(o)||(t[o]=void 0)}));var n=Object.getPrototypeOf(t),i={};Object.getOwnPropertyNames(n).forEach((function(t){if("function"==typeof n[t]&&!e.includes(t)){i[t]={value:function(){console.warn(function(t){return"AG Grid: Grid API function ".concat(t,"() cannot be called as the grid has been destroyed.\n It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid.\n To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: ").concat(o)}(t))},writable:!0}}})),Object.defineProperties(t,i)}function w(t){return"object"==typeof t&&null!==t}var S=Object.freeze({__proto__:null,iterateObject:h,cloneObject:f,deepCloneDefinition:g,getAllValuesInObject:v,mergeDeep:y,getValueUsingField:m,removeAllReferences:C,isNonNullObject:w}),E={};function b(t,e){E[e]||(t(),E[e]=!0)}function R(t){b((function(){return console.warn("AG Grid: "+t)}),t)}function O(t){b((function(){return console.error("AG Grid: "+t)}),t)}function T(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 D(t){L(t,400)}var _=[],A=!1;function F(t){_.push(t),A||(A=!0,window.setTimeout((function(){var t=_.slice();_.length=0,A=!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 M(t,e){var o;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this;window.clearTimeout(o),o=window.setTimeout((function(){t.apply(r,n)}),e)}}function I(t,e){var o=0;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var r=this,s=(new Date).getTime();s-o<e||(o=s,t.apply(r,n))}}function N(t,e,o,n){void 0===o&&(o=100);var i=(new Date).getTime(),r=null,s=!1,a=function(){var a=(new Date).getTime()-i>o;(t()||a)&&(e(),s=!0,null!=r&&(window.clearInterval(r),r=null),a&&n&&console.warn(n))};a(),s||(r=window.setInterval(a,10))}var G,x=Object.freeze({__proto__:null,doOnce:b,warnOnce:R,errorOnce:O,getFunctionName:T,isFunction:P,executeInAWhile:D,executeNextVMTurn:F,executeAfter:L,debounce:M,throttle:I,waitUntil:N,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)}},noop:function(){}});!function(t){t.CommunityCoreModule="@ag-grid-community/core",t.InfiniteRowModelModule="@ag-grid-community/infinite-row-model",t.ClientSideRowModelModule="@ag-grid-community/client-side-row-model",t.CsvExportModule="@ag-grid-community/csv-export",t.EnterpriseCoreModule="@ag-grid-enterprise/core",t.RowGroupingModule="@ag-grid-enterprise/row-grouping",t.ColumnsToolPanelModule="@ag-grid-enterprise/column-tool-panel",t.FiltersToolPanelModule="@ag-grid-enterprise/filter-tool-panel",t.MenuModule="@ag-grid-enterprise/menu",t.SetFilterModule="@ag-grid-enterprise/set-filter",t.MultiFilterModule="@ag-grid-enterprise/multi-filter",t.StatusBarModule="@ag-grid-enterprise/status-bar",t.SideBarModule="@ag-grid-enterprise/side-bar",t.RangeSelectionModule="@ag-grid-enterprise/range-selection",t.MasterDetailModule="@ag-grid-enterprise/master-detail",t.RichSelectModule="@ag-grid-enterprise/rich-select",t.GridChartsModule="@ag-grid-enterprise/charts",t.ViewportRowModelModule="@ag-grid-enterprise/viewport-row-model",t.ServerSideRowModelModule="@ag-grid-enterprise/server-side-row-model",t.ExcelExportModule="@ag-grid-enterprise/excel-export",t.ClipboardModule="@ag-grid-enterprise/clipboard",t.SparklinesModule="@ag-grid-enterprise/sparklines",t.AdvancedFilterModule="@ag-grid-enterprise/advanced-filter",t.AngularModule="@ag-grid-community/angular",t.ReactModule="@ag-grid-community/react",t.VueModule="@ag-grid-community/vue"}(G||(G={}));var V=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,r=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},H=function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},k=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,n){t.runVersionChecks(e),void 0!==n?(t.areGridScopedModules=!0,void 0===t.gridModulesMap[n]&&(t.gridModulesMap[n]={}),t.gridModulesMap[n][e.moduleName]=e):t.globalModulesMap[e.moduleName]=e,t.setModuleBased(o)},t.__unRegisterGridModules=function(e){delete t.gridModulesMap[e]},t.__registerModules=function(e,o,n){t.setModuleBased(o),e&&e.forEach((function(e){return t.__register(e,o,n)}))},t.isValidModuleVersion=function(e){var o=V(e.version.split(".")||[],2),n=o[0],i=o[1],r=V(t.currentModuleVersion.split(".")||[],2),s=r[0],a=r[1];return n===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. '".concat(e.moduleName,"' is version ").concat(e.version," but the other modules are version ").concat(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. '".concat(e.moduleName,"' is incompatible. Please update all modules to the same version.")),e.validate){var o=e.validate();if(!o.isValid){var n=o;console.error("AG Grid: ".concat(n.message))}}},t.setModuleBased=function(e){void 0===t.moduleBased?t.moduleBased=e:t.moduleBased!==e&&b((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,n){var i;if(this.__isRegistered(e,n))return!0;var r,s=o+e;if(t.isBundled)r="AG Grid: unable to use ".concat(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(G).find((function(t){var o=V(t,2);return o[0],o[1]===e})))||void 0===i?void 0:i[0];r="AG Grid: unable to use ".concat(o," as the ").concat(a," is not registered").concat(t.areGridScopedModules?" for gridId: ".concat(n):"",". Check if you have registered the module:\n \n import { ModuleRegistry } from '@ag-grid-community/core';\n import { ").concat(a," } from '").concat(e,"';\n \n ModuleRegistry.registerModules([ ").concat(a," ]);\n\nFor more info see: https://www.ag-grid.com/javascript-grid/modules/")}else r="AG Grid: unable to use ".concat(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 b((function(){console.warn(r)}),s),!1},t.__warnEnterpriseChartDisabled=function(t){var e="ag-charts-enterprise:"+t,o="AG Grid: the '".concat(t,"' chart type is not supported in AG Charts Community. See ").concat("https://ag-grid.com/javascript-data-grid/integrated-charts/"," for more details.");b((function(){console.warn(o)}),e)},t.__isRegistered=function(e,o){var n;return!!t.globalModulesMap[e]||!!(null===(n=t.gridModulesMap[o])||void 0===n?void 0:n[e])},t.__getRegisteredModules=function(e){return H(H([],V(l(t.globalModulesMap)),!1),V(l(t.gridModulesMap[e]||{})),!1)},t.__getGridRegisteredModules=function(e){var o;return l(null!==(o=t.gridModulesMap[e])&&void 0!==o?o:{})||[]},t.__isPackageBased=function(){return!t.moduleBased},t.globalModulesMap={},t.gridModulesMap={},t.areGridScopedModules=!1,t}(),B=function(t,e){var o="function"==typeof Symbol&&t[Symbol.iterator];if(!o)return t;var n,i,r=o.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(n=r.next()).done;)s.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(o=r.return)&&o.call(r)}finally{if(i)throw i.error}}return s},j=function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))},W=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 l(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)),h(this.beanWrappers,(function(e,o){var n;o.bean.__agBeanMetaData&&o.bean.__agBeanMetaData.autowireMethods&&o.bean.__agBeanMetaData.autowireMethods.agConstructor&&(n=o.bean.__agBeanMetaData.autowireMethods.agConstructor);var i=t.getBeansForParameters(n,o.bean.name),r=new(o.bean.bind.apply(o.bean,j([null],B(i),!1)));o.beanInstance=r}));var e=Object.keys(this.beanWrappers).join(", ");this.logger.log("created beans: ".concat(e))},t.prototype.createBeanWrapper=function(t){var e=t.__agBeanMetaData;if(!e){var o=void 0;return o=t.prototype.constructor?T(t.prototype.constructor):""+t,void console.error("Context item ".concat(o," is not a bean"))}var n={bean:t,beanInstance:null,beanName:e.beanName};this.beanWrappers[e.beanName]=n},t.prototype.autoWireBeans=function(t){var e=this;t.forEach((function(t){e.forEachMetaDataInHierarchy(t,(function(o,n){var i=o.agClassAttributes;i&&i.forEach((function(o){var i=e.lookupBeanInstance(n,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,n){h(o.autowireMethods,(function(o,i){if("agConstructor"!==o){var r=e.getBeansForParameters(i,n);t[o].apply(t,r)}}))}))}))},t.prototype.forEachMetaDataInHierarchy=function(t,e){for(var o=Object.getPrototypeOf(t);null!=o;){var n=o.constructor;if(n.hasOwnProperty("__agBeanMetaData"))e(n.__agBeanMetaData,this.getBeanName(n));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,n=[];return t&&h(t,(function(t,i){var r=o.lookupBeanInstance(e,i);n[Number(t)]=r})),n},t.prototype.lookupBeanInstance=function(t,e,o){if(void 0===o&&(o=!1),this.destroyed)return this.logger.log("AG Grid: bean reference ".concat(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 n=this.beanWrappers[e];return n?n.beanInstance:(o||console.error("AG Grid: unable to find bean reference ".concat(e," while initialising ").concat(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 n={};this.forEachMetaDataInHierarchy(t,(function(t){var i=t[e];i&&i.forEach((function(t){t!=o&&(n[t]=!0)}))})),Object.keys(n).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,k.__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 U(t,e,o){var n=Z(t.constructor);n.preConstructMethods||(n.preConstructMethods=[]),n.preConstructMethods.push(e)}function z(t,e,o){var n=Z(t.constructor);n.postConstructMethods||(n.postConstructMethods=[]),n.postConstructMethods.push(e)}function K(t,e,o){var n=Z(t.constructor);n.preDestroyMethods||(n.preDestroyMethods=[]),n.preDestroyMethods.push(e)}function Y(t){return function(e){Z(e).beanName=t}}function q(t){return function(e,o,n){X(e,t,!1,e,o,null)}}function Q(t){return function(e,o,n){X(e,t,!0,e,o,null)}}function X(t,e,o,n,i,r){if(null!==e)if("number"!=typeof r){var s=Z(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 J(t){return function(e,o,n){var i,r="function"==typeof e?e:e.constructor;if("number"==typeof n){var s=void 0;o?(i=Z(r),s=o):(i=Z(r),s="agConstructor"),i.autowireMethods||(i.autowireMethods={}),i.autowireMethods[s]||(i.autowireMethods[s]={}),i.autowireMethods[s][n]=t}}}function Z(t){return t.hasOwnProperty("__agBeanMetaData")||(t.__agBeanMetaData={}),t.__agBeanMetaData}var $=function(t,e,o,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,o,s):i(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},tt=function(t,e){return function(o,n){e(o,n,t)}},et=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,n){if(void 0===o&&(o=null),void 0===n&&(n=null),this.frameworkOverrides=e,this.gridOptionsService=t,o){var i=t.useAsyncEvents();this.addGlobalListener(o,i)}n&&this.addGlobalListener(n,!1)},t.prototype.setFrameworkOverrides=function(t){this.frameworkOverrides=t},t.prototype.getListeners=function(t,e,o){var n=e?this.allAsyncListeners:this.allSyncListeners,i=n.get(t);return!i&&o&&(i=new Set,n.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 n=this.getListeners(t,o,!1);n&&(n.delete(e),0===n.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;this.gridOptionsService&&this.gridOptionsService.addGridCommonParams(e),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,n=this,i=t.type;if(e&&"event"in t){var r=t.event;r instanceof Event&&(t.eventPath=r.composedPath())}var s=null!==(o=this.getListeners(i,e,!1))&&void 0!==o?o:new Set,a=new Set(s);a.size>0&&function(o,i){o.forEach((function(o){if(i.has(o)){var r=n.frameworkOverrides?function(){return n.frameworkOverrides.wrapIncoming((function(){return o(t)}))}:function(){return o(t)};e?n.dispatchAsync(r):r()}}))}(a,s),new Set(e?this.globalAsyncListeners:this.globalSyncListeners).forEach((function(o){var r=n.frameworkOverrides?function(){return n.frameworkOverrides.wrapIncoming((function(){return o(i,t)}))}:function(){return o(i,t)};e?n.dispatchAsync(r):r()}))},t.prototype.dispatchAsync=function(t){var e=this;this.asyncFunctionsQueue.push(t),this.scheduled||(this.frameworkOverrides.wrapIncoming((function(){window.setTimeout(e.flushAsyncQueue.bind(e),0)})),this.scheduled=!0)},t.prototype.flushAsyncQueue=function(){this.scheduled=!1;var t=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],t.forEach((function(t){return t()}))},$([tt(0,J("gridOptionsService")),tt(1,J("frameworkOverrides")),tt(2,J("globalEventListener")),tt(3,J("globalSyncEventListener"))],t.prototype,"setBeans",null),t=$([Y("eventService")],t)}(),ot=function(){function t(t){this.frameworkOverrides=t,this.wrappedListeners=new Map,this.wrappedGlobalListeners=new Map}return t.prototype.wrap=function(t){var e=this,o=t;return this.frameworkOverrides.shouldWrapOutgoing&&(o=function(o){e.frameworkOverrides.wrapOutgoing((function(){return t(o)}))},this.wrappedListeners.set(t,o)),o},t.prototype.wrapGlobal=function(t){var e=this,o=t;return this.frameworkOverrides.shouldWrapOutgoing&&(o=function(o,n){e.frameworkOverrides.wrapOutgoing((function(){return t(o,n)}))},this.wrappedGlobalListeners.set(t,o)),o},t.prototype.unwrap=function(t){var e;return null!==(e=this.wrappedListeners.get(t))&&void 0!==e?e:t},t.prototype.unwrapGlobal=function(t){var e;return null!==(e=this.wrappedGlobalListeners.get(t))&&void 0!==e?e:t},t}(),nt=function(t,e,o,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,o,s):i(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},it={resizable:!0,sortable:!0},rt=0;function st(){return rt++}var at=function(){function t(t,e,o,n){this.instanceId=st(),this.autoHeaderHeight=null,this.moving=!1,this.menuVisible=!1,this.lastLeftPinned=!1,this.firstRightPinned=!1,this.filterActive=!1,this.eventService=new et,this.tooltipEnabled=!1,this.rowGroupActive=!1,this.pivotActive=!1,this.aggregationActive=!1,this.colDef=t,this.userProvidedColDef=e,this.colId=o,this.primary=n,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=t.sortIndex,o=t.initialSortIndex;void 0!==e?null!==e&&(this.sortIndex=e):null!==o&&(this.sortIndex=o);var n=t.hide,i=t.initialHide;this.visible=void 0!==n?!n:!i,void 0!==t.pinned?this.setPinned(t.pinned):this.setPinned(t.initialPinned);var r=t.flex,s=t.initialFlex;void 0!==r?this.flex=r:void 0!==s&&(this.flex=s)},t.prototype.setColDef=function(t,e,o){this.colDef=t,this.userProvidedColDef=e,this.initMinAndMaxWidths(),this.initDotNotation(),this.initTooltip(),this.eventService.dispatchEvent(this.createColumnEvent("colDefChanged",o))},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()},t.prototype.initDotNotation=function(){var t=this.gridOptionsService.get("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){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,n=this.colDef.showRowGroup===t;return e||n},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.addEventListener=function(t,e){var o,n;this.frameworkOverrides.shouldWrapOutgoing&&!this.frameworkEventListenerService&&(this.eventService.setFrameworkOverrides(this.frameworkOverrides),this.frameworkEventListenerService=new ot(this.frameworkOverrides));var i=null!==(n=null===(o=this.frameworkEventListenerService)||void 0===o?void 0:o.wrap(e))&&void 0!==n?n:e;this.eventService.addEventListener(t,i)},t.prototype.removeEventListener=function(t,e){var o,n,i=null!==(n=null===(o=this.frameworkEventListenerService)||void 0===o?void 0:o.unwrap(e))&&void 0!==n?n:e;this.eventService.removeEventListener(t,i)},t.prototype.createColumnFunctionCallbackParams=function(t){return this.gridOptionsService.addGridCommonParams({node:t,data:t.data,column:this,colDef:this.colDef})},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.get("enableGroupEdit"))&&this.isColumnFunc(t,this.colDef.editable)},t.prototype.isSuppressFillHandle=function(){return!!this.colDef.suppressFillHandle},t.prototype.isAutoHeight=function(){return!!this.colDef.autoHeight},t.prototype.isAutoHeaderHeight=function(){return!!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!!this.getColDefValue("resizable")},t.prototype.getColDefValue=function(t){var e;return null!==(e=this.colDef[t])&&void 0!==e?e:it[t]},t.prototype.isColumnFunc=function(t,e){return"boolean"==typeof e?e:"function"==typeof e&&e(this.createColumnFunctionCallbackParams(t))},t.prototype.setMoving=function(t,e){this.moving=t,this.eventService.dispatchEvent(this.createColumnEvent("movingChanged",e))},t.prototype.createColumnEvent=function(t,e){return this.gridOptionsService.addGridCommonParams({type:t,column:this,columns:[this],source:e})},t.prototype.isMoving=function(){return this.moving},t.prototype.getSort=function(){return this.sort},t.prototype.setSort=function(t,e){this.sort!==t&&(this.sort=t,this.eventService.dispatchEvent(this.createColumnEvent("sortChanged",e))),this.dispatchStateUpdatedEvent("sort")},t.prototype.setMenuVisible=function(t,e){this.menuVisible!==t&&(this.menuVisible=t,this.eventService.dispatchEvent(this.createColumnEvent("menuVisibleChanged",e)))},t.prototype.isMenuVisible=function(){return this.menuVisible},t.prototype.isSortable=function(){return!!this.getColDefValue("sortable")},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){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){this.filterActive!==t&&(this.filterActive=t,this.eventService.dispatchEvent(this.createColumnEvent("filterActiveChanged",e)));var n=this.createColumnEvent("filterChanged",e);o&&y(n,o),this.eventService.dispatchEvent(n)},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){this.firstRightPinned!==t&&(this.firstRightPinned=t,this.eventService.dispatchEvent(this.createColumnEvent("firstRightPinnedChanged",e)))},t.prototype.setLastLeftPinned=function(t,e){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){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.getColumnGroupPaddingInfo=function(){var t=this.getParent();if(!t||!t.isPadding())return{numberOfParents:0,isSpanningTotal:!1};for(var e=t.getPaddingLevel()+1,o=!0;t;){if(!t.isPadding()){o=!1;break}t=t.getParent()}return{numberOfParents:e,isSpanningTotal:o}},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 this.gridOptionsService.addGridCommonParams({node:t,data:t.data,colDef:this.colDef,column:this})},t.prototype.getColSpan=function(t){if(o(this.colDef.colSpan))return 1;var e=this.createBaseColDefParams(t),n=this.colDef.colSpan(e);return Math.max(n,1)},t.prototype.getRowSpan=function(t){if(o(this.colDef.rowSpan))return 1;var e=this.createBaseColDefParams(t),n=this.colDef.rowSpan(e);return Math.max(n,1)},t.prototype.setActualWidth=function(t,e,o){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){e(this.minWidth)&&this.setActualWidth(this.minWidth,t)},t.prototype.setRowGroupActive=function(t,e){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){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){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){R("As of v31.1, 'getMenuTabs' is deprecated. Use 'getColDef().menuTabs ?? defaultValues' instead.");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",nt([q("gridOptionsService")],t.prototype,"gridOptionsService",void 0),nt([q("columnUtils")],t.prototype,"columnUtils",void 0),nt([q("columnHoverService")],t.prototype,"columnHoverService",void 0),nt([q("frameworkOverrides")],t.prototype,"frameworkOverrides",void 0),nt([z],t.prototype,"initialise",null),t}(),lt=function(t,e,o,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,o,s):i(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},ut=function(){function t(t,e,o,n){this.localEventService=new et,this.expandable=!1,this.instanceId=st(),this.expandableListenerRemoveCallback=null,this.colGroupDef=t,this.groupId=e,this.expanded=!!t&&!!t.openByDefault,this.padding=o,this.level=n}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 at?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,n=!1,i=this.findChildrenRemovingPadding(),r=0,s=i.length;r<s;r++){var a=i[r];if(a.isVisible()){var l=a.getColumnGroupShow();"open"===l?(e=!0,n=!0):"closed"===l?(o=!0,n=!0):(e=!0,o=!0)}}var u=e&&o&&n;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(n){n.forEach((function(n){n instanceof t&&n.isPadding()?o(n.children):e.push(n)}))};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",lt([K],t.prototype,"destroy",null),t}(),ct={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}};function pt(t){if(t&&t.length)return t[t.length-1]}function dt(t,e,o){return null==t&&null==e||null!=t&&null!=e&&t.length===e.length&&t.every((function(t,n){return o?o(t,e[n]):e[n]===t}))}function ht(t){return t.sort((function(t,e){return t-e}))}function ft(t,e){var o=t.indexOf(e);o>=0&&(t[o]=t[t.length-1],t.pop())}function gt(t,e){var o=t.indexOf(e);o>=0&&t.splice(o,1)}function vt(t,e){for(var o=0;o<e.length;o++)ft(t,e[o])}function yt(t,e){for(var o=0;o<e.length;o++)gt(t,e[o])}function mt(t,e,o){t.splice(o,0,e)}function Ct(t,e,o){yt(t,e),e.slice().reverse().forEach((function(e){return mt(t,e,o)}))}function wt(t,e){return t.indexOf(e)>-1}function St(t){return[].concat.apply([],t)}function Et(t,e){null!=e&&null!=t&&e.forEach((function(e){return t.push(e)}))}var bt=Object.freeze({__proto__:null,existsAndNotEmpty:function(t){return null!=t&&t.length>0},last:pt,areEqual:dt,shallowCompare:function(t,e){return dt(t,e)},sortNumerically:ht,removeRepeatsFromArray:function(t,e){if(t)for(var o=t.length-2;o>=0;o--){var n=t[o]===e,i=t[o+1]===e;n&&i&&t.splice(o+1,1)}},removeFromUnorderedArray:ft,removeFromArray:gt,removeAllFromUnorderedArray:vt,removeAllFromArray:yt,insertIntoArray:mt,insertArrayIntoArray:function(t,e,o){if(null!=t&&null!=e)for(var n=e.length-1;n>=0;n--){mt(t,e[n],o)}},moveInArray:Ct,includes:wt,flatten:St,pushAll:Et,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)}}),Rt=["touchstart","touchend","touchmove","touchcancel","scroll"],Ot={};function Tt(t){t.__ag_Grid_Stop_Propagation=!0}function Pt(t){return!0===t.__ag_Grid_Stop_Propagation}var Dt,_t=(Dt={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"},function(t){if("boolean"==typeof Ot[t])return Ot[t];var e=document.createElement(Dt[t]||"div");return Ot[t="on"+t]=t in e});function At(t,e,o){for(var n=e;n;){var i=t.getDomData(n,o);if(i)return i;n=n.parentElement}return null}function Ft(t,e){return!(!e||!t)&&Mt(e).indexOf(t)>=0}function Lt(t){for(var e=[],o=t.target;o;)e.push(o),o=o.parentElement;return e}function Mt(t){var e=t;return e.path?e.path:e.composedPath?e.composedPath():Lt(e)}function It(t,e,o,n){var i=wt(Rt,o)?{passive:!0}:void 0;t&&t.addEventListener&&t.addEventListener(e,o,n,i)}var Nt,Gt=Object.freeze({__proto__:null,stopPropagationForAgGrid:Tt,isStopPropagationForAgGrid:Pt,isEventSupported:_t,getCtrlForEventTarget:At,isElementInEventPath:Ft,createEventPath:Lt,getEventPath:Mt,addSafePassiveEventListener:It}),xt=function(t,e,o,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,o,s):i(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},Vt=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 et),this.localEventService.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.localEventService&&this.localEventService.removeEventListener(t,e)},t.prototype.dispatchEvent=function(t){this.localEventService&&this.localEventService.dispatchEvent(t)},t.prototype.addManagedListener=function(t,e,o){var n=this;if(!this.destroyed){t instanceof HTMLElement?It(this.getFrameworkOverrides(),t,e,o):t.addEventListener(e,o);var i=function(){return t.removeEventListener(e,o),n.destroyFunctions=n.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 n=function(){return o.gridOptionsService.removeEventListener(t,e),o.destroyFunctions=o.destroyFunctions.filter((function(t){return t!==n})),null};return this.destroyFunctions.push(n),n},t.prototype.addManagedPropertyListener=function(t,e){return this.destroyed?function(){return null}:this.setupGridOptionListener(t,e)},t.prototype.addManagedPropertyListeners=function(t,e){var o=this;if(!this.destroyed){var n=t.join("-")+this.propertyListenerId++,i=function(t){if(t.changeSet){if(t.changeSet&&t.changeSet.id===o.lastChangeSetIdLookup[n])return;o.lastChangeSetIdLookup[n]=t.changeSet.id}var i={type:"gridPropertyChanged",changeSet:t.changeSet,source:t.source};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",xt([q("frameworkOverrides")],t.prototype,"frameworkOverrides",void 0),xt([q("context")],t.prototype,"context",void 0),xt([q("eventService")],t.prototype,"eventService",void 0),xt([q("gridOptionsService")],t.prototype,"gridOptionsService",void 0),xt([q("localeService")],t.prototype,"localeService",void 0),xt([q("environment")],t.prototype,"environment",void 0),xt([K],t.prototype,"destroy",null),t}(),Ht=(Nt=function(t,e){return(Nt=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}Nt(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),kt=function(t,e,o,n){var i,r=arguments.length,s=r<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,o,n);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(r<3?i(s):r>3?i(e,o,s):i(e,o))||s);return r>3&&s&&Object.defineProperty(e,o,s),s},Bt=function(t,e){return function(o,n){e(o,n,t)}},jt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ht(e,t),e.prototype.setBeans=function(t){this.logger=t.create("ColumnFactory")},e.prototype.createColumnTree=function(t,e,o,n){var i=new c,r=this.extractExistingTreeData(o),s=r.existingCols,a=r.existingGroups,l=r.existingColKeys;i.addExistingKeys(l);var u=this.recursivelyCreateColumns(t,0,e,s,i,a,n),p=this.findMaxDept(u,0);this.logger.log("Number of levels for grouped columns is "+p);var d=this.balanceColumnTree(u,0,p,i);return this.columnUtils.depthFirstOriginalTreeSearch(null,d,(function(t,e){t instanceof ut&&t.setupExpandable(),t.setOriginalParent(e)})),{columnTree:d,treeDept:p}},e.prototype.extractExistingTreeData=function(t){var e=[],o=[],n=[];return t&&this.columnUtils.depthFirstOriginalTreeSearch(null,t,(function(t){if(t instanceof ut){var i=t;o.push(i)}else{var r=t;n.push(r.getId()),e.push(r)}})),{existingCols:e,existingGroups:o,existingColKeys:n}},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),n=e,i=o-1;i>=0;i--){var r=new ut(null,"FAKE_PATH_".concat(e.getId(),"}_").concat(i),!0,i);this.createBean(r),r.setChildren([n]),n.setOriginalParent(r),n=r}return 0===o&&e.setOriginalParent(null),n},e.prototype.findDepth=function(t){for(var e=0,o=t;o&&o[0]&&o[0]instanceof ut;)e++,o=o[0].getChildren();return e},e.prototype.balanceColumnTree=function(t,e,o,n){for(var i=[],r=0;r<t.length;r++){var s=t[r];if(s instanceof ut){var a=s,l=this.balanceColumnTree(a.getChildren(),e+1,o,n);a.setChildren(l),i.push(a)}else{for(var u=void 0,c=void 0,p=o-1;p>=e;p--){var d=n.getUniqueKey(null,null),h=this.createMergedColGroupDef(null),f=new ut(h,d,!0,e);this.createBean(f),c&&c.setChildren([f]),c=f,u||(u=c)}if(u&&c){if(i.push(u),t.some((function(t){return t instanceof ut}))){c.setChildren([s]);continue}c.setChildren(t);break}i.push(s)}}return i},e.prototype.findMaxDept=function(t,e){for(var o=e,n=0;n<t.length;n++){var i=t[n];if(i instanceof ut){var r=i,s=this.findMaxDept(r.getChildren(),e+1);o<s&&(o=s)}}return o},e.prototype.recursivelyCreateColumns=function(t,e,o,n,i,r,s){if(!t)return[];for(var a=new Array(t.length),l=0;l<a.length;l++){var u=t[l];this.isColumnGroup(u)?a[l]=this.createColumnGroup(o,u,e,n,i,r,s):a[l]=this.createColumn(o,u,n,i,s)}return a},e.prototype.createColumnGroup=function(t,e,o,n,i,r,s){var a=this.createMergedColGroupDef(e),l=i.getUniqueKey(a.groupId||null,null),u=new ut(a,l,!1,o);this.createBean(u);var c=this.findExistingGroup(e,r);c&&r.splice(c.idx,1);var p=null==c?void 0:c.group;p&&u.setExpanded(p.isExpanded());var d=this.recursivelyCreateColumns(a.children,o+1,t,n,i,r,s);return u.setChildren(d),u},e.prototype.createMergedColGroupDef=function(t){var e={};return Object.assign(e,this.gridOptionsService.get("defaultColGroupDef")),Object.assign(e,t),e},e.prototype.createColumn=function(t,e,o,n,i){var r=this.findExistingColumn(e,o);r&&(null==o||o.splice(r.idx,1));var s=null==r?void 0:r.column;if(s){l=this.addColumnDefaultAndTypes(e,s.ge