qauMaWeb/node_modules/.cache/babel-loader/f985b1262d0c5f0e3b0e0024597...

1 line
37 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\nimport \"core-js/modules/es.array.fill.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 ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar SKIP_PROPS = ['color', 'borderColor'];\n\nvar CandlestickView =\n/** @class */\nfunction (_super) {\n __extends(CandlestickView, _super);\n\n function CandlestickView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = CandlestickView.type;\n return _this;\n }\n\n CandlestickView.prototype.render = function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath(); // Clear previously rendered progressive elements.\n\n this._progressiveEls = null;\n\n this._updateDrawMode(seriesModel);\n\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n };\n\n CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._clear();\n\n this._updateDrawMode(seriesModel);\n };\n\n CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n this._progressiveEls = [];\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n };\n\n CandlestickView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n\n CandlestickView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n };\n\n CandlestickView.prototype._renderNormal = function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!this._data) {\n group.removeAll();\n }\n\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n\n var el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx); // Empty data\n\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n saveOldStyle(el);\n }\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n\n CandlestickView.prototype._renderLarge = function (seriesModel) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n };\n\n CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var itemLayout = data.getItemLayout(dataIndex);\n var el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n\n this._progressiveEls.push(el);\n }\n };\n\n CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n\n CandlestickView.prototype.remove = function (ecModel) {\n this._clear();\n };\n\n CandlestickView.prototype._clear = function () {\n this.group.removeAll();\n this._data = null;\n };\n\n CandlestickView.type = 'candlestick';\n return CandlestickView;\n}(ChartView);\n\nvar NormalBoxPathShape =\n/** @class */\nfunction () {\n function NormalBoxPathShape() {}\n\n return NormalBoxPathShape;\n}();\n\nvar NormalBoxPath =\n/** @class */\nfunction (_super) {\n __extends(NormalBoxPath, _super);\n\n function NormalBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n\n _this.type = 'normalCandlestickBox';\n return _this;\n }\n\n NormalBoxPath.prototype.getDefaultShape = function () {\n return new NormalBoxPathShape();\n };\n\n NormalBoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n };\n\n return NormalBoxPath;\n}(Path);\n\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\n\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n\n return clipped;\n}\n\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.__simpleBox = isSimpleBox;\n setStatesStylesFromModel(el, itemModel);\n}\n\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\n\nvar LargeBoxPathShape =\n/** @class */\nfunction () {\n function LargeBoxPathShape() {}\n\n return LargeBoxPathShape;\n}();\n\nvar LargeBoxPath =\n/** @class */\nfunction (_super) {\n __extends(LargeBoxPath, _super);\n\n function LargeBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n\n _this.type = 'largeCandlestickBox';\n return _this;\n }\n\n LargeBoxPath.prototype.getDefaultShape = function () {\n return new LargeBoxPathShape();\n };\n\n LargeBoxPath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n };\n\n return LargeBoxPath;\n}(Path);\n\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1,\n ignoreCoarsePointer: true\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1,\n ignoreCoarsePointer: true\n });\n group.add(elN);\n var elDoji = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 0,\n ignoreCoarsePointer: true\n });\n group.add(elDoji);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n setLargeStyle(0, elDoji, seriesModel, data);\n\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n\n if (progressiveEls) {\n progressiveEls.push(elP, elN);\n }\n}\n\nfunction setLargeStyle(sign, el, seriesModel, data) {\n // TODO put in visual?\n var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0']) // Use color for border color by default.\n || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']);\n\n if (sign === 0) {\n borderColor = seriesModel.get(['itemStyle', 'borderColorDoji']);\n } // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n\n var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n}\n\nexport default CandlestickView;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/chart/candlestick/CandlestickView.js"],"names":["__extends","zrUtil","ChartView","graphic","setStatesStylesFromModel","Path","createClipPath","saveOldStyle","SKIP_PROPS","CandlestickView","_super","_this","apply","arguments","type","prototype","render","seriesModel","ecModel","api","group","removeClipPath","_progressiveEls","_updateDrawMode","_isLargeDraw","_renderLarge","_renderNormal","incrementalPrepareRender","_clear","incrementalRender","params","_incrementalRenderLarge","_incrementalRenderNormal","eachRendered","cb","traverseElements","isLargeDraw","pipelineContext","large","data","getData","oldData","_data","isSimpleBox","getLayout","needsClip","get","coord","coordinateSystem","clipArea","getArea","removeAll","diff","add","newIdx","hasValue","itemLayout","getItemLayout","isNormalBoxClipped","el","createNormalBox","initProps","shape","points","ends","setBoxCommon","setItemGraphicEl","update","oldIdx","getItemGraphicEl","remove","updateProps","execute","createLarge","clipPath","setClipPath","dataIndex","next","incremental","push","NormalBoxPathShape","NormalBoxPath","opts","call","getDefaultShape","buildPath","ctx","__simpleBox","moveTo","lineTo","closePath","isInit","transInit","z2","clipped","i","length","contain","itemModel","getItemModel","useStyle","getItemVisual","style","strokeNoScale","map","point","slice","initBaseline","LargeBoxPathShape","LargeBoxPath","__sign","x","progressiveEls","largePoints","elP","ignoreCoarsePointer","elN","elDoji","setLargeStyle","sign","borderColor","itemStyle","getModel","getItemStyle","fill","stroke"],"mappings":";;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AA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,QAAH,CAAYqB,SAAZ;AACA9D,EAAAA,EAAE,CAAC2C,KAAH,CAASsB,IAAT,GAAgB,IAAhB;AACAjE,EAAAA,EAAE,CAAC2C,KAAH,CAASuB,MAAT,GAAkBL,WAAlB;AACD;;AAED,eAAe/G,eAAf","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 ChartView from '../../view/Chart.js';\nimport * as graphic from '../../util/graphic.js';\nimport { setStatesStylesFromModel } from '../../util/states.js';\nimport Path from 'zrender/lib/graphic/Path.js';\nimport { createClipPath } from '../helper/createClipPathFromCoordSys.js';\nimport { saveOldStyle } from '../../animation/basicTransition.js';\nvar SKIP_PROPS = ['color', 'borderColor'];\n\nvar CandlestickView =\n/** @class */\nfunction (_super) {\n __extends(CandlestickView, _super);\n\n function CandlestickView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = CandlestickView.type;\n return _this;\n }\n\n CandlestickView.prototype.render = function (seriesModel, ecModel, api) {\n // If there is clipPath created in large mode. Remove it.\n this.group.removeClipPath(); // Clear previously rendered progressive elements.\n\n this._progressiveEls = null;\n\n this._updateDrawMode(seriesModel);\n\n this._isLargeDraw ? this._renderLarge(seriesModel) : this._renderNormal(seriesModel);\n };\n\n CandlestickView.prototype.incrementalPrepareRender = function (seriesModel, ecModel, api) {\n this._clear();\n\n this._updateDrawMode(seriesModel);\n };\n\n CandlestickView.prototype.incrementalRender = function (params, seriesModel, ecModel, api) {\n this._progressiveEls = [];\n this._isLargeDraw ? this._incrementalRenderLarge(params, seriesModel) : this._incrementalRenderNormal(params, seriesModel);\n };\n\n CandlestickView.prototype.eachRendered = function (cb) {\n graphic.traverseElements(this._progressiveEls || this.group, cb);\n };\n\n CandlestickView.prototype._updateDrawMode = function (seriesModel) {\n var isLargeDraw = seriesModel.pipelineContext.large;\n\n if (this._isLargeDraw == null || isLargeDraw !== this._isLargeDraw) {\n this._isLargeDraw = isLargeDraw;\n\n this._clear();\n }\n };\n\n CandlestickView.prototype._renderNormal = function (seriesModel) {\n var data = seriesModel.getData();\n var oldData = this._data;\n var group = this.group;\n var isSimpleBox = data.getLayout('isSimpleBox');\n var needsClip = seriesModel.get('clip', true);\n var coord = seriesModel.coordinateSystem;\n var clipArea = coord.getArea && coord.getArea(); // There is no old data only when first rendering or switching from\n // stream mode to normal mode, where previous elements should be removed.\n\n if (!this._data) {\n group.removeAll();\n }\n\n data.diff(oldData).add(function (newIdx) {\n if (data.hasValue(newIdx)) {\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n return;\n }\n\n var el = createNormalBox(itemLayout, newIdx, true);\n graphic.initProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }\n }).update(function (newIdx, oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx); // Empty data\n\n if (!data.hasValue(newIdx)) {\n group.remove(el);\n return;\n }\n\n var itemLayout = data.getItemLayout(newIdx);\n\n if (needsClip && isNormalBoxClipped(clipArea, itemLayout)) {\n group.remove(el);\n return;\n }\n\n if (!el) {\n el = createNormalBox(itemLayout, newIdx);\n } else {\n graphic.updateProps(el, {\n shape: {\n points: itemLayout.ends\n }\n }, seriesModel, newIdx);\n saveOldStyle(el);\n }\n\n setBoxCommon(el, data, newIdx, isSimpleBox);\n group.add(el);\n data.setItemGraphicEl(newIdx, el);\n }).remove(function (oldIdx) {\n var el = oldData.getItemGraphicEl(oldIdx);\n el && group.remove(el);\n }).execute();\n this._data = data;\n };\n\n CandlestickView.prototype._renderLarge = function (seriesModel) {\n this._clear();\n\n createLarge(seriesModel, this.group);\n var clipPath = seriesModel.get('clip', true) ? createClipPath(seriesModel.coordinateSystem, false, seriesModel) : null;\n\n if (clipPath) {\n this.group.setClipPath(clipPath);\n } else {\n this.group.removeClipPath();\n }\n };\n\n CandlestickView.prototype._incrementalRenderNormal = function (params, seriesModel) {\n var data = seriesModel.getData();\n var isSimpleBox = data.getLayout('isSimpleBox');\n var dataIndex;\n\n while ((dataIndex = params.next()) != null) {\n var itemLayout = data.getItemLayout(dataIndex);\n var el = createNormalBox(itemLayout, dataIndex);\n setBoxCommon(el, data, dataIndex, isSimpleBox);\n el.incremental = true;\n this.group.add(el);\n\n this._progressiveEls.push(el);\n }\n };\n\n CandlestickView.prototype._incrementalRenderLarge = function (params, seriesModel) {\n createLarge(seriesModel, this.group, this._progressiveEls, true);\n };\n\n CandlestickView.prototype.remove = function (ecModel) {\n this._clear();\n };\n\n CandlestickView.prototype._clear = function () {\n this.group.removeAll();\n this._data = null;\n };\n\n CandlestickView.type = 'candlestick';\n return CandlestickView;\n}(ChartView);\n\nvar NormalBoxPathShape =\n/** @class */\nfunction () {\n function NormalBoxPathShape() {}\n\n return NormalBoxPathShape;\n}();\n\nvar NormalBoxPath =\n/** @class */\nfunction (_super) {\n __extends(NormalBoxPath, _super);\n\n function NormalBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n\n _this.type = 'normalCandlestickBox';\n return _this;\n }\n\n NormalBoxPath.prototype.getDefaultShape = function () {\n return new NormalBoxPathShape();\n };\n\n NormalBoxPath.prototype.buildPath = function (ctx, shape) {\n var ends = shape.points;\n\n if (this.__simpleBox) {\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[6][0], ends[6][1]);\n } else {\n ctx.moveTo(ends[0][0], ends[0][1]);\n ctx.lineTo(ends[1][0], ends[1][1]);\n ctx.lineTo(ends[2][0], ends[2][1]);\n ctx.lineTo(ends[3][0], ends[3][1]);\n ctx.closePath();\n ctx.moveTo(ends[4][0], ends[4][1]);\n ctx.lineTo(ends[5][0], ends[5][1]);\n ctx.moveTo(ends[6][0], ends[6][1]);\n ctx.lineTo(ends[7][0], ends[7][1]);\n }\n };\n\n return NormalBoxPath;\n}(Path);\n\nfunction createNormalBox(itemLayout, dataIndex, isInit) {\n var ends = itemLayout.ends;\n return new NormalBoxPath({\n shape: {\n points: isInit ? transInit(ends, itemLayout) : ends\n },\n z2: 100\n });\n}\n\nfunction isNormalBoxClipped(clipArea, itemLayout) {\n var clipped = true;\n\n for (var i = 0; i < itemLayout.ends.length; i++) {\n // If any point are in the region.\n if (clipArea.contain(itemLayout.ends[i][0], itemLayout.ends[i][1])) {\n clipped = false;\n break;\n }\n }\n\n return clipped;\n}\n\nfunction setBoxCommon(el, data, dataIndex, isSimpleBox) {\n var itemModel = data.getItemModel(dataIndex);\n el.useStyle(data.getItemVisual(dataIndex, 'style'));\n el.style.strokeNoScale = true;\n el.__simpleBox = isSimpleBox;\n setStatesStylesFromModel(el, itemModel);\n}\n\nfunction transInit(points, itemLayout) {\n return zrUtil.map(points, function (point) {\n point = point.slice();\n point[1] = itemLayout.initBaseline;\n return point;\n });\n}\n\nvar LargeBoxPathShape =\n/** @class */\nfunction () {\n function LargeBoxPathShape() {}\n\n return LargeBoxPathShape;\n}();\n\nvar LargeBoxPath =\n/** @class */\nfunction (_super) {\n __extends(LargeBoxPath, _super);\n\n function LargeBoxPath(opts) {\n var _this = _super.call(this, opts) || this;\n\n _this.type = 'largeCandlestickBox';\n return _this;\n }\n\n LargeBoxPath.prototype.getDefaultShape = function () {\n return new LargeBoxPathShape();\n };\n\n LargeBoxPath.prototype.buildPath = function (ctx, shape) {\n // Drawing lines is more efficient than drawing\n // a whole line or drawing rects.\n var points = shape.points;\n\n for (var i = 0; i < points.length;) {\n if (this.__sign === points[i++]) {\n var x = points[i++];\n ctx.moveTo(x, points[i++]);\n ctx.lineTo(x, points[i++]);\n } else {\n i += 3;\n }\n }\n };\n\n return LargeBoxPath;\n}(Path);\n\nfunction createLarge(seriesModel, group, progressiveEls, incremental) {\n var data = seriesModel.getData();\n var largePoints = data.getLayout('largePoints');\n var elP = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 1,\n ignoreCoarsePointer: true\n });\n group.add(elP);\n var elN = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: -1,\n ignoreCoarsePointer: true\n });\n group.add(elN);\n var elDoji = new LargeBoxPath({\n shape: {\n points: largePoints\n },\n __sign: 0,\n ignoreCoarsePointer: true\n });\n group.add(elDoji);\n setLargeStyle(1, elP, seriesModel, data);\n setLargeStyle(-1, elN, seriesModel, data);\n setLargeStyle(0, elDoji, seriesModel, data);\n\n if (incremental) {\n elP.incremental = true;\n elN.incremental = true;\n }\n\n if (progressiveEls) {\n progressiveEls.push(elP, elN);\n }\n}\n\nfunction setLargeStyle(sign, el, seriesModel, data) {\n // TODO put in visual?\n var borderColor = seriesModel.get(['itemStyle', sign > 0 ? 'borderColor' : 'borderColor0']) // Use color for border color by default.\n || seriesModel.get(['itemStyle', sign > 0 ? 'color' : 'color0']);\n\n if (sign === 0) {\n borderColor = seriesModel.get(['itemStyle', 'borderColorDoji']);\n } // Color must be excluded.\n // Because symbol provide setColor individually to set fill and stroke\n\n\n var itemStyle = seriesModel.getModel('itemStyle').getItemStyle(SKIP_PROPS);\n el.useStyle(itemStyle);\n el.style.fill = null;\n el.style.stroke = borderColor;\n}\n\nexport default CandlestickView;"]},"metadata":{},"sourceType":"module"}