qauMaWeb/node_modules/.cache/babel-loader/443f6d9507b5e3c44d4e80a49c4...

1 line
86 KiB
JSON

{"ast":null,"code":"import _typeof from \"D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src\\u554A/ElectronicMallVue/node_modules/@babel/runtime/helpers/esm/typeof.js\";\nimport \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.error.cause.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Caution: If the mechanism should be changed some day, these cases\n * should be considered:\n *\n * (1) In `merge option` mode, if using the same option to call `setOption`\n * many times, the result should be the same (try our best to ensure that).\n * (2) In `merge option` mode, if a component has no id/name specified, it\n * will be merged by index, and the result sequence of the components is\n * consistent to the original sequence.\n * (3) In `replaceMerge` mode, keep the result sequence of the components is\n * consistent to the original sequence, even though there might result in \"hole\".\n * (4) `reset` feature (in toolbox). Find detailed info in comments about\n * `mergeOption` in module:echarts/model/OptionManager.\n */\n\nimport { each, filter, isArray, isObject, isString, createHashMap, assert, clone, merge, extend, mixin, isFunction } from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../util/model.js';\nimport Model from './Model.js';\nimport ComponentModel from './Component.js';\nimport globalDefault from './globalDefault.js';\nimport { resetSourceDefaulter } from '../data/helper/sourceHelper.js';\nimport { concatInternalOptions } from './internalComponentCreator.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { error, warn } from '../util/log.js'; // -----------------------\n// Internal method names:\n// -----------------------\n\nvar reCreateSeriesIndices;\nvar assertSeriesInitialized;\nvar initBase;\nvar OPTION_INNER_KEY = '\\0_ec_inner';\nvar OPTION_INNER_VALUE = 1;\nvar BUITIN_COMPONENTS_MAP = {\n grid: 'GridComponent',\n polar: 'PolarComponent',\n geo: 'GeoComponent',\n singleAxis: 'SingleAxisComponent',\n parallel: 'ParallelComponent',\n calendar: 'CalendarComponent',\n graphic: 'GraphicComponent',\n toolbox: 'ToolboxComponent',\n tooltip: 'TooltipComponent',\n axisPointer: 'AxisPointerComponent',\n brush: 'BrushComponent',\n title: 'TitleComponent',\n timeline: 'TimelineComponent',\n markPoint: 'MarkPointComponent',\n markLine: 'MarkLineComponent',\n markArea: 'MarkAreaComponent',\n legend: 'LegendComponent',\n dataZoom: 'DataZoomComponent',\n visualMap: 'VisualMapComponent',\n // aria: 'AriaComponent',\n // dataset: 'DatasetComponent',\n // Dependencies\n xAxis: 'GridComponent',\n yAxis: 'GridComponent',\n angleAxis: 'PolarComponent',\n radiusAxis: 'PolarComponent'\n};\nvar BUILTIN_CHARTS_MAP = {\n line: 'LineChart',\n bar: 'BarChart',\n pie: 'PieChart',\n scatter: 'ScatterChart',\n radar: 'RadarChart',\n map: 'MapChart',\n tree: 'TreeChart',\n treemap: 'TreemapChart',\n graph: 'GraphChart',\n gauge: 'GaugeChart',\n funnel: 'FunnelChart',\n parallel: 'ParallelChart',\n sankey: 'SankeyChart',\n boxplot: 'BoxplotChart',\n candlestick: 'CandlestickChart',\n effectScatter: 'EffectScatterChart',\n lines: 'LinesChart',\n heatmap: 'HeatmapChart',\n pictorialBar: 'PictorialBarChart',\n themeRiver: 'ThemeRiverChart',\n sunburst: 'SunburstChart',\n custom: 'CustomChart'\n};\nvar componetsMissingLogPrinted = {};\n\nfunction checkMissingComponents(option) {\n each(option, function (componentOption, mainType) {\n if (!ComponentModel.hasClass(mainType)) {\n var componentImportName = BUITIN_COMPONENTS_MAP[mainType];\n\n if (componentImportName && !componetsMissingLogPrinted[componentImportName]) {\n error(\"Component \" + mainType + \" is used but not imported.\\nimport { \" + componentImportName + \" } from 'echarts/components';\\necharts.use([\" + componentImportName + \"]);\");\n componetsMissingLogPrinted[componentImportName] = true;\n }\n }\n });\n}\n\nvar GlobalModel =\n/** @class */\nfunction (_super) {\n __extends(GlobalModel, _super);\n\n function GlobalModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n\n this._theme = new Model(theme);\n this._locale = new Model(locale);\n this._optionManager = optionManager;\n };\n\n GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) {\n if (process.env.NODE_ENV !== 'production') {\n assert(option != null, 'option is null/undefined');\n assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()');\n }\n\n var innerOpt = normalizeSetOptionInput(opts);\n\n this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt);\n\n this._resetOption(null, innerOpt);\n };\n /**\n * @param type null/undefined: reset all.\n * 'recreate': force recreate all.\n * 'timeline': only reset timeline option\n * 'media': only reset media query option\n * @return Whether option changed.\n */\n\n\n GlobalModel.prototype.resetOption = function (type, opt) {\n return this._resetOption(type, normalizeSetOptionInput(opt));\n };\n\n GlobalModel.prototype._resetOption = function (type, opt) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n\n if (process.env.NODE_ENV !== 'production') {\n checkMissingComponents(baseOption);\n }\n\n if (!this.option || type === 'recreate') {\n initBase(this, baseOption);\n } else {\n this.restoreData();\n\n this._mergeOption(baseOption, opt);\n }\n\n optionChanged = true;\n }\n\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n } // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`,\n // it should better not have the same props with `MediaUnit['option']`.\n // Because either `option2` or `MediaUnit['option']` will be always merged to \"current option\"\n // rather than original \"baseOption\". If they both override a prop, the result might be\n // unexpected when media state changed after `setOption` called.\n // If we really need to modify a props in each `MediaUnit['option']`, use the full version\n // (`{baseOption, media}`) in `setOption`.\n // For `timeline`, the case is the same.\n\n\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n\n if (timelineOption) {\n optionChanged = true;\n\n this._mergeOption(timelineOption, opt);\n }\n }\n\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this);\n\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n optionChanged = true;\n\n this._mergeOption(mediaOption, opt);\n }, this);\n }\n }\n\n return optionChanged;\n };\n\n GlobalModel.prototype.mergeOption = function (option) {\n this._mergeOption(option, null);\n };\n\n GlobalModel.prototype._mergeOption = function (newOption, opt) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var componentsCount = this._componentsCount;\n var newCmptTypes = [];\n var newCmptTypeMap = createHashMap();\n var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap;\n resetSourceDefaulter(this); // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCmptTypes.push(mainType);\n newCmptTypeMap.set(mainType, true);\n }\n });\n\n if (replaceMergeMainTypeMap) {\n // If there is a mainType `xxx` in `replaceMerge` but not declared in option,\n // we trade it as it is declared in option as `{xxx: []}`. Because:\n // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`.\n // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`.\n replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) {\n if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) {\n newCmptTypes.push(mainTypeInReplaceMerge);\n newCmptTypeMap.set(mainTypeInReplaceMerge, true);\n }\n });\n }\n\n ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n\n function visitComponent(mainType) {\n var newCmptOptionList = concatInternalOptions(this, mainType, modelUtil.normalizeToArray(newOption[mainType]));\n var oldCmptList = componentsMap.get(mainType);\n var mergeMode = // `!oldCmptList` means init. See the comment in `mappingToExists`\n !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge';\n var mappingResult = modelUtil.mappingToExists(oldCmptList, newCmptOptionList, mergeMode); // Set mainType and complete subType.\n\n modelUtil.setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel); // Empty it before the travel, in order to prevent `this._componentsMap`\n // from being used in the `init`/`mergeOption`/`optionUpdated` of some\n // components, which is probably incorrect logic.\n\n option[mainType] = null;\n componentsMap.set(mainType, null);\n componentsCount.set(mainType, 0);\n var optionsByMainType = [];\n var cmptsByMainType = [];\n var cmptsCountByMainType = 0;\n var tooltipExists;\n var tooltipWarningLogged;\n each(mappingResult, function (resultItem, index) {\n var componentModel = resultItem.existing;\n var newCmptOption = resultItem.newOption;\n\n if (!newCmptOption) {\n if (componentModel) {\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n } // If no both `resultItem.exist` and `resultItem.option`,\n // either it is in `replaceMerge` and not matched by any id,\n // or it has been removed in previous `replaceMerge` and left a \"hole\" in this component index.\n\n } else {\n var isSeriesType = mainType === 'series';\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists\n );\n\n if (!ComponentModelClass) {\n if (process.env.NODE_ENV !== 'production') {\n var subType = resultItem.keyInfo.subType;\n var seriesImportName = BUILTIN_CHARTS_MAP[subType];\n\n if (!componetsMissingLogPrinted[subType]) {\n componetsMissingLogPrinted[subType] = true;\n\n if (seriesImportName) {\n error(\"Series \" + subType + \" is used but not imported.\\nimport { \" + seriesImportName + \" } from 'echarts/charts';\\necharts.use([\" + seriesImportName + \"]);\");\n } else {\n error(\"Unknown series \" + subType);\n }\n }\n }\n\n return;\n } // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception.\n\n\n if (mainType === 'tooltip') {\n if (tooltipExists) {\n if (process.env.NODE_ENV !== 'production') {\n if (!tooltipWarningLogged) {\n warn('Currently only one tooltip component is allowed.');\n tooltipWarningLogged = true;\n }\n }\n\n return;\n }\n\n tooltipExists = true;\n }\n\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty();\n\n componentModel.mergeOption(newCmptOption, this);\n componentModel.optionUpdated(newCmptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt); // Assign `keyInfo`\n\n extend(componentModel, extraOpt);\n\n if (resultItem.brandNew) {\n componentModel.__requireNewView = true;\n }\n\n componentModel.init(newCmptOption, this, this); // Call optionUpdated after init.\n // newCmptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n\n componentModel.optionUpdated(null, true);\n }\n }\n\n if (componentModel) {\n optionsByMainType.push(componentModel.option);\n cmptsByMainType.push(componentModel);\n cmptsCountByMainType++;\n } else {\n // Always do assign to avoid elided item in array.\n optionsByMainType.push(void 0);\n cmptsByMainType.push(void 0);\n }\n }, this);\n option[mainType] = optionsByMainType;\n componentsMap.set(mainType, cmptsByMainType);\n componentsCount.set(mainType, cmptsCountByMainType); // Backup series for filtering.\n\n if (mainType === 'series') {\n reCreateSeriesIndices(this);\n }\n } // If no series declared, ensure `_seriesIndices` initialized.\n\n\n if (!this._seriesIndices) {\n reCreateSeriesIndices(this);\n }\n };\n /**\n * Get option for output (cloned option and inner info removed)\n */\n\n\n GlobalModel.prototype.getOption = function () {\n var option = clone(this.option);\n each(option, function (optInMainType, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(optInMainType); // Inner cmpts need to be removed.\n // Inner cmpts might not be at last since ec5.0, but still\n // compatible for users: if inner cmpt at last, splice the returned array.\n\n var realLen = opts.length;\n var metNonInner = false;\n\n for (var i = realLen - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (opts[i] && !modelUtil.isComponentIdInternal(opts[i])) {\n metNonInner = true;\n } else {\n opts[i] = null;\n !metNonInner && realLen--;\n }\n }\n\n opts.length = realLen;\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n };\n\n GlobalModel.prototype.getTheme = function () {\n return this._theme;\n };\n\n GlobalModel.prototype.getLocaleModel = function () {\n return this._locale;\n };\n\n GlobalModel.prototype.setUpdatePayload = function (payload) {\n this._payload = payload;\n };\n\n GlobalModel.prototype.getUpdatePayload = function () {\n return this._payload;\n };\n /**\n * @param idx If not specified, return the first one.\n */\n\n\n GlobalModel.prototype.getComponent = function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n\n if (list) {\n var cmpt = list[idx || 0];\n\n if (cmpt) {\n return cmpt;\n } else if (idx == null) {\n for (var i = 0; i < list.length; i++) {\n if (list[i]) {\n return list[i];\n }\n }\n }\n }\n };\n /**\n * @return Never be null/undefined.\n */\n\n\n GlobalModel.prototype.queryComponents = function (condition) {\n var mainType = condition.mainType;\n\n if (!mainType) {\n return [];\n }\n\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n\n var cmpts = this._componentsMap.get(mainType);\n\n if (!cmpts || !cmpts.length) {\n return [];\n }\n\n var result;\n\n if (index != null) {\n result = [];\n each(modelUtil.normalizeToArray(index), function (idx) {\n cmpts[idx] && result.push(cmpts[idx]);\n });\n } else if (id != null) {\n result = queryByIdOrName('id', id, cmpts);\n } else if (name != null) {\n result = queryByIdOrName('name', name, cmpts);\n } else {\n // Return all non-empty components in that mainType\n result = filter(cmpts, function (cmpt) {\n return !!cmpt;\n });\n }\n\n return filterBySubType(result, condition);\n };\n /**\n * The interface is different from queryComponents,\n * which is convenient for inner usage.\n *\n * @usage\n * let result = findComponents(\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\n * );\n * let result = findComponents(\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\n * );\n * let result = findComponents(\n * {mainType: 'series',\n * filter: function (model, index) {...}}\n * );\n * // result like [component0, componnet1, ...]\n */\n\n\n GlobalModel.prototype.findComponents = function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond) // Retrieve all non-empty components.\n : filter(this._componentsMap.get(mainType), function (cmpt) {\n return !!cmpt;\n });\n return doFilter(filterBySubType(result, condition));\n\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n };\n\n GlobalModel.prototype.eachComponent = function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n\n if (isFunction(mainType)) {\n var ctxForAll_1 = cb;\n var cbForAll_1 = mainType;\n componentsMap.each(function (cmpts, componentType) {\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex);\n }\n });\n } else {\n var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null;\n\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cb.call(context, cmpt, cmpt.componentIndex);\n }\n }\n };\n /**\n * Get series list before filtered by name.\n */\n\n\n GlobalModel.prototype.getSeriesByName = function (name) {\n var nameStr = modelUtil.convertOptionIdName(name, null);\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && nameStr != null && oneSeries.name === nameStr;\n });\n };\n /**\n * Get series list before filtered by index.\n */\n\n\n GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n };\n /**\n * Get series list before filtered by type.\n * FIXME: rename to getRawSeriesByType?\n */\n\n\n GlobalModel.prototype.getSeriesByType = function (subType) {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && oneSeries.subType === subType;\n });\n };\n /**\n * Get all series before filtered.\n */\n\n\n GlobalModel.prototype.getSeries = function () {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries;\n });\n };\n /**\n * Count series before filtered.\n */\n\n\n GlobalModel.prototype.getSeriesCount = function () {\n return this._componentsCount.get('series');\n };\n /**\n * After filtering, series may be different\n * from raw series.\n */\n\n\n GlobalModel.prototype.eachSeries = function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n cb.call(context, series, rawSeriesIndex);\n }, this);\n };\n /**\n * Iterate raw series before filtered.\n *\n * @param {Function} cb\n * @param {*} context\n */\n\n\n GlobalModel.prototype.eachRawSeries = function (cb, context) {\n each(this._componentsMap.get('series'), function (series) {\n series && cb.call(context, series, series.componentIndex);\n });\n };\n /**\n * After filtering, series may be different.\n * from raw series.\n */\n\n\n GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n };\n /**\n * Iterate raw series before filtered of given type.\n */\n\n\n GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n };\n\n GlobalModel.prototype.isSeriesFiltered = function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n };\n\n GlobalModel.prototype.getCurrentSeriesIndices = function () {\n return (this._seriesIndices || []).slice();\n };\n\n GlobalModel.prototype.filterSeries = function (cb, context) {\n assertSeriesInitialized(this);\n var newSeriesIndices = [];\n each(this._seriesIndices, function (seriesRawIdx) {\n var series = this._componentsMap.get('series')[seriesRawIdx];\n\n cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx);\n }, this);\n this._seriesIndices = newSeriesIndices;\n this._seriesIndicesMap = createHashMap(newSeriesIndices);\n };\n\n GlobalModel.prototype.restoreData = function (payload) {\n reCreateSeriesIndices(this);\n var componentsMap = this._componentsMap;\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n if (ComponentModel.hasClass(componentType)) {\n componentTypes.push(componentType);\n }\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) {\n each(componentsMap.get(componentType), function (component) {\n if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) {\n component.restoreData();\n }\n });\n });\n };\n\n GlobalModel.internalField = function () {\n reCreateSeriesIndices = function reCreateSeriesIndices(ecModel) {\n var seriesIndices = ecModel._seriesIndices = [];\n each(ecModel._componentsMap.get('series'), function (series) {\n // series may have been removed by `replaceMerge`.\n series && seriesIndices.push(series.componentIndex);\n });\n ecModel._seriesIndicesMap = createHashMap(seriesIndices);\n };\n\n assertSeriesInitialized = function assertSeriesInitialized(ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (process.env.NODE_ENV !== 'production') {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n };\n\n initBase = function initBase(ecModel, baseOption) {\n // Using OPTION_INNER_KEY to mark that this option cannot be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbidden.\n ecModel.option = {};\n ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE; // Init with series: [], in case of calling findSeries method\n // before series initialized.\n\n ecModel._componentsMap = createHashMap({\n series: []\n });\n ecModel._componentsCount = createHashMap(); // If user spefied `option.aria`, aria will be enable. This detection should be\n // performed before theme and globalDefault merge.\n\n var airaOption = baseOption.aria;\n\n if (isObject(airaOption) && airaOption.enabled == null) {\n airaOption.enabled = true;\n }\n\n mergeTheme(baseOption, ecModel._theme.option); // TODO Needs clone when merging to the unexisted property\n\n merge(baseOption, globalDefault, false);\n\n ecModel._mergeOption(baseOption, null);\n };\n }();\n\n return GlobalModel;\n}(Model);\n\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seriesIndex;\n var id = payload.seriesId;\n var name_1 = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1;\n }\n}\n\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n } // If it is component model mainType, the model handles that merge later.\n // otherwise, merge them here.\n\n\n if (!ComponentModel.hasClass(name)) {\n if (_typeof(themeItem) === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\n\nfunction queryByIdOrName(attr, idOrName, cmpts) {\n // Here is a break from echarts4: string and number are\n // treated as equal.\n if (isArray(idOrName)) {\n var keyMap_1 = createHashMap();\n each(idOrName, function (idOrNameItem) {\n if (idOrNameItem != null) {\n var idName = modelUtil.convertOptionIdName(idOrNameItem, null);\n idName != null && keyMap_1.set(idOrNameItem, true);\n }\n });\n return filter(cmpts, function (cmpt) {\n return cmpt && keyMap_1.get(cmpt[attr]);\n });\n } else {\n var idName_1 = modelUtil.convertOptionIdName(idOrName, null);\n return filter(cmpts, function (cmpt) {\n return cmpt && idName_1 != null && cmpt[attr] === idName_1;\n });\n }\n}\n\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) {\n return cmpt && cmpt.subType === condition.subType;\n }) : components;\n}\n\nfunction normalizeSetOptionInput(opts) {\n var replaceMergeMainTypeMap = createHashMap();\n opts && each(modelUtil.normalizeToArray(opts.replaceMerge), function (mainType) {\n if (process.env.NODE_ENV !== 'production') {\n assert(ComponentModel.hasClass(mainType), '\"' + mainType + '\" is not valid component main type in \"replaceMerge\"');\n }\n\n replaceMergeMainTypeMap.set(mainType, true);\n });\n return {\n replaceMergeMainTypeMap: replaceMergeMainTypeMap\n };\n}\n\nmixin(GlobalModel, PaletteMixin);\nexport default GlobalModel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src啊/ElectronicMallVue/node_modules/echarts/lib/model/Global.js"],"names":["__extends","each","filter","isArray","isObject","isString","createHashMap","assert","clone","merge","extend","mixin","isFunction","modelUtil","Model","ComponentModel","globalDefault","resetSourceDefaulter","concatInternalOptions","PaletteMixin","error","warn","reCreateSeriesIndices","assertSeriesInitialized","initBase","OPTION_INNER_KEY","OPTION_INNER_VALUE","BUITIN_COMPONENTS_MAP","grid","polar","geo","singleAxis","parallel","calendar","graphic","toolbox","tooltip","axisPointer","brush","title","timeline","markPoint","markLine","markArea","legend","dataZoom","visualMap","xAxis","yAxis","angleAxis","radiusAxis","BUILTIN_CHARTS_MAP","line","bar","pie","scatter","radar","map","tree","treemap","graph","gauge","funnel","sankey","boxplot","candlestick","effectScatter","lines","heatmap","pictorialBar","themeRiver","sunburst","custom","componetsMissingLogPrinted","checkMissingComponents","option","componentOption","mainType","hasClass","componentImportName","GlobalModel","_super","apply","arguments","prototype","init","parentModel","ecModel","theme","locale","optionManager","_theme","_locale","_optionManager","setOption","opts","optionPreprocessorFuncs","process","env","NODE_ENV","innerOpt","normalizeSetOptionInput","_resetOption","resetOption","type","opt","optionChanged","baseOption","mountOption","restoreData","_mergeOption","timelineOption","getTimelineOption","mediaOptions","getMediaOption","length","mediaOption","mergeOption","newOption","componentsMap","_componentsMap","componentsCount","_componentsCount","newCmptTypes","newCmptTypeMap","replaceMergeMainTypeMap","push","set","val","mainTypeInReplaceMerge","get","topologicalTravel","getAllClassMainTypes","visitComponent","newCmptOptionList","normalizeToArray","oldCmptList","mergeMode","mappingResult","mappingToExists","setComponentTypeToKeyInfo","optionsByMainType","cmptsByMainType","cmptsCountByMainType","tooltipExists","tooltipWarningLogged","resultItem","index","componentModel","existing","newCmptOption","optionUpdated","isSeriesType","ComponentModelClass","getClass","keyInfo","subType","seriesImportName","constructor","name","extraOpt","componentIndex","brandNew","__requireNewView","_seriesIndices","getOption","optInMainType","realLen","metNonInner","i","isComponentIdInternal","getTheme","getLocaleModel","setUpdatePayload","payload","_payload","getUpdatePayload","getComponent","idx","list","cmpt","queryComponents","condition","id","cmpts","result","queryByIdOrName","filterBySubType","findComponents","query","queryCond","getQueryCond","doFilter","q","indexAttr","idAttr","nameAttr","res","eachComponent","cb","context","ctxForAll_1","cbForAll_1","componentType","call","getSeriesByName","nameStr","convertOptionIdName","oneSeries","getSeriesByIndex","seriesIndex","getSeriesByType","getSeries","getSeriesCount","eachSeries","rawSeriesIndex","series","eachRawSeries","eachSeriesByType","eachRawSeriesByType","isSeriesFiltered","seriesModel","_seriesIndicesMap","getCurrentSeriesIndices","slice","filterSeries","newSeriesIndices","seriesRawIdx","componentTypes","components","component","isNotTargetSeries","internalField","seriesIndices","Error","airaOption","aria","enabled","mergeTheme","seriesId","name_1","seriesName","notMergeColorLayer","color","colorLayer","themeItem","attr","idOrName","keyMap_1","idOrNameItem","idName","idName_1","hasOwnProperty","replaceMerge"],"mappings":";;;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,SAAT,QAA0B,OAA1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASC,IAAT,EAAeC,MAAf,EAAuBC,OAAvB,EAAgCC,QAAhC,EAA0CC,QAA1C,EAAoDC,aAApD,EAAmEC,MAAnE,EAA2EC,KAA3E,EAAkFC,KAAlF,EAAyFC,MAAzF,EAAiGC,KAAjG,EAAwGC,UAAxG,QAA0H,0BAA1H;AACA,OAAO,KAAKC,SAAZ,MAA2B,kBAA3B;AACA,OAAOC,KAAP,MAAkB,YAAlB;AACA,OAAOC,cAAP,MAA2B,gBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,SAASC,oBAAT,QAAqC,gCAArC;AACA,SA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/C,SAArC,EAAgD;AAC9C;AACA;AACA,SAAOA,SAAS,CAACsE,cAAV,CAAyB,SAAzB,IAAsC1P,MAAM,CAACmO,UAAD,EAAa,UAAUjD,IAAV,EAAgB;AAC9E,WAAOA,IAAI,IAAIA,IAAI,CAACxB,OAAL,KAAiB0B,SAAS,CAAC1B,OAA1C;AACD,GAFkD,CAA5C,GAEFyE,UAFL;AAGD;;AAED,SAAShI,uBAAT,CAAiCN,IAAjC,EAAuC;AACrC,MAAI8B,uBAAuB,GAAGvH,aAAa,EAA3C;AACAyF,EAAAA,IAAI,IAAI9F,IAAI,CAACY,SAAS,CAAC0H,gBAAV,CAA2BxC,IAAI,CAAC8J,YAAhC,CAAD,EAAgD,UAAUhL,QAAV,EAAoB;AAC9E,QAAIoB,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;AACzC5F,MAAAA,MAAM,CAACQ,cAAc,CAAC+D,QAAf,CAAwBD,QAAxB,CAAD,EAAoC,MAAMA,QAAN,GAAiB,sDAArD,CAAN;AACD;;AAEDgD,IAAAA,uBAAuB,CAACE,GAAxB,CAA4BlD,QAA5B,EAAsC,IAAtC;AACD,GANW,CAAZ;AAOA,SAAO;AACLgD,IAAAA,uBAAuB,EAAEA;AADpB,GAAP;AAGD;;AAEDlH,KAAK,CAACqE,WAAD,EAAc7D,YAAd,CAAL;AACA,eAAe6D,WAAf","sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { __extends } from \"tslib\";\n/**\n * Caution: If the mechanism should be changed some day, these cases\n * should be considered:\n *\n * (1) In `merge option` mode, if using the same option to call `setOption`\n * many times, the result should be the same (try our best to ensure that).\n * (2) In `merge option` mode, if a component has no id/name specified, it\n * will be merged by index, and the result sequence of the components is\n * consistent to the original sequence.\n * (3) In `replaceMerge` mode, keep the result sequence of the components is\n * consistent to the original sequence, even though there might result in \"hole\".\n * (4) `reset` feature (in toolbox). Find detailed info in comments about\n * `mergeOption` in module:echarts/model/OptionManager.\n */\n\nimport { each, filter, isArray, isObject, isString, createHashMap, assert, clone, merge, extend, mixin, isFunction } from 'zrender/lib/core/util.js';\nimport * as modelUtil from '../util/model.js';\nimport Model from './Model.js';\nimport ComponentModel from './Component.js';\nimport globalDefault from './globalDefault.js';\nimport { resetSourceDefaulter } from '../data/helper/sourceHelper.js';\nimport { concatInternalOptions } from './internalComponentCreator.js';\nimport { PaletteMixin } from './mixin/palette.js';\nimport { error, warn } from '../util/log.js'; // -----------------------\n// Internal method names:\n// -----------------------\n\nvar reCreateSeriesIndices;\nvar assertSeriesInitialized;\nvar initBase;\nvar OPTION_INNER_KEY = '\\0_ec_inner';\nvar OPTION_INNER_VALUE = 1;\nvar BUITIN_COMPONENTS_MAP = {\n grid: 'GridComponent',\n polar: 'PolarComponent',\n geo: 'GeoComponent',\n singleAxis: 'SingleAxisComponent',\n parallel: 'ParallelComponent',\n calendar: 'CalendarComponent',\n graphic: 'GraphicComponent',\n toolbox: 'ToolboxComponent',\n tooltip: 'TooltipComponent',\n axisPointer: 'AxisPointerComponent',\n brush: 'BrushComponent',\n title: 'TitleComponent',\n timeline: 'TimelineComponent',\n markPoint: 'MarkPointComponent',\n markLine: 'MarkLineComponent',\n markArea: 'MarkAreaComponent',\n legend: 'LegendComponent',\n dataZoom: 'DataZoomComponent',\n visualMap: 'VisualMapComponent',\n // aria: 'AriaComponent',\n // dataset: 'DatasetComponent',\n // Dependencies\n xAxis: 'GridComponent',\n yAxis: 'GridComponent',\n angleAxis: 'PolarComponent',\n radiusAxis: 'PolarComponent'\n};\nvar BUILTIN_CHARTS_MAP = {\n line: 'LineChart',\n bar: 'BarChart',\n pie: 'PieChart',\n scatter: 'ScatterChart',\n radar: 'RadarChart',\n map: 'MapChart',\n tree: 'TreeChart',\n treemap: 'TreemapChart',\n graph: 'GraphChart',\n gauge: 'GaugeChart',\n funnel: 'FunnelChart',\n parallel: 'ParallelChart',\n sankey: 'SankeyChart',\n boxplot: 'BoxplotChart',\n candlestick: 'CandlestickChart',\n effectScatter: 'EffectScatterChart',\n lines: 'LinesChart',\n heatmap: 'HeatmapChart',\n pictorialBar: 'PictorialBarChart',\n themeRiver: 'ThemeRiverChart',\n sunburst: 'SunburstChart',\n custom: 'CustomChart'\n};\nvar componetsMissingLogPrinted = {};\n\nfunction checkMissingComponents(option) {\n each(option, function (componentOption, mainType) {\n if (!ComponentModel.hasClass(mainType)) {\n var componentImportName = BUITIN_COMPONENTS_MAP[mainType];\n\n if (componentImportName && !componetsMissingLogPrinted[componentImportName]) {\n error(\"Component \" + mainType + \" is used but not imported.\\nimport { \" + componentImportName + \" } from 'echarts/components';\\necharts.use([\" + componentImportName + \"]);\");\n componetsMissingLogPrinted[componentImportName] = true;\n }\n }\n });\n}\n\nvar GlobalModel =\n/** @class */\nfunction (_super) {\n __extends(GlobalModel, _super);\n\n function GlobalModel() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n GlobalModel.prototype.init = function (option, parentModel, ecModel, theme, locale, optionManager) {\n theme = theme || {};\n this.option = null; // Mark as not initialized.\n\n this._theme = new Model(theme);\n this._locale = new Model(locale);\n this._optionManager = optionManager;\n };\n\n GlobalModel.prototype.setOption = function (option, opts, optionPreprocessorFuncs) {\n if (process.env.NODE_ENV !== 'production') {\n assert(option != null, 'option is null/undefined');\n assert(option[OPTION_INNER_KEY] !== OPTION_INNER_VALUE, 'please use chart.getOption()');\n }\n\n var innerOpt = normalizeSetOptionInput(opts);\n\n this._optionManager.setOption(option, optionPreprocessorFuncs, innerOpt);\n\n this._resetOption(null, innerOpt);\n };\n /**\n * @param type null/undefined: reset all.\n * 'recreate': force recreate all.\n * 'timeline': only reset timeline option\n * 'media': only reset media query option\n * @return Whether option changed.\n */\n\n\n GlobalModel.prototype.resetOption = function (type, opt) {\n return this._resetOption(type, normalizeSetOptionInput(opt));\n };\n\n GlobalModel.prototype._resetOption = function (type, opt) {\n var optionChanged = false;\n var optionManager = this._optionManager;\n\n if (!type || type === 'recreate') {\n var baseOption = optionManager.mountOption(type === 'recreate');\n\n if (process.env.NODE_ENV !== 'production') {\n checkMissingComponents(baseOption);\n }\n\n if (!this.option || type === 'recreate') {\n initBase(this, baseOption);\n } else {\n this.restoreData();\n\n this._mergeOption(baseOption, opt);\n }\n\n optionChanged = true;\n }\n\n if (type === 'timeline' || type === 'media') {\n this.restoreData();\n } // By design, if `setOption(option2)` at the second time, and `option2` is a `ECUnitOption`,\n // it should better not have the same props with `MediaUnit['option']`.\n // Because either `option2` or `MediaUnit['option']` will be always merged to \"current option\"\n // rather than original \"baseOption\". If they both override a prop, the result might be\n // unexpected when media state changed after `setOption` called.\n // If we really need to modify a props in each `MediaUnit['option']`, use the full version\n // (`{baseOption, media}`) in `setOption`.\n // For `timeline`, the case is the same.\n\n\n if (!type || type === 'recreate' || type === 'timeline') {\n var timelineOption = optionManager.getTimelineOption(this);\n\n if (timelineOption) {\n optionChanged = true;\n\n this._mergeOption(timelineOption, opt);\n }\n }\n\n if (!type || type === 'recreate' || type === 'media') {\n var mediaOptions = optionManager.getMediaOption(this);\n\n if (mediaOptions.length) {\n each(mediaOptions, function (mediaOption) {\n optionChanged = true;\n\n this._mergeOption(mediaOption, opt);\n }, this);\n }\n }\n\n return optionChanged;\n };\n\n GlobalModel.prototype.mergeOption = function (option) {\n this._mergeOption(option, null);\n };\n\n GlobalModel.prototype._mergeOption = function (newOption, opt) {\n var option = this.option;\n var componentsMap = this._componentsMap;\n var componentsCount = this._componentsCount;\n var newCmptTypes = [];\n var newCmptTypeMap = createHashMap();\n var replaceMergeMainTypeMap = opt && opt.replaceMergeMainTypeMap;\n resetSourceDefaulter(this); // If no component class, merge directly.\n // For example: color, animaiton options, etc.\n\n each(newOption, function (componentOption, mainType) {\n if (componentOption == null) {\n return;\n }\n\n if (!ComponentModel.hasClass(mainType)) {\n // globalSettingTask.dirty();\n option[mainType] = option[mainType] == null ? clone(componentOption) : merge(option[mainType], componentOption, true);\n } else if (mainType) {\n newCmptTypes.push(mainType);\n newCmptTypeMap.set(mainType, true);\n }\n });\n\n if (replaceMergeMainTypeMap) {\n // If there is a mainType `xxx` in `replaceMerge` but not declared in option,\n // we trade it as it is declared in option as `{xxx: []}`. Because:\n // (1) for normal merge, `{xxx: null/undefined}` are the same meaning as `{xxx: []}`.\n // (2) some preprocessor may convert some of `{xxx: null/undefined}` to `{xxx: []}`.\n replaceMergeMainTypeMap.each(function (val, mainTypeInReplaceMerge) {\n if (ComponentModel.hasClass(mainTypeInReplaceMerge) && !newCmptTypeMap.get(mainTypeInReplaceMerge)) {\n newCmptTypes.push(mainTypeInReplaceMerge);\n newCmptTypeMap.set(mainTypeInReplaceMerge, true);\n }\n });\n }\n\n ComponentModel.topologicalTravel(newCmptTypes, ComponentModel.getAllClassMainTypes(), visitComponent, this);\n\n function visitComponent(mainType) {\n var newCmptOptionList = concatInternalOptions(this, mainType, modelUtil.normalizeToArray(newOption[mainType]));\n var oldCmptList = componentsMap.get(mainType);\n var mergeMode = // `!oldCmptList` means init. See the comment in `mappingToExists`\n !oldCmptList ? 'replaceAll' : replaceMergeMainTypeMap && replaceMergeMainTypeMap.get(mainType) ? 'replaceMerge' : 'normalMerge';\n var mappingResult = modelUtil.mappingToExists(oldCmptList, newCmptOptionList, mergeMode); // Set mainType and complete subType.\n\n modelUtil.setComponentTypeToKeyInfo(mappingResult, mainType, ComponentModel); // Empty it before the travel, in order to prevent `this._componentsMap`\n // from being used in the `init`/`mergeOption`/`optionUpdated` of some\n // components, which is probably incorrect logic.\n\n option[mainType] = null;\n componentsMap.set(mainType, null);\n componentsCount.set(mainType, 0);\n var optionsByMainType = [];\n var cmptsByMainType = [];\n var cmptsCountByMainType = 0;\n var tooltipExists;\n var tooltipWarningLogged;\n each(mappingResult, function (resultItem, index) {\n var componentModel = resultItem.existing;\n var newCmptOption = resultItem.newOption;\n\n if (!newCmptOption) {\n if (componentModel) {\n // Consider where is no new option and should be merged using {},\n // see removeEdgeAndAdd in topologicalTravel and\n // ComponentModel.getAllClassMainTypes.\n componentModel.mergeOption({}, this);\n componentModel.optionUpdated({}, false);\n } // If no both `resultItem.exist` and `resultItem.option`,\n // either it is in `replaceMerge` and not matched by any id,\n // or it has been removed in previous `replaceMerge` and left a \"hole\" in this component index.\n\n } else {\n var isSeriesType = mainType === 'series';\n var ComponentModelClass = ComponentModel.getClass(mainType, resultItem.keyInfo.subType, !isSeriesType // Give a more detailed warn later if series don't exists\n );\n\n if (!ComponentModelClass) {\n if (process.env.NODE_ENV !== 'production') {\n var subType = resultItem.keyInfo.subType;\n var seriesImportName = BUILTIN_CHARTS_MAP[subType];\n\n if (!componetsMissingLogPrinted[subType]) {\n componetsMissingLogPrinted[subType] = true;\n\n if (seriesImportName) {\n error(\"Series \" + subType + \" is used but not imported.\\nimport { \" + seriesImportName + \" } from 'echarts/charts';\\necharts.use([\" + seriesImportName + \"]);\");\n } else {\n error(\"Unknown series \" + subType);\n }\n }\n }\n\n return;\n } // TODO Before multiple tooltips get supported, we do this check to avoid unexpected exception.\n\n\n if (mainType === 'tooltip') {\n if (tooltipExists) {\n if (process.env.NODE_ENV !== 'production') {\n if (!tooltipWarningLogged) {\n warn('Currently only one tooltip component is allowed.');\n tooltipWarningLogged = true;\n }\n }\n\n return;\n }\n\n tooltipExists = true;\n }\n\n if (componentModel && componentModel.constructor === ComponentModelClass) {\n componentModel.name = resultItem.keyInfo.name; // componentModel.settingTask && componentModel.settingTask.dirty();\n\n componentModel.mergeOption(newCmptOption, this);\n componentModel.optionUpdated(newCmptOption, false);\n } else {\n // PENDING Global as parent ?\n var extraOpt = extend({\n componentIndex: index\n }, resultItem.keyInfo);\n componentModel = new ComponentModelClass(newCmptOption, this, this, extraOpt); // Assign `keyInfo`\n\n extend(componentModel, extraOpt);\n\n if (resultItem.brandNew) {\n componentModel.__requireNewView = true;\n }\n\n componentModel.init(newCmptOption, this, this); // Call optionUpdated after init.\n // newCmptOption has been used as componentModel.option\n // and may be merged with theme and default, so pass null\n // to avoid confusion.\n\n componentModel.optionUpdated(null, true);\n }\n }\n\n if (componentModel) {\n optionsByMainType.push(componentModel.option);\n cmptsByMainType.push(componentModel);\n cmptsCountByMainType++;\n } else {\n // Always do assign to avoid elided item in array.\n optionsByMainType.push(void 0);\n cmptsByMainType.push(void 0);\n }\n }, this);\n option[mainType] = optionsByMainType;\n componentsMap.set(mainType, cmptsByMainType);\n componentsCount.set(mainType, cmptsCountByMainType); // Backup series for filtering.\n\n if (mainType === 'series') {\n reCreateSeriesIndices(this);\n }\n } // If no series declared, ensure `_seriesIndices` initialized.\n\n\n if (!this._seriesIndices) {\n reCreateSeriesIndices(this);\n }\n };\n /**\n * Get option for output (cloned option and inner info removed)\n */\n\n\n GlobalModel.prototype.getOption = function () {\n var option = clone(this.option);\n each(option, function (optInMainType, mainType) {\n if (ComponentModel.hasClass(mainType)) {\n var opts = modelUtil.normalizeToArray(optInMainType); // Inner cmpts need to be removed.\n // Inner cmpts might not be at last since ec5.0, but still\n // compatible for users: if inner cmpt at last, splice the returned array.\n\n var realLen = opts.length;\n var metNonInner = false;\n\n for (var i = realLen - 1; i >= 0; i--) {\n // Remove options with inner id.\n if (opts[i] && !modelUtil.isComponentIdInternal(opts[i])) {\n metNonInner = true;\n } else {\n opts[i] = null;\n !metNonInner && realLen--;\n }\n }\n\n opts.length = realLen;\n option[mainType] = opts;\n }\n });\n delete option[OPTION_INNER_KEY];\n return option;\n };\n\n GlobalModel.prototype.getTheme = function () {\n return this._theme;\n };\n\n GlobalModel.prototype.getLocaleModel = function () {\n return this._locale;\n };\n\n GlobalModel.prototype.setUpdatePayload = function (payload) {\n this._payload = payload;\n };\n\n GlobalModel.prototype.getUpdatePayload = function () {\n return this._payload;\n };\n /**\n * @param idx If not specified, return the first one.\n */\n\n\n GlobalModel.prototype.getComponent = function (mainType, idx) {\n var list = this._componentsMap.get(mainType);\n\n if (list) {\n var cmpt = list[idx || 0];\n\n if (cmpt) {\n return cmpt;\n } else if (idx == null) {\n for (var i = 0; i < list.length; i++) {\n if (list[i]) {\n return list[i];\n }\n }\n }\n }\n };\n /**\n * @return Never be null/undefined.\n */\n\n\n GlobalModel.prototype.queryComponents = function (condition) {\n var mainType = condition.mainType;\n\n if (!mainType) {\n return [];\n }\n\n var index = condition.index;\n var id = condition.id;\n var name = condition.name;\n\n var cmpts = this._componentsMap.get(mainType);\n\n if (!cmpts || !cmpts.length) {\n return [];\n }\n\n var result;\n\n if (index != null) {\n result = [];\n each(modelUtil.normalizeToArray(index), function (idx) {\n cmpts[idx] && result.push(cmpts[idx]);\n });\n } else if (id != null) {\n result = queryByIdOrName('id', id, cmpts);\n } else if (name != null) {\n result = queryByIdOrName('name', name, cmpts);\n } else {\n // Return all non-empty components in that mainType\n result = filter(cmpts, function (cmpt) {\n return !!cmpt;\n });\n }\n\n return filterBySubType(result, condition);\n };\n /**\n * The interface is different from queryComponents,\n * which is convenient for inner usage.\n *\n * @usage\n * let result = findComponents(\n * {mainType: 'dataZoom', query: {dataZoomId: 'abc'}}\n * );\n * let result = findComponents(\n * {mainType: 'series', subType: 'pie', query: {seriesName: 'uio'}}\n * );\n * let result = findComponents(\n * {mainType: 'series',\n * filter: function (model, index) {...}}\n * );\n * // result like [component0, componnet1, ...]\n */\n\n\n GlobalModel.prototype.findComponents = function (condition) {\n var query = condition.query;\n var mainType = condition.mainType;\n var queryCond = getQueryCond(query);\n var result = queryCond ? this.queryComponents(queryCond) // Retrieve all non-empty components.\n : filter(this._componentsMap.get(mainType), function (cmpt) {\n return !!cmpt;\n });\n return doFilter(filterBySubType(result, condition));\n\n function getQueryCond(q) {\n var indexAttr = mainType + 'Index';\n var idAttr = mainType + 'Id';\n var nameAttr = mainType + 'Name';\n return q && (q[indexAttr] != null || q[idAttr] != null || q[nameAttr] != null) ? {\n mainType: mainType,\n // subType will be filtered finally.\n index: q[indexAttr],\n id: q[idAttr],\n name: q[nameAttr]\n } : null;\n }\n\n function doFilter(res) {\n return condition.filter ? filter(res, condition.filter) : res;\n }\n };\n\n GlobalModel.prototype.eachComponent = function (mainType, cb, context) {\n var componentsMap = this._componentsMap;\n\n if (isFunction(mainType)) {\n var ctxForAll_1 = cb;\n var cbForAll_1 = mainType;\n componentsMap.each(function (cmpts, componentType) {\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cbForAll_1.call(ctxForAll_1, componentType, cmpt, cmpt.componentIndex);\n }\n });\n } else {\n var cmpts = isString(mainType) ? componentsMap.get(mainType) : isObject(mainType) ? this.findComponents(mainType) : null;\n\n for (var i = 0; cmpts && i < cmpts.length; i++) {\n var cmpt = cmpts[i];\n cmpt && cb.call(context, cmpt, cmpt.componentIndex);\n }\n }\n };\n /**\n * Get series list before filtered by name.\n */\n\n\n GlobalModel.prototype.getSeriesByName = function (name) {\n var nameStr = modelUtil.convertOptionIdName(name, null);\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && nameStr != null && oneSeries.name === nameStr;\n });\n };\n /**\n * Get series list before filtered by index.\n */\n\n\n GlobalModel.prototype.getSeriesByIndex = function (seriesIndex) {\n return this._componentsMap.get('series')[seriesIndex];\n };\n /**\n * Get series list before filtered by type.\n * FIXME: rename to getRawSeriesByType?\n */\n\n\n GlobalModel.prototype.getSeriesByType = function (subType) {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries && oneSeries.subType === subType;\n });\n };\n /**\n * Get all series before filtered.\n */\n\n\n GlobalModel.prototype.getSeries = function () {\n return filter(this._componentsMap.get('series'), function (oneSeries) {\n return !!oneSeries;\n });\n };\n /**\n * Count series before filtered.\n */\n\n\n GlobalModel.prototype.getSeriesCount = function () {\n return this._componentsCount.get('series');\n };\n /**\n * After filtering, series may be different\n * from raw series.\n */\n\n\n GlobalModel.prototype.eachSeries = function (cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n cb.call(context, series, rawSeriesIndex);\n }, this);\n };\n /**\n * Iterate raw series before filtered.\n *\n * @param {Function} cb\n * @param {*} context\n */\n\n\n GlobalModel.prototype.eachRawSeries = function (cb, context) {\n each(this._componentsMap.get('series'), function (series) {\n series && cb.call(context, series, series.componentIndex);\n });\n };\n /**\n * After filtering, series may be different.\n * from raw series.\n */\n\n\n GlobalModel.prototype.eachSeriesByType = function (subType, cb, context) {\n assertSeriesInitialized(this);\n each(this._seriesIndices, function (rawSeriesIndex) {\n var series = this._componentsMap.get('series')[rawSeriesIndex];\n\n if (series.subType === subType) {\n cb.call(context, series, rawSeriesIndex);\n }\n }, this);\n };\n /**\n * Iterate raw series before filtered of given type.\n */\n\n\n GlobalModel.prototype.eachRawSeriesByType = function (subType, cb, context) {\n return each(this.getSeriesByType(subType), cb, context);\n };\n\n GlobalModel.prototype.isSeriesFiltered = function (seriesModel) {\n assertSeriesInitialized(this);\n return this._seriesIndicesMap.get(seriesModel.componentIndex) == null;\n };\n\n GlobalModel.prototype.getCurrentSeriesIndices = function () {\n return (this._seriesIndices || []).slice();\n };\n\n GlobalModel.prototype.filterSeries = function (cb, context) {\n assertSeriesInitialized(this);\n var newSeriesIndices = [];\n each(this._seriesIndices, function (seriesRawIdx) {\n var series = this._componentsMap.get('series')[seriesRawIdx];\n\n cb.call(context, series, seriesRawIdx) && newSeriesIndices.push(seriesRawIdx);\n }, this);\n this._seriesIndices = newSeriesIndices;\n this._seriesIndicesMap = createHashMap(newSeriesIndices);\n };\n\n GlobalModel.prototype.restoreData = function (payload) {\n reCreateSeriesIndices(this);\n var componentsMap = this._componentsMap;\n var componentTypes = [];\n componentsMap.each(function (components, componentType) {\n if (ComponentModel.hasClass(componentType)) {\n componentTypes.push(componentType);\n }\n });\n ComponentModel.topologicalTravel(componentTypes, ComponentModel.getAllClassMainTypes(), function (componentType) {\n each(componentsMap.get(componentType), function (component) {\n if (component && (componentType !== 'series' || !isNotTargetSeries(component, payload))) {\n component.restoreData();\n }\n });\n });\n };\n\n GlobalModel.internalField = function () {\n reCreateSeriesIndices = function (ecModel) {\n var seriesIndices = ecModel._seriesIndices = [];\n each(ecModel._componentsMap.get('series'), function (series) {\n // series may have been removed by `replaceMerge`.\n series && seriesIndices.push(series.componentIndex);\n });\n ecModel._seriesIndicesMap = createHashMap(seriesIndices);\n };\n\n assertSeriesInitialized = function (ecModel) {\n // Components that use _seriesIndices should depends on series component,\n // which make sure that their initialization is after series.\n if (process.env.NODE_ENV !== 'production') {\n if (!ecModel._seriesIndices) {\n throw new Error('Option should contains series.');\n }\n }\n };\n\n initBase = function (ecModel, baseOption) {\n // Using OPTION_INNER_KEY to mark that this option cannot be used outside,\n // i.e. `chart.setOption(chart.getModel().option);` is forbidden.\n ecModel.option = {};\n ecModel.option[OPTION_INNER_KEY] = OPTION_INNER_VALUE; // Init with series: [], in case of calling findSeries method\n // before series initialized.\n\n ecModel._componentsMap = createHashMap({\n series: []\n });\n ecModel._componentsCount = createHashMap(); // If user spefied `option.aria`, aria will be enable. This detection should be\n // performed before theme and globalDefault merge.\n\n var airaOption = baseOption.aria;\n\n if (isObject(airaOption) && airaOption.enabled == null) {\n airaOption.enabled = true;\n }\n\n mergeTheme(baseOption, ecModel._theme.option); // TODO Needs clone when merging to the unexisted property\n\n merge(baseOption, globalDefault, false);\n\n ecModel._mergeOption(baseOption, null);\n };\n }();\n\n return GlobalModel;\n}(Model);\n\nfunction isNotTargetSeries(seriesModel, payload) {\n if (payload) {\n var index = payload.seriesIndex;\n var id = payload.seriesId;\n var name_1 = payload.seriesName;\n return index != null && seriesModel.componentIndex !== index || id != null && seriesModel.id !== id || name_1 != null && seriesModel.name !== name_1;\n }\n}\n\nfunction mergeTheme(option, theme) {\n // PENDING\n // NOT use `colorLayer` in theme if option has `color`\n var notMergeColorLayer = option.color && !option.colorLayer;\n each(theme, function (themeItem, name) {\n if (name === 'colorLayer' && notMergeColorLayer) {\n return;\n } // If it is component model mainType, the model handles that merge later.\n // otherwise, merge them here.\n\n\n if (!ComponentModel.hasClass(name)) {\n if (typeof themeItem === 'object') {\n option[name] = !option[name] ? clone(themeItem) : merge(option[name], themeItem, false);\n } else {\n if (option[name] == null) {\n option[name] = themeItem;\n }\n }\n }\n });\n}\n\nfunction queryByIdOrName(attr, idOrName, cmpts) {\n // Here is a break from echarts4: string and number are\n // treated as equal.\n if (isArray(idOrName)) {\n var keyMap_1 = createHashMap();\n each(idOrName, function (idOrNameItem) {\n if (idOrNameItem != null) {\n var idName = modelUtil.convertOptionIdName(idOrNameItem, null);\n idName != null && keyMap_1.set(idOrNameItem, true);\n }\n });\n return filter(cmpts, function (cmpt) {\n return cmpt && keyMap_1.get(cmpt[attr]);\n });\n } else {\n var idName_1 = modelUtil.convertOptionIdName(idOrName, null);\n return filter(cmpts, function (cmpt) {\n return cmpt && idName_1 != null && cmpt[attr] === idName_1;\n });\n }\n}\n\nfunction filterBySubType(components, condition) {\n // Using hasOwnProperty for restrict. Consider\n // subType is undefined in user payload.\n return condition.hasOwnProperty('subType') ? filter(components, function (cmpt) {\n return cmpt && cmpt.subType === condition.subType;\n }) : components;\n}\n\nfunction normalizeSetOptionInput(opts) {\n var replaceMergeMainTypeMap = createHashMap();\n opts && each(modelUtil.normalizeToArray(opts.replaceMerge), function (mainType) {\n if (process.env.NODE_ENV !== 'production') {\n assert(ComponentModel.hasClass(mainType), '\"' + mainType + '\" is not valid component main type in \"replaceMerge\"');\n }\n\n replaceMergeMainTypeMap.set(mainType, true);\n });\n return {\n replaceMergeMainTypeMap: replaceMergeMainTypeMap\n };\n}\n\nmixin(GlobalModel, PaletteMixin);\nexport default GlobalModel;"]},"metadata":{},"sourceType":"module"}