qauMaWeb/node_modules/.cache/babel-loader/0f10fe769716110f3188fbebf6a...

1 line
19 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.error.cause.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n// TODO Axis scale\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport Polar, { polarDimensions } from './Polar.js';\nimport { parsePercent } from '../../util/number.js';\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\nimport { SINGLE_REFERRING } from '../../util/model.js';\n/**\r\n * Resize method bound to the polar\r\n */\n\nfunction resizePolar(polar, polarModel, api) {\n var center = polarModel.get('center');\n var width = api.getWidth();\n var height = api.getHeight();\n polar.cx = parsePercent(center[0], width);\n polar.cy = parsePercent(center[1], height);\n var radiusAxis = polar.getRadiusAxis();\n var size = Math.min(width, height) / 2;\n var radius = polarModel.get('radius');\n\n if (radius == null) {\n radius = [0, '100%'];\n } else if (!zrUtil.isArray(radius)) {\n // r0 = 0\n radius = [0, radius];\n }\n\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\n}\n/**\r\n * Update polar\r\n */\n\n\nfunction updatePolarScale(ecModel, api) {\n var polar = this;\n var angleAxis = polar.getAngleAxis();\n var radiusAxis = polar.getRadiusAxis(); // Reset scale\n\n angleAxis.scale.setExtent(Infinity, -Infinity);\n radiusAxis.scale.setExtent(Infinity, -Infinity);\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.coordinateSystem === polar) {\n var data_1 = seriesModel.getData();\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\n radiusAxis.scale.unionExtentFromData(data_1, dim);\n });\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\n angleAxis.scale.unionExtentFromData(data_1, dim);\n });\n }\n });\n niceScaleExtent(angleAxis.scale, angleAxis.model);\n niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis\n\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\n var extent = angleAxis.getExtent();\n var diff = 360 / angleAxis.scale.count();\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\n angleAxis.setExtent(extent[0], extent[1]);\n }\n}\n\nfunction isAngleAxisModel(axisModel) {\n return axisModel.mainType === 'angleAxis';\n}\n/**\r\n * Set common axis properties\r\n */\n\n\nfunction setAxis(axis, axisModel) {\n axis.type = axisModel.get('type');\n axis.scale = createScaleByModel(axisModel);\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\n axis.inverse = axisModel.get('inverse');\n\n if (isAngleAxisModel(axisModel)) {\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\n var startAngle = axisModel.get('startAngle');\n axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));\n } // Inject axis instance\n\n\n axisModel.axis = axis;\n axis.model = axisModel;\n}\n\nvar polarCreator = {\n dimensions: polarDimensions,\n create: function create(ecModel, api) {\n var polarList = [];\n ecModel.eachComponent('polar', function (polarModel, idx) {\n var polar = new Polar(idx + ''); // Inject resize and update method\n\n polar.update = updatePolarScale;\n var radiusAxis = polar.getRadiusAxis();\n var angleAxis = polar.getAngleAxis();\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\n setAxis(radiusAxis, radiusAxisModel);\n setAxis(angleAxis, angleAxisModel);\n resizePolar(polar, polarModel, api);\n polarList.push(polar);\n polarModel.coordinateSystem = polar;\n polar.model = polarModel;\n }); // Inject coordinateSystem to series\n\n ecModel.eachSeries(function (seriesModel) {\n if (seriesModel.get('coordinateSystem') === 'polar') {\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\n\n if (process.env.NODE_ENV !== 'production') {\n if (!polarModel) {\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\n }\n }\n\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\n }\n });\n return polarList;\n }\n};\nexport default polarCreator;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/coord/polar/polarCreator.js"],"names":["zrUtil","Polar","polarDimensions","parsePercent","createScaleByModel","niceScaleExtent","getDataDimensionsOnAxis","SINGLE_REFERRING","resizePolar","polar","polarModel","api","center","get","width","getWidth","height","getHeight","cx","cy","radiusAxis","getRadiusAxis","size","Math","min","radius","isArray","parsedRadius","inverse","setExtent","updatePolarScale","ecModel","angleAxis","getAngleAxis","scale","Infinity","eachSeries","seriesModel","coordinateSystem","data_1","getData","each","dim","unionExtentFromData","model","type","onBand","extent","getExtent","diff","count","isAngleAxisModel","axisModel","mainType","setAxis","axis","startAngle","polarCreator","dimensions","create","polarList","eachComponent","idx","update","radiusAxisModel","findAxisModel","angleAxisModel","push","getReferringComponents","models","process","env","NODE_ENV","Error","retrieve"],"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;AACA,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;AACA,OAAOC,KAAP,IAAgBC,eAAhB,QAAuC,YAAvC;AACA,SAASC,YAAT,QAA6B,sBAA7B;AACA,SAASC,kBAAT,EAA6BC,eAA7B,EAA8CC,uBAA9C,QAA6E,2BAA7E;AACA,SAASC,gBAAT,QAAiC,qBAAjC;AACA;AACA;AACA;;AAEA,SAASC,WAAT,CAAqBC,KAArB,EAA4BC,UAA5B,EAAwCC,GAAxC,EAA6C;AAC3C,MAAIC,MAAM,GAAGF,UAAU,CAACG,GAAX,CAAe,QAAf,CAAb;AACA,MAAIC,KAAK,GAAGH,GAAG,CAACI,QAAJ,EAAZ;AACA,MAAIC,MAAM,GAAGL,GAAG,CAACM,SAAJ,EAAb;AACAR,EAAAA,KAAK,CAACS,EAAN,GAAWf,YAAY,CAACS,MAAM,CAAC,CAAD,CAAP,EAAYE,KAAZ,CAAvB;AACAL,EAAAA,KAAK,CAACU,EAAN,GAAWhB,YAAY,CAACS,MAAM,CAAC,CAAD,CAAP,EAAYI,MAAZ,CAAvB;AACA,MAAII,UAAU,GAAGX,KAAK,CAACY,aAAN,EAAjB;AACA,MAAIC,IAAI,GAAGC,IAAI,CAACC,GA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C,gBAAZ,GAA+B5B,UAAU,CAAC4B,gBAA1C;AACD;AACF,KAZD;AAaA,WAAOsB,SAAP;AACD;AAlCgB,CAAnB;AAoCA,eAAeH,YAAf","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n// TODO Axis scale\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport Polar, { polarDimensions } from './Polar.js';\r\nimport { parsePercent } from '../../util/number.js';\r\nimport { createScaleByModel, niceScaleExtent, getDataDimensionsOnAxis } from '../../coord/axisHelper.js';\r\nimport { SINGLE_REFERRING } from '../../util/model.js';\r\n/**\r\n * Resize method bound to the polar\r\n */\r\n\r\nfunction resizePolar(polar, polarModel, api) {\r\n var center = polarModel.get('center');\r\n var width = api.getWidth();\r\n var height = api.getHeight();\r\n polar.cx = parsePercent(center[0], width);\r\n polar.cy = parsePercent(center[1], height);\r\n var radiusAxis = polar.getRadiusAxis();\r\n var size = Math.min(width, height) / 2;\r\n var radius = polarModel.get('radius');\r\n\r\n if (radius == null) {\r\n radius = [0, '100%'];\r\n } else if (!zrUtil.isArray(radius)) {\r\n // r0 = 0\r\n radius = [0, radius];\r\n }\r\n\r\n var parsedRadius = [parsePercent(radius[0], size), parsePercent(radius[1], size)];\r\n radiusAxis.inverse ? radiusAxis.setExtent(parsedRadius[1], parsedRadius[0]) : radiusAxis.setExtent(parsedRadius[0], parsedRadius[1]);\r\n}\r\n/**\r\n * Update polar\r\n */\r\n\r\n\r\nfunction updatePolarScale(ecModel, api) {\r\n var polar = this;\r\n var angleAxis = polar.getAngleAxis();\r\n var radiusAxis = polar.getRadiusAxis(); // Reset scale\r\n\r\n angleAxis.scale.setExtent(Infinity, -Infinity);\r\n radiusAxis.scale.setExtent(Infinity, -Infinity);\r\n ecModel.eachSeries(function (seriesModel) {\r\n if (seriesModel.coordinateSystem === polar) {\r\n var data_1 = seriesModel.getData();\r\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'radius'), function (dim) {\r\n radiusAxis.scale.unionExtentFromData(data_1, dim);\r\n });\r\n zrUtil.each(getDataDimensionsOnAxis(data_1, 'angle'), function (dim) {\r\n angleAxis.scale.unionExtentFromData(data_1, dim);\r\n });\r\n }\r\n });\r\n niceScaleExtent(angleAxis.scale, angleAxis.model);\r\n niceScaleExtent(radiusAxis.scale, radiusAxis.model); // Fix extent of category angle axis\r\n\r\n if (angleAxis.type === 'category' && !angleAxis.onBand) {\r\n var extent = angleAxis.getExtent();\r\n var diff = 360 / angleAxis.scale.count();\r\n angleAxis.inverse ? extent[1] += diff : extent[1] -= diff;\r\n angleAxis.setExtent(extent[0], extent[1]);\r\n }\r\n}\r\n\r\nfunction isAngleAxisModel(axisModel) {\r\n return axisModel.mainType === 'angleAxis';\r\n}\r\n/**\r\n * Set common axis properties\r\n */\r\n\r\n\r\nfunction setAxis(axis, axisModel) {\r\n axis.type = axisModel.get('type');\r\n axis.scale = createScaleByModel(axisModel);\r\n axis.onBand = axisModel.get('boundaryGap') && axis.type === 'category';\r\n axis.inverse = axisModel.get('inverse');\r\n\r\n if (isAngleAxisModel(axisModel)) {\r\n axis.inverse = axis.inverse !== axisModel.get('clockwise');\r\n var startAngle = axisModel.get('startAngle');\r\n axis.setExtent(startAngle, startAngle + (axis.inverse ? -360 : 360));\r\n } // Inject axis instance\r\n\r\n\r\n axisModel.axis = axis;\r\n axis.model = axisModel;\r\n}\r\n\r\nvar polarCreator = {\r\n dimensions: polarDimensions,\r\n create: function (ecModel, api) {\r\n var polarList = [];\r\n ecModel.eachComponent('polar', function (polarModel, idx) {\r\n var polar = new Polar(idx + ''); // Inject resize and update method\r\n\r\n polar.update = updatePolarScale;\r\n var radiusAxis = polar.getRadiusAxis();\r\n var angleAxis = polar.getAngleAxis();\r\n var radiusAxisModel = polarModel.findAxisModel('radiusAxis');\r\n var angleAxisModel = polarModel.findAxisModel('angleAxis');\r\n setAxis(radiusAxis, radiusAxisModel);\r\n setAxis(angleAxis, angleAxisModel);\r\n resizePolar(polar, polarModel, api);\r\n polarList.push(polar);\r\n polarModel.coordinateSystem = polar;\r\n polar.model = polarModel;\r\n }); // Inject coordinateSystem to series\r\n\r\n ecModel.eachSeries(function (seriesModel) {\r\n if (seriesModel.get('coordinateSystem') === 'polar') {\r\n var polarModel = seriesModel.getReferringComponents('polar', SINGLE_REFERRING).models[0];\r\n\r\n if (process.env.NODE_ENV !== 'production') {\r\n if (!polarModel) {\r\n throw new Error('Polar \"' + zrUtil.retrieve(seriesModel.get('polarIndex'), seriesModel.get('polarId'), 0) + '\" not found');\r\n }\r\n }\r\n\r\n seriesModel.coordinateSystem = polarModel.coordinateSystem;\r\n }\r\n });\r\n return polarList;\r\n }\r\n};\r\nexport default polarCreator;"]},"metadata":{},"sourceType":"module"}