{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\nimport \"core-js/modules/es.array.concat.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\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from './Model.js';\nimport * as componentUtil from '../util/component.js';\nimport { enableClassManagement, parseClassType, isExtendedClass, mountExtend } from '../util/clazz.js';\nimport { makeInner, queryReferringComponents } from '../util/model.js';\nimport * as layout from '../util/layout.js';\nvar inner = makeInner();\n\nvar ComponentModel =\n/** @class */\nfunction (_super) {\n __extends(ComponentModel, _super);\n\n function ComponentModel(option, parentModel, ecModel) {\n var _this = _super.call(this, option, parentModel, ecModel) || this;\n\n _this.uid = componentUtil.getUID('ec_cpt_model');\n return _this;\n }\n\n ComponentModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n\n ComponentModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = layout.fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? layout.getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(this.mainType));\n zrUtil.merge(option, this.getDefaultOption());\n\n if (layoutMode) {\n layout.mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n\n ComponentModel.prototype.mergeOption = function (option, ecModel) {\n zrUtil.merge(this.option, option, true);\n var layoutMode = layout.fetchLayoutMode(this);\n\n if (layoutMode) {\n layout.mergeLayoutParam(this.option, option, layoutMode);\n }\n };\n /**\n * Called immediately after `init` or `mergeOption` of this instance called.\n */\n\n\n ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {};\n /**\n * [How to declare defaultOption]:\n *\n * (A) If using class declaration in typescript (since echarts 5):\n * ```ts\n * import {ComponentOption} from '../model/option.js';\n * export interface XxxOption extends ComponentOption {\n * aaa: number\n * }\n * export class XxxModel extends Component {\n * static type = 'xxx';\n * static defaultOption: XxxOption = {\n * aaa: 123\n * }\n * }\n * Component.registerClass(XxxModel);\n * ```\n * ```ts\n * import {inheritDefaultOption} from '../util/component.js';\n * import {XxxModel, XxxOption} from './XxxModel.js';\n * export interface XxxSubOption extends XxxOption {\n * bbb: number\n * }\n * class XxxSubModel extends XxxModel {\n * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, {\n * bbb: 456\n * })\n * fn() {\n * let opt = this.getDefaultOption();\n * // opt is {aaa: 123, bbb: 456}\n * }\n * }\n * ```\n *\n * (B) If using class extend (previous approach in echarts 3 & 4):\n * ```js\n * let XxxComponent = Component.extend({\n * defaultOption: {\n * xx: 123\n * }\n * })\n * ```\n * ```js\n * let XxxSubComponent = XxxComponent.extend({\n * defaultOption: {\n * yy: 456\n * },\n * fn: function () {\n * let opt = this.getDefaultOption();\n * // opt is {xx: 123, yy: 456}\n * }\n * })\n * ```\n */\n\n\n ComponentModel.prototype.getDefaultOption = function () {\n var ctor = this.constructor; // If using class declaration, it is different to travel super class\n // in legacy env and auto merge defaultOption. So if using class\n // declaration, defaultOption should be merged manually.\n\n if (!isExtendedClass(ctor)) {\n // When using ts class, defaultOption must be declared as static.\n return ctor.defaultOption;\n } // FIXME: remove this approach?\n\n\n var fields = inner(this);\n\n if (!fields.defaultOption) {\n var optList = [];\n var clz = ctor;\n\n while (clz) {\n var opt = clz.prototype.defaultOption;\n opt && optList.push(opt);\n clz = clz.superClass;\n }\n\n var defaultOption = {};\n\n for (var i = optList.length - 1; i >= 0; i--) {\n defaultOption = zrUtil.merge(defaultOption, optList[i], true);\n }\n\n fields.defaultOption = defaultOption;\n }\n\n return fields.defaultOption;\n };\n /**\n * Notice: always force to input param `useDefault` in case that forget to consider it.\n * The same behavior as `modelUtil.parseFinder`.\n *\n * @param useDefault In many cases like series refer axis and axis refer grid,\n * If axis index / axis id not specified, use the first target as default.\n * In other cases like dataZoom refer axis, if not specified, measn no refer.\n */\n\n\n ComponentModel.prototype.getReferringComponents = function (mainType, opt) {\n var indexKey = mainType + 'Index';\n var idKey = mainType + 'Id';\n return queryReferringComponents(this.ecModel, mainType, {\n index: this.get(indexKey, true),\n id: this.get(idKey, true)\n }, opt);\n };\n\n ComponentModel.prototype.getBoxLayoutParams = function () {\n // Consider itself having box layout configs.\n var boxLayoutModel = this;\n return {\n left: boxLayoutModel.get('left'),\n top: boxLayoutModel.get('top'),\n right: boxLayoutModel.get('right'),\n bottom: boxLayoutModel.get('bottom'),\n width: boxLayoutModel.get('width'),\n height: boxLayoutModel.get('height')\n };\n };\n /**\n * Get key for zlevel.\n * If developers don't configure zlevel. We will assign zlevel to series based on the key.\n * For example, lines with trail effect and progressive series will in an individual zlevel.\n */\n\n\n ComponentModel.prototype.getZLevelKey = function () {\n return '';\n };\n\n ComponentModel.prototype.setZLevel = function (zlevel) {\n this.option.zlevel = zlevel;\n };\n\n ComponentModel.protoInitialize = function () {\n var proto = ComponentModel.prototype;\n proto.type = 'component';\n proto.id = '';\n proto.name = '';\n proto.mainType = '';\n proto.subType = '';\n proto.componentIndex = 0;\n }();\n\n return ComponentModel;\n}(Model);\n\nmountExtend(ComponentModel, Model);\nenableClassManagement(ComponentModel);\ncomponentUtil.enableSubTypeDefaulter(ComponentModel);\ncomponentUtil.enableTopologicalTravel(ComponentModel, getDependencies);\n\nfunction getDependencies(componentType) {\n var deps = [];\n zrUtil.each(ComponentModel.getClassesByMainType(componentType), function (clz) {\n deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []);\n }); // Ensure main type.\n\n deps = zrUtil.map(deps, function (type) {\n return parseClassType(type).main;\n }); // Hack dataset for convenience.\n\n if (componentType !== 'dataset' && zrUtil.indexOf(deps, 'dataset') <= 0) {\n deps.unshift('dataset');\n }\n\n return deps;\n}\n\nexport default ComponentModel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/model/Component.js"],"names":["__extends","zrUtil","Model","componentUtil","enableClassManagement","parseClassType","isExtendedClass","mountExtend","makeInner","queryReferringComponents","layout","inner","ComponentModel","_super","option","parentModel","ecModel","_this","call","uid","getUID","prototype","init","mergeDefaultAndTheme","layoutMode","fetchLayoutMode","inputPositionParams","getLayoutParams","themeModel","getTheme","merge","get","mainType","getDefaultOption","mergeLayoutParam","mergeOption","optionUpdated","newCptOption","isInit","ctor","constructor","defaultOption","fields","optList","clz","opt","push","superClass","i","length","getReferringComponents","indexKey","idKey","index","id","getBoxLayoutParams","boxLayoutModel","left","top","right","bottom","width","height","getZLevelKey","setZLevel","zlevel","protoInitialize","proto","type","name","subType","componentIndex","enableSubTypeDefaulter","enableTopologicalTravel","getDependencies","componentType","deps","each","getClassesByMainType","concat","dependencies","map","main","indexOf","unshift"],"mappings":";;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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IAAN,GAAa,EAAb;AACAF,IAAAA,KAAK,CAACnC,QAAN,GAAiB,EAAjB;AACAmC,IAAAA,KAAK,CAACG,OAAN,GAAgB,EAAhB;AACAH,IAAAA,KAAK,CAACI,cAAN,GAAuB,CAAvB;AACD,GARgC,EAAjC;;AAUA,SAAO3D,cAAP;AACD,CA3LD,CA2LEV,KA3LF,CAFA;;AA+LAK,WAAW,CAACK,cAAD,EAAiBV,KAAjB,CAAX;AACAE,qBAAqB,CAACQ,cAAD,CAArB;AACAT,aAAa,CAACqE,sBAAd,CAAqC5D,cAArC;AACAT,aAAa,CAACsE,uBAAd,CAAsC7D,cAAtC,EAAsD8D,eAAtD;;AAEA,SAASA,eAAT,CAAyBC,aAAzB,EAAwC;AACtC,MAAIC,IAAI,GAAG,EAAX;AACA3E,EAAAA,MAAM,CAAC4E,IAAP,CAAYjE,cAAc,CAACkE,oBAAf,CAAoCH,aAApC,CAAZ,EAAgE,UAAU/B,GAAV,EAAe;AAC7EgC,IAAAA,IAAI,GAAGA,IAAI,CAACG,MAAL,CAAYnC,GAAG,CAACoC,YAAJ,IAAoBpC,GAAG,CAACvB,SAAJ,CAAc2D,YAAlC,IAAkD,EAA9D,CAAP;AACD,GAFD,EAFsC,CAIlC;;AAEJJ,EAAAA,IAAI,GAAG3E,MAAM,CAACgF,GAAP,CAAWL,IAAX,EAAiB,UAAUR,IAAV,EAAgB;AACtC,WAAO/D,cAAc,CAAC+D,IAAD,CAAd,CAAqBc,IAA5B;AACD,GAFM,CAAP,CANsC,CAQlC;;AAEJ,MAAIP,aAAa,KAAK,SAAlB,IAA+B1E,MAAM,CAACkF,OAAP,CAAeP,IAAf,EAAqB,SAArB,KAAmC,CAAtE,EAAyE;AACvEA,IAAAA,IAAI,CAACQ,OAAL,CAAa,SAAb;AACD;;AAED,SAAOR,IAAP;AACD;;AAED,eAAehE,cAAf","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\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Model from './Model.js';\nimport * as componentUtil from '../util/component.js';\nimport { enableClassManagement, parseClassType, isExtendedClass, mountExtend } from '../util/clazz.js';\nimport { makeInner, queryReferringComponents } from '../util/model.js';\nimport * as layout from '../util/layout.js';\nvar inner = makeInner();\n\nvar ComponentModel =\n/** @class */\nfunction (_super) {\n __extends(ComponentModel, _super);\n\n function ComponentModel(option, parentModel, ecModel) {\n var _this = _super.call(this, option, parentModel, ecModel) || this;\n\n _this.uid = componentUtil.getUID('ec_cpt_model');\n return _this;\n }\n\n ComponentModel.prototype.init = function (option, parentModel, ecModel) {\n this.mergeDefaultAndTheme(option, ecModel);\n };\n\n ComponentModel.prototype.mergeDefaultAndTheme = function (option, ecModel) {\n var layoutMode = layout.fetchLayoutMode(this);\n var inputPositionParams = layoutMode ? layout.getLayoutParams(option) : {};\n var themeModel = ecModel.getTheme();\n zrUtil.merge(option, themeModel.get(this.mainType));\n zrUtil.merge(option, this.getDefaultOption());\n\n if (layoutMode) {\n layout.mergeLayoutParam(option, inputPositionParams, layoutMode);\n }\n };\n\n ComponentModel.prototype.mergeOption = function (option, ecModel) {\n zrUtil.merge(this.option, option, true);\n var layoutMode = layout.fetchLayoutMode(this);\n\n if (layoutMode) {\n layout.mergeLayoutParam(this.option, option, layoutMode);\n }\n };\n /**\n * Called immediately after `init` or `mergeOption` of this instance called.\n */\n\n\n ComponentModel.prototype.optionUpdated = function (newCptOption, isInit) {};\n /**\n * [How to declare defaultOption]:\n *\n * (A) If using class declaration in typescript (since echarts 5):\n * ```ts\n * import {ComponentOption} from '../model/option.js';\n * export interface XxxOption extends ComponentOption {\n * aaa: number\n * }\n * export class XxxModel extends Component {\n * static type = 'xxx';\n * static defaultOption: XxxOption = {\n * aaa: 123\n * }\n * }\n * Component.registerClass(XxxModel);\n * ```\n * ```ts\n * import {inheritDefaultOption} from '../util/component.js';\n * import {XxxModel, XxxOption} from './XxxModel.js';\n * export interface XxxSubOption extends XxxOption {\n * bbb: number\n * }\n * class XxxSubModel extends XxxModel {\n * static defaultOption: XxxSubOption = inheritDefaultOption(XxxModel.defaultOption, {\n * bbb: 456\n * })\n * fn() {\n * let opt = this.getDefaultOption();\n * // opt is {aaa: 123, bbb: 456}\n * }\n * }\n * ```\n *\n * (B) If using class extend (previous approach in echarts 3 & 4):\n * ```js\n * let XxxComponent = Component.extend({\n * defaultOption: {\n * xx: 123\n * }\n * })\n * ```\n * ```js\n * let XxxSubComponent = XxxComponent.extend({\n * defaultOption: {\n * yy: 456\n * },\n * fn: function () {\n * let opt = this.getDefaultOption();\n * // opt is {xx: 123, yy: 456}\n * }\n * })\n * ```\n */\n\n\n ComponentModel.prototype.getDefaultOption = function () {\n var ctor = this.constructor; // If using class declaration, it is different to travel super class\n // in legacy env and auto merge defaultOption. So if using class\n // declaration, defaultOption should be merged manually.\n\n if (!isExtendedClass(ctor)) {\n // When using ts class, defaultOption must be declared as static.\n return ctor.defaultOption;\n } // FIXME: remove this approach?\n\n\n var fields = inner(this);\n\n if (!fields.defaultOption) {\n var optList = [];\n var clz = ctor;\n\n while (clz) {\n var opt = clz.prototype.defaultOption;\n opt && optList.push(opt);\n clz = clz.superClass;\n }\n\n var defaultOption = {};\n\n for (var i = optList.length - 1; i >= 0; i--) {\n defaultOption = zrUtil.merge(defaultOption, optList[i], true);\n }\n\n fields.defaultOption = defaultOption;\n }\n\n return fields.defaultOption;\n };\n /**\n * Notice: always force to input param `useDefault` in case that forget to consider it.\n * The same behavior as `modelUtil.parseFinder`.\n *\n * @param useDefault In many cases like series refer axis and axis refer grid,\n * If axis index / axis id not specified, use the first target as default.\n * In other cases like dataZoom refer axis, if not specified, measn no refer.\n */\n\n\n ComponentModel.prototype.getReferringComponents = function (mainType, opt) {\n var indexKey = mainType + 'Index';\n var idKey = mainType + 'Id';\n return queryReferringComponents(this.ecModel, mainType, {\n index: this.get(indexKey, true),\n id: this.get(idKey, true)\n }, opt);\n };\n\n ComponentModel.prototype.getBoxLayoutParams = function () {\n // Consider itself having box layout configs.\n var boxLayoutModel = this;\n return {\n left: boxLayoutModel.get('left'),\n top: boxLayoutModel.get('top'),\n right: boxLayoutModel.get('right'),\n bottom: boxLayoutModel.get('bottom'),\n width: boxLayoutModel.get('width'),\n height: boxLayoutModel.get('height')\n };\n };\n /**\n * Get key for zlevel.\n * If developers don't configure zlevel. We will assign zlevel to series based on the key.\n * For example, lines with trail effect and progressive series will in an individual zlevel.\n */\n\n\n ComponentModel.prototype.getZLevelKey = function () {\n return '';\n };\n\n ComponentModel.prototype.setZLevel = function (zlevel) {\n this.option.zlevel = zlevel;\n };\n\n ComponentModel.protoInitialize = function () {\n var proto = ComponentModel.prototype;\n proto.type = 'component';\n proto.id = '';\n proto.name = '';\n proto.mainType = '';\n proto.subType = '';\n proto.componentIndex = 0;\n }();\n\n return ComponentModel;\n}(Model);\n\nmountExtend(ComponentModel, Model);\nenableClassManagement(ComponentModel);\ncomponentUtil.enableSubTypeDefaulter(ComponentModel);\ncomponentUtil.enableTopologicalTravel(ComponentModel, getDependencies);\n\nfunction getDependencies(componentType) {\n var deps = [];\n zrUtil.each(ComponentModel.getClassesByMainType(componentType), function (clz) {\n deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []);\n }); // Ensure main type.\n\n deps = zrUtil.map(deps, function (type) {\n return parseClassType(type).main;\n }); // Hack dataset for convenience.\n\n if (componentType !== 'dataset' && zrUtil.indexOf(deps, 'dataset') <= 0) {\n deps.unshift('dataset');\n }\n\n return deps;\n}\n\nexport default ComponentModel;"]},"metadata":{},"sourceType":"module"}