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EAAaF,EAUjB,SAASG,EAAUxG,EAAOxI,EAAG+M,EAAGC,GAG9B,GAFAxE,EAAQC,EAAMD,GAEVA,EAKF,OAJAA,EAAQyE,EAAUzE,GACb,MAALxI,IAAcwI,EAAM,GAAKiC,EAAczK,IAClC,MAAL+M,IAAcvE,EAAM,GAAKsC,EAAciC,IAClC,MAALC,IAAcxE,EAAM,GAAKsC,EAAckC,IAChCiB,EAAUtB,EAAUnE,GAAQ,OAEvC,CASA,SAASyG,EAAYzG,EAAOiE,GAG1B,GAFAjE,EAAQC,EAAMD,GAEVA,GAAkB,MAATiE,EAEX,OADAjE,EAAM,GAAKkC,EAAc+B,GAClBwB,EAAUzF,EAAO,OAE5B,CAQA,SAASyF,EAAUiB,EAAUrS,GAC3B,GAAKqS,GAAaA,EAASjY,OAA3B,CAIA,IAAI4U,EAAWqD,EAAS,GAAK,IAAMA,EAAS,GAAK,IAAMA,EAAS,GAMhE,MAJa,SAATrS,GAA4B,SAATA,GAA4B,SAATA,IACxCgP,GAAY,IAAMqD,EAAS,IAGtBrS,EAAO,IAAMgP,EAAW,GAR/B,CASF,CAEAtR,EAAQkO,MAAQA,EAChBlO,EAAQuT,KAAOA,EACfvT,EAAQoO,MAAQA,EAChBpO,EAAQ4T,SAAWA,EACnB5T,EAAQqU,eAAiBA,EACzBrU,EAAQsU,KAAOA,EACftU,EAAQwU,WAAaA,EACrBxU,EAAQyU,UAAYA,EACpBzU,EAAQ0U,YAAcA,EACtB1U,EAAQ0T,UAAYA,C","sources":["webpack://app/./node_modules/zrender/lib/svg/Painter.js","webpack://app/./node_modules/zrender/lib/svg/core.js","webpack://app/./node_modules/zrender/lib/svg/graphic.js","webpack://app/./node_modules/zrender/lib/svg/helper/ClippathManager.js","webpack://app/./node_modules/zrender/lib/svg/helper/Definable.js","webpack://app/./node_modules/zrender/lib/svg/helper/GradientManager.js","webpack://app/./node_modules/zrender/lib/svg/helper/ShadowManager.js","webpack://app/./node_modules/zrender/lib/svg/svg.js","webpack://app/./node_modules/zrender/lib/tool/color.js"],"sourcesContent":["var _core = require(\"./core\");\n\nvar createElement = _core.createElement;\n\nvar util = require(\"../core/util\");\n\nvar logError = require(\"../core/log\");\n\nvar Path = require(\"../graphic/Path\");\n\nvar ZImage = require(\"../graphic/Image\");\n\nvar ZText = require(\"../graphic/Text\");\n\nvar arrayDiff = require(\"../core/arrayDiff2\");\n\nvar GradientManager = require(\"./helper/GradientManager\");\n\nvar ClippathManager = require(\"./helper/ClippathManager\");\n\nvar ShadowManager = require(\"./helper/ShadowManager\");\n\nvar _graphic = require(\"./graphic\");\n\nvar svgPath = _graphic.path;\nvar svgImage = _graphic.image;\nvar svgText = _graphic.text;\n\n/**\n * SVG Painter\n * @module zrender/svg/Painter\n */\nfunction parseInt10(val) {\n return parseInt(val, 10);\n}\n\nfunction getSvgProxy(el) {\n if (el instanceof Path) {\n return svgPath;\n } else if (el instanceof ZImage) {\n return svgImage;\n } else if (el instanceof ZText) {\n return svgText;\n } else {\n return svgPath;\n }\n}\n\nfunction checkParentAvailable(parent, child) {\n return child && parent && child.parentNode !== parent;\n}\n\nfunction insertAfter(parent, child, prevSibling) {\n if (checkParentAvailable(parent, child) && prevSibling) {\n var nextSibling = prevSibling.nextSibling;\n nextSibling ? parent.insertBefore(child, nextSibling) : parent.appendChild(child);\n }\n}\n\nfunction prepend(parent, child) {\n if (checkParentAvailable(parent, child)) {\n var firstChild = parent.firstChild;\n firstChild ? parent.insertBefore(child, firstChild) : parent.appendChild(child);\n }\n} // function append(parent, child) {\n// if (checkParentAvailable(parent, child)) {\n// parent.appendChild(child);\n// }\n// }\n\n\nfunction remove(parent, child) {\n if (child && parent && child.parentNode === parent) {\n parent.removeChild(child);\n }\n}\n\nfunction getTextSvgElement(displayable) {\n return displayable.__textSvgEl;\n}\n\nfunction getSvgElement(displayable) {\n return displayable.__svgEl;\n}\n/**\n * @alias module:zrender/svg/Painter\n * @constructor\n * @param {HTMLElement} root 绘图容器\n * @param {module:zrender/Storage} storage\n * @param {Object} opts\n */\n\n\nvar SVGPainter = function (root, storage, opts, zrId) {\n this.root = root;\n this.storage = storage;\n this._opts = opts = util.extend({}, opts || {});\n var svgDom = createElement('svg');\n svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n svgDom.setAttribute('version', '1.1');\n svgDom.setAttribute('baseProfile', 'full');\n svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;';\n var bgRoot = createElement('g');\n svgDom.appendChild(bgRoot);\n var svgRoot = createElement('g');\n svgDom.appendChild(svgRoot);\n this.gradientManager = new GradientManager(zrId, svgRoot);\n this.clipPathManager = new ClippathManager(zrId, svgRoot);\n this.shadowManager = new ShadowManager(zrId, svgRoot);\n var viewport = document.createElement('div');\n viewport.style.cssText = 'overflow:hidden;position:relative';\n this._svgDom = svgDom;\n this._svgRoot = svgRoot;\n this._backgroundRoot = bgRoot;\n this._viewport = viewport;\n root.appendChild(viewport);\n viewport.appendChild(svgDom);\n this.resize(opts.width, opts.height);\n this._visibleList = [];\n};\n\nSVGPainter.prototype = {\n constructor: SVGPainter,\n getType: function () {\n return 'svg';\n },\n getViewportRoot: function () {\n return this._viewport;\n },\n getSvgDom: function () {\n return this._svgDom;\n },\n getSvgRoot: function () {\n return this._svgRoot;\n },\n getViewportRootOffset: function () {\n var viewportRoot = this.getViewportRoot();\n\n if (viewportRoot) {\n return {\n offsetLeft: viewportRoot.offsetLeft || 0,\n offsetTop: viewportRoot.offsetTop || 0\n };\n }\n },\n refresh: function () {\n var list = this.storage.getDisplayList(true);\n\n this._paintList(list);\n },\n setBackgroundColor: function (backgroundColor) {\n // TODO gradient\n // Insert a bg rect instead of setting background to viewport.\n // Otherwise, the exported SVG don't have background.\n if (this._backgroundRoot && this._backgroundNode) {\n this._backgroundRoot.removeChild(this._backgroundNode);\n }\n\n var bgNode = createElement('rect');\n bgNode.setAttribute('width', this.getWidth());\n bgNode.setAttribute('height', this.getHeight());\n bgNode.setAttribute('x', 0);\n bgNode.setAttribute('y', 0);\n bgNode.setAttribute('id', 0);\n bgNode.style.fill = backgroundColor;\n\n this._backgroundRoot.appendChild(bgNode);\n\n this._backgroundNode = bgNode;\n },\n _paintList: function (list) {\n this.gradientManager.markAllUnused();\n this.clipPathManager.markAllUnused();\n this.shadowManager.markAllUnused();\n var svgRoot = this._svgRoot;\n var visibleList = this._visibleList;\n var listLen = list.length;\n var newVisibleList = [];\n var i;\n\n for (i = 0; i < listLen; i++) {\n var displayable = list[i];\n var svgProxy = getSvgProxy(displayable);\n var svgElement = getSvgElement(displayable) || getTextSvgElement(displayable);\n\n if (!displayable.invisible) {\n if (displayable.__dirty) {\n svgProxy && svgProxy.brush(displayable); // Update clipPath\n\n this.clipPathManager.update(displayable); // Update gradient and shadow\n\n if (displayable.style) {\n this.gradientManager.update(displayable.style.fill);\n this.gradientManager.update(displayable.style.stroke);\n this.shadowManager.update(svgElement, displayable);\n }\n\n displayable.__dirty = false;\n }\n\n newVisibleList.push(displayable);\n }\n }\n\n var diff = arrayDiff(visibleList, newVisibleList);\n var prevSvgElement; // First do remove, in case element moved to the head and do remove\n // after add\n\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n\n if (item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = visibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n remove(svgRoot, svgElement);\n remove(svgRoot, textSvgElement);\n }\n }\n }\n\n for (i = 0; i < diff.length; i++) {\n var item = diff[i];\n\n if (item.added) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n prevSvgElement ? insertAfter(svgRoot, svgElement, prevSvgElement) : prepend(svgRoot, svgElement);\n\n if (svgElement) {\n insertAfter(svgRoot, textSvgElement, svgElement);\n } else if (prevSvgElement) {\n insertAfter(svgRoot, textSvgElement, prevSvgElement);\n } else {\n prepend(svgRoot, textSvgElement);\n } // Insert text\n\n\n insertAfter(svgRoot, textSvgElement, svgElement);\n prevSvgElement = textSvgElement || svgElement || prevSvgElement; // zrender.Text only create textSvgElement.\n\n this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.clipPathManager.markUsed(displayable);\n }\n } else if (!item.removed) {\n for (var k = 0; k < item.count; k++) {\n var displayable = newVisibleList[item.indices[k]];\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n var svgElement = getSvgElement(displayable);\n var textSvgElement = getTextSvgElement(displayable);\n this.gradientManager.markUsed(displayable);\n this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.shadowManager.markUsed(displayable);\n this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable);\n this.clipPathManager.markUsed(displayable);\n\n if (textSvgElement) {\n // Insert text.\n insertAfter(svgRoot, textSvgElement, svgElement);\n }\n\n prevSvgElement = svgElement || textSvgElement || prevSvgElement;\n }\n }\n }\n\n this.gradientManager.removeUnused();\n this.clipPathManager.removeUnused();\n this.shadowManager.removeUnused();\n this._visibleList = newVisibleList;\n },\n _getDefs: function (isForceCreating) {\n var svgRoot = this._svgDom;\n var defs = svgRoot.getElementsByTagName('defs');\n\n if (defs.length === 0) {\n // Not exist\n if (isForceCreating) {\n var defs = svgRoot.insertBefore(createElement('defs'), // Create new tag\n svgRoot.firstChild // Insert in the front of svg\n );\n\n if (!defs.contains) {\n // IE doesn't support contains method\n defs.contains = function (el) {\n var children = defs.children;\n\n if (!children) {\n return false;\n }\n\n for (var i = children.length - 1; i >= 0; --i) {\n if (children[i] === el) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n return defs;\n } else {\n return null;\n }\n } else {\n return defs[0];\n }\n },\n resize: function (width, height) {\n var viewport = this._viewport; // FIXME Why ?\n\n viewport.style.display = 'none'; // Save input w/h\n\n var opts = this._opts;\n width != null && (opts.width = width);\n height != null && (opts.height = height);\n width = this._getSize(0);\n height = this._getSize(1);\n viewport.style.display = '';\n\n if (this._width !== width || this._height !== height) {\n this._width = width;\n this._height = height;\n var viewportStyle = viewport.style;\n viewportStyle.width = width + 'px';\n viewportStyle.height = height + 'px';\n var svgRoot = this._svgDom; // Set width by 'svgRoot.width = width' is invalid\n\n svgRoot.setAttribute('width', width);\n svgRoot.setAttribute('height', height);\n }\n\n if (this._backgroundNode) {\n this._backgroundNode.setAttribute('width', width);\n\n this._backgroundNode.setAttribute('height', height);\n }\n },\n\n /**\n * 获取绘图区域宽度\n */\n getWidth: function () {\n return this._width;\n },\n\n /**\n * 获取绘图区域高度\n */\n getHeight: function () {\n return this._height;\n },\n _getSize: function (whIdx) {\n var opts = this._opts;\n var wh = ['width', 'height'][whIdx];\n var cwh = ['clientWidth', 'clientHeight'][whIdx];\n var plt = ['paddingLeft', 'paddingTop'][whIdx];\n var prb = ['paddingRight', 'paddingBottom'][whIdx];\n\n if (opts[wh] != null && opts[wh] !== 'auto') {\n return parseFloat(opts[wh]);\n }\n\n var root = this.root; // IE8 does not support getComputedStyle, but it use VML.\n\n var stl = document.defaultView.getComputedStyle(root);\n return (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0) | 0;\n },\n dispose: function () {\n this.root.innerHTML = '';\n this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null;\n },\n clear: function () {\n if (this._viewport) {\n this.root.removeChild(this._viewport);\n }\n },\n toDataURL: function () {\n this.refresh();\n var html = encodeURIComponent(this._svgDom.outerHTML.replace(/></g, '>\\n\\r<'));\n return 'data:image/svg+xml;charset=UTF-8,' + html;\n }\n}; // Not supported methods\n\nfunction createMethodNotSupport(method) {\n return function () {\n logError('In SVG mode painter not support method \"' + method + '\"');\n };\n} // Unsuppoted methods\n\n\nutil.each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'pathToImage'], function (name) {\n SVGPainter.prototype[name] = createMethodNotSupport(name);\n});\nvar _default = SVGPainter;\nmodule.exports = _default;","var svgURI = 'http://www.w3.org/2000/svg';\n\nfunction createElement(name) {\n return document.createElementNS(svgURI, name);\n}\n\nexports.createElement = createElement;","var _core = require(\"./core\");\n\nvar createElement = _core.createElement;\n\nvar PathProxy = require(\"../core/PathProxy\");\n\nvar BoundingRect = require(\"../core/BoundingRect\");\n\nvar matrix = require(\"../core/matrix\");\n\nvar textContain = require(\"../contain/text\");\n\nvar textHelper = require(\"../graphic/helper/text\");\n\nvar Text = require(\"../graphic/Text\");\n\n// TODO\n// 1. shadow\n// 2. Image: sx, sy, sw, sh\nvar CMD = PathProxy.CMD;\nvar arrayJoin = Array.prototype.join;\nvar NONE = 'none';\nvar mathRound = Math.round;\nvar mathSin = Math.sin;\nvar mathCos = Math.cos;\nvar PI = Math.PI;\nvar PI2 = Math.PI * 2;\nvar degree = 180 / PI;\nvar EPSILON = 1e-4;\n\nfunction round4(val) {\n return mathRound(val * 1e4) / 1e4;\n}\n\nfunction isAroundZero(val) {\n return val < EPSILON && val > -EPSILON;\n}\n\nfunction pathHasFill(style, isText) {\n var fill = isText ? style.textFill : style.fill;\n return fill != null && fill !== NONE;\n}\n\nfunction pathHasStroke(style, isText) {\n var stroke = isText ? style.textStroke : style.stroke;\n return stroke != null && stroke !== NONE;\n}\n\nfunction setTransform(svgEl, m) {\n if (m) {\n attr(svgEl, 'transform', 'matrix(' + arrayJoin.call(m, ',') + ')');\n }\n}\n\nfunction attr(el, key, val) {\n if (!val || val.type !== 'linear' && val.type !== 'radial') {\n // Don't set attribute for gradient, since it need new dom nodes\n el.setAttribute(key, val);\n }\n}\n\nfunction attrXLink(el, key, val) {\n el.setAttributeNS('http://www.w3.org/1999/xlink', key, val);\n}\n\nfunction bindStyle(svgEl, style, isText, el) {\n if (pathHasFill(style, isText)) {\n var fill = isText ? style.textFill : style.fill;\n fill = fill === 'transparent' ? NONE : fill;\n attr(svgEl, 'fill', fill);\n attr(svgEl, 'fill-opacity', style.fillOpacity != null ? style.fillOpacity * style.opacity : style.opacity);\n } else {\n attr(svgEl, 'fill', NONE);\n }\n\n if (pathHasStroke(style, isText)) {\n var stroke = isText ? style.textStroke : style.stroke;\n stroke = stroke === 'transparent' ? NONE : stroke;\n attr(svgEl, 'stroke', stroke);\n var strokeWidth = isText ? style.textStrokeWidth : style.lineWidth;\n var strokeScale = !isText && style.strokeNoScale ? el.getLineScale() : 1;\n attr(svgEl, 'stroke-width', strokeWidth / strokeScale); // stroke then fill for text; fill then stroke for others\n\n attr(svgEl, 'paint-order', isText ? 'stroke' : 'fill');\n attr(svgEl, 'stroke-opacity', style.strokeOpacity != null ? style.strokeOpacity : style.opacity);\n var lineDash = style.lineDash;\n\n if (lineDash) {\n attr(svgEl, 'stroke-dasharray', style.lineDash.join(','));\n attr(svgEl, 'stroke-dashoffset', mathRound(style.lineDashOffset || 0));\n } else {\n attr(svgEl, 'stroke-dasharray', '');\n } // PENDING\n\n\n style.lineCap && attr(svgEl, 'stroke-linecap', style.lineCap);\n style.lineJoin && attr(svgEl, 'stroke-linejoin', style.lineJoin);\n style.miterLimit && attr(svgEl, 'stroke-miterlimit', style.miterLimit);\n } else {\n attr(svgEl, 'stroke', NONE);\n }\n}\n/***************************************************\n * PATH\n **************************************************/\n\n\nfunction pathDataToString(path) {\n var str = [];\n var data = path.data;\n var dataLength = path.len();\n\n for (var i = 0; i < dataLength;) {\n var cmd = data[i++];\n var cmdStr = '';\n var nData = 0;\n\n switch (cmd) {\n case CMD.M:\n cmdStr = 'M';\n nData = 2;\n break;\n\n case CMD.L:\n cmdStr = 'L';\n nData = 2;\n break;\n\n case CMD.Q:\n cmdStr = 'Q';\n nData = 4;\n break;\n\n case CMD.C:\n cmdStr = 'C';\n nData = 6;\n break;\n\n case CMD.A:\n var cx = data[i++];\n var cy = data[i++];\n var rx = data[i++];\n var ry = data[i++];\n var theta = data[i++];\n var dTheta = data[i++];\n var psi = data[i++];\n var clockwise = data[i++];\n var dThetaPositive = Math.abs(dTheta);\n var isCircle = isAroundZero(dThetaPositive - PI2) || (clockwise ? dTheta >= PI2 : -dTheta >= PI2); // Mapping to 0~2PI\n\n var unifiedTheta = dTheta > 0 ? dTheta % PI2 : dTheta % PI2 + PI2;\n var large = false;\n\n if (isCircle) {\n large = true;\n } else if (isAroundZero(dThetaPositive)) {\n large = false;\n } else {\n large = unifiedTheta >= PI === !!clockwise;\n }\n\n var x0 = round4(cx + rx * mathCos(theta));\n var y0 = round4(cy + ry * mathSin(theta)); // It will not draw if start point and end point are exactly the same\n // We need to shift the end point with a small value\n // FIXME A better way to draw circle ?\n\n if (isCircle) {\n if (clockwise) {\n dTheta = PI2 - 1e-4;\n } else {\n dTheta = -PI2 + 1e-4;\n }\n\n large = true;\n\n if (i === 9) {\n // Move to (x0, y0) only when CMD.A comes at the\n // first position of a shape.\n // For instance, when drawing a ring, CMD.A comes\n // after CMD.M, so it's unnecessary to move to\n // (x0, y0).\n str.push('M', x0, y0);\n }\n }\n\n var x = round4(cx + rx * mathCos(theta + dTheta));\n var y = round4(cy + ry * mathSin(theta + dTheta)); // FIXME Ellipse\n\n str.push('A', round4(rx), round4(ry), mathRound(psi * degree), +large, +clockwise, x, y);\n break;\n\n case CMD.Z:\n cmdStr = 'Z';\n break;\n\n case CMD.R:\n var x = round4(data[i++]);\n var y = round4(data[i++]);\n var w = round4(data[i++]);\n var h = round4(data[i++]);\n str.push('M', x, y, 'L', x + w, y, 'L', x + w, y + h, 'L', x, y + h, 'L', x, y);\n break;\n }\n\n cmdStr && str.push(cmdStr);\n\n for (var j = 0; j < nData; j++) {\n // PENDING With scale\n str.push(round4(data[i++]));\n }\n }\n\n return str.join(' ');\n}\n\nvar svgPath = {};\n\nsvgPath.brush = function (el) {\n var style = el.style;\n var svgEl = el.__svgEl;\n\n if (!svgEl) {\n svgEl = createElement('path');\n el.__svgEl = svgEl;\n }\n\n if (!el.path) {\n el.createPathProxy();\n }\n\n var path = el.path;\n\n if (el.__dirtyPath) {\n path.beginPath();\n path.subPixelOptimize = false;\n el.buildPath(path, el.shape);\n el.__dirtyPath = false;\n var pathStr = pathDataToString(path);\n\n if (pathStr.indexOf('NaN') < 0) {\n // Ignore illegal path, which may happen such in out-of-range\n // data in Calendar series.\n attr(svgEl, 'd', pathStr);\n }\n }\n\n bindStyle(svgEl, style, false, el);\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n } else {\n removeOldTextNode(el);\n }\n};\n/***************************************************\n * IMAGE\n **************************************************/\n\n\nvar svgImage = {};\n\nsvgImage.brush = function (el) {\n var style = el.style;\n var image = style.image;\n\n if (image instanceof HTMLImageElement) {\n var src = image.src;\n image = src;\n }\n\n if (!image) {\n return;\n }\n\n var x = style.x || 0;\n var y = style.y || 0;\n var dw = style.width;\n var dh = style.height;\n var svgEl = el.__svgEl;\n\n if (!svgEl) {\n svgEl = createElement('image');\n el.__svgEl = svgEl;\n }\n\n if (image !== el.__imageSrc) {\n attrXLink(svgEl, 'href', image); // Caching image src\n\n el.__imageSrc = image;\n }\n\n attr(svgEl, 'width', dw);\n attr(svgEl, 'height', dh);\n attr(svgEl, 'x', x);\n attr(svgEl, 'y', y);\n setTransform(svgEl, el.transform);\n\n if (style.text != null) {\n svgTextDrawRectText(el, el.getBoundingRect());\n } else {\n removeOldTextNode(el);\n }\n};\n/***************************************************\n * TEXT\n **************************************************/\n\n\nvar svgText = {};\n\nvar _tmpTextHostRect = new BoundingRect();\n\nvar _tmpTextBoxPos = {};\nvar _tmpTextTransform = [];\nvar TEXT_ALIGN_TO_ANCHRO = {\n left: 'start',\n right: 'end',\n center: 'middle',\n middle: 'middle'\n};\n/**\n * @param {module:zrender/Element} el\n * @param {Object|boolean} [hostRect] {x, y, width, height}\n * If set false, rect text is not used.\n */\n\nvar svgTextDrawRectText = function (el, hostRect) {\n var style = el.style;\n var elTransform = el.transform;\n var needTransformTextByHostEl = el instanceof Text || style.transformText;\n el.__dirty && textHelper.normalizeTextStyle(style, true);\n var text = style.text; // Convert to string\n\n text != null && (text += '');\n\n if (!textHelper.needDrawText(text, style)) {\n return;\n } // render empty text for svg if no text but need draw text.\n\n\n text == null && (text = ''); // Follow the setting in the canvas renderer, if not transform the\n // text, transform the hostRect, by which the text is located.\n\n if (!needTransformTextByHostEl && elTransform) {\n _tmpTextHostRect.copy(hostRect);\n\n _tmpTextHostRect.applyTransform(elTransform);\n\n hostRect = _tmpTextHostRect;\n }\n\n var textSvgEl = el.__textSvgEl;\n\n if (!textSvgEl) {\n textSvgEl = createElement('text');\n el.__textSvgEl = textSvgEl;\n } // style.font has been normalized by `normalizeTextStyle`.\n\n\n var textSvgElStyle = textSvgEl.style;\n var font = style.font || textContain.DEFAULT_FONT;\n var computedFont = textSvgEl.__computedFont;\n\n if (font !== textSvgEl.__styleFont) {\n textSvgElStyle.font = textSvgEl.__styleFont = font; // The computedFont might not be the orginal font if it is illegal font.\n\n computedFont = textSvgEl.__computedFont = textSvgElStyle.font;\n }\n\n var textPadding = style.textPadding;\n var textLineHeight = style.textLineHeight;\n var contentBlock = el.__textCotentBlock;\n\n if (!contentBlock || el.__dirtyText) {\n contentBlock = el.__textCotentBlock = textContain.parsePlainText(text, computedFont, textPadding, textLineHeight, style.truncate);\n }\n\n var outerHeight = contentBlock.outerHeight;\n var lineHeight = contentBlock.lineHeight;\n textHelper.getBoxPosition(_tmpTextBoxPos, el, style, hostRect);\n var baseX = _tmpTextBoxPos.baseX;\n var baseY = _tmpTextBoxPos.baseY;\n var textAlign = _tmpTextBoxPos.textAlign || 'left';\n var textVerticalAlign = _tmpTextBoxPos.textVerticalAlign;\n setTextTransform(textSvgEl, needTransformTextByHostEl, elTransform, style, hostRect, baseX, baseY);\n var boxY = textContain.adjustTextY(baseY, outerHeight, textVerticalAlign);\n var textX = baseX;\n var textY = boxY; // TODO needDrawBg\n\n if (textPadding) {\n textX = getTextXForPadding(baseX, textAlign, textPadding);\n textY += textPadding[0];\n } // `textBaseline` is set as 'middle'.\n\n\n textY += lineHeight / 2;\n bindStyle(textSvgEl, style, true, el); // FIXME\n // Add a <style> to reset all of the text font as inherit?\n // otherwise the outer <style> may set the unexpected style.\n // Font may affect position of each tspan elements\n\n var canCacheByTextString = contentBlock.canCacheByTextString;\n var tspanList = el.__tspanList || (el.__tspanList = []);\n var tspanOriginLen = tspanList.length; // Optimize for most cases, just compare text string to determine change.\n\n if (canCacheByTextString && el.__canCacheByTextString && el.__text === text) {\n if (el.__dirtyText && tspanOriginLen) {\n for (var idx = 0; idx < tspanOriginLen; ++idx) {\n updateTextLocation(tspanList[idx], textAlign, textX, textY + idx * lineHeight);\n }\n }\n } else {\n el.__text = text;\n el.__canCacheByTextString = canCacheByTextString;\n var textLines = contentBlock.lines;\n var nTextLines = textLines.length;\n var idx = 0;\n\n for (; idx < nTextLines; idx++) {\n // Using cached tspan elements\n var tspan = tspanList[idx];\n var singleLineText = textLines[idx];\n\n if (!tspan) {\n tspan = tspanList[idx] = createElement('tspan');\n textSvgEl.appendChild(tspan);\n tspan.appendChild(document.createTextNode(singleLineText));\n } else if (tspan.__zrText !== singleLineText) {\n tspan.innerHTML = '';\n tspan.appendChild(document.createTextNode(singleLineText));\n }\n\n updateTextLocation(tspan, textAlign, textX, textY + idx * lineHeight);\n } // Remove unused tspan elements\n\n\n if (tspanOriginLen > nTextLines) {\n for (; idx < tspanOriginLen; idx++) {\n textSvgEl.removeChild(tspanList[idx]);\n }\n\n tspanList.length = nTextLines;\n }\n }\n};\n\nfunction setTextTransform(textSvgEl, needTransformTextByHostEl, elTransform, style, hostRect, baseX, baseY) {\n matrix.identity(_tmpTextTransform);\n\n if (needTransformTextByHostEl && elTransform) {\n matrix.copy(_tmpTextTransform, elTransform);\n } // textRotation only apply in RectText.\n\n\n var textRotation = style.textRotation;\n\n if (hostRect && textRotation) {\n var origin = style.textOrigin;\n\n if (origin === 'center') {\n baseX = hostRect.width / 2 + hostRect.x;\n baseY = hostRect.height / 2 + hostRect.y;\n } else if (origin) {\n baseX = origin[0] + hostRect.x;\n baseY = origin[1] + hostRect.y;\n }\n\n _tmpTextTransform[4] -= baseX;\n _tmpTextTransform[5] -= baseY; // Positive: anticlockwise\n\n matrix.rotate(_tmpTextTransform, _tmpTextTransform, textRotation);\n _tmpTextTransform[4] += baseX;\n _tmpTextTransform[5] += baseY;\n } // See the definition in `Style.js#textOrigin`, the default\n // origin is from the result of `getBoxPosition`.\n\n\n setTransform(textSvgEl, _tmpTextTransform);\n} // FIXME merge the same code with `helper/text.js#getTextXForPadding`;\n\n\nfunction getTextXForPadding(x, textAlign, textPadding) {\n return textAlign === 'right' ? x - textPadding[1] : textAlign === 'center' ? x + textPadding[3] / 2 - textPadding[1] / 2 : x + textPadding[3];\n}\n\nfunction updateTextLocation(tspan, textAlign, x, y) {\n // Consider different font display differently in vertial align, we always\n // set vertialAlign as 'middle', and use 'y' to locate text vertically.\n attr(tspan, 'dominant-baseline', 'middle');\n attr(tspan, 'text-anchor', TEXT_ALIGN_TO_ANCHRO[textAlign]);\n attr(tspan, 'x', x);\n attr(tspan, 'y', y);\n}\n\nfunction removeOldTextNode(el) {\n if (el && el.__textSvgEl) {\n // textSvgEl may has no parentNode if el has been removed temporary.\n if (el.__textSvgEl.parentNode) {\n el.__textSvgEl.parentNode.removeChild(el.__textSvgEl);\n }\n\n el.__textSvgEl = null;\n el.__tspanList = [];\n el.__text = null;\n }\n}\n\nsvgText.drawRectText = svgTextDrawRectText;\n\nsvgText.brush = function (el) {\n var style = el.style;\n\n if (style.text != null) {\n svgTextDrawRectText(el, false);\n } else {\n removeOldTextNode(el);\n }\n};\n\nexports.path = svgPath;\nexports.image = svgImage;\nexports.text = svgText;","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\nvar matrix = require(\"../../core/matrix\");\n\n/**\n * @file Manages SVG clipPath elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG clipPath elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ClippathManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, 'clipPath', '__clippath_in_use__');\n}\n\nzrUtil.inherits(ClippathManager, Definable);\n/**\n * Update clipPath.\n *\n * @param {Displayable} displayable displayable element\n */\n\nClippathManager.prototype.update = function (displayable) {\n var svgEl = this.getSvgElement(displayable);\n\n if (svgEl) {\n this.updateDom(svgEl, displayable.__clipPaths, false);\n }\n\n var textEl = this.getTextSvgElement(displayable);\n\n if (textEl) {\n // Make another clipPath for text, since it's transform\n // matrix is not the same with svgElement\n this.updateDom(textEl, displayable.__clipPaths, true);\n }\n\n this.markUsed(displayable);\n};\n/**\n * Create an SVGElement of displayable and create a <clipPath> of its\n * clipPath\n *\n * @param {Displayable} parentEl parent element\n * @param {ClipPath[]} clipPaths clipPaths of parent element\n * @param {boolean} isText if parent element is Text\n */\n\n\nClippathManager.prototype.updateDom = function (parentEl, clipPaths, isText) {\n if (clipPaths && clipPaths.length > 0) {\n // Has clipPath, create <clipPath> with the first clipPath\n var defs = this.getDefs(true);\n var clipPath = clipPaths[0];\n var clipPathEl;\n var id;\n var dom = isText ? '_textDom' : '_dom';\n\n if (clipPath[dom]) {\n // Use a dom that is already in <defs>\n id = clipPath[dom].getAttribute('id');\n clipPathEl = clipPath[dom]; // Use a dom that is already in <defs>\n\n if (!defs.contains(clipPathEl)) {\n // This happens when set old clipPath that has\n // been previously removed\n defs.appendChild(clipPathEl);\n }\n } else {\n // New <clipPath>\n id = 'zr' + this._zrId + '-clip-' + this.nextId;\n ++this.nextId;\n clipPathEl = this.createElement('clipPath');\n clipPathEl.setAttribute('id', id);\n defs.appendChild(clipPathEl);\n clipPath[dom] = clipPathEl;\n } // Build path and add to <clipPath>\n\n\n var svgProxy = this.getSvgProxy(clipPath);\n\n if (clipPath.transform && clipPath.parent.invTransform && !isText) {\n /**\n * If a clipPath has a parent with transform, the transform\n * of parent should not be considered when setting transform\n * of clipPath. So we need to transform back from parent's\n * transform, which is done by multiplying parent's inverse\n * transform.\n */\n // Store old transform\n var transform = Array.prototype.slice.call(clipPath.transform); // Transform back from parent, and brush path\n\n matrix.mul(clipPath.transform, clipPath.parent.invTransform, clipPath.transform);\n svgProxy.brush(clipPath); // Set back transform of clipPath\n\n clipPath.transform = transform;\n } else {\n svgProxy.brush(clipPath);\n }\n\n var pathEl = this.getSvgElement(clipPath);\n clipPathEl.innerHTML = '';\n /**\n * Use `cloneNode()` here to appendChild to multiple parents,\n * which may happend when Text and other shapes are using the same\n * clipPath. Since Text will create an extra clipPath DOM due to\n * different transform rules.\n */\n\n clipPathEl.appendChild(pathEl.cloneNode());\n parentEl.setAttribute('clip-path', 'url(#' + id + ')');\n\n if (clipPaths.length > 1) {\n // Make the other clipPaths recursively\n this.updateDom(clipPathEl, clipPaths.slice(1), isText);\n }\n } else {\n // No clipPath\n if (parentEl) {\n parentEl.setAttribute('clip-path', 'none');\n }\n }\n};\n/**\n * Mark a single clipPath to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nClippathManager.prototype.markUsed = function (displayable) {\n var that = this; // displayable.__clipPaths can only be `null`/`undefined` or an non-empty array.\n\n if (displayable.__clipPaths) {\n zrUtil.each(displayable.__clipPaths, function (clipPath) {\n if (clipPath._dom) {\n Definable.prototype.markUsed.call(that, clipPath._dom);\n }\n\n if (clipPath._textDom) {\n Definable.prototype.markUsed.call(that, clipPath._textDom);\n }\n });\n }\n};\n\nvar _default = ClippathManager;\nmodule.exports = _default;","var _core = require(\"../core\");\n\nvar createElement = _core.createElement;\n\nvar zrUtil = require(\"../../core/util\");\n\nvar Path = require(\"../../graphic/Path\");\n\nvar ZImage = require(\"../../graphic/Image\");\n\nvar ZText = require(\"../../graphic/Text\");\n\nvar _graphic = require(\"../graphic\");\n\nvar svgPath = _graphic.path;\nvar svgImage = _graphic.image;\nvar svgText = _graphic.text;\n\n/**\n * @file Manages elements that can be defined in <defs> in SVG,\n * e.g., gradients, clip path, etc.\n * @author Zhang Wenli\n */\nvar MARK_UNUSED = '0';\nvar MARK_USED = '1';\n/**\n * Manages elements that can be defined in <defs> in SVG,\n * e.g., gradients, clip path, etc.\n *\n * @class\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n * @param {string|string[]} tagNames possible tag names\n * @param {string} markLabel label name to make if the element\n * is used\n */\n\nfunction Definable(zrId, svgRoot, tagNames, markLabel, domName) {\n this._zrId = zrId;\n this._svgRoot = svgRoot;\n this._tagNames = typeof tagNames === 'string' ? [tagNames] : tagNames;\n this._markLabel = markLabel;\n this._domName = domName || '_dom';\n this.nextId = 0;\n}\n\nDefinable.prototype.createElement = createElement;\n/**\n * Get the <defs> tag for svgRoot; optionally creates one if not exists.\n *\n * @param {boolean} isForceCreating if need to create when not exists\n * @return {SVGDefsElement} SVG <defs> element, null if it doesn't\n * exist and isForceCreating is false\n */\n\nDefinable.prototype.getDefs = function (isForceCreating) {\n var svgRoot = this._svgRoot;\n\n var defs = this._svgRoot.getElementsByTagName('defs');\n\n if (defs.length === 0) {\n // Not exist\n if (isForceCreating) {\n defs = svgRoot.insertBefore(this.createElement('defs'), // Create new tag\n svgRoot.firstChild // Insert in the front of svg\n );\n\n if (!defs.contains) {\n // IE doesn't support contains method\n defs.contains = function (el) {\n var children = defs.children;\n\n if (!children) {\n return false;\n }\n\n for (var i = children.length - 1; i >= 0; --i) {\n if (children[i] === el) {\n return true;\n }\n }\n\n return false;\n };\n }\n\n return defs;\n } else {\n return null;\n }\n } else {\n return defs[0];\n }\n};\n/**\n * Update DOM element if necessary.\n *\n * @param {Object|string} element style element. e.g., for gradient,\n * it may be '#ccc' or {type: 'linear', ...}\n * @param {Function|undefined} onUpdate update callback\n */\n\n\nDefinable.prototype.update = function (element, onUpdate) {\n if (!element) {\n return;\n }\n\n var defs = this.getDefs(false);\n\n if (element[this._domName] && defs.contains(element[this._domName])) {\n // Update DOM\n if (typeof onUpdate === 'function') {\n onUpdate(element);\n }\n } else {\n // No previous dom, create new\n var dom = this.add(element);\n\n if (dom) {\n element[this._domName] = dom;\n }\n }\n};\n/**\n * Add gradient dom to defs\n *\n * @param {SVGElement} dom DOM to be added to <defs>\n */\n\n\nDefinable.prototype.addDom = function (dom) {\n var defs = this.getDefs(true);\n defs.appendChild(dom);\n};\n/**\n * Remove DOM of a given element.\n *\n * @param {SVGElement} element element to remove dom\n */\n\n\nDefinable.prototype.removeDom = function (element) {\n var defs = this.getDefs(false);\n\n if (defs && element[this._domName]) {\n defs.removeChild(element[this._domName]);\n element[this._domName] = null;\n }\n};\n/**\n * Get DOMs of this element.\n *\n * @return {HTMLDomElement} doms of this defineable elements in <defs>\n */\n\n\nDefinable.prototype.getDoms = function () {\n var defs = this.getDefs(false);\n\n if (!defs) {\n // No dom when defs is not defined\n return [];\n }\n\n var doms = [];\n zrUtil.each(this._tagNames, function (tagName) {\n var tags = defs.getElementsByTagName(tagName); // Note that tags is HTMLCollection, which is array-like\n // rather than real array.\n // So `doms.concat(tags)` add tags as one object.\n\n doms = doms.concat([].slice.call(tags));\n });\n return doms;\n};\n/**\n * Mark DOMs to be unused before painting, and clear unused ones at the end\n * of the painting.\n */\n\n\nDefinable.prototype.markAllUnused = function () {\n var doms = this.getDoms();\n var that = this;\n zrUtil.each(doms, function (dom) {\n dom[that._markLabel] = MARK_UNUSED;\n });\n};\n/**\n * Mark a single DOM to be used.\n *\n * @param {SVGElement} dom DOM to mark\n */\n\n\nDefinable.prototype.markUsed = function (dom) {\n if (dom) {\n dom[this._markLabel] = MARK_USED;\n }\n};\n/**\n * Remove unused DOMs defined in <defs>\n */\n\n\nDefinable.prototype.removeUnused = function () {\n var defs = this.getDefs(false);\n\n if (!defs) {\n // Nothing to remove\n return;\n }\n\n var doms = this.getDoms();\n var that = this;\n zrUtil.each(doms, function (dom) {\n if (dom[that._markLabel] !== MARK_USED) {\n // Remove gradient\n defs.removeChild(dom);\n }\n });\n};\n/**\n * Get SVG proxy.\n *\n * @param {Displayable} displayable displayable element\n * @return {Path|Image|Text} svg proxy of given element\n */\n\n\nDefinable.prototype.getSvgProxy = function (displayable) {\n if (displayable instanceof Path) {\n return svgPath;\n } else if (displayable instanceof ZImage) {\n return svgImage;\n } else if (displayable instanceof ZText) {\n return svgText;\n } else {\n return svgPath;\n }\n};\n/**\n * Get text SVG element.\n *\n * @param {Displayable} displayable displayable element\n * @return {SVGElement} SVG element of text\n */\n\n\nDefinable.prototype.getTextSvgElement = function (displayable) {\n return displayable.__textSvgEl;\n};\n/**\n * Get SVG element.\n *\n * @param {Displayable} displayable displayable element\n * @return {SVGElement} SVG element\n */\n\n\nDefinable.prototype.getSvgElement = function (displayable) {\n return displayable.__svgEl;\n};\n\nvar _default = Definable;\nmodule.exports = _default;","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\nvar logError = require(\"../../core/log\");\n\nvar colorTool = require(\"../../tool/color\");\n\n/**\n * @file Manages SVG gradient elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG gradient elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction GradientManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, ['linearGradient', 'radialGradient'], '__gradient_in_use__');\n}\n\nzrUtil.inherits(GradientManager, Definable);\n/**\n * Create new gradient DOM for fill or stroke if not exist,\n * but will not update gradient if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\n\nGradientManager.prototype.addWithoutUpdate = function (svgElement, displayable) {\n if (displayable && displayable.style) {\n var that = this;\n zrUtil.each(['fill', 'stroke'], function (fillOrStroke) {\n if (displayable.style[fillOrStroke] && (displayable.style[fillOrStroke].type === 'linear' || displayable.style[fillOrStroke].type === 'radial')) {\n var gradient = displayable.style[fillOrStroke];\n var defs = that.getDefs(true); // Create dom in <defs> if not exists\n\n var dom;\n\n if (gradient._dom) {\n // Gradient exists\n dom = gradient._dom;\n\n if (!defs.contains(gradient._dom)) {\n // _dom is no longer in defs, recreate\n that.addDom(dom);\n }\n } else {\n // New dom\n dom = that.add(gradient);\n }\n\n that.markUsed(displayable);\n var id = dom.getAttribute('id');\n svgElement.setAttribute(fillOrStroke, 'url(#' + id + ')');\n }\n });\n }\n};\n/**\n * Add a new gradient tag in <defs>\n *\n * @param {Gradient} gradient zr gradient instance\n * @return {SVGLinearGradientElement | SVGRadialGradientElement}\n * created DOM\n */\n\n\nGradientManager.prototype.add = function (gradient) {\n var dom;\n\n if (gradient.type === 'linear') {\n dom = this.createElement('linearGradient');\n } else if (gradient.type === 'radial') {\n dom = this.createElement('radialGradient');\n } else {\n logError('Illegal gradient type.');\n return null;\n } // Set dom id with gradient id, since each gradient instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n\n\n gradient.id = gradient.id || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId + '-gradient-' + gradient.id);\n this.updateDom(gradient, dom);\n this.addDom(dom);\n return dom;\n};\n/**\n * Update gradient.\n *\n * @param {Gradient} gradient zr gradient instance\n */\n\n\nGradientManager.prototype.update = function (gradient) {\n var that = this;\n Definable.prototype.update.call(this, gradient, function () {\n var type = gradient.type;\n var tagName = gradient._dom.tagName;\n\n if (type === 'linear' && tagName === 'linearGradient' || type === 'radial' && tagName === 'radialGradient') {\n // Gradient type is not changed, update gradient\n that.updateDom(gradient, gradient._dom);\n } else {\n // Remove and re-create if type is changed\n that.removeDom(gradient);\n that.add(gradient);\n }\n });\n};\n/**\n * Update gradient dom\n *\n * @param {Gradient} gradient zr gradient instance\n * @param {SVGLinearGradientElement | SVGRadialGradientElement} dom\n * DOM to update\n */\n\n\nGradientManager.prototype.updateDom = function (gradient, dom) {\n if (gradient.type === 'linear') {\n dom.setAttribute('x1', gradient.x);\n dom.setAttribute('y1', gradient.y);\n dom.setAttribute('x2', gradient.x2);\n dom.setAttribute('y2', gradient.y2);\n } else if (gradient.type === 'radial') {\n dom.setAttribute('cx', gradient.x);\n dom.setAttribute('cy', gradient.y);\n dom.setAttribute('r', gradient.r);\n } else {\n logError('Illegal gradient type.');\n return;\n }\n\n if (gradient.global) {\n // x1, x2, y1, y2 in range of 0 to canvas width or height\n dom.setAttribute('gradientUnits', 'userSpaceOnUse');\n } else {\n // x1, x2, y1, y2 in range of 0 to 1\n dom.setAttribute('gradientUnits', 'objectBoundingBox');\n } // Remove color stops if exists\n\n\n dom.innerHTML = ''; // Add color stops\n\n var colors = gradient.colorStops;\n\n for (var i = 0, len = colors.length; i < len; ++i) {\n var stop = this.createElement('stop');\n stop.setAttribute('offset', colors[i].offset * 100 + '%');\n var color = colors[i].color;\n\n if (color.indexOf('rgba' > -1)) {\n // Fix Safari bug that stop-color not recognizing alpha #9014\n var opacity = colorTool.parse(color)[3];\n var hex = colorTool.toHex(color); // stop-color cannot be color, since:\n // The opacity value used for the gradient calculation is the\n // *product* of the value of stop-opacity and the opacity of the\n // value of stop-color.\n // See https://www.w3.org/TR/SVG2/pservers.html#StopOpacityProperty\n\n stop.setAttribute('stop-color', '#' + hex);\n stop.setAttribute('stop-opacity', opacity);\n } else {\n stop.setAttribute('stop-color', colors[i].color);\n }\n\n dom.appendChild(stop);\n } // Store dom element in gradient, to avoid creating multiple\n // dom instances for the same gradient element\n\n\n gradient._dom = dom;\n};\n/**\n * Mark a single gradient to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nGradientManager.prototype.markUsed = function (displayable) {\n if (displayable.style) {\n var gradient = displayable.style.fill;\n\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n\n gradient = displayable.style.stroke;\n\n if (gradient && gradient._dom) {\n Definable.prototype.markUsed.call(this, gradient._dom);\n }\n }\n};\n\nvar _default = GradientManager;\nmodule.exports = _default;","var Definable = require(\"./Definable\");\n\nvar zrUtil = require(\"../../core/util\");\n\n/**\n * @file Manages SVG shadow elements.\n * @author Zhang Wenli\n */\n\n/**\n * Manages SVG shadow elements.\n *\n * @class\n * @extends Definable\n * @param {number} zrId zrender instance id\n * @param {SVGElement} svgRoot root of SVG document\n */\nfunction ShadowManager(zrId, svgRoot) {\n Definable.call(this, zrId, svgRoot, ['filter'], '__filter_in_use__', '_shadowDom');\n}\n\nzrUtil.inherits(ShadowManager, Definable);\n/**\n * Create new shadow DOM for fill or stroke if not exist,\n * but will not update shadow if exists.\n *\n * @param {SvgElement} svgElement SVG element to paint\n * @param {Displayable} displayable zrender displayable element\n */\n\nShadowManager.prototype.addWithoutUpdate = function (svgElement, displayable) {\n if (displayable && hasShadow(displayable.style)) {\n // Create dom in <defs> if not exists\n var dom;\n\n if (displayable._shadowDom) {\n // Gradient exists\n dom = displayable._shadowDom;\n var defs = this.getDefs(true);\n\n if (!defs.contains(displayable._shadowDom)) {\n // _shadowDom is no longer in defs, recreate\n this.addDom(dom);\n }\n } else {\n // New dom\n dom = this.add(displayable);\n }\n\n this.markUsed(displayable);\n var id = dom.getAttribute('id');\n svgElement.style.filter = 'url(#' + id + ')';\n }\n};\n/**\n * Add a new shadow tag in <defs>\n *\n * @param {Displayable} displayable zrender displayable element\n * @return {SVGFilterElement} created DOM\n */\n\n\nShadowManager.prototype.add = function (displayable) {\n var dom = this.createElement('filter'); // Set dom id with shadow id, since each shadow instance\n // will have no more than one dom element.\n // id may exists before for those dirty elements, in which case\n // id should remain the same, and other attributes should be\n // updated.\n\n displayable._shadowDomId = displayable._shadowDomId || this.nextId++;\n dom.setAttribute('id', 'zr' + this._zrId + '-shadow-' + displayable._shadowDomId);\n this.updateDom(displayable, dom);\n this.addDom(dom);\n return dom;\n};\n/**\n * Update shadow.\n *\n * @param {Displayable} displayable zrender displayable element\n */\n\n\nShadowManager.prototype.update = function (svgElement, displayable) {\n var style = displayable.style;\n\n if (hasShadow(style)) {\n var that = this;\n Definable.prototype.update.call(this, displayable, function () {\n that.updateDom(displayable, displayable._shadowDom);\n });\n } else {\n // Remove shadow\n this.remove(svgElement, displayable);\n }\n};\n/**\n * Remove DOM and clear parent filter\n */\n\n\nShadowManager.prototype.remove = function (svgElement, displayable) {\n if (displayable._shadowDomId != null) {\n this.removeDom(svgElement);\n svgElement.style.filter = '';\n }\n};\n/**\n * Update shadow dom\n *\n * @param {Displayable} displayable zrender displayable element\n * @param {SVGFilterElement} dom DOM to update\n */\n\n\nShadowManager.prototype.updateDom = function (displayable, dom) {\n var domChild = dom.getElementsByTagName('feDropShadow');\n\n if (domChild.length === 0) {\n domChild = this.createElement('feDropShadow');\n } else {\n domChild = domChild[0];\n }\n\n var style = displayable.style;\n var scaleX = displayable.scale ? displayable.scale[0] || 1 : 1;\n var scaleY = displayable.scale ? displayable.scale[1] || 1 : 1; // TODO: textBoxShadowBlur is not supported yet\n\n var offsetX;\n var offsetY;\n var blur;\n var color;\n\n if (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY) {\n offsetX = style.shadowOffsetX || 0;\n offsetY = style.shadowOffsetY || 0;\n blur = style.shadowBlur;\n color = style.shadowColor;\n } else if (style.textShadowBlur) {\n offsetX = style.textShadowOffsetX || 0;\n offsetY = style.textShadowOffsetY || 0;\n blur = style.textShadowBlur;\n color = style.textShadowColor;\n } else {\n // Remove shadow\n this.removeDom(dom, style);\n return;\n }\n\n domChild.setAttribute('dx', offsetX / scaleX);\n domChild.setAttribute('dy', offsetY / scaleY);\n domChild.setAttribute('flood-color', color); // Divide by two here so that it looks the same as in canvas\n // See: https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-shadowblur\n\n var stdDx = blur / 2 / scaleX;\n var stdDy = blur / 2 / scaleY;\n var stdDeviation = stdDx + ' ' + stdDy;\n domChild.setAttribute('stdDeviation', stdDeviation); // Fix filter clipping problem\n\n dom.setAttribute('x', '-100%');\n dom.setAttribute('y', '-100%');\n dom.setAttribute('width', Math.ceil(blur / 2 * 200) + '%');\n dom.setAttribute('height', Math.ceil(blur / 2 * 200) + '%');\n dom.appendChild(domChild); // Store dom element in shadow, to avoid creating multiple\n // dom instances for the same shadow element\n\n displayable._shadowDom = dom;\n};\n/**\n * Mark a single shadow to be used\n *\n * @param {Displayable} displayable displayable element\n */\n\n\nShadowManager.prototype.markUsed = function (displayable) {\n if (displayable._shadowDom) {\n Definable.prototype.markUsed.call(this, displayable._shadowDom);\n }\n};\n\nfunction hasShadow(style) {\n // TODO: textBoxShadowBlur is not supported yet\n return style && (style.shadowBlur || style.shadowOffsetX || style.shadowOffsetY || style.textShadowBlur || style.textShadowOffsetX || style.textShadowOffsetY);\n}\n\nvar _default = ShadowManager;\nmodule.exports = _default;","require(\"./graphic\");\n\nvar _zrender = require(\"../zrender\");\n\nvar registerPainter = _zrender.registerPainter;\n\nvar Painter = require(\"./Painter\");\n\nregisterPainter('svg', Painter);","var LRU = require(\"../core/LRU\");\n\nvar kCSSColorTable = {\n 'transparent': [0, 0, 0, 0],\n 'aliceblue': [240, 248, 255, 1],\n 'antiquewhite': [250, 235, 215, 1],\n 'aqua': [0, 255, 255, 1],\n 'aquamarine': [127, 255, 212, 1],\n 'azure': [240, 255, 255, 1],\n 'beige': [245, 245, 220, 1],\n 'bisque': [255, 228, 196, 1],\n 'black': [0, 0, 0, 1],\n 'blanchedalmond': [255, 235, 205, 1],\n 'blue': [0, 0, 255, 1],\n 'blueviolet': [138, 43, 226, 1],\n 'brown': [165, 42, 42, 1],\n 'burlywood': [222, 184, 135, 1],\n 'cadetblue': [95, 158, 160, 1],\n 'chartreuse': [127, 255, 0, 1],\n 'chocolate': [210, 105, 30, 1],\n 'coral': [255, 127, 80, 1],\n 'cornflowerblue': [100, 149, 237, 1],\n 'cornsilk': [255, 248, 220, 1],\n 'crimson': [220, 20, 60, 1],\n 'cyan': [0, 255, 255, 1],\n 'darkblue': [0, 0, 139, 1],\n 'darkcyan': [0, 139, 139, 1],\n 'darkgoldenrod': [184, 134, 11, 1],\n 'darkgray': [169, 169, 169, 1],\n 'darkgreen': [0, 100, 0, 1],\n 'darkgrey': [169, 169, 169, 1],\n 'darkkhaki': [189, 183, 107, 1],\n 'darkmagenta': [139, 0, 139, 1],\n 'darkolivegreen': [85, 107, 47, 1],\n 'darkorange': [255, 140, 0, 1],\n 'darkorchid': [153, 50, 204, 1],\n 'darkred': [139, 0, 0, 1],\n 'darksalmon': [233, 150, 122, 1],\n 'darkseagreen': [143, 188, 143, 1],\n 'darkslateblue': [72, 61, 139, 1],\n 'darkslategray': [47, 79, 79, 1],\n 'darkslategrey': [47, 79, 79, 1],\n 'darkturquoise': [0, 206, 209, 1],\n 'darkviolet': [148, 0, 211, 1],\n 'deeppink': [255, 20, 147, 1],\n 'deepskyblue': [0, 191, 255, 1],\n 'dimgray': [105, 105, 105, 1],\n 'dimgrey': [105, 105, 105, 1],\n 'dodgerblue': [30, 144, 255, 1],\n 'firebrick': [178, 34, 34, 1],\n 'floralwhite': [255, 250, 240, 1],\n 'forestgreen': [34, 139, 34, 1],\n 'fuchsia': [255, 0, 255, 1],\n 'gainsboro': [220, 220, 220, 1],\n 'ghostwhite': [248, 248, 255, 1],\n 'gold': [255, 215, 0, 1],\n 'goldenrod': [218, 165, 32, 1],\n 'gray': [128, 128, 128, 1],\n 'green': [0, 128, 0, 1],\n 'greenyellow': [173, 255, 47, 1],\n 'grey': [128, 128, 128, 1],\n 'honeydew': [240, 255, 240, 1],\n 'hotpink': [255, 105, 180, 1],\n 'indianred': [205, 92, 92, 1],\n 'indigo': [75, 0, 130, 1],\n 'ivory': [255, 255, 240, 1],\n 'khaki': [240, 230, 140, 1],\n 'lavender': [230, 230, 250, 1],\n 'lavenderblush': [255, 240, 245, 1],\n 'lawngreen': [124, 252, 0, 1],\n 'lemonchiffon': [255, 250, 205, 1],\n 'lightblue': [173, 216, 230, 1],\n 'lightcoral': [240, 128, 128, 1],\n 'lightcyan': [224, 255, 255, 1],\n 'lightgoldenrodyellow': [250, 250, 210, 1],\n 'lightgray': [211, 211, 211, 1],\n 'lightgreen': [144, 238, 144, 1],\n 'lightgrey': [211, 211, 211, 1],\n 'lightpink': [255, 182, 193, 1],\n 'lightsalmon': [255, 160, 122, 1],\n 'lightseagreen': [32, 178, 170, 1],\n 'lightskyblue': [135, 206, 250, 1],\n 'lightslategray': [119, 136, 153, 1],\n 'lightslategrey': [119, 136, 153, 1],\n 'lightsteelblue': [176, 196, 222, 1],\n 'lightyellow': [255, 255, 224, 1],\n 'lime': [0, 255, 0, 1],\n 'limegreen': [50, 205, 50, 1],\n 'linen': [250, 240, 230, 1],\n 'magenta': [255, 0, 255, 1],\n 'maroon': [128, 0, 0, 1],\n 'mediumaquamarine': [102, 205, 170, 1],\n 'mediumblue': [0, 0, 205, 1],\n 'mediumorchid': [186, 85, 211, 1],\n 'mediumpurple': [147, 112, 219, 1],\n 'mediumseagreen': [60, 179, 113, 1],\n 'mediumslateblue': [123, 104, 238, 1],\n 'mediumspringgreen': [0, 250, 154, 1],\n 'mediumturquoise': [72, 209, 204, 1],\n 'mediumvioletred': [199, 21, 133, 1],\n 'midnightblue': [25, 25, 112, 1],\n 'mintcream': [245, 255, 250, 1],\n 'mistyrose': [255, 228, 225, 1],\n 'moccasin': [255, 228, 181, 1],\n 'navajowhite': [255, 222, 173, 1],\n 'navy': [0, 0, 128, 1],\n 'oldlace': [253, 245, 230, 1],\n 'olive': [128, 128, 0, 1],\n 'olivedrab': [107, 142, 35, 1],\n 'orange': [255, 165, 0, 1],\n 'orangered': [255, 69, 0, 1],\n 'orchid': [218, 112, 214, 1],\n 'palegoldenrod': [238, 232, 170, 1],\n 'palegreen': [152, 251, 152, 1],\n 'paleturquoise': [175, 238, 238, 1],\n 'palevioletred': [219, 112, 147, 1],\n 'papayawhip': [255, 239, 213, 1],\n 'peachpuff': [255, 218, 185, 1],\n 'peru': [205, 133, 63, 1],\n 'pink': [255, 192, 203, 1],\n 'plum': [221, 160, 221, 1],\n 'powderblue': [176, 224, 230, 1],\n 'purple': [128, 0, 128, 1],\n 'red': [255, 0, 0, 1],\n 'rosybrown': [188, 143, 143, 1],\n 'royalblue': [65, 105, 225, 1],\n 'saddlebrown': [139, 69, 19, 1],\n 'salmon': [250, 128, 114, 1],\n 'sandybrown': [244, 164, 96, 1],\n 'seagreen': [46, 139, 87, 1],\n 'seashell': [255, 245, 238, 1],\n 'sienna': [160, 82, 45, 1],\n 'silver': [192, 192, 192, 1],\n 'skyblue': [135, 206, 235, 1],\n 'slateblue': [106, 90, 205, 1],\n 'slategray': [112, 128, 144, 1],\n 'slategrey': [112, 128, 144, 1],\n 'snow': [255, 250, 250, 1],\n 'springgreen': [0, 255, 127, 1],\n 'steelblue': [70, 130, 180, 1],\n 'tan': [210, 180, 140, 1],\n 'teal': [0, 128, 128, 1],\n 'thistle': [216, 191, 216, 1],\n 'tomato': [255, 99, 71, 1],\n 'turquoise': [64, 224, 208, 1],\n 'violet': [238, 130, 238, 1],\n 'wheat': [245, 222, 179, 1],\n 'white': [255, 255, 255, 1],\n 'whitesmoke': [245, 245, 245, 1],\n 'yellow': [255, 255, 0, 1],\n 'yellowgreen': [154, 205, 50, 1]\n};\n\nfunction clampCssByte(i) {\n // Clamp to integer 0 .. 255.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n\n return i < 0 ? 0 : i > 255 ? 255 : i;\n}\n\nfunction clampCssAngle(i) {\n // Clamp to integer 0 .. 360.\n i = Math.round(i); // Seems to be what Chrome does (vs truncation).\n\n return i < 0 ? 0 : i > 360 ? 360 : i;\n}\n\nfunction clampCssFloat(f) {\n // Clamp to float 0.0 .. 1.0.\n return f < 0 ? 0 : f > 1 ? 1 : f;\n}\n\nfunction parseCssInt(str) {\n // int or percentage.\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssByte(parseFloat(str) / 100 * 255);\n }\n\n return clampCssByte(parseInt(str, 10));\n}\n\nfunction parseCssFloat(str) {\n // float or percentage.\n if (str.length && str.charAt(str.length - 1) === '%') {\n return clampCssFloat(parseFloat(str) / 100);\n }\n\n return clampCssFloat(parseFloat(str));\n}\n\nfunction cssHueToRgb(m1, m2, h) {\n if (h < 0) {\n h += 1;\n } else if (h > 1) {\n h -= 1;\n }\n\n if (h * 6 < 1) {\n return m1 + (m2 - m1) * h * 6;\n }\n\n if (h * 2 < 1) {\n return m2;\n }\n\n if (h * 3 < 2) {\n return m1 + (m2 - m1) * (2 / 3 - h) * 6;\n }\n\n return m1;\n}\n\nfunction lerpNumber(a, b, p) {\n return a + (b - a) * p;\n}\n\nfunction setRgba(out, r, g, b, a) {\n out[0] = r;\n out[1] = g;\n out[2] = b;\n out[3] = a;\n return out;\n}\n\nfunction copyRgba(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n}\n\nvar colorCache = new LRU(20);\nvar lastRemovedArr = null;\n\nfunction putToCache(colorStr, rgbaArr) {\n // Reuse removed array\n if (lastRemovedArr) {\n copyRgba(lastRemovedArr, rgbaArr);\n }\n\n lastRemovedArr = colorCache.put(colorStr, lastRemovedArr || rgbaArr.slice());\n}\n/**\n * @param {string} colorStr\n * @param {Array.<number>} out\n * @return {Array.<number>}\n * @memberOf module:zrender/util/color\n */\n\n\nfunction parse(colorStr, rgbaArr) {\n if (!colorStr) {\n return;\n }\n\n rgbaArr = rgbaArr || [];\n var cached = colorCache.get(colorStr);\n\n if (cached) {\n return copyRgba(rgbaArr, cached);\n } // colorStr may be not string\n\n\n colorStr = colorStr + ''; // Remove all whitespace, not compliant, but should just be more accepting.\n\n var str = colorStr.replace(/ /g, '').toLowerCase(); // Color keywords (and transparent) lookup.\n\n if (str in kCSSColorTable) {\n copyRgba(rgbaArr, kCSSColorTable[str]);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n } // #abc and #abc123 syntax.\n\n\n if (str.charAt(0) === '#') {\n if (str.length === 4) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n\n if (!(iv >= 0 && iv <= 0xfff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return; // Covers NaN.\n }\n\n setRgba(rgbaArr, (iv & 0xf00) >> 4 | (iv & 0xf00) >> 8, iv & 0xf0 | (iv & 0xf0) >> 4, iv & 0xf | (iv & 0xf) << 4, 1);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n } else if (str.length === 7) {\n var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.\n\n if (!(iv >= 0 && iv <= 0xffffff)) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return; // Covers NaN.\n }\n\n setRgba(rgbaArr, (iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n }\n\n return;\n }\n\n var op = str.indexOf('(');\n var ep = str.indexOf(')');\n\n if (op !== -1 && ep + 1 === str.length) {\n var fname = str.substr(0, op);\n var params = str.substr(op + 1, ep - (op + 1)).split(',');\n var alpha = 1; // To allow case fallthrough.\n\n switch (fname) {\n case 'rgba':\n if (params.length !== 4) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n\n alpha = parseCssFloat(params.pop());\n // jshint ignore:line\n // Fall through.\n\n case 'rgb':\n if (params.length !== 3) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n\n setRgba(rgbaArr, parseCssInt(params[0]), parseCssInt(params[1]), parseCssInt(params[2]), alpha);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n\n case 'hsla':\n if (params.length !== 4) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n\n params[3] = parseCssFloat(params[3]);\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n\n case 'hsl':\n if (params.length !== 3) {\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n }\n\n hsla2rgba(params, rgbaArr);\n putToCache(colorStr, rgbaArr);\n return rgbaArr;\n\n default:\n return;\n }\n }\n\n setRgba(rgbaArr, 0, 0, 0, 1);\n return;\n}\n/**\n * @param {Array.<number>} hsla\n * @param {Array.<number>} rgba\n * @return {Array.<number>} rgba\n */\n\n\nfunction hsla2rgba(hsla, rgba) {\n var h = (parseFloat(hsla[0]) % 360 + 360) % 360 / 360; // 0 .. 1\n // NOTE(deanm): According to the CSS spec s/l should only be\n // percentages, but we don't bother and let float or percentage.\n\n var s = parseCssFloat(hsla[1]);\n var l = parseCssFloat(hsla[2]);\n var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;\n var m1 = l * 2 - m2;\n rgba = rgba || [];\n setRgba(rgba, clampCssByte(cssHueToRgb(m1, m2, h + 1 / 3) * 255), clampCssByte(cssHueToRgb(m1, m2, h) * 255), clampCssByte(cssHueToRgb(m1, m2, h - 1 / 3) * 255), 1);\n\n if (hsla.length === 4) {\n rgba[3] = hsla[3];\n }\n\n return rgba;\n}\n/**\n * @param {Array.<number>} rgba\n * @return {Array.<number>} hsla\n */\n\n\nfunction rgba2hsla(rgba) {\n if (!rgba) {\n return;\n } // RGB from 0 to 255\n\n\n var R = rgba[0] / 255;\n var G = rgba[1] / 255;\n var B = rgba[2] / 255;\n var vMin = Math.min(R, G, B); // Min. value of RGB\n\n var vMax = Math.max(R, G, B); // Max. value of RGB\n\n var delta = vMax - vMin; // Delta RGB value\n\n var L = (vMax + vMin) / 2;\n var H;\n var S; // HSL results from 0 to 1\n\n if (delta === 0) {\n H = 0;\n S = 0;\n } else {\n if (L < 0.5) {\n S = delta / (vMax + vMin);\n } else {\n S = delta / (2 - vMax - vMin);\n }\n\n var deltaR = ((vMax - R) / 6 + delta / 2) / delta;\n var deltaG = ((vMax - G) / 6 + delta / 2) / delta;\n var deltaB = ((vMax - B) / 6 + delta / 2) / delta;\n\n if (R === vMax) {\n H = deltaB - deltaG;\n } else if (G === vMax) {\n H = 1 / 3 + deltaR - deltaB;\n } else if (B === vMax) {\n H = 2 / 3 + deltaG - deltaR;\n }\n\n if (H < 0) {\n H += 1;\n }\n\n if (H > 1) {\n H -= 1;\n }\n }\n\n var hsla = [H * 360, S, L];\n\n if (rgba[3] != null) {\n hsla.push(rgba[3]);\n }\n\n return hsla;\n}\n/**\n * @param {string} color\n * @param {number} level\n * @return {string}\n * @memberOf module:zrender/util/color\n */\n\n\nfunction lift(color, level) {\n var colorArr = parse(color);\n\n if (colorArr) {\n for (var i = 0; i < 3; i++) {\n if (level < 0) {\n colorArr[i] = colorArr[i] * (1 - level) | 0;\n } else {\n colorArr[i] = (255 - colorArr[i]) * level + colorArr[i] | 0;\n }\n\n if (colorArr[i] > 255) {\n colorArr[i] = 255;\n } else if (color[i] < 0) {\n colorArr[i] = 0;\n }\n }\n\n return stringify(colorArr, colorArr.length === 4 ? 'rgba' : 'rgb');\n }\n}\n/**\n * @param {string} color\n * @return {string}\n * @memberOf module:zrender/util/color\n */\n\n\nfunction toHex(color) {\n var colorArr = parse(color);\n\n if (colorArr) {\n return ((1 << 24) + (colorArr[0] << 16) + (colorArr[1] << 8) + +colorArr[2]).toString(16).slice(1);\n }\n}\n/**\n * Map value to color. Faster than lerp methods because color is represented by rgba array.\n * @param {number} normalizedValue A float between 0 and 1.\n * @param {Array.<Array.<number>>} colors List of rgba color array\n * @param {Array.<number>} [out] Mapped gba color array\n * @return {Array.<number>} will be null/undefined if input illegal.\n */\n\n\nfunction fastLerp(normalizedValue, colors, out) {\n if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) {\n return;\n }\n\n out = out || [];\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = colors[leftIndex];\n var rightColor = colors[rightIndex];\n var dv = value - leftIndex;\n out[0] = clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv));\n out[1] = clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv));\n out[2] = clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv));\n out[3] = clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv));\n return out;\n}\n/**\n * @deprecated\n */\n\n\nvar fastMapToColor = fastLerp;\n/**\n * @param {number} normalizedValue A float between 0 and 1.\n * @param {Array.<string>} colors Color list.\n * @param {boolean=} fullOutput Default false.\n * @return {(string|Object)} Result color. If fullOutput,\n * return {color: ..., leftIndex: ..., rightIndex: ..., value: ...},\n * @memberOf module:zrender/util/color\n */\n\nfunction lerp(normalizedValue, colors, fullOutput) {\n if (!(colors && colors.length) || !(normalizedValue >= 0 && normalizedValue <= 1)) {\n return;\n }\n\n var value = normalizedValue * (colors.length - 1);\n var leftIndex = Math.floor(value);\n var rightIndex = Math.ceil(value);\n var leftColor = parse(colors[leftIndex]);\n var rightColor = parse(colors[rightIndex]);\n var dv = value - leftIndex;\n var color = stringify([clampCssByte(lerpNumber(leftColor[0], rightColor[0], dv)), clampCssByte(lerpNumber(leftColor[1], rightColor[1], dv)), clampCssByte(lerpNumber(leftColor[2], rightColor[2], dv)), clampCssFloat(lerpNumber(leftColor[3], rightColor[3], dv))], 'rgba');\n return fullOutput ? {\n color: color,\n leftIndex: leftIndex,\n rightIndex: rightIndex,\n value: value\n } : color;\n}\n/**\n * @deprecated\n */\n\n\nvar mapToColor = lerp;\n/**\n * @param {string} color\n * @param {number=} h 0 ~ 360, ignore when null.\n * @param {number=} s 0 ~ 1, ignore when null.\n * @param {number=} l 0 ~ 1, ignore when null.\n * @return {string} Color string in rgba format.\n * @memberOf module:zrender/util/color\n */\n\nfunction modifyHSL(color, h, s, l) {\n color = parse(color);\n\n if (color) {\n color = rgba2hsla(color);\n h != null && (color[0] = clampCssAngle(h));\n s != null && (color[1] = parseCssFloat(s));\n l != null && (color[2] = parseCssFloat(l));\n return stringify(hsla2rgba(color), 'rgba');\n }\n}\n/**\n * @param {string} color\n * @param {number=} alpha 0 ~ 1\n * @return {string} Color string in rgba format.\n * @memberOf module:zrender/util/color\n */\n\n\nfunction modifyAlpha(color, alpha) {\n color = parse(color);\n\n if (color && alpha != null) {\n color[3] = clampCssFloat(alpha);\n return stringify(color, 'rgba');\n }\n}\n/**\n * @param {Array.<number>} arrColor like [12,33,44,0.4]\n * @param {string} type 'rgba', 'hsva', ...\n * @return {string} Result color. (If input illegal, return undefined).\n */\n\n\nfunction stringify(arrColor, type) {\n if (!arrColor || !arrColor.length) {\n return;\n }\n\n var colorStr = arrColor[0] + ',' + arrColor[1] + ',' + arrColor[2];\n\n if (type === 'rgba' || type === 'hsva' || type === 'hsla') {\n colorStr += ',' + arrColor[3];\n }\n\n return type + '(' + colorStr + ')';\n}\n\nexports.parse = parse;\nexports.lift = lift;\nexports.toHex = toHex;\nexports.fastLerp = fastLerp;\nexports.fastMapToColor = fastMapToColor;\nexports.lerp = lerp;\nexports.mapToColor = mapToColor;\nexports.modifyHSL = modifyHSL;\nexports.modifyAlpha = modifyAlpha;\nexports.stringify = stringify;"],"names":["_core","createElement","util","logError","Path","ZImage","ZText","arrayDiff","GradientManager","ClippathManager","ShadowManager","_graphic","svgPath","path","svgImage","image","svgText","text","parseInt10","val","parseInt","getSvgProxy","el","checkParentAvailable","parent","child","parentNode","insertAfter","prevSibling","nextSibling","insertBefore","appendChild","prepend","firstChild","remove","removeChild","getTextSvgElement","displayable","__textSvgEl","getSvgElement","__svgEl","SVGPainter","root","storage","opts","zrId","this","_opts","extend","svgDom","setAttribute","style","cssText","bgRoot","svgRoot","gradientManager","clipPathManager","shadowManager","viewport","document","_svgDom","_svgRoot","_backgroundRoot","_viewport","resize","width","height","_visibleList","createMethodNotSupport","method","prototype","constructor","getType","getViewportRoot","getSvgDom","getSvgRoot","getViewportRootOffset","viewportRoot","offsetLeft","offsetTop","refresh","list","getDisplayList","_paintList","setBackgroundColor","backgroundColor","_backgroundNode","bgNode","getWidth","getHeight","fill","markAllUnused","i","visibleList","listLen","length","newVisibleList","svgProxy","svgElement","invisible","__dirty","brush","update","stroke","push","prevSvgElement","diff","item","removed","k","count","indices","textSvgElement","added","addWithoutUpdate","markUsed","removeUnused","_getDefs","isForceCreating","defs","getElementsByTagName","contains","children","display","_getSize","_width","_height","viewportStyle","whIdx","wh","cwh","plt","prb","parseFloat","stl","defaultView","getComputedStyle","dispose","innerHTML","clear","toDataURL","html","encodeURIComponent","outerHTML","replace","each","name","_default","module","exports","svgURI","createElementNS","PathProxy","BoundingRect","matrix","textContain","textHelper","Text","CMD","arrayJoin","Array","join","NONE","mathRound","Math","round","mathSin","sin","mathCos","cos","PI","PI2","degree","EPSILON","round4","isAroundZero","pathHasFill","isText","textFill","pathHasStroke","textStroke","setTransform","svgEl","m","attr","call","key","type","attrXLink","setAttributeNS","bindStyle","fillOpacity","opacity","strokeWidth","textStrokeWidth","lineWidth","strokeScale","strokeNoScale","getLineScale","strokeOpacity","lineDash","lineDashOffset","lineCap","lineJoin","miterLimit","pathDataToString","str","data","dataLength","len","cmd","cmdStr","nData","M","L","Q","C","A","cx","cy","rx","ry","theta","dTheta","psi","clockwise","dThetaPositive","abs","isCircle","unifiedTheta","large","x0","y0","x","y","Z","R","w","h","j","createPathProxy","__dirtyPath","beginPath","subPixelOptimize","buildPath","shape","pathStr","indexOf","transform","svgTextDrawRectText","getBoundingRect","removeOldTextNode","HTMLImageElement","src","dw","dh","__imageSrc","_tmpTextHostRect","_tmpTextBoxPos","_tmpTextTransform","TEXT_ALIGN_TO_ANCHRO","left","right","center","middle","hostRect","elTransform","needTransformTextByHostEl","transformText","normalizeTextStyle","needDrawText","copy","applyTransform","textSvgEl","textSvgElStyle","font","DEFAULT_FONT","computedFont","__computedFont","__styleFont","textPadding","textLineHeight","contentBlock","__textCotentBlock","__dirtyText","parsePlainText","truncate","outerHeight","lineHeight","getBoxPosition","baseX","baseY","textAlign","textVerticalAlign","setTextTransform","boxY","adjustTextY","textX","textY","getTextXForPadding","canCacheByTextString","tspanList","__tspanList","tspanOriginLen","__canCacheByTextString","__text","idx","updateTextLocation","textLines","lines","nTextLines","tspan","singleLineText","__zrText","createTextNode","identity","textRotation","origin","textOrigin","rotate","drawRectText","Definable","zrUtil","inherits","updateDom","__clipPaths","textEl","parentEl","clipPaths","clipPathEl","id","getDefs","clipPath","dom","getAttribute","_zrId","nextId","invTransform","slice","mul","pathEl","cloneNode","that","_dom","_textDom","MARK_UNUSED","MARK_USED","tagNames","markLabel","domName","_tagNames","_markLabel","_domName","element","onUpdate","add","addDom","removeDom","getDoms","doms","tagName","tags","concat","colorTool","fillOrStroke","gradient","x2","y2","r","global","colors","colorStops","stop","offset","color","parse","hex","toHex","hasShadow","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowBlur","textShadowOffsetX","textShadowOffsetY","_shadowDom","filter","_shadowDomId","domChild","offsetX","offsetY","blur","scaleX","scale","scaleY","shadowColor","textShadowColor","stdDx","stdDy","stdDeviation","ceil","_zrender","registerPainter","Painter","LRU","kCSSColorTable","clampCssByte","clampCssAngle","clampCssFloat","f","parseCssInt","charAt","parseCssFloat","cssHueToRgb","m1","m2","lerpNumber","a","b","p","setRgba","out","g","copyRgba","colorCache","lastRemovedArr","putToCache","colorStr","rgbaArr","put","cached","get","toLowerCase","op","ep","fname","substr","params","split","alpha","pop","hsla2rgba","iv","hsla","rgba","s","l","rgba2hsla","H","S","G","B","vMin","min","vMax","max","delta","deltaR","deltaG","deltaB","lift","level","colorArr","stringify","toString","fastLerp","normalizedValue","value","leftIndex","floor","rightIndex","leftColor","rightColor","dv","fastMapToColor","lerp","fullOutput","mapToColor","modifyHSL","modifyAlpha","arrColor"],"sourceRoot":""}