diff --git a/index.es.js b/index.es.js index 473f8ca2..f0119b0f 100644 --- a/index.es.js +++ b/index.es.js @@ -12083,12 +12083,12 @@ var Text = /*#__PURE__*/function (_Node) { }, { key: "root", get: function get() { - return this.domParent.root; + return (this.domParent || {}).root; } }, { key: "currentStyle", get: function get() { - return this.domParent.currentStyle; + return (this.domParent || {}).currentStyle; } }, { key: "style", @@ -12098,12 +12098,12 @@ var Text = /*#__PURE__*/function (_Node) { }, { key: "computedStyle", get: function get() { - return this.domParent.computedStyle; + return (this.domParent || {}).computedStyle; } }, { key: "cacheStyle", get: function get() { - return this.domParent.__cacheStyle; + return (this.domParent || {}).__cacheStyle; } }, { key: "bbox", diff --git a/index.es.js.map b/index.es.js.map index ead0241f..88bfc318 100644 --- a/index.es.js.map +++ b/index.es.js.map @@ -1 +1 @@ -{"version":3,"file":"index.es.js","sources":["src/util/enums.js","src/node/Node.js","src/node/mode.js","src/style/unit.js","src/style/font.js","src/style/reg.js","src/math/matrix.js","src/math/vector.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/util/$$type.js","src/util/util.js","src/util/debug.js","src/node/textCache.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.js","src/style/gradient.js","src/style/reset.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/style/css.js","src/node/TextBox.js","src/refresh/Page.js","src/math/tar.js","src/math/index.js","src/style/transform.js","src/math/blur.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.js","src/util/Event.js","src/node/Component.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/inline.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/abbr.js","src/parser/parse.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n // GEOM\n FILL: 87,\n STROKE: 88,\n STROKE_WIDTH: 89,\n STROKE_DASHARRAY: 90,\n STROKE_DASHARRAY_STR: 91,\n STROKE_LINECAP: 92,\n STROKE_LINEJOIN: 93,\n STROKE_MITERLIMIT: 94,\n FILL_RULE: 95,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 96,\n BORDER_TOP: 97,\n BORDER_RIGHT: 98,\n BORDER_BOTTOM: 99,\n BORDER_LEFT: 100,\n TRANSLATE_PATH: 101,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_MEASURE: 3,\n UPDATE_COMPONENT: 4,\n UPDATE_OVERWRITE: 5,\n UPDATE_KEYS: 6,\n UPDATE_LIST: 7,\n UPDATE_CONFIG: 8,\n UPDATE_ADD_DOM: 9,\n UPDATE_REMOVE_DOM: 10,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseLine = 0;\n this.__config = {};\n // 默认undefined\n // this.__prev = undefined;\n // this.__next = undefined;\n // this.__parent = undefined;\n // this.__domParent = undefined;\n // this.__root = undefined;\n // this.__host = undefined;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\n }\n\n __offsetX(diff, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += diff;\n }\n\n __destroy() {\n this.__config[NODE_IS_DESTROYED] = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__config[NODE_IS_DESTROYED];\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return [n, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n return [n, o.NUMBER];\n },\n};\n\nexport default o;\n","'use strict';\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n // 个别字符误差,初次之外误差还有根据经验得的比例系数,https://github.com/karasjs/karas/issues/145\n padding: {\n 1: 1,\n f: 0.9,\n },\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n padding: {\n S: 1,\n T: 1,\n Z: 1,\n c: 1,\n f: 0.7,\n i: 1,\n l: 1,\n t: 0.9,\n },\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n padding: {\n f: 0.5,\n },\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n padding: {\n f: 0.5,\n },\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily);\n },\n register(name, info) {\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 67, padding = {} } = info || {};\n this.info[name.toLowerCase()] = {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n padding,\n };\n },\n addPadding(name, padding) {\n Object.assign(this.info[name.toLowerCase()].padding, padding);\n },\n};\n\no.info['宋体'] = o.info.simsun;\n\nexport default o;\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwh%]*)|(left|top|right|bottom|center)){1,2}/ig,\n // tfo: /((-?[\\d.]+(px|%)?)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i];\n let a1 = a[i + 4];\n let a2 = a[i + 8];\n let a3 = a[i + 12];\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let [xmax, ymax] = vertexes[0];\n let [xmin, ymin] = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let [x, y] = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n // 所有向量积均为非负数说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let [x1, y1] = vertexes[i];\n let [x2, y2] = vertexes[(i + 1) % len];\n if(crossProduct(x2 - x1, y2 - y1, x - x1, y - y1) < 0) {\n return false;\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInPolygon(x, y, [\n [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return [\n (a * x1 + b * x2 + c * x3) / (a + b + c),\n (a * y1 + b * y2 + c * y3) / (a + b + c),\n ];\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n * @param a\n * @param b\n */\nfunction isRectsOverlap(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n * @param a\n * @param b\n */\nfunction isRectsInside(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = {} } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + oy];\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let [x1, y1] = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.min(maxX, qx);\n maxY = Math.min(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = (-bx + hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = (-by + hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n if(arguments.length === 4) {\n return [x0, y0, x1, y1];\n }\n if(arguments.length === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(arguments.length === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param order 阶次, 2 和 3\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, order, startT = 0, endT = 1) {\n let derivativeFunc = t => norm(at(t, points, order));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n else {\n // 3阶导数就是常数了,大于3阶的都是0\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n else {\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\nfunction at(t, points, bezierOrder, derivativeOrder = 1) {\n if(bezierOrder === 2) {\n return at2(t, points, derivativeOrder);\n }\n else if(bezierOrder === 3) {\n return at3(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, order, percent, maxIteration, eps) {\n let length = bezierLength(points, order, 0, 1);\n return pointAtBezierWithLength(points, order, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, order, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points, order));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, order, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, order, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, order, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return [\n x - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\n}\n\nexport default {\n pointInPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointOnCircle,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","function canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n ctx.moveTo(list[start][0] + dx, list[start][1] + dy);\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let s = 'M' + list[start][0] + ',' + list[start][1];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'hue-rotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1]\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","// 类型为引用防止json仿造\nconst TYPE_VD = { _: 1 };\nconst TYPE_GM = { _: 2 };\nconst TYPE_CP = { _: 3 };\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\n","import $$type from './$$type';\nimport mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = ``;\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 4) {\n color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n color = color.map(c => Math.floor(c));\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(matrix && !mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n [x, y, , w] = mx.calPoint([x, y], matrix);\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n bbox = [xa, ya, xb, yb];\n }\n else if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n return t;\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n extendAnimate,\n transformBbox,\n assignMatrix,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","export default {\n list: [], // 每次渲染前的更新后,等待测量的文字对象列表\n data: {}, // Text中存入的特殊等待测量的信息,字体+字号+粗细为key\n charWidth: {}, // key的文字宽度hash\n padding: {}, // key的文字宽度偏移,少量字体的少量文字有\n ELLIPSIS: '…',\n};\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl([x, y, z, w], cx, cy, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, z * w, w];\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n // gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, -1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\n vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\n record[0]++;\n });\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\n });\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param texCache\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param cx\n * @param cy\n * @param spread\n * @param d\n * @param sigma\n */\nfunction drawBlur(gl, program, frameBuffer, texCache, tex1, tex2, i, j, width, height, cx, cy, spread, d, sigma) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height - spread], cx, cy);\n let [x2, y1] = convertCoords2Gl([width - spread, spread], cx, cy);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, i, m) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, i);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.programOverflow, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, program) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMbm(gl, program, i, j, W, H) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n};\n","import util from './util';\nimport debug from './debug';\nimport textCache from '../node/textCache';\nimport font from '../style/font';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nlet defaultFontFamilyData;\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\n\nlet inject = {\n measureText() {\n let { list, data } = textCache;\n let html = '';\n let keys = [];\n let lengths = [];\n let chars = [];\n Object.keys(data).forEach(key => {\n let { ff, fs, fw, s } = data[key];\n if(s) {\n keys.push(key);\n lengths.push(s.length);\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n for(let i = 0, len = s.length; i < len; i++) {\n let char = s.charAt(i);\n chars.push(char);\n html += `${char.replace(/`;\n }\n data[key].s = '';\n }\n });\n if(!html) {\n return;\n }\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let { charWidth } = textCache;\n let count = 0, index = 0, key;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n if(count === 0) {\n key = keys[index];\n }\n if(++count === lengths[index]) {\n index++;\n count = 0;\n }\n let char = chars[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n let css = window.getComputedStyle(node, null);\n charWidth[key][char] = parseFloat(css.width);\n }\n list.forEach(text => text.__measureCb());\n textCache.list = [];\n textCache.data = {};\n if(!debug.flag) {\n document.body.removeChild(div);\n }\n },\n measureTextSync(key, ff, fs, fw, char) {\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n let html = `${char}${char}${char}`;\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let w1 = parseFloat(window.getComputedStyle(cns[0], null).width);\n let w2 = parseFloat(window.getComputedStyle(cns[1], null).width);\n return w1 * 2 - w2;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag) {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(window);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(window);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === 'arial') {\n return true;\n }\n if(!font.info.hasOwnProperty(ff)) {\n return false;\n }\n if(font.info[ff].hasOwnProperty('checked')) {\n return font.info[ff].checked;\n }\n let canvas = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px arial';\n context.fillText('a', 8, 8);\n canvas.draw();\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + ff;\n context.fillText('a', 8, 8);\n canvas.draw();\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return font.info[ff].checked = true;\n }\n }\n return font.info[ff].checked = false;\n },\n loadFont(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let f = new FontFace(url, `url(${url})`);\n f.load().then(function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }).catch(function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n });\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../node/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n PERCENT,\n ];\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else {\n list.push([item[0], p[0] / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else {\n cy = y1 + positionY[0];\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n if(size[4] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[4];\n r = Math.max(xl, yl);\n // 看旋转\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n if(!isNil(points[5])) {\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n let v = gradient[2].match(/([-+]?[\\d.]+[pxremvwh%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwh%]+)?/ig) || [];\n o.v = v.map(item => {\n let color = /((?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\)))/i.exec(item);\n let arr = [rgba2int(color[1])];\n let percent = /[-+]?[\\d.]+[pxremvwh%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root) {\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root) {\n let w = x2 - x1;\n let h = y2 - y1;\n let [cx, cy, r, xl, yl, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n res.forEach(item => {\n v.children.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ],\n });\n });\n return ctx.add(v);\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n let clip = ctx.add(v);\n res.forEach(item => {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","const DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: '#000',\n borderRightColor: '#000',\n borderBottomColor: '#000',\n borderLeftColor: '#000',\n borderTopStyle: 'solid',\n borderRightStyle: 'solid',\n borderBottomStyle: 'solid',\n borderLeftStyle: 'solid',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nlet DOM_ENTRY_SET = [];\nlet DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet GEOM_ENTRY_SET = [];\nlet GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet INHERIT = {\n fontFamily: 'arial',\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 1,\n textStrokeOver: 'none',\n};\n\nlet INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwh%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwh%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwh%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwh%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwh%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwh%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR],\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\n};\n","import reset from '../style/reset';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { INHERIT } = unit;\nconst { STYLE_KEY } = enums;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\nconst MEASURE = {\n [STYLE_KEY.FONT_SIZE]: true,\n [STYLE_KEY.FONT_WEIGHT]: true,\n [STYLE_KEY.FONT_FAMILY]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\n MEASURE,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n};\n\no.isIgnore = function(k) {\n return IGNORE.hasOwnProperty(k);\n};\nfunction isGeom(tagName, k) {\n return GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n}\no.isGeom = isGeom;\no.isRepaint = function(k) {\n return REPAINT.hasOwnProperty(k) || isGeom(k);\n};\no.isMeasure = function(k) {\n return MEASURE.hasOwnProperty(k);\n};\no.isValid = function(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n};\n\nlet MEASURE_KEY_SET = o.MEASURE_KEY_SET = Object.keys(MEASURE).map(i => parseInt(i));\nlet len = MEASURE_KEY_SET.length;\no.isMeasureInherit = function(target) {\n if(target) {\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n return true;\n }\n }\n }\n return false;\n};\no.measureInheritList = function(target) {\n let list = [];\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n list.push(k);\n }\n }\n return list;\n};\n\no.addGeom('$line', ['x1', 'y1', 'x2', 'y2', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end']);\n\nexport default o;\n","import unit from './unit';\nimport font from './font';\nimport gradient from './gradient';\nimport reg from './reg';\nimport reset from './reset';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\n\nconst { STYLE_KEY, STYLE_RV_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, calUnit } = unit;\nconst { isNil, rgba2int, equalArr } = util;\nconst { MEASURE_KEY_SET, isGeom, GEOM, GEOM_KEY_SET } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = DEG;\n }\n }\n}\n\n/**\n * 将传入的手写style标准化,并且用reset默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param reset 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, reset = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(!isNil(v) && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n reset.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n if(reg.img.test(item)) {\n return reg.img.exec(item)[2];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [gradient.parseGradient(temp)];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [reg.img.exec(temp)[2]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\n }\n }\n temp = style.backgroundColor;\n if(temp) {\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), RGBA];\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(!isNil(temp)) {\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n PERCENT,\n ];\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwh%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0] === 'contain' || match[0] === 'cover') {\n match[1] = match[0];\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(!isNil(v)) {\n res[STYLE_KEY[style2Upper(k)]] = [rgba2int(v), RGBA];\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(!isNil(v)) {\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push([MATRIX, [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]]);\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, arr]);\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push([ROTATE_3D, arr]);\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push([k2, arr]);\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(!isNil(temp)) {\n let arr = calUnit(temp);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, PERCENT]);\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp) {\n let arr = temp.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n res[ROTATE_3D] = arr;\n }\n }\n temp = style.opacity;\n if(!isNil(temp)) {\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n if(v === 'auto') {\n v = [0, AUTO];\n }\n else {\n v = calUnit(v);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(!isNil(temp)) {\n if(temp === 'content') {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, AUTO];\n }\n }\n temp = style.order;\n if(!isNil(temp)) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[COLOR] = [[], INHERIT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp || temp === 0) {\n if(temp === 'inherit') {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_OVER] = [0, INHERIT];\n }\n else {\n let v = temp.toString();\n if(v !== 'none' && v !== 'fill') {\n v = 'none';\n }\n res[TEXT_STROKE_OVER] = [v, STRING];\n }\n }\n temp = style.fontWeight;\n if(!isNil(temp)) {\n if(temp === 'bold') {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(temp === 'normal') {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(temp === 'lighter') {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(temp === 'inherit') {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_STYLE] = [0, INHERIT];\n }\n else {\n res[FONT_STYLE] = [temp, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.textAlign;\n if(temp) {\n if(temp === 'inherit') {\n res[TEXT_ALIGN] = [0, INHERIT];\n }\n else {\n res[TEXT_ALIGN] = [temp, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp) {\n if(temp === 'inherit') {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, STRING];\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[FILL] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [gradient.parseGradient(temp)];\n }\n else {\n res[FILL] = [rgba2int(temp)];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[STROKE] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [gradient.parseGradient(temp)];\n }\n else {\n res[STROKE] = [rgba2int(temp)];\n }\n }\n temp = style.strokeWidth;\n if(!isNil(temp)) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(!isNil(temp)) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = item.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = temp.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n temp = style.filter;\n if(temp !== undefined) {\n let match = (temp || '').toString().match(/\\b[\\w-]+\\s*\\(\\s*[-+]?[\\d.]+\\s*[pxremvwhdg%]*\\s*\\)\\s*/ig);\n let f = null;\n if(match) {\n f = [];\n match.forEach(item => {\n let m2 = /([\\w-]+)\\s*\\(\\s*([-+]?[\\d.]+\\s*[pxremvwhdg%]*)\\s*\\)\\s*/i.exec(item);\n if(m2) {\n let k = m2[1].toLowerCase(), v = calUnit(m2[2]);\n if(k === 'blur') {\n if(v[0] <= 0 || [DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n f.push([k, v]);\n }\n else if(k === 'hue-rotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push([k, v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = PERCENT;\n f.push([k, v]);\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp) {\n if(temp === 'inherit') {\n res[VISIBILITY] = [0, INHERIT];\n }\n else {\n res[VISIBILITY] = [temp, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp) {\n if(temp === 'inherit') {\n res[POINTER_EVENTS] = [0, INHERIT];\n }\n else {\n res[POINTER_EVENTS] = [temp, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\n let match = (temp || '').match(/([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(((transparent)|(#[0-9a-f]{3,8})|(rgba?\\(.+?\\)))\\s*)?(inset|outset)?\\s*,?/ig);\n if(match) {\n match.forEach(item => {\n let boxShadow = /([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(?:((?:transparent)|(?:#[0-9a-f]{3,8})|(?:rgba?\\(.+\\)))\\s*)?(inset|outset)?/i.exec(item);\n if(boxShadow) {\n bs = bs || [];\n let res = [];\n // v,h,blur,spread,color,inset\n for(let i = 0; i < 4; i++) {\n let v = calUnit(boxShadow[i + 1]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 1 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n res.push(rgba2int(boxShadow[5]));\n res.push(boxShadow[6] || 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = style[k];\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n res[STYLE_KEY[style2Upper(k)]] = Array.isArray(v) ? v : [v];\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\n/**\n * 第一次和REFLOW等级下,刷新前首先执行,生成computedStyle\n * 影响文字测量的只有字体和大小和重量,需要提前处理\n * 继承相关的计算\n * @param node 对象节点\n * @param isRoot 是否是根节点,无继承需使用默认值\n */\nfunction computeMeasure(node, isRoot) {\n let { currentStyle, computedStyle, domParent } = node;\n let parentComputedStyle = !isRoot && domParent.computedStyle;\n MEASURE_KEY_SET.forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v[1] === INHERIT) {\n computedStyle[k] = getFontFamily(isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k]);\n }\n else {\n computedStyle[k] = getFontFamily(v[0]);\n }\n }\n else if(v[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.height * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\n }\n });\n}\n\n/**\n * 每次布局前需要计算的reflow相关的computedStyle\n * @param node 对象节点\n * @param isHost 是否是根节点或组件节点这种局部根节点,无继承需使用默认值\n */\nfunction computeReflow(node, isHost) {\n let { currentStyle, computedStyle, domParent: parent, root } = node;\n let rem = root.computedStyle[FONT_SIZE];\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.computedStyle;\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n if(item[1] === PX) {\n computedStyle[k] = item[0];\n }\n else if(item[1] === REM) {\n computedStyle[k] = item[0] * rem;\n }\n else if(item[1] === VW) {\n computedStyle[k] = item[0] * root.width * 0.01;\n }\n else if(item[1] === VH) {\n computedStyle[k] = item[0] * root.height * 0.01;\n }\n else {\n computedStyle[k] = 0;\n }\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n // 防止为0\n else if(lineHeight[1] === PX) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === PERCENT) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * fontSize * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === REM) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * rem, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VW) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.width * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VH) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.height * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // normal或auto\n else {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing[1] === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else if(letterSpacing[1] === PERCENT) {\n computedStyle[LETTER_SPACING] = fontSize * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === REM) {\n computedStyle[LETTER_SPACING] = rem * letterSpacing[0];\n }\n else if(letterSpacing[1] === VW) {\n computedStyle[LETTER_SPACING] = root.width * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === VH) {\n computedStyle[LETTER_SPACING] = root.height * 0.01 * letterSpacing[0];\n }\n else {\n computedStyle[LETTER_SPACING] = letterSpacing[0];\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\n }\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE];\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + (style[FONT_FAMILY] || 'arial');\n}\n\nfunction getFontFamily(str) {\n let ff = str.split(',');\n let f = 'arial';\n for(let i = 0, len = ff.length; i < len; i++) {\n if(font.support(ff[i])) {\n f = ff[i];\n break;\n }\n }\n return f;\n}\n\nfunction getBaseLine(style) {\n let fontSize = style[FONT_SIZE];\n let ff = getFontFamily(style[FONT_FAMILY]);\n let normal = fontSize * (font.info[ff] || font.info.arial).lhr;\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info.arial).blr;\n}\n\nfunction calNormalLineHeight(style) {\n let ff = getFontFamily(style[FONT_FAMILY]);\n return style[FONT_SIZE] * (font.info[ff] || font.info.arial).lhr;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n return v;\n}\n\nfunction calAbsolute(currentStyle, k, v, size, root) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER, DEG, RGBA, STRING].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n v = v[0] * size * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * root.height * 0.01;\n }\n return v;\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\n }\n if(k === BACKGROUND_SIZE) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equalArr(a, b);\n }\n return a === b;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [COLOR]: true,\n [TEXT_STROKE_COLOR]: true,\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\n};\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n // 可能为null\n if(item && item.k) {\n return util.clone(item);\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变\n // 可能非法为空\n if(item && item.k) {\n return util.clone(item);\n }\n // 颜色\n else {\n return item.slice(0);\n }\n });\n }\n else if(k === TRANSFORM || k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\n }\n }\n return res;\n}\n\nexport default {\n normalize,\n computeMeasure,\n computeReflow,\n setFontStyle,\n getFontFamily,\n getBaseLine,\n calRelative,\n calAbsolute,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n};\n","import mode from './mode';\nimport css from '../style/css';\nimport enums from '../util/enums';\nimport util from '../util/util';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, wList) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n this.__width = w;\n this.__height = h;\n this.__content = content;\n this.__wList = wList;\n this.__virtualDom = {};\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, wList, width } = this;\n let { ox, oy } = parent;\n y += css.getBaseLine(computedStyle);\n x += ox + dx;\n y += oy + dy;\n this.__endX = x + width;\n this.__endY = y;\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n if(overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content.charAt(i), x, y);\n }\n if(!overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n x += wList[i] + letterSpacing;\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', x],\n ['y', y],\n ['fill', cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n props.push(['stroke', cacheStyle[TEXT_STROKE_COLOR]]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseLine() {\n return this.parent.baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get wList() {\n return this.__wList;\n }\n}\n\nexport default TextBox;\n","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.offscreen.canvas;\n }\n\n get ctx() {\n return this.offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, sy3], n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport geom from './geom';\n\nexport default {\n matrix,\n tar,\n geom,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n }\n else if(k === ROTATE_Y) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n }\n else if(k === ROTATE_Z) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r[0]);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let [k, v] = item;\n let t = identity();\n calSingle(t, k, v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\n });\n return res;\n}\n\nfunction calOrigin(transformOrigin, w, h, root) {\n let tfo = [];\n transformOrigin.forEach((item, i) => {\n if(item[1] === PX) {\n tfo.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n tfo.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n tfo.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n tfo.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n tfo.push(item[0] * root.height * 0.01);\n }\n });\n return tfo;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calOrigin,\n calMatrixByPerspective,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\nimport mx from '../math/matrix';\nimport blur from '../math/blur';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n DISPLAY,\n VISIBILITY,\n },\n NODE_KEY: {\n NODE_OPACITY,\n NODE_CACHE,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_HAS_CONTENT,\n NODE_COMPUTED_STYLE,\n },\n} = enums;\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用\nfunction genSingle(cache, message) {\n let { size, sx1, sy1, width, height, bbox } = cache;\n let offscreen = inject.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bbox;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let [x, y] = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始x1/y1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.update = true;\n }\n\n clear() {\n if(this.available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.enabled) {\n this.clear();\n this.page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.enabled) {\n this.clear();\n return;\n }\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get canvas() {\n return this.page.canvas;\n }\n\n get ctx() {\n return this.page.ctx;\n }\n\n get size() {\n return this.page.size;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean, draw()}}\n */\n static genFilter(cache, filter) {\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n let { x, y, size, canvas, sx1, sy1, width, height, bbox } = cache;\n bbox = bbox.slice(0);\n bbox[0] -= d;\n bbox[1] -= d;\n bbox[2] += d;\n bbox[3] += d;\n let offscreen = inject.getCacheCanvas(width + d * 2, height + d * 2, null, 'filter1');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.draw();\n offscreen.bbox = bbox;\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.sx1 = sx1 - d;\n offscreen.sy1 = sy1 - d;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width + d * 2;\n offscreen.height = height + d * 2;\n return offscreen;\n }\n\n static genMask(target, next, isClip, transform, tfo) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n while(next && (next.isMask)) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n let __config = item.__config;\n let cacheOverflow = __config[NODE_CACHE_OVERFLOW], cacheFilter = __config[NODE_CACHE_FILTER], cache = __config[NODE_CACHE];\n let source = cacheOverflow && cacheOverflow.available && cacheOverflow;\n if(!source) {\n source = cacheFilter && cacheFilter.available && cacheFilter;\n }\n if(!source) {\n source = cache && cache.available && cache;\n }\n if(source) {\n ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(\n source, cacheMask,\n __config[NODE_COMPUTED_STYLE][TRANSFORM],\n mx.identity(),\n __config[NODE_COMPUTED_STYLE][TRANSFORM_ORIGIN].slice(0),\n inverse\n );\n }\n // 没有内容或者img没加载成功导致没有内容,有内容且可见则是超限,不可能进这里\n else if(__config[NODE_HAS_CONTENT]\n && __config[NODE_COMPUTED_STYLE][DISPLAY] !== 'none'\n && __config[NODE_COMPUTED_STYLE][VISIBILITY] !== 'hidden') {\n inject.error('CacheMask is oversize');\n }\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n cacheMask.draw(ctx);\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { sx, sy, outerWidth, outerHeight } = node;\n let xe = sx + outerWidth;\n let ye = sy + outerHeight;\n if(bbox[0] < sx || bbox[1] < sy || bbox[2] > xe || bbox[3] > ye) {\n let cacheOverflow = genSingle(target, 'overflow');\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n cacheOverflow.draw(ctx);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(sx - bbox[0], sy - bbox[1], outerWidth, outerHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n /**\n * bbox变化时直接用老的cache内容重设bbox\n * @param cache\n * @param bbox\n */\n static updateCache(cache, bbox) {\n let old = cache.bbox;\n if(!util.equalArr(bbox, old)) {\n let dx = old[0] - bbox[0];\n let dy = old[1] - bbox[1];\n let newCache = Cache.getInstance(bbox);\n if(newCache && newCache.enabled) {\n let { x: ox, y: oy, canvas, width, height } = cache;\n let { x: nx, y: ny } = newCache;\n newCache.sx1 = cache.sx1;\n newCache.sy1 = cache.sy1;\n newCache.dx = cache.dx + dx;\n newCache.dy = cache.dy + dy;\n newCache.dbx = cache.dbx + dx;\n newCache.dby = cache.dby + dy;\n newCache.ctx.drawImage(canvas, ox, oy, width, height, dx + nx, dy + ny, width, height);\n newCache.__available = true;\n cache.release();\n return newCache;\n }\n }\n else {\n return cache;\n }\n }\n\n static drawCache(source, target, transform, matrix, tfo, inverse) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n }\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport mode from './mode';\nimport css from '../style/css';\nimport font from '../style/font';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport textCache from './textCache';\nimport inject from '../util/inject';\nimport Cache from '../refresh/Cache';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_STYLE,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_MEASURE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n} = enums;\n\nconst ELLIPSIS = textCache.ELLIPSIS;\nconst AUTO = unit.AUTO;\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidthList = [];\n this.__charWidth = 0;\n this.__textWidth = 0;\n }\n\n /**\n * 预先计算每个字的宽度,在每次布局渲染前做\n * @param renderMode\n * @param ctx\n * @private\n */\n __computeMeasure(renderMode, ctx) {\n let { content, computedStyle, charWidthList } = this;\n // 每次都要清空重新计算,计算会有缓存\n charWidthList.splice(0);\n let ffs = computedStyle[FONT_FAMILY].split(',');\n let ff = 'arial';\n for(let i = 0, len = ffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(ffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n this.__ff = ff;\n let fs = computedStyle[FONT_SIZE];\n let fw = computedStyle[FONT_WEIGHT];\n let key = this.__key = computedStyle[FONT_SIZE] + ',' + ff + ',' + fw;\n let wait = textCache.data[key] = textCache.data[key] || {\n ff,\n fs,\n fw,\n hash: {},\n s: '',\n };\n let cache = textCache.charWidth[key] = textCache.charWidth[key] || {};\n let sum = 0;\n let needMeasure = false;\n // text-overflow:ellipse需要,即便没有也要先测量,其基于最近非inline父节点的字体\n let bp = this.domParent;\n while(bp.currentStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let parentComputedStyle = bp.computedStyle;\n let pff = 'arial';\n for(let i = 0, pffs = parentComputedStyle[FONT_FAMILY].split(','), len = pffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(pffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n let pfs = parentComputedStyle[FONT_SIZE];\n let pfw = parentComputedStyle[FONT_WEIGHT];\n let pKey = this.__pKey = pfs + ',' + pff + ',' + pfw;\n let parentCache = textCache.charWidth[pKey] = textCache.charWidth[pKey] || {};\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(renderMode === mode.WEBGL) {\n ctx = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__').ctx;\n }\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n ctx.font = css.setFontStyle(parentComputedStyle);\n parentCache[ELLIPSIS] = ctx.measureText(ELLIPSIS).width;\n }\n ctx.font = css.setFontStyle(computedStyle);\n }\n else if(renderMode === mode.SVG) {\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n parentCache[ELLIPSIS] = 0;\n let wait = textCache.data[pKey] = textCache.data[pKey] || {\n ff: pff,\n fs: pfs,\n fw: pfw,\n hash: {},\n s: '',\n };\n wait.s += ELLIPSIS;\n needMeasure = true;\n }\n }\n // 逐字测量,canvas可瞬间得到信息,svg先预存统一进行\n for(let i = 0, length = content.length; i < length; i++) {\n let char = content.charAt(i);\n let mw;\n if(cache.hasOwnProperty(char)) {\n mw = cache[char];\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n mw = cache[char] = ctx.measureText(char).width;\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else {\n if(!wait.hash.hasOwnProperty(char)) {\n wait.s += char;\n }\n wait.hash[char] = true;\n // 先预存标识位-1,测量完后替换它\n charWidthList.push(-1);\n needMeasure = true;\n }\n }\n this.__textWidth = sum;\n if(needMeasure) {\n textCache.list.push(this);\n }\n }\n\n __measureCb() {\n let { content, charWidthList } = this;\n let key = this.__key;\n let cache = textCache.charWidth[key];\n let sum = 0;\n for(let i = 0, len = charWidthList.length; i < len; i++) {\n if(charWidthList[i] < 0) {\n let mw = charWidthList[i] = cache[content.charAt(i)];\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n }\n this.__textWidth = sum;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layout(data) {\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, lx = x, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0 } = data;\n this.__x = this.__sx1 = x;\n this.__y = this.__sy1 = y;\n let { isDestroyed, content, currentStyle, computedStyle, textBoxes, charWidthList, root, __ff, __key } = this;\n textBoxes.splice(0);\n let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\n // 空内容w/h都为0可以提前跳出\n if(isDestroyed || currentStyle[DISPLAY] === 'none' || !content) {\n return lineClampCount;\n }\n this.__ox = this.__oy = 0;\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let begin = 0;\n let i = 0;\n let beginSpace = x - lx; // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n let count = beginSpace;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n } = computedStyle;\n // 特殊字体中特殊字符连续时需减少一定的padding量\n let padding = font.info[__ff].padding;\n let needReduce = !!padding;\n let lastChar;\n let ew = textCache.charWidth[this.__pKey][ELLIPSIS];\n let lineCount = 0;\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow;\n // block的overflow:hidden和textOverflow:clip/ellipsis才生效,inline要看最近非inline父元素\n let bp = this.__bp;\n let {\n [DISPLAY]: display,\n [OVERFLOW]: overflow,\n [WIDTH]: width,\n [TEXT_OVERFLOW]: textOverflow,\n } = bp.currentStyle;\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n while(i < length) {\n count += charWidthList[i] + letterSpacing;\n if(count > w) {\n // block/flex无需宽度,inline-block需要设置宽度才生效\n if(display === 'block' || display === 'flex') {\n isTextOverflow = true;\n }\n else if(width[1] !== AUTO) {\n isTextOverflow = true;\n }\n break;\n }\n i++;\n }\n }\n else {\n while(i < length) {\n count += charWidthList[i++] + letterSpacing;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n }\n // 默认clip跟随overflow:hidden,无需感知\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, count - beginSpace, lineHeight,\n content, charWidthList);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n maxW = count - beginSpace;\n y += lineHeight;\n }\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let cw = charWidthList[i] + letterSpacing;\n count += cw;\n // 连续字符减少padding,除了连续还需判断char是否在padding的hash中\n if(needReduce) {\n let char = content[i];\n if(char === lastChar && padding.hasOwnProperty(char) && padding[char]) {\n let hasCache, p = textCache.padding[__key] = textCache.padding[__key] || {};\n if(textCache.padding.hasOwnProperty(__key)) {\n if(p.hasOwnProperty(char)) {\n hasCache = true;\n count -= p[char];\n }\n }\n if(!hasCache) {\n let n = 0;\n if(root.renderMode === mode.CANVAS) {\n root.ctx.font = css.setFontStyle(computedStyle);\n let w1 = root.ctx.measureText(char).width;\n let w2 = root.ctx.measureText(char + char).width;\n n = w1 * 2 - w2;\n n *= padding[char];\n }\n else if(root.renderMode === mode.SVG) {\n n = inject.measureTextSync(__key, __ff, fontSize, fontWeight, char);\n n *= padding[char];\n }\n count -= n;\n p[char] = n;\n }\n }\n lastChar = char;\n }\n // 忽略零宽字符\n if(cw === 0) {\n i++;\n continue;\n }\n // 换行都要判断i不是0的时候,第1个字符强制不换行\n if(count === w) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n let textBox;\n // 特殊情况,恰好最后一行最后一个排满,此时查看末尾mpb,要防止i为0的情况首个字符特殊不回退,无需看开头mpb\n if(i === length - 1 && count > w - endSpace && i) {\n count -= charWidthList[i--];\n }\n i++;\n if(!lineCount) {\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, count);\n }\n // 必须先添加再设置y,当有diff的lineHeight时,第一个换行不影响,再换行时第2个换行即第3行会被第1行影响\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null; // 换行后连续字符reduce不生效重新计数\n }\n // 奇怪的精度问题,暂时不用相等判断,而是为原本w宽度加一点点冗余1e-10\n else if(count > w + (1e-10)) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n // 普通非多行文本阶段逻辑\n let width;\n // 宽度不足时无法跳出循环,至少也要塞个字符形成一行,无需判断第1行,因为是否放得下逻辑在dom中做过了,\n // 如果第1行放不下,一定会另起一行,此时作为开头再放不下才会进这里,这个if只有0或1个字符的情况\n if(i <= begin) {\n width = count;\n }\n // 超过2个字符回退1个\n else {\n width = count - charWidthList[i--];\n }\n i++;\n // 根据是否第一行分开处理行首空白\n let textBox;\n if(!lineCount) {\n maxW = width - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, width);\n }\n // 必须先添加再设置y,同上\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null;\n }\n else {\n i++;\n }\n }\n // 换行后Text的x重设为lx\n if(!lineCount) {\n this.__x = this.__sx1 = lx;\n }\n // 最后一行,只有一行未满时也进这里,需查看末尾mpb,排不下回退一个字符\n // 声明了lineClamp时特殊考虑,这里一定是最后一行,要对比行数不能超过,超过忽略掉这些文本\n if(begin < length && (!lineClamp || lineCount + lineClampCount < lineClamp)) {\n let textBox;\n if(!lineCount) {\n let needBack;\n // 防止开头第一个begin=0时回退,这在inline有padding且是第一个child时会发生\n if(begin && count > w - endSpace) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n else {\n let needBack;\n // 防止begin在结尾时回退,必须要有个字符,这在最后一行1个字符排不下时会出现\n if(count > w - endSpace && begin < length - 1) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n maxW = Math.max(maxW, count);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n }\n }\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseLine = css.getBaseLine(computedStyle);\n return lineCount;\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount, lineHeight, lx, x, y, maxW,\n textBoxes, content, charWidthList, lineBoxManager) {\n for(; i >= begin; i--) {\n count -= charWidthList[i] + letterSpacing;\n if(count + ew + endSpace <= w) {\n // 至少1个字符不用回退,到0也没找到需要回退\n if(i) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n break;\n }\n }\n }\n // 最后也没找到,看是否要查找前一个inline节点,还是本身是行首兜底首字母\n if(i < 0) {\n let lineBox = lineBoxManager.lineBox;\n // lineBox为空是行首,至少放1个字符\n if(!lineBox.size) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.charAt(begin), charWidthList.slice(begin, begin + 1));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n }\n // 向前查找inline节点,可能会有前面inline嵌套,因此直接用lineBox,不会出现inlineBlock,\n // 这里和css不同,ib强制超限换行不会同行\n else {\n let list = lineBox.list;\n outer:\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n let { content, wList, width } = tb;\n // 整体减去可以说明可能在这个tb中,只要最后发现不是空文本节点就行,否则继续;第0个强制进入保证1字符\n if(count - width + ew <= w || !j) {\n // 找到可以跳出outer循环,找不到继续,注意第0个且1个字符判断\n for(let k = wList.length - 1; k >= 0; k--) {\n if(!k && !j || count + ew <= w) {\n tb.__content = content;\n tb.__width = width;\n tb.parent.__ellipsis = true;\n break outer;\n }\n else {\n let w2 = wList[k];\n tb.__endY -= w2;\n width -= w2;\n content = content.slice(0, k);\n count -= w2;\n wList.pop();\n }\n }\n }\n // 不够则看前一个tb并且删掉这个\n else {\n count -= width;\n }\n list.pop();\n tb.parent.textBoxes.pop();\n }\n }\n }\n return [y, maxW];\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__sx1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__sy1 += diff;\n }\n\n __tryLayInline(w) {\n return w - this.charWidthList[0];\n }\n\n __inlineSize() {\n let minX, maxX;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n minX = Math.min(minX, item.x);\n maxX = Math.max(maxX, item.x + item.width);\n }\n else {\n minX = item.x;\n maxX = item.x + item.width;\n }\n });\n this.__x = minX;\n this.__sx = this.__sx1 = minX + this.ox;\n this.__width = maxX - minX;\n }\n\n __calMaxAndMinWidth() {\n let n = 0;\n this.charWidthList.forEach(item => {\n n = Math.max(n, item);\n });\n return { max: this.textWidth, min: n };\n }\n\n __calAbsWidth(x, y, w) {\n this.__layout({\n x,\n y,\n w,\n }, true);\n return this.width;\n }\n\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __ellipsis, __bp, __config } = this;\n if(renderMode === mode.SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === mode.WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\n }\n if(__cache && __cache.enabled) {\n __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += -sx + __cache.x;\n dy += -sy + __cache.y;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let strokeColor = cacheStyle[TEXT_STROKE_COLOR];\n if(ctx.strokeStyle !== strokeColor) {\n ctx.strokeStyle = strokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === mode.SVG) {\n this.virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n // textOverflow的省略号font使用最近非inline的父节点\n if(__ellipsis) {\n let last = textBoxes[textBoxes.length - 1];\n let { endX, endY } = last;\n let computedStyle = __bp.computedStyle;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = __bp.__cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n ctx.fillText(ELLIPSIS, endX, endY);\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', endX],\n ['y', endY],\n ['fill', __bp.__cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n this.virtualDom.children.push({\n type: 'item',\n tagName: 'text',\n props,\n content: ELLIPSIS,\n });\n }\n }\n }\n\n __deepScan(cb) {\n cb(this);\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidthList() {\n return this.__charWidthList;\n }\n\n get charWidth() {\n return this.__charWidth;\n }\n\n get firstCharWidth() {\n return this.charWidthList[0] || 0;\n }\n\n get textWidth() {\n return this.__textWidth;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.domParent.computedStyle;\n }\n\n get cacheStyle() {\n return this.domParent.__cacheStyle;\n }\n\n get bbox() {\n let { sx, sy, width, height, computedStyle: { [TEXT_STROKE_WIDTH]: textStrokeWidth = 0 } } = this;\n textStrokeWidth *= 0.5;\n return [sx - textStrokeWidth, sy - textStrokeWidth, sx + width + textStrokeWidth, sy + height + textStrokeWidth];\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get matrix() {\n return this.domParent.matrix;\n }\n\n get matrixEvent() {\n return this.domParent.matrixEvent;\n }\n}\n\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\n","import util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasUpdate) {\n return;\n }\n cp.__hasUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must implement render()');\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseLine',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__calMp',\n '__calAbs',\n '__renderAsMask',\n '__renderByMask',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n '__deepScan',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { PERCENT, NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, NUMBER]],\n ];\n let tfo = transform.calOrigin([[0, PERCENT], [0, PERCENT]], w, h);\n tfo[0] += x;\n tfo[1] += y;\n return transform.calMatrixWithOrigin(list, tfo, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport unit from './unit';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { AUTO, PX, PERCENT, STRING, REM, VW, VH } = unit;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr, method = 'fill', isInline) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction calBackgroundSize(value, w, h, root) {\n let res = [];\n value.forEach((item, i) => {\n if(item[1] === PX) {\n res.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n res.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n res.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n res.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n res.push(item[0] * root.height * 0.01);\n }\n else if(item[1] === AUTO) {\n res.push(-1);\n }\n else if(item[1] === STRING) {\n res.push(item[0] === 'contain' ? -2 : -3);\n }\n });\n return res;\n}\n\nfunction calBackgroundPosition(position, container, size, root) {\n if(Array.isArray(position)) {\n if(position[1] === PX) {\n return position[0];\n }\n else if(position[1] === PERCENT) {\n return (container - size) * position[0] * 0.01;\n }\n else if(position[1] === REM) {\n return position[0] * root.computedStyle[FONT_SIZE];\n }\n else if(position[1] === VW) {\n return position[0] * root.width * 0.01;\n }\n else if(position[1] === VH) {\n return position[0] * root.height * 0.01;\n }\n }\n return 0;\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, isInline) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = bx1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_X][i], bgW, w, xom.root);\n let bgY = by1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_Y][i], bgH, h, xom.root);\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeat-x', 'repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeat-y', 'repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = [bx1, by1];\n let p2 = [bx2, by2];\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n calBackgroundSize,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || (!task.length && !taskCp.length)) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n style[k] = target.currentStyle[k];\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵\nfunction inherit(frames, keys, target) {\n let computedStyle = target.computedStyle;\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.outerWidth;\n let oh = target.outerHeight;\n let m = tf.calMatrix(v, ow, oh);\n style[k] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => calUnit(item));\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,忽视顺序按hash计算,为空视为默认值,如blur默认0,brightness默认1\n let pHash = {}, nHash = {}, keyHash = {};\n if(p) {\n p.forEach(item => {\n keyHash[item[0]] = true;\n pHash[item[0]] = item[1];\n });\n }\n if(n) {\n n.forEach(item => {\n keyHash[item[0]] = true;\n nHash[item[0]] = item[1];\n })\n }\n let v = {}, hasChange;\n // 只有blur支持px/rem/vw/vh,其余都是特殊固定单位\n Object.keys(keyHash).forEach(k => {\n if(k === 'blur') {\n if(!pHash[k]) {\n v[k] = nHash[k].slice(0);\n hasChange = true;\n }\n else if(!nHash[k]) {\n v[k] = [-pHash[k][0], pHash[k][1]];\n hasChange = true;\n }\n else {\n let v2 = calByUnit(pHash[k], nHash[k], 0, target.root);\n v[k] = [v2, pHash[k][1]];\n hasChange = true;\n }\n }\n else if(k === 'hue-rotate') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let nv = isNil(nHash[k]) ? 100 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 100 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'grayscale') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n });\n if(!hasChange) {\n return;\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || isString(pi) || isString(ni)) {\n res[1].push(null);\n continue;\n }\n if(pi.k !== ni.k) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n // 渐变\n if(pi.k === 'linear' || pi.k === 'radial' || pi.k === 'conic') {\n let pv = pi.v;\n let nv = ni.v;\n temp[0] = [];\n let { clientWidth } = target;\n let eq = equalArr(pv, nv);\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\n }\n else {\n let v = calByUnit(a[1], b[1], clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n // 线性渐变有角度差值变化\n if(pi.k === 'linear') {\n let isArrP = Array.isArray(pi.d);\n let isArrN = Array.isArray(ni.d);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n let v = [ni.d[0] - pi.d[0], ni.d[1] - pi.d[1], ni.d[2] - pi.d[2], ni.d[3] - pi.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n else {\n let v = ni.d - pi.d;\n if(eq && v === 0) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n }\n // 径向渐变的位置\n else if(pi.k === 'radial') {\n let isArrP = Array.isArray(pi.z);\n let isArrN = Array.isArray(ni.z);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n temp[2] = [];\n for(let i = 0; i < 5; i++) {\n let pz = pi.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = ni.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n if(eq && equalArr(res[4], [0, 0, 0, 0, 0])) {\n res[1].push(null);\n }\n }\n else {\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = pi.p[i];\n let np = ni.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n else if(pi.k === 'conic') {\n temp[1].push(n.d - p.d);\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && res[2] !== 0 && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n // 纯色\n else {\n if(equalArr(n, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n n = n[0];\n p = p[0];\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res[1] = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n res[1].push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res[1] = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure') {\n return;\n }\n else {\n res[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\n }\n });\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n // 将已有的样式按key存入引用来操作\n let hash = {};\n st.forEach(item => {\n hash[item[0]] = item[1];\n });\n Object.keys(v).forEach(k => {\n if(hash.hasOwnProperty(k)) {\n hash[k][0] += v[k][0] * percent;\n }\n else {\n // 2个关键帧中有1个未声明,需新建样式存入\n if(k === 'blur' || k === 'hue-rotate' || k === 'grayscale') {\n let n = v[k].slice(0);\n n[0] *= percent;\n st.push([k, n]);\n }\n // 默认值是1而非0\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let n = v[k].slice(0);\n n[0] = 100 + n[0] * percent;\n st.push([k, n]);\n }\n }\n });\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let [c, d, p, z] = v2;\n if(GRADIENT_TYPE.hasOwnProperty(st2.k)) {\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[k];\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] += n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] += item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] += n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nlet uuid = 0;\n\nconst I_ASSIGNING = 0;\nconst I_IN_FPS = 1;\nconst I_IS_DELAY = 2;\nconst I_BEGIN = 3;\nconst I_END = 4;\nconst I_FINISHED = 5;\nconst I_NEXT_END = 6;\nconst I_FIRST_PLAY = 7;\nconst I_FRAME_CB = 8;\nconst I_PLAY_CB = 9;\nconst I_TARGET = 10;\nconst I_ROOT = 11;\nconst I_FRAMES = 12;\nconst I_FRAMES_R = 13;\nconst I_CURRENT_TIME = 14;\nconst I_NEXT_TIME = 15;\nconst I_STYLE = 16;\nconst I_DURATION = 17;\nconst I_ITERATIONS = 18;\nconst I_FILL = 19;\nconst I_PLAYBACK_RATE = 20;\nconst I_PLAY_COUNT = 21;\nconst I_PLAY_STATE = 22;\nconst I_DESTROYED = 23;\nconst I_START_TIME = 24;\nconst I_FPS_TIME = 25;\nconst I_EASING = 26;\nconst I_ENTER_FRAME = 27;\nconst I_DELAY = 28;\nconst I_END_DELAY = 29;\nconst I_KEYS = 30;\nconst I_ORIGIN_STYLE = 31;\nconst I_CURRENT_FRAMES = 32;\nconst I_CURRENT_FRAME = 33;\nconst I_SPF_LIMIT = 34;\nconst I_FPS = 35;\nconst I_DIRECTION = 36;\nconst I_CAL_DIFF_TIME = 37;\nconst I_FIRST_ENTER = 38;\nconst I_STAY_BEGIN = 39;\nconst I_STAY_END = 40;\nconst I_IS2 = 41;\nconst I_END_TIME = 42;\nconst I_NODE_CONFIG = 43;\nconst I_ROOT_CONFIG = 44;\nconst I_OUT_BEGIN_DELAY = 45;\nconst I_TIME_STAMP = 46;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n false, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n this.__frameCb,\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n this.__calDiffTime,\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let [frames, framesR, keys, originStyle] = this.__init(list, iterations, duration, op.easing, target);\n config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_TRANSITION] = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n __frameCb(__config, diff, isDelay) {\n this.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n this.emit(Event.PLAY);\n }\n if(isFunction(__config[I_PLAY_CB])) {\n __config[I_PLAY_CB].call(this, diff, isDelay);\n __config[I_PLAY_CB] = null;\n }\n }\n\n __calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n __config[I_NEXT_TIME] += diff;\n return [v, diff];\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = __config[I_PLAY_COUNT];\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = __config[I_CAL_DIFF_TIME](__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效\n if(playCount === 0 && currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧,仅首轮\n if(playCount === 0) {\n currentTime -= delay;\n }\n if(currentTime === 0 || __config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n __config[I_NEXT_TIME] -= duration;\n playCount = ++__config[I_PLAY_COUNT];\n __config[I_BEGIN] = true;\n round = true;\n }\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n this.__clean(true);\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n __config[I_FRAME_CB].call(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += __config[I_DELAY];\n }\n // 超过一轮去掉delay\n if(v > duration + __config[I_DELAY]) {\n v -= __config[I_DELAY];\n }\n // 超过时间长度需要累加次数\n __config[I_PLAY_COUNT] = 0;\n while(v > duration && __config[I_PLAY_COUNT] < __config[I_ITERATIONS] - 1) {\n __config[I_PLAY_COUNT]++;\n v -= duration;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = __config[I_PLAY_COUNT] % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_ITERATIONS];\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\n }\n}\n\nexport default Animation;\n","import mode from '../node/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h) {\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0 && (sigma > 0 || spread > 0)) {\n if(renderMode === mode.CANVAS | renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__config[NODE_DEFS_CACHE].push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__config[NODE_DEFS_CACHE].push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n 'color-dodge': true,\n 'color-burn': true,\n 'hard-light': true,\n 'soft-light': true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(mbmName(v));\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseLine\n * @param lineHeight\n * @param diffL\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, contentBoxList, start, end, lineBox, baseLine, lineHeight, diffL, isStart, isEnd,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let eyt = 0, eyb = 0;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n eyt = paddingTop;\n eyb = paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n eyt = paddingTop + borderTopWidth;\n eyb = paddingBottom + borderBottomWidth;\n }\n // 同y的border伸展范围,其影响border渲染\n let pbt = paddingTop + borderTopWidth;\n let pbb = paddingBottom + borderBottomWidth;\n // inline的baseLine和lineBox的差值\n let diff = lineBox.baseLine - baseLine;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseLine对齐后计算的\n let x1 = start.x;\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n dom = dom.domParent;\n }\n let bx1 = x1;\n if(isStart) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n bx1 -= paddingLeft + borderLeftWidth;\n }\n let y1 = lineBox.y + diff - eyt;\n let by1 = lineBox.y + diff - pbt;\n let x2 = end.x + end.outerWidth;\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n let bx2 = x2;\n if(isEnd) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x2 += paddingRight;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x2 += paddingRight + borderRightWidth;\n }\n bx2 += paddingRight + borderRightWidth;\n }\n let y2 = lineBox.y + diff + lineHeight - diffL + eyb;\n let by2 = lineBox.y + diff + lineHeight - diffL + pbb;\n // x要考虑xom的ox值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList) {\n let sum = 0;\n let length = contentBoxList.length;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n sum += contentBox.width;\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n if(contentBox === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import Node from './Node';\nimport mode from './mode';\nimport Component from './Component';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport blur from '../math/blur';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport Cache from '../refresh/Cache';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport inline from './inline';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n }\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, REM, VW, VH, DEG } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil } = util;\nconst { calRelative } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d } = mx;\n\nconst {\n contain,\n NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n} = level;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__config[NODE_IS_INLINE]) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = {}; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = {}; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = {}; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__isClip = !!this.props.clip;\n let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__mpWidth(currentStyle[a], w);\n computedStyle[b] = this.__mpWidth(currentStyle[b], w);\n });\n }\n\n __mpWidth(mp, w) {\n if(mp[1] === PX) {\n return mp[0];\n }\n else if(mp[1] === PERCENT) {\n return mp[0] * w * 0.01;\n }\n else if(mp[1] === REM) {\n return mp[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(mp[1] === VW) {\n return mp[0] * this.root.width * 0.01;\n }\n else if(mp[1] === VH) {\n return mp[0] * this.root.height * 0.01;\n }\n return 0;\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n\n // 换算margin/padding为px单位,onlyFixedValue只考虑绝对值,不考虑百分比等\n __calMp(v, w, onlyFixedValue) {\n let n = 0;\n if(v[1] === PX) {\n n += v[0];\n }\n else if(v[1] === PERCENT && !onlyFixedValue) {\n v[0] *= w * 0.01;\n v[1] = PX;\n n += v[0];\n }\n else if(v[1] === REM) {\n n += v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n n += v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n n += v[0] * this.root.height * 0.01;\n }\n return n;\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMp(isDirectionRow, w, currentStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w, !isDirectItem)\n + this.__calMp(marginRight, w, !isDirectItem)\n + this.__calMp(paddingLeft, w, !isDirectItem)\n + this.__calMp(paddingRight, w, !isDirectItem);\n if(borderLeftWidth[1] === PX) {\n mp += borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n mp += borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n mp += borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n mp += borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n mp += borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n mp += borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n mp += borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n mp += borderRightWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n else {\n let mp = this.__calMp(marginTop, w, !isDirectItem)\n + this.__calMp(marginBottom, w, !isDirectItem)\n + this.__calMp(paddingTop, w, !isDirectItem)\n + this.__calMp(paddingBottom, w, !isDirectItem);\n if(borderTopWidth[1] === PX) {\n mp += borderTopWidth[0];\n }\n else if(borderTopWidth[1] === REM) {\n mp += borderTopWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderTopWidth[1] === VW) {\n mp += borderTopWidth[0] * this.root.width * 0.01;\n }\n else if(borderTopWidth[1] === VH) {\n mp += borderTopWidth[0] * this.root.height * 0.01;\n }\n if(borderBottomWidth[1] === PX) {\n mp += borderBottomWidth[0];\n }\n else if(borderBottomWidth[1] === REM) {\n mp += borderBottomWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderBottomWidth[1] === VW) {\n mp += borderBottomWidth[0] * this.root.width * 0.01;\n }\n else if(borderBottomWidth[1] === VH) {\n mp += borderBottomWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n return res;\n }\n\n // absolute且无尺寸时,isVirtual标明先假布局一次计算尺寸,还有flex列计算时\n // fromAbs为absolute节点特有省略计算标识,本节点是abs时真正布局传入\n __layout(data, isVirtual, fromAbs) {\n css.computeReflow(this, this.isShadowRoot);\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config } = this;\n let {\n [DISPLAY]: display,\n } = computedStyle;\n let {\n [WIDTH]: width,\n [POSITION]: position,\n } = currentStyle;\n this.clearCache();\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n };\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = false;\n // 防止display:none不统计mask,isVirtual忽略,abs布局后续会真正来走一遍\n if(!isVirtual) {\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.isMask && next && (next.isMask)) {\n let count = 0;\n while(next) {\n if(next.isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\n if(isDestroyed || display === 'none') {\n this.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n return;\n }\n // margin/padding在abs前已经计算过了,无需二次计算\n if(!fromAbs) {\n this.__mp(currentStyle, computedStyle, w);\n }\n // inline的width/height无效,其它有效\n if(width[1] !== AUTO) {\n if(this.__isRealInline() && currentStyle[DISPLAY] === 'inline') {\n width[0] = 0;\n width[1] = AUTO;\n }\n else {\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n }\n let lineClampCount = 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n this.__layoutFlex(data, isVirtual);\n }\n else if(display === 'inlineBlock' || display === 'inline-block') {\n lineClampCount = this.__layoutInline(data, isVirtual);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isVirtual, true);\n }\n else {\n this.__layoutBlock(data, isVirtual);\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let { [TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left } = currentStyle;\n let { parent } = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if(right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if(position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\n x = this.__sx1 = x + computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.width;\n x = this.__sx5 = x + computedStyle[PADDING_RIGHT];\n this.__sx6 = x + computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.height;\n y = this.__sy5 = y + computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + computedStyle[BORDER_BOTTOM_WIDTH];\n }\n computedStyle[WIDTH] = this.width;\n computedStyle[HEIGHT] = this.height;\n // abs布局的不执行,在__layoutAbs末尾做,防止未布局没有尺寸从而动画计算错误\n if(!fromAbs) {\n this.__execAr();\n }\n return lineClampCount;\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\n computedStyle[MARGIN_TOP]\n = computedStyle[MARGIN_RIGHT]\n = computedStyle[MARGIN_BOTTOM]\n = computedStyle[MARGIN_LEFT]\n = computedStyle[PADDING_TOP]\n = computedStyle[PADDING_RIGHT]\n = computedStyle[PADDING_BOTTOM]\n = computedStyle[PADDING_LEFT]\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, nowrap, lineBoxManager, endSpace = 0 } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width[1] !== AUTO) {\n fixedWidth = true;\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n else if(height[1] !== AUTO) {\n fixedHeight = true;\n switch(height[1]) {\n case PX:\n h = height[0];\n break;\n case PERCENT:\n h *= height[0] * 0.01;\n break;\n case REM:\n h = height[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n h = height[0] * this.root.width * 0.01;\n break;\n case VH:\n h = height[0] * this.root.height * 0.01;\n break;\n }\n }\n // margin/padding/border影响x和y和尺寸,注意inline的y不受mpb影响\n x += borderLeftWidth + marginLeft + paddingLeft;\n data.x = x;\n if(!isInline) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mpb,其一定是block和inline互斥\n if(!isInline) {\n if(width[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n nowrap,\n endSpace,\n selfEndSpace,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')\n && (width[1] !== AUTO || this.tagName === 'img') && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = currentStyle[TRANSLATE_X];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n x = v - (computedStyle[TRANSLATE_X] || 0);\n computedStyle[TRANSLATE_X] = v;\n computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = currentStyle[TRANSLATE_Y];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetHeight * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n y = v - (computedStyle[TRANSLATE_Y] || 0);\n computedStyle[TRANSLATE_Y] = v;\n computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n z = v - (computedStyle[TRANSLATE_Z] || 0);\n computedStyle[TRANSLATE_Z] = v;\n computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n computedStyle[TRANSFORM_ORIGIN] = tf.calOrigin(currentStyle[TRANSFORM_ORIGIN], offsetWidth, offsetHeight, this.root);\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(currentStyle[TRANSFORM]) {\n matrix = tf.calMatrix(currentStyle[TRANSFORM], offsetWidth, offsetHeight, this.root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete computedStyle[k];\n let v = currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n computedStyle[k] = [v[0], v[1], v[2], v[3][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 0) {\n return;\n }\n if(v[1] === PERCENT) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * offsetWidth * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * offsetHeight * 0.01;\n }\n }\n else if(v[1] === REM) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n }\n else if(v[1] === VW) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n }\n else if(v[1] === VH) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n }\n temp.push([k, v]);\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, offsetWidth, offsetHeight, this.root);\n }\n }\n computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = computedStyle[TRANSFORM];\n let tfo = computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += sx1 || 0;\n tfo[1] += sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox' || backgroundClip === 'content-box') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\n if(isInline && !this.contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n computedStyle[BACKGROUND_SIZE] = (currentStyle[BACKGROUND_SIZE] || []).map(item => {\n return bg.calBackgroundSize(item, bx2 - bx1, by2 - by1, this.root);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = computedStyle[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE].slice(0);\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[BACKGROUND_IMAGE];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = BACKGROUND_IMAGE;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi;\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\n });\n }\n return true;\n }\n else if(!isInline && bgi.k) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n computedStyle[BOX_SHADOW] = (currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n let v = item2[0];\n if(item2[1] === PERCENT) {\n if(i % 2 === 0) {\n v *= 0.01 * (bx2 - bx1);\n }\n else {\n v *= 0.01 * (by2 - by1);\n }\n }\n else if(item2[1] === REM) {\n v = v * this.root.computedStyle[FONT_SIZE];\n }\n else if(item2[1] === VW) {\n v = v * this.root.width * 0.01;\n }\n else if(item2[1] === VH) {\n v = v * this.root.height * 0.01;\n }\n return v;\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(computedStyle[k] = currentStyle[k][0]);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.contentBoxList, currentStyle, computedStyle, this.root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(offsetWidth, offsetHeight, currentStyle, computedStyle, this.root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === INHERIT) {\n computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n computedStyle[FONT_STYLE] = currentStyle[FONT_STYLE][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n if(currentStyle[COLOR][1] === INHERIT) {\n computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : [0, 0, 0, 1];\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n else if(isNil(__cacheStyle[COLOR])) {\n computedStyle[COLOR] = rgba2int(currentStyle[COLOR][0]);\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n if(currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : [0, 0, 0, 1];\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n computedStyle[TEXT_STROKE_COLOR] = rgba2int(currentStyle[TEXT_STROKE_COLOR][0]);\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : 0;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = currentStyle[TEXT_STROKE_WIDTH];\n if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : 'none';\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = currentStyle[TEXT_STROKE_OVER][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === INHERIT) {\n computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n computedStyle[POINTER_EVENTS] = currentStyle[POINTER_EVENTS][0];\n }\n __cacheStyle[POINTER_EVENTS] = computedStyle[POINTER_EVENTS];\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = 0;\n if(v[1] === REM) {\n ppt = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n ppt = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n ppt = v[0] * this.root.height * 0.01;\n }\n else {\n ppt = v[0];\n }\n computedStyle[PERSPECTIVE] = ppt;\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n computedStyle[PERSPECTIVE_ORIGIN] = tf.calOrigin(currentStyle[PERSPECTIVE_ORIGIN], this.offsetWidth, this.offsetHeight, this.root);\n }\n if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\n return computedStyle[FILTER] = (currentStyle[FILTER] || []).map(item => {\n let [k, v] = item;\n // 部分%单位的滤镜强制使用数字\n if(v[1] === PX || v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n return [k, v];\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\n let visibility = currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][3] > 0) {\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT],\n paddingTop = computedStyle[PADDING_TOP], paddingRight = computedStyle[PADDING_RIGHT],\n paddingBottom = computedStyle[PADDING_BOTTOM], paddingLeft = computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]][0][3] > 0) {\n return true;\n }\n }\n let bs = currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && (item[2] > 0 || item[3] > 0)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @param lv\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否开启缓存\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT才会进入这里,清空bbox\n this.__bbox = null;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList);\n ih = lineHeight;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n let uuid = gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseLine,再减去lineBox的baseLine得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n let ff = css.getFontFamily(fontFamily);\n let baseLine = css.getBaseLine(computedStyle);\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - diffL\n let diffL = fontSize * (font.info[ff].lgr || 0);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0, countW = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseLine, lineHeight, diffL, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n countW += w;\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n count++;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseLine, lineHeight, diffL, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0]);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR]);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR]);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR]);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR]);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n root.delRefreshTask(this.__loadBgi.cb);\n root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\n this.clearCache();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.isClip;\n let hasEmitMask;\n while(next && next.isMask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, computedStyle } = this;\n if(computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd);\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.cx, gd.cy, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.cx],\n ['cy', gd.cy],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { cx, cy, r, deg, stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n else if(renderMode === SVG) {\n let offset = 0.5;\n let prev;\n // 根据2个stop之间的百分比得角度差划分块数,每0.5°一块,不足也算\n let list = [];\n for(let i = 0, len = stop.length; i < len - 1; i++) {\n let begin = stop[i][1] * 360;\n let end = stop[i + 1][1] * 360;\n let diff = end - begin;\n let n = Math.ceil(diff);\n let per = diff / n;\n // 计算每块的2个弧端点\n let bc = stop[i][0];\n let ec = stop[i + 1][0];\n let dc = [ec[0] - bc[0], ec[1] - bc[1], ec[2] - bc[2], ec[3] - bc[3]];\n let pc = [dc[0] / n, dc[1] / n, dc[2] / n, dc[3] / n];\n for(let j = 0; j < n; j++) {\n let [x1, y1] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg - offset);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg + offset);\n list.push([\n x1, y1,\n x2, y2,\n Math.round(bc[0] + pc[0] * j),\n Math.round(bc[1] + pc[1] * j),\n Math.round(bc[2] + pc[2] * j),\n Math.round(bc[3] + pc[3] * j),\n ]);\n }\n }\n // 最后一段补自己末尾颜色特殊处理\n let end = list[0].slice(0);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, deg);\n end[2] = x2;\n end[3] = y2;\n let s = stop[stop.length - 1][0];\n end[4] = s[0];\n end[5] = s[1];\n end[6] = s[2];\n end[7] = s[3];\n list.push(end);\n for(let i = 0, len = list.length; i < len; i++) {\n let cur = list[i];\n if(prev) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', prev[0]],\n ['y1', prev[1]],\n ['x2', cur[2]],\n ['y2', cur[3]],\n ],\n children: [\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([prev[4], prev[5], prev[6], prev[7]])],\n ['offset', '0%'],\n ],\n },\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([cur[4], cur[5], cur[6], cur[7]])],\n ['offset', '100%'],\n ],\n },\n ],\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n res.push([[[cx, cy], [prev[0], prev[1]], [cur[2], cur[3]]], 'url(#' + uuid + ')']);\n }\n prev = cur;\n }\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\n return animation;\n }\n this.animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(util.isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n __computeMeasure(renderMode, ctx, cb) {\n css.computeMeasure(this);\n if(util.isFunction(cb)) {\n cb(this);\n }\n }\n\n __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative/margin/flex/vertical等\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData.y += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n }\n\n __resizeX(diff, lv) {\n this.computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData.w += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n this.computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __spreadBbox(boxShadow) {\n let ox = 0, oy = 0;\n if(Array.isArray(boxShadow)) {\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, , inset] = item;\n if(inset !== 'inset') {\n let d = blur.outerSize(sigma);\n d += spread;\n ox = Math.max(ox, x + d);\n oy = Math.max(oy, y + d);\n }\n });\n }\n return [ox, oy];\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\n }\n\n getComputedStyle(key) {\n let computedStyle = this.computedStyle;\n let res = {};\n let keys;\n if(key) {\n if(Array.isArray(key)) {\n keys = key;\n }\n else {\n keys = [key];\n }\n keys = keys.map(s => {\n return STYLE_KEY[style2Upper(s)];\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect() {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent } = this;\n let p1 = point2d(mx.calPoint([__sx1, __sy1], matrixEvent));\n let p2 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1], matrixEvent));\n let p3 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1 + offsetHeight], matrixEvent));\n let p4 = point2d(mx.calPoint([__sx1, __sy1 + offsetHeight], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n let zChildren = domParent.zIndexChildren;\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(i === -1 || j === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n zChildren.splice(j, 1);\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(util.isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, clientWidth, clientHeight,\n currentStyle: {\n [BORDER_TOP_WIDTH]: borderTopWidth = [0],\n [BORDER_RIGHT_WIDTH]: borderRightWidth = [0],\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth = [0],\n [BORDER_LEFT_WIDTH]: borderLeftWidth = [0],\n [BOX_SHADOW]: boxShadow = [],\n } = {},\n } = this;\n let [ox, oy] = this.__spreadBbox(boxShadow);\n clientWidth += borderLeftWidth[0] + borderRightWidth[0];\n clientHeight += borderTopWidth[0] + borderBottomWidth[0];\n this.__bbox = [__sx1 - ox, __sy1 - oy, __sx1 + clientWidth + ox, __sy1 + clientHeight + oy];\n }\n return this.__bbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseLine() {\n return this.offsetHeight;\n }\n\n get firstBaseLine() {\n return this.offsetHeight;\n }\n\n get isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n}\n\nexport default Xom;\n","import enums from '../util/enums';\nimport TextBox from './TextBox';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_LEFT,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_RIGHT_WIDTH,\n MARGIN_RIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseLine,inlineBlock等节点按最后一行baseLine\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseLine) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseLine\n this.__baseLine = baseLine;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign() {\n let n = this.baseLine;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseLine发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n let m = item.baseLine;\n if(m !== n) {\n item.__offsetY(n - m);\n }\n });\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseLine,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseLine = Math.max(b, this.__baseLine);\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n return this.lineHeight;\n }\n\n get baseLine() {\n let baseLine = 0;\n this.list.forEach(item => {\n baseLine = Math.max(baseLine, item.baseLine);\n });\n return Math.max(this.__baseLine, baseLine);\n }\n\n get lineHeight() {\n let lineHeight = 0;\n // 只有TextBox和InlineBlock\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return Math.max(this.__lineHeight, lineHeight);\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseLine) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__maxX = x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseLine = baseLine;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n setLbOrGenLineBoxByInline(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n let lineBox;\n let list = this.list;\n if(this.__isNewLine) {\n lineBox = new LineBox(x, y, lineHeight, baseLine);\n list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n else {\n let length = list.length;\n lineBox = list[length - 1];\n lineBox.__setLB(l, b);\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox;\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n this.__maxX = Math.max(this.__maxX, o.x + o.outerWidth);\n return lineBox;\n }\n\n horizonAlign(w, textAlign) {\n this.list.forEach(lineBox => {\n let diff = w - lineBox.width;\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n lineBox.__offsetX(diff);\n lineBox.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n });\n }\n\n verticalAlign() {\n this.list.forEach(lineBox => {\n lineBox.verticalAlign();\n });\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n return n + list[length - 1].baseLine;\n }\n return 0;\n }\n\n get firstBaseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseLine;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.currentStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMarginTB(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[0];\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMarginTB,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport mode from './mode';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n FONT_WEIGHT,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n // PERSPECTIVE,\n // TRANSFORM,\n },\n NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n UPDATE_MEASURE,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH } = unit;\nconst { calAbsolute, isRelativeOrAbsolute } = css;\n\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.isMask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n inlineBlock: true,\n 'inline-block': true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = util.extend({}, this.__style);\n this.__children = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n child.__config[NODE_STRUCT][STRUCT_CHILD_INDEX] = i;\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + child[STRUCT_TOTAL] + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\n })\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param w 剩余宽度\n * @param total 容器尺寸\n * @returns {number|*}\n * @private\n */\n __tryLayInline(w, total) {\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n w = first.__tryLayInline(w, total);\n }\n else {\n w -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(w < 0) {\n return w;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n w = item.__tryLayInline(w, total);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n w -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n }\n // 还要减去开头的mpb\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto等对齐用\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n // 记得偏移LineBox\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n // item的递归子节点求min/max,只考虑固定值单位,忽略百分比,同时按方向和display\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h, lineBoxManager } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n else {\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n else if(display === 'block') {\n let countMin = 0, countMax = 0;\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n else {\n if(display === 'inlineBlock' || display === 'inline-block') {\n lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n if(isDirectionRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else if(isDirectionRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n });\n }\n }\n return [display, this.__addMp(isDirectionRow, w, currentStyle, [min, max])];\n }\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时isVirtual状态参与计算,文本抵达边界才进行换行\n * @param isDirectionRow\n * @param data\n * @param isVirtual abs非固定尺寸时先进行虚拟布局标识\n * @private\n */\n __calBasis(isDirectionRow, data, isVirtual) {\n css.computeReflow(this, this.isShadowRoot);\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n [FLEX_BASIS]: flexBasis,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = fixedSize = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = fixedSize = (isDirectionRow ? w : h) * flexBasis[0] * 0.01;\n }\n else if(flexBasis[1] === REM) {\n b = fixedSize = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = fixedSize = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = fixedSize = flexBasis[0] * this.root.height * 0.01;\n }\n }\n // 已声明主轴尺寸的,当basis是auto时为值\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1) && isAuto) {\n if(main[1] === PX) {\n b = fixedSize = main[0];\n }\n else if(main[1] === PERCENT) {\n b = fixedSize = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = fixedSize = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = fixedSize = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = fixedSize = main[0] * this.root.height * 0.01;\n }\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n // flex的item还是flex时\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n // flex的item是block/inline时,inline也会变成block统一对待\n else {\n let countMin = 0, countMax = 0;\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n if(isContent) {\n b = max;\n }\n // 直接item的mpb影响basis\n return this.__addMp(isDirectionRow, w, currentStyle, [b, min, max], true);\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isVirtual abs无尺寸时提前虚拟布局计算尺寸\n * @private\n */\n __layoutBlock(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxW = 0;\n let cw = 0;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isImg = item.tagName === 'img';\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || isInline && whiteSpace === 'nowrap') {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // abs统计宽度\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let fw = item.__tryLayInline(w + data.x - x, w);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(fw >= (-1e-10)) {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n // 非开头,说明之前的text未换行,需要增加行数\n if(x !== data.x && flowChildren[i - 1] instanceof Text) {\n lineClampCount++;\n }\n x = data.x;\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layout({\n x,\n y,\n w,\n h,\n }, isVirtual);\n let isNone = item.currentStyle[DISPLAY] === 'none';\n // 自身无内容\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n // absolute/flex前置虚拟计算\n if(isVirtual) {\n maxW = Math.max(maxW, item.outerWidth);\n cw = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n item.__offsetY(diff, true);\n y += diff;\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n }\n }\n // 文字和inline类似\n else {\n // lineClamp作用域为block下的inline(同LineBox上下文)\n if(lineClamp && lineClampCount >= lineClamp) {\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let fw = item.__tryLayInline(w - x + data.x);\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, item.width);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n }\n let tw = this.__width = (fixedWidth || !isVirtual) ? w : maxW;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isVirtual) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n this.__marginAuto(currentStyle, data);\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let maxX = 0;\n let isDirectionRow = ['column', 'column-reverse', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n // abs虚拟布局计算时纵向也是看横向宽度\n let [b, min, max] = item.__calBasis(isVirtual ? true : isDirectionRow, { x, y, w, h }, isVirtual);\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += max;\n }\n else {\n maxX = Math.max(maxX, max);\n }\n return;\n }\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += item.textWidth;\n }\n else {\n maxX = Math.max(maxX, item.textWidth);\n }\n return;\n }\n growList.push(0);\n shrinkList.push(1);\n if(isDirectionRow) {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n let h = item.height;\n basisList.push(h);\n minList.push(h);\n }\n }\n });\n // abs时,只需关注宽度即可,无需真正布局\n if(isVirtual) {\n let tw = this.__width = Math.min(maxX, w);\n this.__ioSize(tw, this.height);\n return;\n }\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = flexWrap === 'wrap' || ['wrap-reverse', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross] = this.__layoutFlexLine(clone, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n offset += length;\n });\n let tw = this.__width = w;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'row-reverse' || flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true);\n }\n });\n });\n }\n else if(flexDirection === 'column-reverse' || flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(['wrapReverse', 'wrap-reverse'].indexOf(flexWrap) > -1 && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(!isVirtual && length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true);\n }\n else {\n item.__offsetX(per, true);\n }\n });\n }\n else if(alignContent === 'flex-start' || alignContent === 'flexStart') {}\n else if(alignContent === 'flex-end' || alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n else if(alignContent === 'space-between' || alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true);\n }\n else {\n item.__offsetX(between, true);\n }\n });\n }\n });\n }\n else if(alignContent === 'space-around' || alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true);\n }\n else {\n item.__offsetX(around * (i + 1), true);\n }\n });\n });\n }\n // 默认stretch\n else {\n per = diff / length;\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true);\n }\n else {\n item.__offsetX(per * i, true);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行cross对齐,在alignContent为stretch时计算每行的高度\n if(!isVirtual) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__crossAlign(item, alignItems, isDirectionRow, maxCross);\n });\n }\n else if(length) {\n let maxCross = maxCrossList[0];\n if(isDirectionRow) {\n if(fixedHeight) {\n maxCross = h;\n }\n }\n else {\n maxCross = w;\n }\n this.__crossAlign(__flexLine[0], alignItems, isDirectionRow, maxCross);\n }\n }\n this.__marginAuto(currentStyle, data);\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free);\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) {\n let n = item * basisList[i];\n factorSum += n;\n return n;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layout({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n });\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n });\n }\n }\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lbmList.push(lineBoxManager);\n item.__layout({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n // 计算主轴剩余时要用真实剩余空间而不能用伸缩剩余空间\n let diff = isDirectionRow ? (w - x + data.x) : (h - y + data.y);\n // 主轴对齐方式\n if(diff > 0) {\n let len = orderChildren.length;\n if(justifyContent === 'flexEnd' || justifyContent === 'flex-end') {\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(diff, true) : child.__offsetY(diff, true);\n }\n }\n else if(justifyContent === 'center') {\n let center = diff * 0.5;\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(center, true) : child.__offsetY(center, true);\n }\n }\n else if(justifyContent === 'spaceBetween' || justifyContent === 'space-between') {\n let between = diff / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(between * i, true) : child.__offsetY(between * i, true);\n }\n }\n else if(justifyContent === 'spaceAround' || justifyContent === 'space-around') {\n let around = diff / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true) : child.__offsetY(around * (i + 1), true);\n }\n }\n }\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(item.width, textAlign);\n })\n }\n return [x, y, maxCross];\n }\n\n // 每个flexLine的侧轴对齐,单行时就是一行对齐\n __crossAlign(line, alignItems, isDirectionRow, maxCross) {\n let baseLine = 0;\n line.forEach(item => {\n baseLine = Math.max(baseLine, item.firstBaseLine);\n });\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对其,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isVirtual\n * @param isInline\n * @private\n */\n __layoutInline(data, isVirtual, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h, lx,\n lineBoxManager, nowrap, endSpace, selfEndSpace } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [WIDTH]: width,\n } = currentStyle;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__config[NODE_IS_INLINE] = true;\n this.__lineBoxManager = lineBoxManager;\n let baseLine = css.getBaseLine(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(marginLeft || marginRight\n || paddingLeft || paddingRight\n || borderLeftWidth || borderRightWidth) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseLine);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lx = x;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n let contentBoxList;\n if(isInline) {\n contentBoxList = this.__contentBoxList = [];\n lineBoxManager.pushContentBoxList(this);\n }\n let isIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline2 = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isRealInline = isXom && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb\n let isEnd = isInline && (i === length - 1);\n if(isEnd) {\n endSpace += selfEndSpace;\n }\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头,不用考虑是否放得下直接放,i为0强制不换行\n if(x === lx || !i || isInline2 && whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n isInlineBlock2 && (w[1] === AUTO) && (isIbFull = true);\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let fw = (whiteSpace === 'nowrap') ? 0 : item.__tryLayInline(w - x + lx, w - (isEnd ? endSpace : 0));\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n nowrap: whiteSpace === 'nowrap',\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n isInline2 && lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if(x === lx || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n // 第一个Text且父元素声明了nowrap也强制不换行,非第一个则看本身whiteSpace声明\n let focusNoWrap = (!i && nowrap) || whiteSpace === 'nowrap';\n let fw = focusNoWrap ? 0 : item.__tryLayInline(w + lx - x);\n if(!focusNoWrap && fw >= 0 && isEnd && endSpace && item.content.length === 1) {\n let fw2 = fw - endSpace;\n if(fw2 < 0) {\n fw = fw2;\n }\n }\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n y = lineBoxManager.endY;\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n lineBoxManager.addX(selfEndSpace);\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,\n if(isVirtual) {\n this.__inlineSize();\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用maxW\n let maxW = lineBoxManager.__maxX - data.x;\n tw = this.__width = fixedWidth ? w : (isIbFull ? Math.max(w, maxW) : maxW);\n th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isVirtual && !isInline) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return isInline ? lineClampCount : 0;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseLine得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(tw, textAlign) {\n let { contentBoxList, computedStyle, __ox, __oy } = this;\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = tw;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff) {\n this.__offsetX(diff, true);\n }\n }\n this.__width = computedStyle[WIDTH] = 0;\n let th = this.__height = computedStyle[HEIGHT] = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n this.__sx1 = this.sx + marginLeft;\n this.__sy1 = this.sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { sx: x, sy: y, clientWidth, clientHeight, computedStyle } = container;\n let { isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding\n item.__mp(currentStyle, computedStyle, clientWidth);\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let { [LEFT]: left, [TOP]: top, [RIGHT]: right,\n [BOTTOM]: bottom, [WIDTH]: width, [HEIGHT]: height, [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = calAbsolute(currentStyle, 'left', left, clientWidth, this.root);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = calAbsolute(currentStyle, 'right', right, clientWidth, this.root);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = calAbsolute(currentStyle, 'top', top, clientHeight, this.root);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = calAbsolute(currentStyle, 'bottom', bottom, clientHeight, this.root);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = x + clientWidth - computedStyle[RIGHT] - x2;\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n else if(fixedRight) {\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= currentStyle[BORDER_LEFT_WIDTH][0];\n x2 -= currentStyle[BORDER_RIGHT_WIDTH][0];\n }\n else {\n x2 = x + paddingLeft;\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = y + clientHeight - computedStyle[BOTTOM] - y2;\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n }\n else if(fixedBottom) {\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= currentStyle[BORDER_TOP_WIDTH][0];\n y2 -= currentStyle[BORDER_BOTTOM_WIDTH][0];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.prev;\n while(prev) {\n // 目前不考虑margin合并,直接以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else if(height[1] === PX) {\n h2 = height[0];\n }\n }\n // 没设宽高,需手动计算获取最大宽高后,赋给样式再布局\n let needCalWidth;\n if((display === 'block' || ['inlineBlock', 'inline-block'].indexOf(display) > -1) && w2 === undefined) {\n needCalWidth = true;\n }\n else if(display === 'flex') {\n if(w2 === undefined) {\n needCalWidth = true;\n }\n else if(flexDirection === 'column' && h2 === undefined) {\n needCalWidth = true;\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let wl = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let hl = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取孩子宽度最大值\n if(needCalWidth) {\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n }, true, true);\n wl = item.outerWidth;\n }\n // needCalWidth传入,因为自适应尺寸上面已经计算过一次margin/padding了\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n }, false, true);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n this.__execAr();\n }\n\n /**\n * 布局前检查继承的样式以及统计字体测量信息\n * 首次检查为整树遍历,后续检查是节点自发局部检查,不再进入\n * @param renderMode\n * @param ctx\n * @param cb\n * @private\n */\n __computeMeasure(renderMode, ctx, cb) {\n super.__computeMeasure(renderMode, ctx, cb);\n // 即便自己不需要计算,但children还要继续递归检查\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx, cb);\n });\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n super.__destroy();\n }\n\n __emitEvent(e, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e);\n }\n\n // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\n }\n\n appendChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n throw new Error('Invalid parameter in removeChild.');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Xom && item.currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseLine;\n }\n\n get firstBaseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseLine;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from './mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport enums from '../util/enums';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, RGBA } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data) {\n let res = super.__preLayout(data);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\n loadImg.source = cache.source;\n loadImg.width = cache.width;\n loadImg.height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n if(computedStyle[VISIBILITY] !== 'hidden' && (computedStyle[WIDTH] || computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n return res;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\n computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3;\n originY = res.y3;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n if(cross[1] !== AUTO) {\n if(cross[1] === PX) {\n cross = cross[0];\n }\n else if(cross[1] === PERCENT) {\n cross = cross[0] * 0.01 * (isDirectionRow ? h : w);\n }\n else if(cross[1] === REM) {\n cross = cross[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(cross[1] === VW) {\n cross = cross[0] * this.root.width * 0.01;\n }\n else if(cross[1] === VH) {\n cross = cross[0] * this.root.height * 0.01;\n }\n let ratio = __loadImg.width / __loadImg.height;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? __loadImg.width : __loadImg.height;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FONT_SIZE,\n FLEX_BASIS,\n },\n NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_IS_MASK,\n NODE_STYLE,\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend({}, this.__style);\n this.__currentProps = util.clone(this.props);\n let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __tryLayInline(w, total) {\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n // 计算需考虑style的属性\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n [DISPLAY]: display,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n return [display, this.__addMp(isDirectionRow, data.w, currentStyle, [min, max])];\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __layoutBlock(data, isVirtual) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data);\n this.__height = fixedHeight ? h : 0;\n if(isVirtual) {\n this.__width = fixedWidth ? w : 0;\n return;\n }\n this.__width = w;\n this.__ioSize(w, this.height);\n this.__marginAuto(this.currentStyle, data);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __layoutFlex(data) {\n // 无children所以等同于block\n this.__layoutBlock(data);\n }\n\n __layoutInline(data) {\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // 元素的width不能超过父元素w\n let tw = this.__width = fixedWidth ? w : x - data.x;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n else if(item[1] === PERCENT) {\n return item[0] * w * 0.01;\n }\n else if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n else if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n else {\n return 0;\n }\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n computedStyle[STROKE_DASHARRAY] = currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [STROKE, FILL].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = currentStyle[k];\n computedStyle[k] = v;\n let res = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && (item.k === 'linear' || item.k === 'radial' || item.k === 'conic')) {\n res.push(this.__gradient(renderMode, ctx, x3, y3, x4, y4, item));\n }\n else if(item[3] > 0) {\n res.push(int2rgba(item));\n }\n else {\n res.push('none');\n }\n });\n }\n __cacheStyle[k] = res;\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + height * 0.5;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') {\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // geom的cache无内容也不清除\n __releaseWhenEmpty() {}\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasUpdate) {\n child.__hasUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasUpdate) {\n vd.__hasUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_STRUCT];\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { contain, NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n // if(ovd.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\n // }\n // else {\n // elem.removeAttribute('filter');\n // }\n // }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(lv, MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate } = item;\n if(target.isDestroyed) {\n return;\n }\n if(Array.isArray(animate)) {\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n }\n else {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n }\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.__page = new MockPage(texture, width, height);\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = sx1 - bbox[0];\n this.dby = sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n\n get page() {\n return this.__page;\n }\n}\n\nexport default MockCache;\n","import Geom from '../node/geom/Geom';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Cache from './Cache';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport mode from '../node/mode';\n\nconst { canvasPolygon } = painter;\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\n// 依次从list获取首个available可用的cache\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(cache && cache.available) {\n bboxTotal = cache.bbox.slice(0);\n }\n else {\n bboxTotal = node.bbox;\n }\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n },\n } = node2;\n // webgl不能跳过超限\n if(limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n // 防止text的情况,其一定属于某个node,其bbox被计算过,text不应该计算\n if(node2 instanceof Text) {\n continue;\n }\n let bbox, dx = 0, dy = 0, hasTotal;\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox.slice(0);\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox.slice(0);\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.bbox;\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = util.transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,当超限时返回空\n * @param renderMode\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cacheTop\n * @param cache\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, __config, index, total, __structs, cacheTop, cache) {\n if(total === 0) {\n return cache;\n }\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, Cache.MAX);\n if(!bboxTotal) {\n return;\n }\n let { __sx1: sx1, __sy1: sy1 } = node;\n if(cacheTop) {\n cacheTop.reset(bboxTotal, sx1, sy1);\n }\n else {\n cacheTop = Cache.getInstance(bboxTotal, sx1, sy1);\n }\n // 创建失败,再次降级\n if(!cacheTop || !cacheTop.enabled) {\n return;\n }\n cacheTop.__available = true;\n let { x: tx, y: ty, ctx, dbx, dby } = cacheTop;\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n Cache.drawCache(cache, cacheTop);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n ctx.globalAlpha = opacity;\n let m = matrix || mx.identity();\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, 0, ctx, true, tx - sx1 + dbx, ty - sy1 + dby);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx + tx;\n let dy = -sy1 + dby + ty;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n ctx.globalAlpha = opacity;\n if(matrix) {\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n Cache.drawCache(target, cacheTop);\n if(target !== __cache) {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n }\n }\n return cacheTop;\n}\n\nfunction genFilter(node, cache, v) {\n return Cache.genFilter(cache, v);\n}\n\nfunction genMask(node, cache) {\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: transformOrigin } = node.computedStyle;\n let isClip = node.next.isClip;\n return Cache.genMask(cache, node.next, isClip, transform, transformOrigin);\n}\n\nfunction genOverflow(node, cache) {\n let sbox = node.bbox;\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n return Cache.genOverflow(cache, node);\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, width, height);\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n return [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.WEBGL, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'hue-rotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n width += spread * 2;\n height += spread * 2;\n // 防止超限,webgl最大纹理尺寸限制\n let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\n return;\n }\n bbox = bbox.slice(0);\n bbox[0] -= spread;\n bbox[1] -= spread;\n bbox[2] += spread;\n bbox[3] += spread;\n let cx = width * 0.5, cy = height * 0.5;\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `\\nv_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `\\nv_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `\\nv_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texCache, texture, cache.page.texture, i, j,\n width, height, cx, cy, spread, d, sigma);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let sbox = node.bbox.slice(0);\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n let width = sbox[2] - sbox[0], height = sbox[3] - sbox[1];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, sbox[0] - bbox[0], sbox[1] - bbox[1], width, height, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, width, height, sbox);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, __config, cache, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bbox[0], dy = -bbox[1];\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dx;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n while(next && next.isMask) {\n let __config = next.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n if(display === 'none' || visibility === 'hidden') {\n continue;\n }\n // total无用,都是单节点\n let target = getCache([__cacheFilter, __cacheOverflow, __cache]);\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n // m = mx.m2Mat4(m, cx, cy);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, dx, dy);\n }\n // 异常情况超限\n else if(__config[NODE_LIMIT_CACHE]) {\n return;\n }\n next = next.next;\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let isClip = node.next.isClip;\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n list.forEach(item => {\n let [, , type, offscreen] = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getCacheCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n apply.ctx.filter = 'none';\n apply.draw();\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\n inject.releaseCacheCanvas(apply.canvas);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n mask.draw();\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n offscreen.target.draw();\n inject.releaseCacheCanvas(offscreen.target.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n target.draw();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nfunction renderCacheCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在 lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 父不为E时要点乘继承父的\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制limitCache\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n node.render(renderMode, refreshLevel, ctx, true);\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = computedStyle;\n if(!limitCache && (hasMask || position === 'absolute'\n || filter.length || (overflow === 'hidden' && total) || isValidMbm(mixBlendMode))) {\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n hasRecordAsMask[7] = overflow;\n }\n else {\n mergeList.push([i, lv, total, node, __config, hasMask, filter, overflow]);\n }\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n __cacheTotal = genTotal(renderMode, node, __config, i, total || 0, __structs, __cacheTotal, __cache);\n if(__cacheTotal && __cacheTotal !== __cache) {\n __config[NODE_CACHE_TOTAL] = __cacheTotal;\n }\n needGen = true;\n }\n // 防止失败超限,必须有total结果\n if(__cacheTotal && __cacheTotal.available) {\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n __config[NODE_CACHE_OVERFLOW] = genOverflow(node, target);\n needGen = true;\n }\n target = __config[NODE_CACHE_OVERFLOW] || target;\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n __config[NODE_CACHE_FILTER] = genFilter(node, target, filter);\n needGen = true;\n }\n target = __config[NODE_CACHE_FILTER] || target;\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n __config[NODE_CACHE_MASK] = genMask(node, target);\n }\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 超尺寸的依旧要走无cache逻辑render,这部分和无cache渲染很像\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config[NODE_DOM_PARENT].__config;\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrixEvent[0], matrixEvent[1], matrixEvent[4], matrixEvent[5], matrixEvent[12], matrixEvent[13]);\n node.render(renderMode, 0, ctx);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n // 有total的可以直接绘制并跳过子节点索引\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // total的尝试\n if(target) {\n i += (total || 0) + (hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n // 自身cache尝试\n else {\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n // 这里比较特殊,可能会有__cache但超限没被汇聚到total上,需mock出离屏对象数据,还有可能本身就超限\n if(__cache && __cache.available || limitCache) {\n if(__cache && __cache.available) {\n // 有cache但没生成total的都在这\n if(isValidMbm(mixBlendMode)) {\n let c = inject.getCacheCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode: mbmName(mixBlendMode),\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(hasMask) {\n let c = inject.getCacheCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getCacheCanvas(width, height, null, 'filter1');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getCacheCanvas(width, height, null, 'overflow');\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: matrixEvent,\n x: __cache.sx1,\n y: __cache.sy1,\n offsetWidth: node.offsetWidth,\n offsetHeight: node.offsetHeight,\n };\n ctx = c.ctx;\n }\n if(visibility !== 'hidden') {\n Cache.draw(ctx, opacity, matrixEvent, __cache);\n }\n }\n else {\n // 连cache都没生成的超限\n let res = node.render(renderMode, refreshLevel, ctx) || {};\n offscreenBlend = res.offscreenBlend;\n offscreenMask = res.offscreenMask;\n offscreenFilter = res.offscreenFilter;\n offscreenOverflow = res.offscreenOverflow;\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n if(limitCache && node instanceof Geom) {\n node.render(renderMode, refreshLevel, ctx);\n }\n }\n // 没内容的遮罩跳过,比如未加载的img,否则会将遮罩绘制出来\n else if(hasMask) {\n i += (total || 0) + hasMask;\n }\n // 同无cache一样的离屏应用\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n}\n\n/**\n * 无缓存模式canvas渲染,O(n)一次循环完成\n * @param renderMode\n * @param ctx\n * @param root\n */\nfunction renderCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n /**\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性,\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_REFRESH_LV]: refreshLevel,\n } = node.__config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let res = node.render(renderMode, refreshLevel, ctx);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,以及svg的virtualDom也要生成\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = {};\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, TRANSFORM_ALL)) {\n defsCache.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = {};\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start][STRUCT_NODE].isClip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = __config[NODE_VIRTUAL_DOM] = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n util.assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(contain(refreshLevel, FT)) {\n let filter = node.__calFilter(currentStyle, computedStyle);\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(contain(refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_NODE];\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j][STRUCT_NODE];\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.isMask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\n }\n}\n\nfunction renderWebgl(renderMode, gl, root) {\n let { __structs, width, height, texCache } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, 0, gl, true);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // node本身有或者父有perspective都认为需要生成3d渲染上下文\n if(tf.isPerspectiveMatrix(matrix) || parentPm) {\n if(hasRecordAsMask) {\n hasRecordAsMask[9] = true;\n }\n else {\n hasRecordAsMask = [i, lv, total, node, __config, null, null, null, null, true];\n }\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[7] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, true);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, limitCache, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n target = genOverflowWebgl(gl, texCache, node, target, width, height);\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = target;\n }\n }\n // 保存临时的局部根节点\n if(limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n continue;\n }\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + (hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n // let m = mx.m2Mat4(matrixEvent, cx, cy);\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nexport default {\n renderCacheCanvas,\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last[0] !== page || page.update) {\n // page可能为一个已有纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n channels[i] = page;\n }\n else {\n // 可能老的先删除\n if(last) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n channels[i] = page;\n }\n hash[page.uuid] = i;\n }\n else {\n hash[page.uuid] = i;\n }\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n}\n\nexport default TexCache;\n","import Dom from './Dom';\nimport Text from './Text';\nimport Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport mode from './mode';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_MEASURE,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, isGeom, isMeasure } = change;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, true);\n target = target.domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.domParent;\n if(parent) {\n if(parent.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inline-block', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inline-block', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, measureList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_MEASURE]: measure,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasMeasure = measure;\n let hasZ, hasVisibility, hasColor, hasDisplay;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n if(isMeasure(k)) {\n hasMeasure = true;\n }\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n if(k === VISIBILITY) {\n hasVisibility = true;\n }\n if(k === COLOR) {\n hasColor = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // visibility/color变化,影响子继承\n if(hasVisibility || hasColor) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n // text的style指向parent,因此text一定变更\n if(hasVisibility && (node instanceof Text || currentStyle[VISIBILITY][1] === INHERIT)) {\n need = true;\n }\n if(hasColor && (node instanceof Text || currentStyle[COLOR][1] === INHERIT)) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n if(node instanceof Xom) {\n node.clearCache();\n }\n }\n else {\n i += total || 0;\n }\n }\n }\n // mask需清除遮罩对象的缓存\n if(isMask) {\n let prev = node.prev;\n while(prev && (prev.isMask)) {\n prev = prev.prev;\n }\n if(prev && prev.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint/measure相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n // measure需要提前先处理\n if(hasMeasure) {\n measureList.push(node);\n }\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__taskUp = [];\n this.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__children = builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.cache = !!this.props.cache;\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.width) {\n dom.setAttribute('width', this.width);\n }\n if(this.height) {\n dom.setAttribute('height', this.height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n // 没有设置width/height则采用css计算形式\n if(!this.width || !this.height) {\n let css = window.getComputedStyle(dom, null);\n if(!this.width) {\n this.__width = parseFloat(css.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.height) {\n this.__height = parseFloat(css.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 只有canvas有ctx,svg用真实dom\n if(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d');\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', ca);\n this.__renderMode = mode.WEBGL;\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(null, true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.dom.__root && this.dom.__root instanceof Root) {\n this.dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.dom, Root);\n this.dom.__root = this;\n }\n\n refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n this.__computeMeasure(renderMode, ctx);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n // 获取所有字体和大小测量,仅svg需要,canvas直接做\n inject.measureText();\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n // 利用list循环代替tree递归快速渲染\n if(this.cache) {\n struct.renderCacheCanvas(renderMode, ctx, this);\n }\n else {\n struct.renderCanvas(renderMode, ctx, this);\n }\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n if(isFunction(cb)) {\n cb();\n }\n this.emit(Event.REFRESH, this.__rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, this, this.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = [width, PX];\n currentStyle[HEIGHT] = [height, PX];\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n updateHash[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n target[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let measureList = [];\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n let hasUpdate;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, measureList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, measureList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n /**\n * 遍历每项节点,计算测量信息,节点向上向下查找继承信息,如果parent也是继承,先计算parent的\n * 过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n */\n let measureHash = {};\n measureList.forEach(node => {\n let { __config:{ [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId, [NODE_DOM_PARENT]: parent } } = node;\n // 在root下的component变更时root会进入,但其没有__uniqueUpdateId\n if(node !== root) {\n if(measureHash.hasOwnProperty(__uniqueUpdateId)) {\n return;\n }\n measureHash[__uniqueUpdateId] = true;\n }\n let last = node;\n // 检查measure的属性是否是inherit,在root下的component变更时root会进入,但其没有__uniqueUpdateId\n // 另外dom标识表明有dom变更强制进入\n let isInherit = node !== root\n && (updateHash[__uniqueUpdateId][UPDATE_ADD_DOM]\n || change.isMeasureInherit(updateHash[__uniqueUpdateId][UPDATE_STYLE]));\n // 是inherit,需要向上查找,从顶部向下递归计算继承信息\n if(isInherit) {\n while(parent && parent !== root) {\n let { __config: {\n [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId,\n }, currentStyle } = parent;\n let isInherit;\n if(parent.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let style = updateHash[__uniqueUpdateId][UPDATE_STYLE];\n measureHash[__uniqueUpdateId] = true;\n let temp = change.measureInheritList(style);\n isInherit = !!temp.length;\n }\n else {\n isInherit = change.isMeasureInherit(currentStyle);\n }\n // 如果parent有inherit存入列表且继续向上,否则跳出循环\n if(isInherit) {\n last = parent;\n }\n else {\n break;\n }\n // 考虑component下的继续往上继承\n parent = parent.domParent;\n }\n }\n // 自顶向下查找inherit的,利用已有的方法+回调,当递归包含重复时标记防止重复\n last.__computeMeasure(renderMode, ctx, function(target) {\n if(target.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n measureHash[target.__config[NODE_UNIQUE_UPDATE_ID]] = true;\n }\n });\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.prev;\n let hasFlowPrev;\n while(ref) {\n if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.computedStyle[DISPLAY] !== 'none')) {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.prev;\n }\n // 找不到prev以parent为基准,找到则增加自身,排除remove\n if(!removeDom) {\n if(!hasFlowPrev) {\n y += computedStyle[MARGIN_TOP] + computedStyle[BORDER_TOP_WIDTH] + computedStyle[PADDING_TOP];\n }\n x += computedStyle[MARGIN_LEFT] + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, null, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n });\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(cs[DISPLAY]) > -1;\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], null, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 特殊覆盖方法,不需要super()计算自己,因为放在每次checkRoot()做过了\n __computeMeasure(renderMode, ctx) {\n css.computeMeasure(this, true);\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx);\n });\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get taskUp() {\n return this.__taskUp;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\n","import Geom from './Geom';\nimport mode from '../mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA.length >= 2) {\n num++;\n }\n if(controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getNewPoint(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start > 0 || end < 1) {\n if(num === 3) {\n [[x1, y1], controlA, controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = Math.abs(x1 - x2);\n let b = Math.abs(y1 - y2);\n x1 += a * start;\n y1 += b * start;\n x2 -= a * (1 - end);\n y2 -= b * (1 - end);\n }\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__x1.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__x1.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__x1.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\n let {\n sx3,\n sy3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n if(!isMulti) {\n x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[0] = Math.min(bbox[0], xb - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[1] = Math.min(bbox[1], yb - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[2] = Math.max(bbox[2], xb + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n bbox[3] = Math.max(bbox[3], yb + oy);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]], 2);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]], 3);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start >= end) {\n return [];\n }\n let i = 0, j = list.length - 1;\n if(start > 0) {\n i = getIndex(len.increase, start * len.total, i, j);\n }\n if(end < 1) {\n j = getIndex(len.increase, end * len.total, i, j);\n }\n list = util.clone(list);\n end *= len.total;\n let prePercent = 1;\n if(end > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[j + 1] = [current[1] - (1 - t) * a, current[1] - (1 - t) * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], res[3][0], res[3][1]];\n }\n }\n start *= len.total;\n if(start > len.increase[i]) {\n let prev = list[i].slice(list[i].length - 2);\n let current = list[i + 1];\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度\n if(i === j && prePercent !== 1) {\n l *= prePercent;\n }\n let diff = start - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[i] = [prev[0] + t * a, prev[1] + t * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], current[4], current[5]];\n }\n }\n if(j < list.length - 2) {\n list = list.slice(0, j + 2);\n }\n if(i > 0) {\n list = list.slice(i);\n }\n return list;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map((item, i) => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(c && c.length === 2) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from \"../../util/util\";\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n bbox[0] = Math.min(bbox[0], originX - ox);\n bbox[1] = Math.min(bbox[1], originY - oy);\n bbox[2] = Math.max(bbox[2], originX + width + ox);\n bbox[3] = Math.max(bbox[3], originY + height + oy);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - rx - ox;\n let xb = cx + rx + ox;\n let ya = cy - ry - oy;\n let yb = cy + ry + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\nimport inject from '../util/inject';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json && vars) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\nfunction replaceLibraryVars(json, hash, vars) {\n if(vars) {\n // 新版同级vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度\n if(Array.isArray(member) && member.length > 1 && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n let old = target[k];\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n }\n // 兼容老版var-\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n // 直接移除library插槽,防止下面调用replaceVars(json, vars)时报错\n delete json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // 替换图层的值必须是一个有tagName的对象\n if(!value || !value.tagName) {\n return;\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction linkLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n/**\n * 链接child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkChild(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props);\n child.children = libraryItem.children;\n child.library = libraryItem.library;\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n child.libraryId = null;\n // 规定图层实例化的属性和样式在init上,优先使用init,然后才取原型链的props\n let { init } = child;\n if(init) {\n let props = child.props = child.props || {};\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n child.init = null;\n }\n}\n\nfunction parse(karas, json, animateRecords, opt, hash = {}) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, hash);\n });\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkChild(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n json.libraryId = null;\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => {\n linkLibrary(item, hash);\n });\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n json.library = null;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n let style = props.style;\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n // 再替换静态属性,style也作为属性的一种,目前尚未被设计为被替换\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n let animationRecord;\n if(animate) {\n if(Array.isArray(animate)) {\n let has;\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n });\n if(has) {\n animationRecord = {\n animate,\n target: vd,\n };\n }\n }\n else {\n (opt.abbr !== false) && abbr2full(animate, abbrAnimate);\n let { value, options } = animate;\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n animationRecord = {\n animate,\n target: vd,\n };\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n }\n }\n // 产生实际动画运行才存入列表供root调用执行\n if(animationRecord) {\n animateRecords.push(animationRecord);\n }\n return vd;\n}\n\nexport default parse;\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\n\nlet o = {\n parse(karas, json, dom, options = {}) {\n json = util.clone(json);\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, data } = item;\n if(fontFamily && data) {\n font.register(fontFamily, data);\n }\n });\n }\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = dom || {};\n dom = null;\n }\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n animateRecords.forEach(item => {\n item.target = item.target.vd;\n });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(url);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n if(a || b || c) {\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n return res;\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './node/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport $$type from './util/$$type';\nimport builder from './util/builder';\nimport updater from './util/updater';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n return {\n tagName,\n props,\n children,\n $$type: $$type.TYPE_VD,\n };\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return {\n klass,\n props,\n $$type: $$type.TYPE_CP,\n };\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\n});\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_MEASURE","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","enums","Node","__x","__y","__ox","__oy","__width","__height","__baseLine","__config","i","lv","j","root","struct","diff","isLayout","__sx","__sy","x","ox","y","oy","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","calUnit","v","n","parseFloat","test","info","arial","lhr","blr","lgr","padding","f","verdana","tahoma","S","T","Z","c","t","georgia","simsun","support","fontFamily","hasOwnProperty","register","name","emSquare","ascent","descent","lineGap","addPadding","assign","position","gradient","img","identity","multiply","a","b","isE","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","inverse","inverse4","divisor","inv","det","m2m6","point2d","slice","dotProduct","x1","y1","x2","y2","crossProduct","H","Math","sqrt","vector","mx","h","deg","cos","sin","pointInPolygon","vertexes","xmax","ymax","xmin","ymin","len","max","min","pointInQuadrilateral","x4","y4","x3","y3","matrix","w1","w2","w3","w4","angleBySide","theta","pow","acos","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","list","floor","h2","d2r","abs","atan","rx","ry","p1","p2","p4","p3","push","concat","temp","res","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","isRectsInside","calCoordsInNode","px","py","node","computedStyle","width","height","calPercentInNode","ds","Infinity","PI","dt","r2d","bboxBezier2","x0","y0","minX","minY","maxX","maxY","tx","ty","sx","sy","qx","qy","bboxBezier3","cx","cy","bx","by","ax","ay","hx","hy","q","bboxBezier","arguments","norm","order","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","points","startT","endT","at","at3","p0","at2","bezierOrder","derivativeOrder","pointAtBezier","percent","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","start","reverse","pointOnCircle","getConicGradientImage","originX","originY","stop","data","Error","getAngle","dx","dy","increasingList","map","item","color","angle","factor","idx","canvasPolygon","ctx","Array","isArray","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","num","svgLine","canvasFilter","filter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","style","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","indexOf","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","ya","yb","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","xa","xb","ca","calBezierTopLeft","cb","controls1","controls2","limit","pop","endLength","oyr","calBezierTopRight","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","noRadius","target","prev","next","half","calBorderRadiusInline","contentBoxList","first","last","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","fillStyle","fill","closePath","virtualDom","bb","type","tagName","props","TYPE_VD","_","TYPE_GM","TYPE_CP","toString","isType","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","joinDef","joinVd","conClip","children","isMask","content","opacity","transform","visibility","mask","overflow","mixBlendMode","def","uuid","joinItem","rgba2int","charAt","parseInt","match","int2rgba","joinArr","int2invert","arr2hash","hash","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","proto","getPrototypeOf","Ctor","constructor","assignMatrix","isPrimitive","isAuto","flag","charWidth","ELLIPSIS","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","revertY","createTexture","tex","texture","bindTexture","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","drawTextureCache","vtPoint","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","Float32Array","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","texCache","tex1","tex2","spread","sigma","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","defaultFontFamilyData","key","message","debug","document","createElement","setAttribute","body","appendChild","canvas","draw","enabled","available","release","cacheCanvas","cacheWebgl","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","inject","measureText","textCache","html","lengths","chars","ff","fs","fw","inline","char","div","left","top","innerHTML","cns","childNodes","index","css","window","getComputedStyle","text","__measureCb","removeChild","measureTextSync","measureImg","url","state","success","task","Image","onload","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","checkSupportFontFamily","font","checked","context","textAlign","textBaseline","clearRect","fillText","getImageData","loadFont","FontFace","load","then","loadComponent","script","async","head","getLinearDeg","getRadialPosition","center","right","bottom","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","asin","parseGradient","reg","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","add","DOM","display","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","fontStyle","fontWeight","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","boxShadow","pointerEvents","whiteSpace","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","isValid","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","MEASURE","addGeom","ks","isIgnore","isGeom","isRepaint","isMeasure","MEASURE_KEY_SET","isMeasureInherit","measureInheritList","change","TRANSFORM_HASH","compatibleTransform","normalize","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","computeMeasure","isRoot","domParent","parentComputedStyle","getFontFamily","computeReflow","isHost","parent","rem","calNormalLineHeight","ph","setFontStyle","str","getBaseLine","normal","calRelativePercent","calRelative","isWidth","calAbsolute","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","TextBox","wList","__index","__content","__wList","cacheStyle","__endX","__endY","overFill","strokeText","baseLine","__parentLineBox","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","calDeg","pointIndex","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","ac","bc","AB","AC","BC","A","tar","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calOrigin","tfo","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","kernelSize","outerSize","outerSizeByD","gaussianWeight","E","_enums$NODE_KEY","genSingle","dbx","dby","Cache","__init","__bbox","__page","__pos","getCoords","__appendData","__enabled","setTransform","globalAlpha","update","__available","clear","del","ceil","getInstance","blur","isClip","cacheMask","tf","cacheOverflow","cacheFilter","drawCache","globalCompositeOperation","xe","ye","rect","old","newCache","nx","ny","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","value","getLevel","isReflow","isRebuild","Text","__textBoxes","__charWidthList","__charWidth","__textWidth","charWidthList","ffs","__ff","__key","wait","needMeasure","bp","__bp","pff","pffs","pfs","pfw","pKey","__pKey","parentCache","mw","__cache","lx","lineBoxManager","endSpace","lineClampCount","__sx1","__sy1","isDestroyed","textBoxes","beginSpace","maxW","needReduce","lastChar","ew","lineCount","isTextOverflow","__lineBack","textBox","addItem","cw","hasCache","needBack","setNewLine","__ellipsis","lineBox","tb","__offsetX","__offsetY","textWidth","__layout","lineWidth","strokeColor","strokeStyle","render","endX","endY","__cacheStyle","delRefreshTask","__task","addRefreshTask","__before","level","__addUpdate","__after","__style","matrixEvent","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","hasRegister","defineProperty","get","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","me","calBackgroundSize","calBackgroundPosition","container","renderImage","loadBgi","bx2","by2","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","I_NODE_CONFIG","I_ROOT_CONFIG","I_STYLE","I_ASSIGNING","__frameHook","framing","duration","es","offset","translatePath","calByUnit","calDiff","nm","pHash","nHash","keyHash","hasChange","nv","pv","pi","ni","has","pp","nn","clientWidth","eq","isArrP","isArrN","pz","nz","np","len2","pv2","nv2","len3","pv3","nv3","u","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_FRAME_CB","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_CAL_DIFF_TIME","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_OUT_BEGIN_DELAY","I_TIME_STAMP","Animation","__id","nl","__options","op","config","__frameCb","__calDiffTime","iterations","framesR","originStyle","fps","spfLimit","delay","endDelay","playbackRate","current","isFinish","__cancelTask","__currentProps","__currentStyle","isDelay","FRAME","PLAY","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","round","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","inset","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","getInlineBox","diffL","eyt","eyb","pbt","pbb","dom","getInlineWidth","contentBox","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__hasMask","__mpWidth","mp","__clientWidth","__clientHeight","__offsetWidth","__offsetHeight","__outerWidth","__outerHeight","onlyFixedValue","isDirectionRow","isDirectItem","__calMp","isVirtual","fromAbs","isShadowRoot","clearCache","__layoutData","__layoutNone","__mp","__isRealInline","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","nowrap","fixedWidth","fixedHeight","selfEndSpace","offsetWidth","offsetHeight","matrixCache","isScale","clientHeight","x5","x6","y5","y6","__calFilter","bg","bgI","item2","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","hasContent","__calContent","__calPerspective","__calMatrix","__releaseWhenEmpty","limitCache","__calCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","__gradient","isFirst","lastContentBox","lastLineBox","parentLineBox","countW","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","ec","dc","pc","cur","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","hostRoot","pJson","zChildren","zIndexChildren","__spreadBbox","LineBox","__list","__lineHeight","LineBoxManager","__lastX","__lastY","__maxX","__domList","__domStack","__isNewLine","__isEnd","__setLB","nextNewLine","genLineBox","verticalAlign","isNewLine","TAG_NAME","INLINE","BOLD","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","isAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMarginTB","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","firstCharWidth","main","isRow","__calMinMax","min2","max2","countMin","countMax","setNotEnd","__addMp","isFixed","isContent","fixedSize","__lineBoxManager","__preLayout","__ioSize","mergeMarginBottomList","mergeMarginTopList","isXom","isInlineBlock","isImg","reflow","__isIbFull","lastX","lastY","isNone","isEmptyBlock","tw","th","horizonAlign","__inlineSize","domList","__marginAuto","growList","shrinkList","basisList","maxList","minList","orderChildren","__calBasis","containerSize","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","__layoutFlexLine","maxCross","crossSum","crossSumList","between","around","__crossAlign","flexLine","hypotheticalSum","targetMainList","factorSum","factorList","needReset","factorSum2","lbmList","firstBaseLine","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isInline2","isInlineBlock2","focusNoWrap","fw2","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","needCalWidth","wl","hl","__computeMeasure","__deepScan","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","pts","arc","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","onList","__action","__mergeAuto","__on","timestamp","__set","MockPage","genUuid","MockCache","OP","FT","MBM","PPT","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","getCache","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","cacheTop","hasMask","genFilter","genMask","genOverflow","sbox","genFrameBufferWithTexture","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","applyOffscreen","origin","renderCacheCanvas","matrixList","parentMatrix","opacityList","parentOpacity","lastConfig","lastLv","mergeList","refreshLevel","hasRecordAsMask","needGen","maskStartHash","offscreenHash","renderCanvas","renderSvg","maskEffectHash","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","hasMbm","validMbm","isPerspective","limitHash","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","shift","cl","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","measureList","cacheList","zHash","zList","overwrite","focus","measure","removeDom","style2","keys2","hasMeasure","hasZ","hasVisibility","hasColor","hasDisplay","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","getPropertyValue","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","measureHash","__uniqueUpdateId","isInherit","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","startIndex","oldH","nowH","lastIndex","ns","reBuild","base","reBuildC","curveNum","limitStartEnd","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","buildCache","curve","bezierBox","concatPointAndControl","control","getLength","increase","getIndex","getNewList","prePercent","Polyline","__points","__controls","controls","isControl","rebuildSE","__getPoints","__renderPolygon","pointList","controlList","Polygon","getR","dft","Sector","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","replaceVars","vars","slot","member","replaceLibraryVars","linkLibrary","JSON","linkChild","libraryItem","library","libraryId","parse","animateRecords","opt","createGm","createCp","createVd","animationRecord","fonts","loadAndParse","components","imgs","list1","list3","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,WAAS,GAAG;AAChBC,EAAAA,QAAQ,EAAE,CADM;AAEhBC,EAAAA,OAAO,EAAE,CAFO;AAGhBC,EAAAA,GAAG,EAAE,CAHW;AAIhBC,EAAAA,KAAK,EAAE,CAJS;AAKhBC,EAAAA,MAAM,EAAE,CALQ;AAMhBC,EAAAA,IAAI,EAAE,CANU;AAOhBC,EAAAA,UAAU,EAAE,CAPI;AAQhBC,EAAAA,YAAY,EAAE,CARE;AAShBC,EAAAA,aAAa,EAAE,CATC;AAUhBC,EAAAA,WAAW,EAAE,CAVG;AAWhBC,EAAAA,WAAW,EAAE,EAXG;AAYhBC,EAAAA,aAAa,EAAE,EAZC;AAahBC,EAAAA,cAAc,EAAE,EAbA;AAchBC,EAAAA,YAAY,EAAE,EAdE;AAehBC,EAAAA,SAAS,EAAE,EAfK;AAgBhBC,EAAAA,WAAW,EAAE,EAhBG;AAiBhBC,EAAAA,KAAK,EAAE,EAjBS;AAkBhBC,EAAAA,UAAU,EAAE,EAlBI;AAmBhBC,EAAAA,WAAW,EAAE,EAnBG;AAoBhBC,EAAAA,WAAW,EAAE,EApBG;AAqBhBC,EAA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AAA,IAAI,EAAJA,IAxEU;AAyEVn4B,EAAAA,KAAK,EAALA,KAzEU;AA0EVluB,EAAAA,IAAI,EAAJA,IA1EU;AA2EV0L,EAAAA,MAAM,EAANA,MA3EU;AA4EV3X,EAAAA,KAAK,EAALA,KA5EU;AA6EV8/D,EAAAA,MAAM,EAANA,CA7EU;AA8EVvX,EAAAA,OAAO,EAAPA,OA9EU;AA+EVl5B,EAAAA,IAAI,EAAJA,IA/EU;AAgFVmM,EAAAA,OAAO,EAAPA,OAhFU;AAiFVq8B,EAAAA,OAAO,EAAPA,OAjFU;AAkFVhM,EAAAA,OAAO,EAAPA,OAlFU;AAmFV/gE,EAAAA,KAAK,EAALA,KAnFU;;EAoFV,IAAI0rB,KAAJ,CAAU1oB,CAAV,EAAa;AACX0oB,IAAAA,KAAK,CAACrI,IAAN,GAAa,CAAC,CAACrgB,CAAf,CAAA;AACD,GAAA;;AAtFS,EAAZ;AAyFA0tC,OAAO,CAACvB,GAAR,CAAY;AACVvB,EAAAA,GAAG,EAAHA,GADU;AAEVC,EAAAA,GAAG,EAAHA,GAFU;AAGVC,EAAAA,GAAG,EAAHA,GAHU;AAIVC,EAAAA,IAAI,EAAJA,IAJU;AAKVC,EAAAA,SAAS,EAATA,SAAAA;AALU,CAAZ,CAAA,CAAA;;AAQA,IAAG,OAAOhgB,MAAP,KAAkB,WAArB,EAAkC;EAChCA,MAAM,CAACq/C,KAAP,GAAeA,OAAf,CAAA;AACD,CAFD,MAGK,IAAG,OAAO58C,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAAC48C,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"} \ No newline at end of file +{"version":3,"file":"index.es.js","sources":["src/util/enums.js","src/node/Node.js","src/node/mode.js","src/style/unit.js","src/style/font.js","src/style/reg.js","src/math/matrix.js","src/math/vector.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/util/$$type.js","src/util/util.js","src/util/debug.js","src/node/textCache.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.js","src/style/gradient.js","src/style/reset.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/style/css.js","src/node/TextBox.js","src/refresh/Page.js","src/math/tar.js","src/math/index.js","src/style/transform.js","src/math/blur.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.js","src/util/Event.js","src/node/Component.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/inline.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/abbr.js","src/parser/parse.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n // GEOM\n FILL: 87,\n STROKE: 88,\n STROKE_WIDTH: 89,\n STROKE_DASHARRAY: 90,\n STROKE_DASHARRAY_STR: 91,\n STROKE_LINECAP: 92,\n STROKE_LINEJOIN: 93,\n STROKE_MITERLIMIT: 94,\n FILL_RULE: 95,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 96,\n BORDER_TOP: 97,\n BORDER_RIGHT: 98,\n BORDER_BOTTOM: 99,\n BORDER_LEFT: 100,\n TRANSLATE_PATH: 101,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_MEASURE: 3,\n UPDATE_COMPONENT: 4,\n UPDATE_OVERWRITE: 5,\n UPDATE_KEYS: 6,\n UPDATE_LIST: 7,\n UPDATE_CONFIG: 8,\n UPDATE_ADD_DOM: 9,\n UPDATE_REMOVE_DOM: 10,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseLine = 0;\n this.__config = {};\n // 默认undefined\n // this.__prev = undefined;\n // this.__next = undefined;\n // this.__parent = undefined;\n // this.__domParent = undefined;\n // this.__root = undefined;\n // this.__host = undefined;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\n }\n\n __offsetX(diff, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += diff;\n }\n\n __destroy() {\n this.__config[NODE_IS_DESTROYED] = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__config[NODE_IS_DESTROYED];\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return [n, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n return [n, o.NUMBER];\n },\n};\n\nexport default o;\n","'use strict';\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n // 个别字符误差,初次之外误差还有根据经验得的比例系数,https://github.com/karasjs/karas/issues/145\n padding: {\n 1: 1,\n f: 0.9,\n },\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n padding: {\n S: 1,\n T: 1,\n Z: 1,\n c: 1,\n f: 0.7,\n i: 1,\n l: 1,\n t: 0.9,\n },\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n padding: {\n f: 0.5,\n },\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n padding: {\n f: 0.5,\n },\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily);\n },\n register(name, info) {\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 67, padding = {} } = info || {};\n this.info[name.toLowerCase()] = {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n padding,\n };\n },\n addPadding(name, padding) {\n Object.assign(this.info[name.toLowerCase()].padding, padding);\n },\n};\n\no.info['宋体'] = o.info.simsun;\n\nexport default o;\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwh%]*)|(left|top|right|bottom|center)){1,2}/ig,\n // tfo: /((-?[\\d.]+(px|%)?)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i];\n let a1 = a[i + 4];\n let a2 = a[i + 8];\n let a3 = a[i + 12];\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let [xmax, ymax] = vertexes[0];\n let [xmin, ymin] = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let [x, y] = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n // 所有向量积均为非负数说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let [x1, y1] = vertexes[i];\n let [x2, y2] = vertexes[(i + 1) % len];\n if(crossProduct(x2 - x1, y2 - y1, x - x1, y - y1) < 0) {\n return false;\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInPolygon(x, y, [\n [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return [\n (a * x1 + b * x2 + c * x3) / (a + b + c),\n (a * y1 + b * y2 + c * y3) / (a + b + c),\n ];\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n * @param a\n * @param b\n */\nfunction isRectsOverlap(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n * @param a\n * @param b\n */\nfunction isRectsInside(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = {} } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + oy];\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let [x1, y1] = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.min(maxX, qx);\n maxY = Math.min(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = (-bx + hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = (-by + hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n if(arguments.length === 4) {\n return [x0, y0, x1, y1];\n }\n if(arguments.length === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(arguments.length === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param order 阶次, 2 和 3\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, order, startT = 0, endT = 1) {\n let derivativeFunc = t => norm(at(t, points, order));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n else {\n // 3阶导数就是常数了,大于3阶的都是0\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n else {\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\nfunction at(t, points, bezierOrder, derivativeOrder = 1) {\n if(bezierOrder === 2) {\n return at2(t, points, derivativeOrder);\n }\n else if(bezierOrder === 3) {\n return at3(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, order, percent, maxIteration, eps) {\n let length = bezierLength(points, order, 0, 1);\n return pointAtBezierWithLength(points, order, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, order, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points, order));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, order, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, order, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, order, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return [\n x - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\n}\n\nexport default {\n pointInPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointOnCircle,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","function canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n ctx.moveTo(list[start][0] + dx, list[start][1] + dy);\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let s = 'M' + list[start][0] + ',' + list[start][1];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'hue-rotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1]\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","// 类型为引用防止json仿造\nconst TYPE_VD = { _: 1 };\nconst TYPE_GM = { _: 2 };\nconst TYPE_CP = { _: 3 };\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\n","import $$type from './$$type';\nimport mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = ``;\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 4) {\n color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n color = color.map(c => Math.floor(c));\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(matrix && !mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n [x, y, , w] = mx.calPoint([x, y], matrix);\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n bbox = [xa, ya, xb, yb];\n }\n else if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n return t;\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n extendAnimate,\n transformBbox,\n assignMatrix,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","export default {\n list: [], // 每次渲染前的更新后,等待测量的文字对象列表\n data: {}, // Text中存入的特殊等待测量的信息,字体+字号+粗细为key\n charWidth: {}, // key的文字宽度hash\n padding: {}, // key的文字宽度偏移,少量字体的少量文字有\n ELLIPSIS: '…',\n};\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl([x, y, z, w], cx, cy, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, z * w, w];\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n // gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, -1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\n vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\n record[0]++;\n });\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\n });\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param texCache\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param cx\n * @param cy\n * @param spread\n * @param d\n * @param sigma\n */\nfunction drawBlur(gl, program, frameBuffer, texCache, tex1, tex2, i, j, width, height, cx, cy, spread, d, sigma) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height - spread], cx, cy);\n let [x2, y1] = convertCoords2Gl([width - spread, spread], cx, cy);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, i, m) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, i);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.programOverflow, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, program) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMbm(gl, program, i, j, W, H) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n};\n","import util from './util';\nimport debug from './debug';\nimport textCache from '../node/textCache';\nimport font from '../style/font';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nlet defaultFontFamilyData;\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\n\nlet inject = {\n measureText() {\n let { list, data } = textCache;\n let html = '';\n let keys = [];\n let lengths = [];\n let chars = [];\n Object.keys(data).forEach(key => {\n let { ff, fs, fw, s } = data[key];\n if(s) {\n keys.push(key);\n lengths.push(s.length);\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n for(let i = 0, len = s.length; i < len; i++) {\n let char = s.charAt(i);\n chars.push(char);\n html += `${char.replace(/`;\n }\n data[key].s = '';\n }\n });\n if(!html) {\n return;\n }\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let { charWidth } = textCache;\n let count = 0, index = 0, key;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n if(count === 0) {\n key = keys[index];\n }\n if(++count === lengths[index]) {\n index++;\n count = 0;\n }\n let char = chars[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n let css = window.getComputedStyle(node, null);\n charWidth[key][char] = parseFloat(css.width);\n }\n list.forEach(text => text.__measureCb());\n textCache.list = [];\n textCache.data = {};\n if(!debug.flag) {\n document.body.removeChild(div);\n }\n },\n measureTextSync(key, ff, fs, fw, char) {\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n let html = `${char}${char}${char}`;\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let w1 = parseFloat(window.getComputedStyle(cns[0], null).width);\n let w2 = parseFloat(window.getComputedStyle(cns[1], null).width);\n return w1 * 2 - w2;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag) {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(window);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(window);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === 'arial') {\n return true;\n }\n if(!font.info.hasOwnProperty(ff)) {\n return false;\n }\n if(font.info[ff].hasOwnProperty('checked')) {\n return font.info[ff].checked;\n }\n let canvas = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px arial';\n context.fillText('a', 8, 8);\n canvas.draw();\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + ff;\n context.fillText('a', 8, 8);\n canvas.draw();\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return font.info[ff].checked = true;\n }\n }\n return font.info[ff].checked = false;\n },\n loadFont(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let f = new FontFace(url, `url(${url})`);\n f.load().then(function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }).catch(function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n });\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../node/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n PERCENT,\n ];\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else {\n list.push([item[0], p[0] / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else {\n cy = y1 + positionY[0];\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n if(size[4] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[4];\n r = Math.max(xl, yl);\n // 看旋转\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n if(!isNil(points[5])) {\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n let v = gradient[2].match(/([-+]?[\\d.]+[pxremvwh%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwh%]+)?/ig) || [];\n o.v = v.map(item => {\n let color = /((?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\)))/i.exec(item);\n let arr = [rgba2int(color[1])];\n let percent = /[-+]?[\\d.]+[pxremvwh%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root) {\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root) {\n let w = x2 - x1;\n let h = y2 - y1;\n let [cx, cy, r, xl, yl, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n res.forEach(item => {\n v.children.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ],\n });\n });\n return ctx.add(v);\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n let clip = ctx.add(v);\n res.forEach(item => {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","const DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: '#000',\n borderRightColor: '#000',\n borderBottomColor: '#000',\n borderLeftColor: '#000',\n borderTopStyle: 'solid',\n borderRightStyle: 'solid',\n borderBottomStyle: 'solid',\n borderLeftStyle: 'solid',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nlet DOM_ENTRY_SET = [];\nlet DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet GEOM_ENTRY_SET = [];\nlet GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet INHERIT = {\n fontFamily: 'arial',\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 1,\n textStrokeOver: 'none',\n};\n\nlet INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwh%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwh%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwh%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwh%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwh%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwh%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR],\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\n};\n","import reset from '../style/reset';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { INHERIT } = unit;\nconst { STYLE_KEY } = enums;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\nconst MEASURE = {\n [STYLE_KEY.FONT_SIZE]: true,\n [STYLE_KEY.FONT_WEIGHT]: true,\n [STYLE_KEY.FONT_FAMILY]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\n MEASURE,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n};\n\no.isIgnore = function(k) {\n return IGNORE.hasOwnProperty(k);\n};\nfunction isGeom(tagName, k) {\n return GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n}\no.isGeom = isGeom;\no.isRepaint = function(k) {\n return REPAINT.hasOwnProperty(k) || isGeom(k);\n};\no.isMeasure = function(k) {\n return MEASURE.hasOwnProperty(k);\n};\no.isValid = function(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n};\n\nlet MEASURE_KEY_SET = o.MEASURE_KEY_SET = Object.keys(MEASURE).map(i => parseInt(i));\nlet len = MEASURE_KEY_SET.length;\no.isMeasureInherit = function(target) {\n if(target) {\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n return true;\n }\n }\n }\n return false;\n};\no.measureInheritList = function(target) {\n let list = [];\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n list.push(k);\n }\n }\n return list;\n};\n\no.addGeom('$line', ['x1', 'y1', 'x2', 'y2', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end']);\n\nexport default o;\n","import unit from './unit';\nimport font from './font';\nimport gradient from './gradient';\nimport reg from './reg';\nimport reset from './reset';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\n\nconst { STYLE_KEY, STYLE_RV_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, calUnit } = unit;\nconst { isNil, rgba2int, equalArr } = util;\nconst { MEASURE_KEY_SET, isGeom, GEOM, GEOM_KEY_SET } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = DEG;\n }\n }\n}\n\n/**\n * 将传入的手写style标准化,并且用reset默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param reset 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, reset = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(!isNil(v) && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n reset.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n if(reg.img.test(item)) {\n return reg.img.exec(item)[2];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [gradient.parseGradient(temp)];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [reg.img.exec(temp)[2]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\n }\n }\n temp = style.backgroundColor;\n if(temp) {\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), RGBA];\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(!isNil(temp)) {\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n PERCENT,\n ];\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwh%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0] === 'contain' || match[0] === 'cover') {\n match[1] = match[0];\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(!isNil(v)) {\n res[STYLE_KEY[style2Upper(k)]] = [rgba2int(v), RGBA];\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(!isNil(v)) {\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push([MATRIX, [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]]);\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, arr]);\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push([ROTATE_3D, arr]);\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push([k2, arr]);\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(!isNil(temp)) {\n let arr = calUnit(temp);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, PERCENT]);\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp) {\n let arr = temp.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n res[ROTATE_3D] = arr;\n }\n }\n temp = style.opacity;\n if(!isNil(temp)) {\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n if(v === 'auto') {\n v = [0, AUTO];\n }\n else {\n v = calUnit(v);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(!isNil(temp)) {\n if(temp === 'content') {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, AUTO];\n }\n }\n temp = style.order;\n if(!isNil(temp)) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[COLOR] = [[], INHERIT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp || temp === 0) {\n if(temp === 'inherit') {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_OVER] = [0, INHERIT];\n }\n else {\n let v = temp.toString();\n if(v !== 'none' && v !== 'fill') {\n v = 'none';\n }\n res[TEXT_STROKE_OVER] = [v, STRING];\n }\n }\n temp = style.fontWeight;\n if(!isNil(temp)) {\n if(temp === 'bold') {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(temp === 'normal') {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(temp === 'lighter') {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(temp === 'inherit') {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_STYLE] = [0, INHERIT];\n }\n else {\n res[FONT_STYLE] = [temp, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.textAlign;\n if(temp) {\n if(temp === 'inherit') {\n res[TEXT_ALIGN] = [0, INHERIT];\n }\n else {\n res[TEXT_ALIGN] = [temp, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp) {\n if(temp === 'inherit') {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, STRING];\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[FILL] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [gradient.parseGradient(temp)];\n }\n else {\n res[FILL] = [rgba2int(temp)];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[STROKE] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [gradient.parseGradient(temp)];\n }\n else {\n res[STROKE] = [rgba2int(temp)];\n }\n }\n temp = style.strokeWidth;\n if(!isNil(temp)) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(!isNil(temp)) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = item.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = temp.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n temp = style.filter;\n if(temp !== undefined) {\n let match = (temp || '').toString().match(/\\b[\\w-]+\\s*\\(\\s*[-+]?[\\d.]+\\s*[pxremvwhdg%]*\\s*\\)\\s*/ig);\n let f = null;\n if(match) {\n f = [];\n match.forEach(item => {\n let m2 = /([\\w-]+)\\s*\\(\\s*([-+]?[\\d.]+\\s*[pxremvwhdg%]*)\\s*\\)\\s*/i.exec(item);\n if(m2) {\n let k = m2[1].toLowerCase(), v = calUnit(m2[2]);\n if(k === 'blur') {\n if(v[0] <= 0 || [DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n f.push([k, v]);\n }\n else if(k === 'hue-rotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push([k, v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = PERCENT;\n f.push([k, v]);\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp) {\n if(temp === 'inherit') {\n res[VISIBILITY] = [0, INHERIT];\n }\n else {\n res[VISIBILITY] = [temp, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp) {\n if(temp === 'inherit') {\n res[POINTER_EVENTS] = [0, INHERIT];\n }\n else {\n res[POINTER_EVENTS] = [temp, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\n let match = (temp || '').match(/([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(((transparent)|(#[0-9a-f]{3,8})|(rgba?\\(.+?\\)))\\s*)?(inset|outset)?\\s*,?/ig);\n if(match) {\n match.forEach(item => {\n let boxShadow = /([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(?:((?:transparent)|(?:#[0-9a-f]{3,8})|(?:rgba?\\(.+\\)))\\s*)?(inset|outset)?/i.exec(item);\n if(boxShadow) {\n bs = bs || [];\n let res = [];\n // v,h,blur,spread,color,inset\n for(let i = 0; i < 4; i++) {\n let v = calUnit(boxShadow[i + 1]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 1 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n res.push(rgba2int(boxShadow[5]));\n res.push(boxShadow[6] || 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = style[k];\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n res[STYLE_KEY[style2Upper(k)]] = Array.isArray(v) ? v : [v];\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\n/**\n * 第一次和REFLOW等级下,刷新前首先执行,生成computedStyle\n * 影响文字测量的只有字体和大小和重量,需要提前处理\n * 继承相关的计算\n * @param node 对象节点\n * @param isRoot 是否是根节点,无继承需使用默认值\n */\nfunction computeMeasure(node, isRoot) {\n let { currentStyle, computedStyle, domParent } = node;\n let parentComputedStyle = !isRoot && domParent.computedStyle;\n MEASURE_KEY_SET.forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v[1] === INHERIT) {\n computedStyle[k] = getFontFamily(isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k]);\n }\n else {\n computedStyle[k] = getFontFamily(v[0]);\n }\n }\n else if(v[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.height * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\n }\n });\n}\n\n/**\n * 每次布局前需要计算的reflow相关的computedStyle\n * @param node 对象节点\n * @param isHost 是否是根节点或组件节点这种局部根节点,无继承需使用默认值\n */\nfunction computeReflow(node, isHost) {\n let { currentStyle, computedStyle, domParent: parent, root } = node;\n let rem = root.computedStyle[FONT_SIZE];\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.computedStyle;\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n if(item[1] === PX) {\n computedStyle[k] = item[0];\n }\n else if(item[1] === REM) {\n computedStyle[k] = item[0] * rem;\n }\n else if(item[1] === VW) {\n computedStyle[k] = item[0] * root.width * 0.01;\n }\n else if(item[1] === VH) {\n computedStyle[k] = item[0] * root.height * 0.01;\n }\n else {\n computedStyle[k] = 0;\n }\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n // 防止为0\n else if(lineHeight[1] === PX) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === PERCENT) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * fontSize * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === REM) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * rem, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VW) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.width * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VH) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.height * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // normal或auto\n else {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing[1] === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else if(letterSpacing[1] === PERCENT) {\n computedStyle[LETTER_SPACING] = fontSize * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === REM) {\n computedStyle[LETTER_SPACING] = rem * letterSpacing[0];\n }\n else if(letterSpacing[1] === VW) {\n computedStyle[LETTER_SPACING] = root.width * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === VH) {\n computedStyle[LETTER_SPACING] = root.height * 0.01 * letterSpacing[0];\n }\n else {\n computedStyle[LETTER_SPACING] = letterSpacing[0];\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\n }\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE];\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + (style[FONT_FAMILY] || 'arial');\n}\n\nfunction getFontFamily(str) {\n let ff = str.split(',');\n let f = 'arial';\n for(let i = 0, len = ff.length; i < len; i++) {\n if(font.support(ff[i])) {\n f = ff[i];\n break;\n }\n }\n return f;\n}\n\nfunction getBaseLine(style) {\n let fontSize = style[FONT_SIZE];\n let ff = getFontFamily(style[FONT_FAMILY]);\n let normal = fontSize * (font.info[ff] || font.info.arial).lhr;\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info.arial).blr;\n}\n\nfunction calNormalLineHeight(style) {\n let ff = getFontFamily(style[FONT_FAMILY]);\n return style[FONT_SIZE] * (font.info[ff] || font.info.arial).lhr;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n return v;\n}\n\nfunction calAbsolute(currentStyle, k, v, size, root) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER, DEG, RGBA, STRING].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n v = v[0] * size * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * root.height * 0.01;\n }\n return v;\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\n }\n if(k === BACKGROUND_SIZE) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equalArr(a, b);\n }\n return a === b;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [COLOR]: true,\n [TEXT_STROKE_COLOR]: true,\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\n};\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n // 可能为null\n if(item && item.k) {\n return util.clone(item);\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变\n // 可能非法为空\n if(item && item.k) {\n return util.clone(item);\n }\n // 颜色\n else {\n return item.slice(0);\n }\n });\n }\n else if(k === TRANSFORM || k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\n }\n }\n return res;\n}\n\nexport default {\n normalize,\n computeMeasure,\n computeReflow,\n setFontStyle,\n getFontFamily,\n getBaseLine,\n calRelative,\n calAbsolute,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n};\n","import mode from './mode';\nimport css from '../style/css';\nimport enums from '../util/enums';\nimport util from '../util/util';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, wList) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n this.__width = w;\n this.__height = h;\n this.__content = content;\n this.__wList = wList;\n this.__virtualDom = {};\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, wList, width } = this;\n let { ox, oy } = parent;\n y += css.getBaseLine(computedStyle);\n x += ox + dx;\n y += oy + dy;\n this.__endX = x + width;\n this.__endY = y;\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n if(overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content.charAt(i), x, y);\n }\n if(!overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n x += wList[i] + letterSpacing;\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', x],\n ['y', y],\n ['fill', cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n props.push(['stroke', cacheStyle[TEXT_STROKE_COLOR]]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseLine() {\n return this.parent.baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get wList() {\n return this.__wList;\n }\n}\n\nexport default TextBox;\n","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.offscreen.canvas;\n }\n\n get ctx() {\n return this.offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, sy3], n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport geom from './geom';\n\nexport default {\n matrix,\n tar,\n geom,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n }\n else if(k === ROTATE_Y) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n }\n else if(k === ROTATE_Z) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r[0]);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let [k, v] = item;\n let t = identity();\n calSingle(t, k, v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\n });\n return res;\n}\n\nfunction calOrigin(transformOrigin, w, h, root) {\n let tfo = [];\n transformOrigin.forEach((item, i) => {\n if(item[1] === PX) {\n tfo.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n tfo.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n tfo.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n tfo.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n tfo.push(item[0] * root.height * 0.01);\n }\n });\n return tfo;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calOrigin,\n calMatrixByPerspective,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\nimport mx from '../math/matrix';\nimport blur from '../math/blur';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n DISPLAY,\n VISIBILITY,\n },\n NODE_KEY: {\n NODE_OPACITY,\n NODE_CACHE,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_HAS_CONTENT,\n NODE_COMPUTED_STYLE,\n },\n} = enums;\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用\nfunction genSingle(cache, message) {\n let { size, sx1, sy1, width, height, bbox } = cache;\n let offscreen = inject.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bbox;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let [x, y] = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始x1/y1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.update = true;\n }\n\n clear() {\n if(this.available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.enabled) {\n this.clear();\n this.page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.enabled) {\n this.clear();\n return;\n }\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get canvas() {\n return this.page.canvas;\n }\n\n get ctx() {\n return this.page.ctx;\n }\n\n get size() {\n return this.page.size;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean, draw()}}\n */\n static genFilter(cache, filter) {\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n let { x, y, size, canvas, sx1, sy1, width, height, bbox } = cache;\n bbox = bbox.slice(0);\n bbox[0] -= d;\n bbox[1] -= d;\n bbox[2] += d;\n bbox[3] += d;\n let offscreen = inject.getCacheCanvas(width + d * 2, height + d * 2, null, 'filter1');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.draw();\n offscreen.bbox = bbox;\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.sx1 = sx1 - d;\n offscreen.sy1 = sy1 - d;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width + d * 2;\n offscreen.height = height + d * 2;\n return offscreen;\n }\n\n static genMask(target, next, isClip, transform, tfo) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n while(next && (next.isMask)) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n let __config = item.__config;\n let cacheOverflow = __config[NODE_CACHE_OVERFLOW], cacheFilter = __config[NODE_CACHE_FILTER], cache = __config[NODE_CACHE];\n let source = cacheOverflow && cacheOverflow.available && cacheOverflow;\n if(!source) {\n source = cacheFilter && cacheFilter.available && cacheFilter;\n }\n if(!source) {\n source = cache && cache.available && cache;\n }\n if(source) {\n ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(\n source, cacheMask,\n __config[NODE_COMPUTED_STYLE][TRANSFORM],\n mx.identity(),\n __config[NODE_COMPUTED_STYLE][TRANSFORM_ORIGIN].slice(0),\n inverse\n );\n }\n // 没有内容或者img没加载成功导致没有内容,有内容且可见则是超限,不可能进这里\n else if(__config[NODE_HAS_CONTENT]\n && __config[NODE_COMPUTED_STYLE][DISPLAY] !== 'none'\n && __config[NODE_COMPUTED_STYLE][VISIBILITY] !== 'hidden') {\n inject.error('CacheMask is oversize');\n }\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n cacheMask.draw(ctx);\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { sx, sy, outerWidth, outerHeight } = node;\n let xe = sx + outerWidth;\n let ye = sy + outerHeight;\n if(bbox[0] < sx || bbox[1] < sy || bbox[2] > xe || bbox[3] > ye) {\n let cacheOverflow = genSingle(target, 'overflow');\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n cacheOverflow.draw(ctx);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(sx - bbox[0], sy - bbox[1], outerWidth, outerHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n /**\n * bbox变化时直接用老的cache内容重设bbox\n * @param cache\n * @param bbox\n */\n static updateCache(cache, bbox) {\n let old = cache.bbox;\n if(!util.equalArr(bbox, old)) {\n let dx = old[0] - bbox[0];\n let dy = old[1] - bbox[1];\n let newCache = Cache.getInstance(bbox);\n if(newCache && newCache.enabled) {\n let { x: ox, y: oy, canvas, width, height } = cache;\n let { x: nx, y: ny } = newCache;\n newCache.sx1 = cache.sx1;\n newCache.sy1 = cache.sy1;\n newCache.dx = cache.dx + dx;\n newCache.dy = cache.dy + dy;\n newCache.dbx = cache.dbx + dx;\n newCache.dby = cache.dby + dy;\n newCache.ctx.drawImage(canvas, ox, oy, width, height, dx + nx, dy + ny, width, height);\n newCache.__available = true;\n cache.release();\n return newCache;\n }\n }\n else {\n return cache;\n }\n }\n\n static drawCache(source, target, transform, matrix, tfo, inverse) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n }\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport mode from './mode';\nimport css from '../style/css';\nimport font from '../style/font';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport textCache from './textCache';\nimport inject from '../util/inject';\nimport Cache from '../refresh/Cache';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_STYLE,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_MEASURE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n} = enums;\n\nconst ELLIPSIS = textCache.ELLIPSIS;\nconst AUTO = unit.AUTO;\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidthList = [];\n this.__charWidth = 0;\n this.__textWidth = 0;\n }\n\n /**\n * 预先计算每个字的宽度,在每次布局渲染前做\n * @param renderMode\n * @param ctx\n * @private\n */\n __computeMeasure(renderMode, ctx) {\n let { content, computedStyle, charWidthList } = this;\n // 每次都要清空重新计算,计算会有缓存\n charWidthList.splice(0);\n let ffs = computedStyle[FONT_FAMILY].split(',');\n let ff = 'arial';\n for(let i = 0, len = ffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(ffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n this.__ff = ff;\n let fs = computedStyle[FONT_SIZE];\n let fw = computedStyle[FONT_WEIGHT];\n let key = this.__key = computedStyle[FONT_SIZE] + ',' + ff + ',' + fw;\n let wait = textCache.data[key] = textCache.data[key] || {\n ff,\n fs,\n fw,\n hash: {},\n s: '',\n };\n let cache = textCache.charWidth[key] = textCache.charWidth[key] || {};\n let sum = 0;\n let needMeasure = false;\n // text-overflow:ellipse需要,即便没有也要先测量,其基于最近非inline父节点的字体\n let bp = this.domParent;\n while(bp.currentStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let parentComputedStyle = bp.computedStyle;\n let pff = 'arial';\n for(let i = 0, pffs = parentComputedStyle[FONT_FAMILY].split(','), len = pffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(pffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n let pfs = parentComputedStyle[FONT_SIZE];\n let pfw = parentComputedStyle[FONT_WEIGHT];\n let pKey = this.__pKey = pfs + ',' + pff + ',' + pfw;\n let parentCache = textCache.charWidth[pKey] = textCache.charWidth[pKey] || {};\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(renderMode === mode.WEBGL) {\n ctx = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__').ctx;\n }\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n ctx.font = css.setFontStyle(parentComputedStyle);\n parentCache[ELLIPSIS] = ctx.measureText(ELLIPSIS).width;\n }\n ctx.font = css.setFontStyle(computedStyle);\n }\n else if(renderMode === mode.SVG) {\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n parentCache[ELLIPSIS] = 0;\n let wait = textCache.data[pKey] = textCache.data[pKey] || {\n ff: pff,\n fs: pfs,\n fw: pfw,\n hash: {},\n s: '',\n };\n wait.s += ELLIPSIS;\n needMeasure = true;\n }\n }\n // 逐字测量,canvas可瞬间得到信息,svg先预存统一进行\n for(let i = 0, length = content.length; i < length; i++) {\n let char = content.charAt(i);\n let mw;\n if(cache.hasOwnProperty(char)) {\n mw = cache[char];\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n mw = cache[char] = ctx.measureText(char).width;\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else {\n if(!wait.hash.hasOwnProperty(char)) {\n wait.s += char;\n }\n wait.hash[char] = true;\n // 先预存标识位-1,测量完后替换它\n charWidthList.push(-1);\n needMeasure = true;\n }\n }\n this.__textWidth = sum;\n if(needMeasure) {\n textCache.list.push(this);\n }\n }\n\n __measureCb() {\n let { content, charWidthList } = this;\n let key = this.__key;\n let cache = textCache.charWidth[key];\n let sum = 0;\n for(let i = 0, len = charWidthList.length; i < len; i++) {\n if(charWidthList[i] < 0) {\n let mw = charWidthList[i] = cache[content.charAt(i)];\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n }\n this.__textWidth = sum;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layout(data) {\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, lx = x, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0 } = data;\n this.__x = this.__sx1 = x;\n this.__y = this.__sy1 = y;\n let { isDestroyed, content, currentStyle, computedStyle, textBoxes, charWidthList, root, __ff, __key } = this;\n textBoxes.splice(0);\n let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\n // 空内容w/h都为0可以提前跳出\n if(isDestroyed || currentStyle[DISPLAY] === 'none' || !content) {\n return lineClampCount;\n }\n this.__ox = this.__oy = 0;\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let begin = 0;\n let i = 0;\n let beginSpace = x - lx; // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n let count = beginSpace;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n } = computedStyle;\n // 特殊字体中特殊字符连续时需减少一定的padding量\n let padding = font.info[__ff].padding;\n let needReduce = !!padding;\n let lastChar;\n let ew = textCache.charWidth[this.__pKey][ELLIPSIS];\n let lineCount = 0;\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow;\n // block的overflow:hidden和textOverflow:clip/ellipsis才生效,inline要看最近非inline父元素\n let bp = this.__bp;\n let {\n [DISPLAY]: display,\n [OVERFLOW]: overflow,\n [WIDTH]: width,\n [TEXT_OVERFLOW]: textOverflow,\n } = bp.currentStyle;\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n while(i < length) {\n count += charWidthList[i] + letterSpacing;\n if(count > w) {\n // block/flex无需宽度,inline-block需要设置宽度才生效\n if(display === 'block' || display === 'flex') {\n isTextOverflow = true;\n }\n else if(width[1] !== AUTO) {\n isTextOverflow = true;\n }\n break;\n }\n i++;\n }\n }\n else {\n while(i < length) {\n count += charWidthList[i++] + letterSpacing;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n }\n // 默认clip跟随overflow:hidden,无需感知\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, count - beginSpace, lineHeight,\n content, charWidthList);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n maxW = count - beginSpace;\n y += lineHeight;\n }\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let cw = charWidthList[i] + letterSpacing;\n count += cw;\n // 连续字符减少padding,除了连续还需判断char是否在padding的hash中\n if(needReduce) {\n let char = content[i];\n if(char === lastChar && padding.hasOwnProperty(char) && padding[char]) {\n let hasCache, p = textCache.padding[__key] = textCache.padding[__key] || {};\n if(textCache.padding.hasOwnProperty(__key)) {\n if(p.hasOwnProperty(char)) {\n hasCache = true;\n count -= p[char];\n }\n }\n if(!hasCache) {\n let n = 0;\n if(root.renderMode === mode.CANVAS) {\n root.ctx.font = css.setFontStyle(computedStyle);\n let w1 = root.ctx.measureText(char).width;\n let w2 = root.ctx.measureText(char + char).width;\n n = w1 * 2 - w2;\n n *= padding[char];\n }\n else if(root.renderMode === mode.SVG) {\n n = inject.measureTextSync(__key, __ff, fontSize, fontWeight, char);\n n *= padding[char];\n }\n count -= n;\n p[char] = n;\n }\n }\n lastChar = char;\n }\n // 忽略零宽字符\n if(cw === 0) {\n i++;\n continue;\n }\n // 换行都要判断i不是0的时候,第1个字符强制不换行\n if(count === w) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n let textBox;\n // 特殊情况,恰好最后一行最后一个排满,此时查看末尾mpb,要防止i为0的情况首个字符特殊不回退,无需看开头mpb\n if(i === length - 1 && count > w - endSpace && i) {\n count -= charWidthList[i--];\n }\n i++;\n if(!lineCount) {\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, count);\n }\n // 必须先添加再设置y,当有diff的lineHeight时,第一个换行不影响,再换行时第2个换行即第3行会被第1行影响\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null; // 换行后连续字符reduce不生效重新计数\n }\n // 奇怪的精度问题,暂时不用相等判断,而是为原本w宽度加一点点冗余1e-10\n else if(count > w + (1e-10)) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n // 普通非多行文本阶段逻辑\n let width;\n // 宽度不足时无法跳出循环,至少也要塞个字符形成一行,无需判断第1行,因为是否放得下逻辑在dom中做过了,\n // 如果第1行放不下,一定会另起一行,此时作为开头再放不下才会进这里,这个if只有0或1个字符的情况\n if(i <= begin) {\n width = count;\n }\n // 超过2个字符回退1个\n else {\n width = count - charWidthList[i--];\n }\n i++;\n // 根据是否第一行分开处理行首空白\n let textBox;\n if(!lineCount) {\n maxW = width - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, width);\n }\n // 必须先添加再设置y,同上\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null;\n }\n else {\n i++;\n }\n }\n // 换行后Text的x重设为lx\n if(!lineCount) {\n this.__x = this.__sx1 = lx;\n }\n // 最后一行,只有一行未满时也进这里,需查看末尾mpb,排不下回退一个字符\n // 声明了lineClamp时特殊考虑,这里一定是最后一行,要对比行数不能超过,超过忽略掉这些文本\n if(begin < length && (!lineClamp || lineCount + lineClampCount < lineClamp)) {\n let textBox;\n if(!lineCount) {\n let needBack;\n // 防止开头第一个begin=0时回退,这在inline有padding且是第一个child时会发生\n if(begin && count > w - endSpace) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n else {\n let needBack;\n // 防止begin在结尾时回退,必须要有个字符,这在最后一行1个字符排不下时会出现\n if(count > w - endSpace && begin < length - 1) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n maxW = Math.max(maxW, count);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n }\n }\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseLine = css.getBaseLine(computedStyle);\n return lineCount;\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount, lineHeight, lx, x, y, maxW,\n textBoxes, content, charWidthList, lineBoxManager) {\n for(; i >= begin; i--) {\n count -= charWidthList[i] + letterSpacing;\n if(count + ew + endSpace <= w) {\n // 至少1个字符不用回退,到0也没找到需要回退\n if(i) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n break;\n }\n }\n }\n // 最后也没找到,看是否要查找前一个inline节点,还是本身是行首兜底首字母\n if(i < 0) {\n let lineBox = lineBoxManager.lineBox;\n // lineBox为空是行首,至少放1个字符\n if(!lineBox.size) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.charAt(begin), charWidthList.slice(begin, begin + 1));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n }\n // 向前查找inline节点,可能会有前面inline嵌套,因此直接用lineBox,不会出现inlineBlock,\n // 这里和css不同,ib强制超限换行不会同行\n else {\n let list = lineBox.list;\n outer:\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n let { content, wList, width } = tb;\n // 整体减去可以说明可能在这个tb中,只要最后发现不是空文本节点就行,否则继续;第0个强制进入保证1字符\n if(count - width + ew <= w || !j) {\n // 找到可以跳出outer循环,找不到继续,注意第0个且1个字符判断\n for(let k = wList.length - 1; k >= 0; k--) {\n if(!k && !j || count + ew <= w) {\n tb.__content = content;\n tb.__width = width;\n tb.parent.__ellipsis = true;\n break outer;\n }\n else {\n let w2 = wList[k];\n tb.__endY -= w2;\n width -= w2;\n content = content.slice(0, k);\n count -= w2;\n wList.pop();\n }\n }\n }\n // 不够则看前一个tb并且删掉这个\n else {\n count -= width;\n }\n list.pop();\n tb.parent.textBoxes.pop();\n }\n }\n }\n return [y, maxW];\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__sx1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__sy1 += diff;\n }\n\n __tryLayInline(w) {\n return w - this.charWidthList[0];\n }\n\n __inlineSize() {\n let minX, maxX;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n minX = Math.min(minX, item.x);\n maxX = Math.max(maxX, item.x + item.width);\n }\n else {\n minX = item.x;\n maxX = item.x + item.width;\n }\n });\n this.__x = minX;\n this.__sx = this.__sx1 = minX + this.ox;\n this.__width = maxX - minX;\n }\n\n __calMaxAndMinWidth() {\n let n = 0;\n this.charWidthList.forEach(item => {\n n = Math.max(n, item);\n });\n return { max: this.textWidth, min: n };\n }\n\n __calAbsWidth(x, y, w) {\n this.__layout({\n x,\n y,\n w,\n }, true);\n return this.width;\n }\n\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __ellipsis, __bp, __config } = this;\n if(renderMode === mode.SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === mode.WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\n }\n if(__cache && __cache.enabled) {\n __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += -sx + __cache.x;\n dy += -sy + __cache.y;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let strokeColor = cacheStyle[TEXT_STROKE_COLOR];\n if(ctx.strokeStyle !== strokeColor) {\n ctx.strokeStyle = strokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === mode.SVG) {\n this.virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n // textOverflow的省略号font使用最近非inline的父节点\n if(__ellipsis) {\n let last = textBoxes[textBoxes.length - 1];\n let { endX, endY } = last;\n let computedStyle = __bp.computedStyle;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = __bp.__cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n ctx.fillText(ELLIPSIS, endX, endY);\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', endX],\n ['y', endY],\n ['fill', __bp.__cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n this.virtualDom.children.push({\n type: 'item',\n tagName: 'text',\n props,\n content: ELLIPSIS,\n });\n }\n }\n }\n\n __deepScan(cb) {\n cb(this);\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidthList() {\n return this.__charWidthList;\n }\n\n get charWidth() {\n return this.__charWidth;\n }\n\n get firstCharWidth() {\n return this.charWidthList[0] || 0;\n }\n\n get textWidth() {\n return this.__textWidth;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get root() {\n return (this.domParent || {}).root;\n }\n\n get currentStyle() {\n return (this.domParent || {}).currentStyle;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return (this.domParent || {}).computedStyle;\n }\n\n get cacheStyle() {\n return (this.domParent || {}).__cacheStyle;\n }\n\n get bbox() {\n let { sx, sy, width, height, computedStyle: { [TEXT_STROKE_WIDTH]: textStrokeWidth = 0 } } = this;\n textStrokeWidth *= 0.5;\n return [sx - textStrokeWidth, sy - textStrokeWidth, sx + width + textStrokeWidth, sy + height + textStrokeWidth];\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get matrix() {\n return this.domParent.matrix;\n }\n\n get matrixEvent() {\n return this.domParent.matrixEvent;\n }\n}\n\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\n","import util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasUpdate) {\n return;\n }\n cp.__hasUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must implement render()');\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseLine',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__calMp',\n '__calAbs',\n '__renderAsMask',\n '__renderByMask',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n '__deepScan',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { PERCENT, NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, NUMBER]],\n ];\n let tfo = transform.calOrigin([[0, PERCENT], [0, PERCENT]], w, h);\n tfo[0] += x;\n tfo[1] += y;\n return transform.calMatrixWithOrigin(list, tfo, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport unit from './unit';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { AUTO, PX, PERCENT, STRING, REM, VW, VH } = unit;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr, method = 'fill', isInline) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction calBackgroundSize(value, w, h, root) {\n let res = [];\n value.forEach((item, i) => {\n if(item[1] === PX) {\n res.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n res.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n res.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n res.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n res.push(item[0] * root.height * 0.01);\n }\n else if(item[1] === AUTO) {\n res.push(-1);\n }\n else if(item[1] === STRING) {\n res.push(item[0] === 'contain' ? -2 : -3);\n }\n });\n return res;\n}\n\nfunction calBackgroundPosition(position, container, size, root) {\n if(Array.isArray(position)) {\n if(position[1] === PX) {\n return position[0];\n }\n else if(position[1] === PERCENT) {\n return (container - size) * position[0] * 0.01;\n }\n else if(position[1] === REM) {\n return position[0] * root.computedStyle[FONT_SIZE];\n }\n else if(position[1] === VW) {\n return position[0] * root.width * 0.01;\n }\n else if(position[1] === VH) {\n return position[0] * root.height * 0.01;\n }\n }\n return 0;\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, isInline) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = bx1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_X][i], bgW, w, xom.root);\n let bgY = by1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_Y][i], bgH, h, xom.root);\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeat-x', 'repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeat-y', 'repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = [bx1, by1];\n let p2 = [bx2, by2];\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n calBackgroundSize,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || (!task.length && !taskCp.length)) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n style[k] = target.currentStyle[k];\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵\nfunction inherit(frames, keys, target) {\n let computedStyle = target.computedStyle;\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.outerWidth;\n let oh = target.outerHeight;\n let m = tf.calMatrix(v, ow, oh);\n style[k] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => calUnit(item));\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,忽视顺序按hash计算,为空视为默认值,如blur默认0,brightness默认1\n let pHash = {}, nHash = {}, keyHash = {};\n if(p) {\n p.forEach(item => {\n keyHash[item[0]] = true;\n pHash[item[0]] = item[1];\n });\n }\n if(n) {\n n.forEach(item => {\n keyHash[item[0]] = true;\n nHash[item[0]] = item[1];\n })\n }\n let v = {}, hasChange;\n // 只有blur支持px/rem/vw/vh,其余都是特殊固定单位\n Object.keys(keyHash).forEach(k => {\n if(k === 'blur') {\n if(!pHash[k]) {\n v[k] = nHash[k].slice(0);\n hasChange = true;\n }\n else if(!nHash[k]) {\n v[k] = [-pHash[k][0], pHash[k][1]];\n hasChange = true;\n }\n else {\n let v2 = calByUnit(pHash[k], nHash[k], 0, target.root);\n v[k] = [v2, pHash[k][1]];\n hasChange = true;\n }\n }\n else if(k === 'hue-rotate') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let nv = isNil(nHash[k]) ? 100 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 100 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'grayscale') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n });\n if(!hasChange) {\n return;\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || isString(pi) || isString(ni)) {\n res[1].push(null);\n continue;\n }\n if(pi.k !== ni.k) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n // 渐变\n if(pi.k === 'linear' || pi.k === 'radial' || pi.k === 'conic') {\n let pv = pi.v;\n let nv = ni.v;\n temp[0] = [];\n let { clientWidth } = target;\n let eq = equalArr(pv, nv);\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\n }\n else {\n let v = calByUnit(a[1], b[1], clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n // 线性渐变有角度差值变化\n if(pi.k === 'linear') {\n let isArrP = Array.isArray(pi.d);\n let isArrN = Array.isArray(ni.d);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n let v = [ni.d[0] - pi.d[0], ni.d[1] - pi.d[1], ni.d[2] - pi.d[2], ni.d[3] - pi.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n else {\n let v = ni.d - pi.d;\n if(eq && v === 0) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n }\n // 径向渐变的位置\n else if(pi.k === 'radial') {\n let isArrP = Array.isArray(pi.z);\n let isArrN = Array.isArray(ni.z);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n temp[2] = [];\n for(let i = 0; i < 5; i++) {\n let pz = pi.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = ni.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n if(eq && equalArr(res[4], [0, 0, 0, 0, 0])) {\n res[1].push(null);\n }\n }\n else {\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = pi.p[i];\n let np = ni.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n else if(pi.k === 'conic') {\n temp[1].push(n.d - p.d);\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && res[2] !== 0 && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n // 纯色\n else {\n if(equalArr(n, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n n = n[0];\n p = p[0];\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res[1] = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n res[1].push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res[1] = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure') {\n return;\n }\n else {\n res[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\n }\n });\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n // 将已有的样式按key存入引用来操作\n let hash = {};\n st.forEach(item => {\n hash[item[0]] = item[1];\n });\n Object.keys(v).forEach(k => {\n if(hash.hasOwnProperty(k)) {\n hash[k][0] += v[k][0] * percent;\n }\n else {\n // 2个关键帧中有1个未声明,需新建样式存入\n if(k === 'blur' || k === 'hue-rotate' || k === 'grayscale') {\n let n = v[k].slice(0);\n n[0] *= percent;\n st.push([k, n]);\n }\n // 默认值是1而非0\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let n = v[k].slice(0);\n n[0] = 100 + n[0] * percent;\n st.push([k, n]);\n }\n }\n });\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let [c, d, p, z] = v2;\n if(GRADIENT_TYPE.hasOwnProperty(st2.k)) {\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[k];\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] += n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] += item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] += n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nlet uuid = 0;\n\nconst I_ASSIGNING = 0;\nconst I_IN_FPS = 1;\nconst I_IS_DELAY = 2;\nconst I_BEGIN = 3;\nconst I_END = 4;\nconst I_FINISHED = 5;\nconst I_NEXT_END = 6;\nconst I_FIRST_PLAY = 7;\nconst I_FRAME_CB = 8;\nconst I_PLAY_CB = 9;\nconst I_TARGET = 10;\nconst I_ROOT = 11;\nconst I_FRAMES = 12;\nconst I_FRAMES_R = 13;\nconst I_CURRENT_TIME = 14;\nconst I_NEXT_TIME = 15;\nconst I_STYLE = 16;\nconst I_DURATION = 17;\nconst I_ITERATIONS = 18;\nconst I_FILL = 19;\nconst I_PLAYBACK_RATE = 20;\nconst I_PLAY_COUNT = 21;\nconst I_PLAY_STATE = 22;\nconst I_DESTROYED = 23;\nconst I_START_TIME = 24;\nconst I_FPS_TIME = 25;\nconst I_EASING = 26;\nconst I_ENTER_FRAME = 27;\nconst I_DELAY = 28;\nconst I_END_DELAY = 29;\nconst I_KEYS = 30;\nconst I_ORIGIN_STYLE = 31;\nconst I_CURRENT_FRAMES = 32;\nconst I_CURRENT_FRAME = 33;\nconst I_SPF_LIMIT = 34;\nconst I_FPS = 35;\nconst I_DIRECTION = 36;\nconst I_CAL_DIFF_TIME = 37;\nconst I_FIRST_ENTER = 38;\nconst I_STAY_BEGIN = 39;\nconst I_STAY_END = 40;\nconst I_IS2 = 41;\nconst I_END_TIME = 42;\nconst I_NODE_CONFIG = 43;\nconst I_ROOT_CONFIG = 44;\nconst I_OUT_BEGIN_DELAY = 45;\nconst I_TIME_STAMP = 46;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n false, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n this.__frameCb,\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n this.__calDiffTime,\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let [frames, framesR, keys, originStyle] = this.__init(list, iterations, duration, op.easing, target);\n config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_TRANSITION] = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n __frameCb(__config, diff, isDelay) {\n this.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n this.emit(Event.PLAY);\n }\n if(isFunction(__config[I_PLAY_CB])) {\n __config[I_PLAY_CB].call(this, diff, isDelay);\n __config[I_PLAY_CB] = null;\n }\n }\n\n __calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n __config[I_NEXT_TIME] += diff;\n return [v, diff];\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = __config[I_PLAY_COUNT];\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = __config[I_CAL_DIFF_TIME](__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效\n if(playCount === 0 && currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧,仅首轮\n if(playCount === 0) {\n currentTime -= delay;\n }\n if(currentTime === 0 || __config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n __config[I_NEXT_TIME] -= duration;\n playCount = ++__config[I_PLAY_COUNT];\n __config[I_BEGIN] = true;\n round = true;\n }\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n this.__clean(true);\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n __config[I_FRAME_CB].call(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += __config[I_DELAY];\n }\n // 超过一轮去掉delay\n if(v > duration + __config[I_DELAY]) {\n v -= __config[I_DELAY];\n }\n // 超过时间长度需要累加次数\n __config[I_PLAY_COUNT] = 0;\n while(v > duration && __config[I_PLAY_COUNT] < __config[I_ITERATIONS] - 1) {\n __config[I_PLAY_COUNT]++;\n v -= duration;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = __config[I_PLAY_COUNT] % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_ITERATIONS];\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\n }\n}\n\nexport default Animation;\n","import mode from '../node/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h) {\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0 && (sigma > 0 || spread > 0)) {\n if(renderMode === mode.CANVAS | renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__config[NODE_DEFS_CACHE].push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__config[NODE_DEFS_CACHE].push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n 'color-dodge': true,\n 'color-burn': true,\n 'hard-light': true,\n 'soft-light': true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(mbmName(v));\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseLine\n * @param lineHeight\n * @param diffL\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, contentBoxList, start, end, lineBox, baseLine, lineHeight, diffL, isStart, isEnd,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let eyt = 0, eyb = 0;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n eyt = paddingTop;\n eyb = paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n eyt = paddingTop + borderTopWidth;\n eyb = paddingBottom + borderBottomWidth;\n }\n // 同y的border伸展范围,其影响border渲染\n let pbt = paddingTop + borderTopWidth;\n let pbb = paddingBottom + borderBottomWidth;\n // inline的baseLine和lineBox的差值\n let diff = lineBox.baseLine - baseLine;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseLine对齐后计算的\n let x1 = start.x;\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n dom = dom.domParent;\n }\n let bx1 = x1;\n if(isStart) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n bx1 -= paddingLeft + borderLeftWidth;\n }\n let y1 = lineBox.y + diff - eyt;\n let by1 = lineBox.y + diff - pbt;\n let x2 = end.x + end.outerWidth;\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n let bx2 = x2;\n if(isEnd) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x2 += paddingRight;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x2 += paddingRight + borderRightWidth;\n }\n bx2 += paddingRight + borderRightWidth;\n }\n let y2 = lineBox.y + diff + lineHeight - diffL + eyb;\n let by2 = lineBox.y + diff + lineHeight - diffL + pbb;\n // x要考虑xom的ox值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList) {\n let sum = 0;\n let length = contentBoxList.length;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n sum += contentBox.width;\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n if(contentBox === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import Node from './Node';\nimport mode from './mode';\nimport Component from './Component';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport blur from '../math/blur';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport Cache from '../refresh/Cache';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport inline from './inline';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n }\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, REM, VW, VH, DEG } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil } = util;\nconst { calRelative } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d } = mx;\n\nconst {\n contain,\n NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n} = level;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__config[NODE_IS_INLINE]) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = {}; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = {}; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = {}; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__isClip = !!this.props.clip;\n let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__mpWidth(currentStyle[a], w);\n computedStyle[b] = this.__mpWidth(currentStyle[b], w);\n });\n }\n\n __mpWidth(mp, w) {\n if(mp[1] === PX) {\n return mp[0];\n }\n else if(mp[1] === PERCENT) {\n return mp[0] * w * 0.01;\n }\n else if(mp[1] === REM) {\n return mp[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(mp[1] === VW) {\n return mp[0] * this.root.width * 0.01;\n }\n else if(mp[1] === VH) {\n return mp[0] * this.root.height * 0.01;\n }\n return 0;\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n\n // 换算margin/padding为px单位,onlyFixedValue只考虑绝对值,不考虑百分比等\n __calMp(v, w, onlyFixedValue) {\n let n = 0;\n if(v[1] === PX) {\n n += v[0];\n }\n else if(v[1] === PERCENT && !onlyFixedValue) {\n v[0] *= w * 0.01;\n v[1] = PX;\n n += v[0];\n }\n else if(v[1] === REM) {\n n += v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n n += v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n n += v[0] * this.root.height * 0.01;\n }\n return n;\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMp(isDirectionRow, w, currentStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w, !isDirectItem)\n + this.__calMp(marginRight, w, !isDirectItem)\n + this.__calMp(paddingLeft, w, !isDirectItem)\n + this.__calMp(paddingRight, w, !isDirectItem);\n if(borderLeftWidth[1] === PX) {\n mp += borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n mp += borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n mp += borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n mp += borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n mp += borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n mp += borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n mp += borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n mp += borderRightWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n else {\n let mp = this.__calMp(marginTop, w, !isDirectItem)\n + this.__calMp(marginBottom, w, !isDirectItem)\n + this.__calMp(paddingTop, w, !isDirectItem)\n + this.__calMp(paddingBottom, w, !isDirectItem);\n if(borderTopWidth[1] === PX) {\n mp += borderTopWidth[0];\n }\n else if(borderTopWidth[1] === REM) {\n mp += borderTopWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderTopWidth[1] === VW) {\n mp += borderTopWidth[0] * this.root.width * 0.01;\n }\n else if(borderTopWidth[1] === VH) {\n mp += borderTopWidth[0] * this.root.height * 0.01;\n }\n if(borderBottomWidth[1] === PX) {\n mp += borderBottomWidth[0];\n }\n else if(borderBottomWidth[1] === REM) {\n mp += borderBottomWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderBottomWidth[1] === VW) {\n mp += borderBottomWidth[0] * this.root.width * 0.01;\n }\n else if(borderBottomWidth[1] === VH) {\n mp += borderBottomWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n return res;\n }\n\n // absolute且无尺寸时,isVirtual标明先假布局一次计算尺寸,还有flex列计算时\n // fromAbs为absolute节点特有省略计算标识,本节点是abs时真正布局传入\n __layout(data, isVirtual, fromAbs) {\n css.computeReflow(this, this.isShadowRoot);\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config } = this;\n let {\n [DISPLAY]: display,\n } = computedStyle;\n let {\n [WIDTH]: width,\n [POSITION]: position,\n } = currentStyle;\n this.clearCache();\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n };\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = false;\n // 防止display:none不统计mask,isVirtual忽略,abs布局后续会真正来走一遍\n if(!isVirtual) {\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.isMask && next && (next.isMask)) {\n let count = 0;\n while(next) {\n if(next.isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\n if(isDestroyed || display === 'none') {\n this.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n return;\n }\n // margin/padding在abs前已经计算过了,无需二次计算\n if(!fromAbs) {\n this.__mp(currentStyle, computedStyle, w);\n }\n // inline的width/height无效,其它有效\n if(width[1] !== AUTO) {\n if(this.__isRealInline() && currentStyle[DISPLAY] === 'inline') {\n width[0] = 0;\n width[1] = AUTO;\n }\n else {\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n }\n let lineClampCount = 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n this.__layoutFlex(data, isVirtual);\n }\n else if(display === 'inlineBlock' || display === 'inline-block') {\n lineClampCount = this.__layoutInline(data, isVirtual);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isVirtual, true);\n }\n else {\n this.__layoutBlock(data, isVirtual);\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let { [TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left } = currentStyle;\n let { parent } = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if(right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if(position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\n x = this.__sx1 = x + computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.width;\n x = this.__sx5 = x + computedStyle[PADDING_RIGHT];\n this.__sx6 = x + computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.height;\n y = this.__sy5 = y + computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + computedStyle[BORDER_BOTTOM_WIDTH];\n }\n computedStyle[WIDTH] = this.width;\n computedStyle[HEIGHT] = this.height;\n // abs布局的不执行,在__layoutAbs末尾做,防止未布局没有尺寸从而动画计算错误\n if(!fromAbs) {\n this.__execAr();\n }\n return lineClampCount;\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\n computedStyle[MARGIN_TOP]\n = computedStyle[MARGIN_RIGHT]\n = computedStyle[MARGIN_BOTTOM]\n = computedStyle[MARGIN_LEFT]\n = computedStyle[PADDING_TOP]\n = computedStyle[PADDING_RIGHT]\n = computedStyle[PADDING_BOTTOM]\n = computedStyle[PADDING_LEFT]\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, nowrap, lineBoxManager, endSpace = 0 } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width[1] !== AUTO) {\n fixedWidth = true;\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n else if(height[1] !== AUTO) {\n fixedHeight = true;\n switch(height[1]) {\n case PX:\n h = height[0];\n break;\n case PERCENT:\n h *= height[0] * 0.01;\n break;\n case REM:\n h = height[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n h = height[0] * this.root.width * 0.01;\n break;\n case VH:\n h = height[0] * this.root.height * 0.01;\n break;\n }\n }\n // margin/padding/border影响x和y和尺寸,注意inline的y不受mpb影响\n x += borderLeftWidth + marginLeft + paddingLeft;\n data.x = x;\n if(!isInline) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mpb,其一定是block和inline互斥\n if(!isInline) {\n if(width[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n nowrap,\n endSpace,\n selfEndSpace,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')\n && (width[1] !== AUTO || this.tagName === 'img') && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = currentStyle[TRANSLATE_X];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n x = v - (computedStyle[TRANSLATE_X] || 0);\n computedStyle[TRANSLATE_X] = v;\n computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = currentStyle[TRANSLATE_Y];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetHeight * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n y = v - (computedStyle[TRANSLATE_Y] || 0);\n computedStyle[TRANSLATE_Y] = v;\n computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n z = v - (computedStyle[TRANSLATE_Z] || 0);\n computedStyle[TRANSLATE_Z] = v;\n computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n computedStyle[TRANSFORM_ORIGIN] = tf.calOrigin(currentStyle[TRANSFORM_ORIGIN], offsetWidth, offsetHeight, this.root);\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(currentStyle[TRANSFORM]) {\n matrix = tf.calMatrix(currentStyle[TRANSFORM], offsetWidth, offsetHeight, this.root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete computedStyle[k];\n let v = currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n computedStyle[k] = [v[0], v[1], v[2], v[3][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 0) {\n return;\n }\n if(v[1] === PERCENT) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * offsetWidth * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * offsetHeight * 0.01;\n }\n }\n else if(v[1] === REM) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n }\n else if(v[1] === VW) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n }\n else if(v[1] === VH) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n }\n temp.push([k, v]);\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, offsetWidth, offsetHeight, this.root);\n }\n }\n computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = computedStyle[TRANSFORM];\n let tfo = computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += sx1 || 0;\n tfo[1] += sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox' || backgroundClip === 'content-box') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\n if(isInline && !this.contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n computedStyle[BACKGROUND_SIZE] = (currentStyle[BACKGROUND_SIZE] || []).map(item => {\n return bg.calBackgroundSize(item, bx2 - bx1, by2 - by1, this.root);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = computedStyle[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE].slice(0);\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[BACKGROUND_IMAGE];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = BACKGROUND_IMAGE;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi;\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\n });\n }\n return true;\n }\n else if(!isInline && bgi.k) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n computedStyle[BOX_SHADOW] = (currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n let v = item2[0];\n if(item2[1] === PERCENT) {\n if(i % 2 === 0) {\n v *= 0.01 * (bx2 - bx1);\n }\n else {\n v *= 0.01 * (by2 - by1);\n }\n }\n else if(item2[1] === REM) {\n v = v * this.root.computedStyle[FONT_SIZE];\n }\n else if(item2[1] === VW) {\n v = v * this.root.width * 0.01;\n }\n else if(item2[1] === VH) {\n v = v * this.root.height * 0.01;\n }\n return v;\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(computedStyle[k] = currentStyle[k][0]);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.contentBoxList, currentStyle, computedStyle, this.root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(offsetWidth, offsetHeight, currentStyle, computedStyle, this.root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === INHERIT) {\n computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n computedStyle[FONT_STYLE] = currentStyle[FONT_STYLE][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n if(currentStyle[COLOR][1] === INHERIT) {\n computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : [0, 0, 0, 1];\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n else if(isNil(__cacheStyle[COLOR])) {\n computedStyle[COLOR] = rgba2int(currentStyle[COLOR][0]);\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n if(currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : [0, 0, 0, 1];\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n computedStyle[TEXT_STROKE_COLOR] = rgba2int(currentStyle[TEXT_STROKE_COLOR][0]);\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : 0;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = currentStyle[TEXT_STROKE_WIDTH];\n if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : 'none';\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = currentStyle[TEXT_STROKE_OVER][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === INHERIT) {\n computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n computedStyle[POINTER_EVENTS] = currentStyle[POINTER_EVENTS][0];\n }\n __cacheStyle[POINTER_EVENTS] = computedStyle[POINTER_EVENTS];\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = 0;\n if(v[1] === REM) {\n ppt = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n ppt = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n ppt = v[0] * this.root.height * 0.01;\n }\n else {\n ppt = v[0];\n }\n computedStyle[PERSPECTIVE] = ppt;\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n computedStyle[PERSPECTIVE_ORIGIN] = tf.calOrigin(currentStyle[PERSPECTIVE_ORIGIN], this.offsetWidth, this.offsetHeight, this.root);\n }\n if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\n return computedStyle[FILTER] = (currentStyle[FILTER] || []).map(item => {\n let [k, v] = item;\n // 部分%单位的滤镜强制使用数字\n if(v[1] === PX || v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n return [k, v];\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\n let visibility = currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][3] > 0) {\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT],\n paddingTop = computedStyle[PADDING_TOP], paddingRight = computedStyle[PADDING_RIGHT],\n paddingBottom = computedStyle[PADDING_BOTTOM], paddingLeft = computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]][0][3] > 0) {\n return true;\n }\n }\n let bs = currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && (item[2] > 0 || item[3] > 0)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @param lv\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否开启缓存\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT才会进入这里,清空bbox\n this.__bbox = null;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList);\n ih = lineHeight;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n let uuid = gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseLine,再减去lineBox的baseLine得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n let ff = css.getFontFamily(fontFamily);\n let baseLine = css.getBaseLine(computedStyle);\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - diffL\n let diffL = fontSize * (font.info[ff].lgr || 0);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0, countW = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseLine, lineHeight, diffL, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n countW += w;\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n count++;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseLine, lineHeight, diffL, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0]);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR]);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR]);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR]);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR]);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n root.delRefreshTask(this.__loadBgi.cb);\n root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\n this.clearCache();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.isClip;\n let hasEmitMask;\n while(next && next.isMask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, computedStyle } = this;\n if(computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd);\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.cx, gd.cy, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.cx],\n ['cy', gd.cy],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { cx, cy, r, deg, stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n else if(renderMode === SVG) {\n let offset = 0.5;\n let prev;\n // 根据2个stop之间的百分比得角度差划分块数,每0.5°一块,不足也算\n let list = [];\n for(let i = 0, len = stop.length; i < len - 1; i++) {\n let begin = stop[i][1] * 360;\n let end = stop[i + 1][1] * 360;\n let diff = end - begin;\n let n = Math.ceil(diff);\n let per = diff / n;\n // 计算每块的2个弧端点\n let bc = stop[i][0];\n let ec = stop[i + 1][0];\n let dc = [ec[0] - bc[0], ec[1] - bc[1], ec[2] - bc[2], ec[3] - bc[3]];\n let pc = [dc[0] / n, dc[1] / n, dc[2] / n, dc[3] / n];\n for(let j = 0; j < n; j++) {\n let [x1, y1] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg - offset);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg + offset);\n list.push([\n x1, y1,\n x2, y2,\n Math.round(bc[0] + pc[0] * j),\n Math.round(bc[1] + pc[1] * j),\n Math.round(bc[2] + pc[2] * j),\n Math.round(bc[3] + pc[3] * j),\n ]);\n }\n }\n // 最后一段补自己末尾颜色特殊处理\n let end = list[0].slice(0);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, deg);\n end[2] = x2;\n end[3] = y2;\n let s = stop[stop.length - 1][0];\n end[4] = s[0];\n end[5] = s[1];\n end[6] = s[2];\n end[7] = s[3];\n list.push(end);\n for(let i = 0, len = list.length; i < len; i++) {\n let cur = list[i];\n if(prev) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', prev[0]],\n ['y1', prev[1]],\n ['x2', cur[2]],\n ['y2', cur[3]],\n ],\n children: [\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([prev[4], prev[5], prev[6], prev[7]])],\n ['offset', '0%'],\n ],\n },\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([cur[4], cur[5], cur[6], cur[7]])],\n ['offset', '100%'],\n ],\n },\n ],\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n res.push([[[cx, cy], [prev[0], prev[1]], [cur[2], cur[3]]], 'url(#' + uuid + ')']);\n }\n prev = cur;\n }\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\n return animation;\n }\n this.animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(util.isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n __computeMeasure(renderMode, ctx, cb) {\n css.computeMeasure(this);\n if(util.isFunction(cb)) {\n cb(this);\n }\n }\n\n __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative/margin/flex/vertical等\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData.y += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n }\n\n __resizeX(diff, lv) {\n this.computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData.w += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n this.computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __spreadBbox(boxShadow) {\n let ox = 0, oy = 0;\n if(Array.isArray(boxShadow)) {\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, , inset] = item;\n if(inset !== 'inset') {\n let d = blur.outerSize(sigma);\n d += spread;\n ox = Math.max(ox, x + d);\n oy = Math.max(oy, y + d);\n }\n });\n }\n return [ox, oy];\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\n }\n\n getComputedStyle(key) {\n let computedStyle = this.computedStyle;\n let res = {};\n let keys;\n if(key) {\n if(Array.isArray(key)) {\n keys = key;\n }\n else {\n keys = [key];\n }\n keys = keys.map(s => {\n return STYLE_KEY[style2Upper(s)];\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect() {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent } = this;\n let p1 = point2d(mx.calPoint([__sx1, __sy1], matrixEvent));\n let p2 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1], matrixEvent));\n let p3 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1 + offsetHeight], matrixEvent));\n let p4 = point2d(mx.calPoint([__sx1, __sy1 + offsetHeight], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n let zChildren = domParent.zIndexChildren;\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(i === -1 || j === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n zChildren.splice(j, 1);\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(util.isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, clientWidth, clientHeight,\n currentStyle: {\n [BORDER_TOP_WIDTH]: borderTopWidth = [0],\n [BORDER_RIGHT_WIDTH]: borderRightWidth = [0],\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth = [0],\n [BORDER_LEFT_WIDTH]: borderLeftWidth = [0],\n [BOX_SHADOW]: boxShadow = [],\n } = {},\n } = this;\n let [ox, oy] = this.__spreadBbox(boxShadow);\n clientWidth += borderLeftWidth[0] + borderRightWidth[0];\n clientHeight += borderTopWidth[0] + borderBottomWidth[0];\n this.__bbox = [__sx1 - ox, __sy1 - oy, __sx1 + clientWidth + ox, __sy1 + clientHeight + oy];\n }\n return this.__bbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseLine() {\n return this.offsetHeight;\n }\n\n get firstBaseLine() {\n return this.offsetHeight;\n }\n\n get isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n}\n\nexport default Xom;\n","import enums from '../util/enums';\nimport TextBox from './TextBox';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_LEFT,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_RIGHT_WIDTH,\n MARGIN_RIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseLine,inlineBlock等节点按最后一行baseLine\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseLine) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseLine\n this.__baseLine = baseLine;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign() {\n let n = this.baseLine;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseLine发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n let m = item.baseLine;\n if(m !== n) {\n item.__offsetY(n - m);\n }\n });\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseLine,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseLine = Math.max(b, this.__baseLine);\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n return this.lineHeight;\n }\n\n get baseLine() {\n let baseLine = 0;\n this.list.forEach(item => {\n baseLine = Math.max(baseLine, item.baseLine);\n });\n return Math.max(this.__baseLine, baseLine);\n }\n\n get lineHeight() {\n let lineHeight = 0;\n // 只有TextBox和InlineBlock\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return Math.max(this.__lineHeight, lineHeight);\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseLine) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__maxX = x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseLine = baseLine;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n setLbOrGenLineBoxByInline(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n let lineBox;\n let list = this.list;\n if(this.__isNewLine) {\n lineBox = new LineBox(x, y, lineHeight, baseLine);\n list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n else {\n let length = list.length;\n lineBox = list[length - 1];\n lineBox.__setLB(l, b);\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox;\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n this.__maxX = Math.max(this.__maxX, o.x + o.outerWidth);\n return lineBox;\n }\n\n horizonAlign(w, textAlign) {\n this.list.forEach(lineBox => {\n let diff = w - lineBox.width;\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n lineBox.__offsetX(diff);\n lineBox.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n });\n }\n\n verticalAlign() {\n this.list.forEach(lineBox => {\n lineBox.verticalAlign();\n });\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n return n + list[length - 1].baseLine;\n }\n return 0;\n }\n\n get firstBaseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseLine;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.currentStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMarginTB(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[0];\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMarginTB,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport mode from './mode';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n FONT_WEIGHT,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n // PERSPECTIVE,\n // TRANSFORM,\n },\n NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n UPDATE_MEASURE,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH } = unit;\nconst { calAbsolute, isRelativeOrAbsolute } = css;\n\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.isMask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n inlineBlock: true,\n 'inline-block': true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = util.extend({}, this.__style);\n this.__children = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n child.__config[NODE_STRUCT][STRUCT_CHILD_INDEX] = i;\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + child[STRUCT_TOTAL] + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\n })\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param w 剩余宽度\n * @param total 容器尺寸\n * @returns {number|*}\n * @private\n */\n __tryLayInline(w, total) {\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n w = first.__tryLayInline(w, total);\n }\n else {\n w -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(w < 0) {\n return w;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n w = item.__tryLayInline(w, total);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n w -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n }\n // 还要减去开头的mpb\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto等对齐用\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n // 记得偏移LineBox\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n // item的递归子节点求min/max,只考虑固定值单位,忽略百分比,同时按方向和display\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h, lineBoxManager } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n else {\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n else if(display === 'block') {\n let countMin = 0, countMax = 0;\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n else {\n if(display === 'inlineBlock' || display === 'inline-block') {\n lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n if(isDirectionRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else if(isDirectionRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n });\n }\n }\n return [display, this.__addMp(isDirectionRow, w, currentStyle, [min, max])];\n }\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时isVirtual状态参与计算,文本抵达边界才进行换行\n * @param isDirectionRow\n * @param data\n * @param isVirtual abs非固定尺寸时先进行虚拟布局标识\n * @private\n */\n __calBasis(isDirectionRow, data, isVirtual) {\n css.computeReflow(this, this.isShadowRoot);\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n [FLEX_BASIS]: flexBasis,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = fixedSize = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = fixedSize = (isDirectionRow ? w : h) * flexBasis[0] * 0.01;\n }\n else if(flexBasis[1] === REM) {\n b = fixedSize = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = fixedSize = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = fixedSize = flexBasis[0] * this.root.height * 0.01;\n }\n }\n // 已声明主轴尺寸的,当basis是auto时为值\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1) && isAuto) {\n if(main[1] === PX) {\n b = fixedSize = main[0];\n }\n else if(main[1] === PERCENT) {\n b = fixedSize = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = fixedSize = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = fixedSize = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = fixedSize = main[0] * this.root.height * 0.01;\n }\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n // flex的item还是flex时\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n // flex的item是block/inline时,inline也会变成block统一对待\n else {\n let countMin = 0, countMax = 0;\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n if(isContent) {\n b = max;\n }\n // 直接item的mpb影响basis\n return this.__addMp(isDirectionRow, w, currentStyle, [b, min, max], true);\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isVirtual abs无尺寸时提前虚拟布局计算尺寸\n * @private\n */\n __layoutBlock(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxW = 0;\n let cw = 0;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isImg = item.tagName === 'img';\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || isInline && whiteSpace === 'nowrap') {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // abs统计宽度\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let fw = item.__tryLayInline(w + data.x - x, w);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(fw >= (-1e-10)) {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n // 非开头,说明之前的text未换行,需要增加行数\n if(x !== data.x && flowChildren[i - 1] instanceof Text) {\n lineClampCount++;\n }\n x = data.x;\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layout({\n x,\n y,\n w,\n h,\n }, isVirtual);\n let isNone = item.currentStyle[DISPLAY] === 'none';\n // 自身无内容\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n // absolute/flex前置虚拟计算\n if(isVirtual) {\n maxW = Math.max(maxW, item.outerWidth);\n cw = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n item.__offsetY(diff, true);\n y += diff;\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n }\n }\n // 文字和inline类似\n else {\n // lineClamp作用域为block下的inline(同LineBox上下文)\n if(lineClamp && lineClampCount >= lineClamp) {\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let fw = item.__tryLayInline(w - x + data.x);\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, item.width);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n }\n let tw = this.__width = (fixedWidth || !isVirtual) ? w : maxW;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isVirtual) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n this.__marginAuto(currentStyle, data);\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let maxX = 0;\n let isDirectionRow = ['column', 'column-reverse', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n // abs虚拟布局计算时纵向也是看横向宽度\n let [b, min, max] = item.__calBasis(isVirtual ? true : isDirectionRow, { x, y, w, h }, isVirtual);\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += max;\n }\n else {\n maxX = Math.max(maxX, max);\n }\n return;\n }\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += item.textWidth;\n }\n else {\n maxX = Math.max(maxX, item.textWidth);\n }\n return;\n }\n growList.push(0);\n shrinkList.push(1);\n if(isDirectionRow) {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n let h = item.height;\n basisList.push(h);\n minList.push(h);\n }\n }\n });\n // abs时,只需关注宽度即可,无需真正布局\n if(isVirtual) {\n let tw = this.__width = Math.min(maxX, w);\n this.__ioSize(tw, this.height);\n return;\n }\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = flexWrap === 'wrap' || ['wrap-reverse', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross] = this.__layoutFlexLine(clone, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n offset += length;\n });\n let tw = this.__width = w;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'row-reverse' || flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true);\n }\n });\n });\n }\n else if(flexDirection === 'column-reverse' || flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(['wrapReverse', 'wrap-reverse'].indexOf(flexWrap) > -1 && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(!isVirtual && length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true);\n }\n else {\n item.__offsetX(per, true);\n }\n });\n }\n else if(alignContent === 'flex-start' || alignContent === 'flexStart') {}\n else if(alignContent === 'flex-end' || alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n else if(alignContent === 'space-between' || alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true);\n }\n else {\n item.__offsetX(between, true);\n }\n });\n }\n });\n }\n else if(alignContent === 'space-around' || alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true);\n }\n else {\n item.__offsetX(around * (i + 1), true);\n }\n });\n });\n }\n // 默认stretch\n else {\n per = diff / length;\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true);\n }\n else {\n item.__offsetX(per * i, true);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行cross对齐,在alignContent为stretch时计算每行的高度\n if(!isVirtual) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__crossAlign(item, alignItems, isDirectionRow, maxCross);\n });\n }\n else if(length) {\n let maxCross = maxCrossList[0];\n if(isDirectionRow) {\n if(fixedHeight) {\n maxCross = h;\n }\n }\n else {\n maxCross = w;\n }\n this.__crossAlign(__flexLine[0], alignItems, isDirectionRow, maxCross);\n }\n }\n this.__marginAuto(currentStyle, data);\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free);\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) {\n let n = item * basisList[i];\n factorSum += n;\n return n;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layout({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n });\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n });\n }\n }\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lbmList.push(lineBoxManager);\n item.__layout({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n // 计算主轴剩余时要用真实剩余空间而不能用伸缩剩余空间\n let diff = isDirectionRow ? (w - x + data.x) : (h - y + data.y);\n // 主轴对齐方式\n if(diff > 0) {\n let len = orderChildren.length;\n if(justifyContent === 'flexEnd' || justifyContent === 'flex-end') {\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(diff, true) : child.__offsetY(diff, true);\n }\n }\n else if(justifyContent === 'center') {\n let center = diff * 0.5;\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(center, true) : child.__offsetY(center, true);\n }\n }\n else if(justifyContent === 'spaceBetween' || justifyContent === 'space-between') {\n let between = diff / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(between * i, true) : child.__offsetY(between * i, true);\n }\n }\n else if(justifyContent === 'spaceAround' || justifyContent === 'space-around') {\n let around = diff / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true) : child.__offsetY(around * (i + 1), true);\n }\n }\n }\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(item.width, textAlign);\n })\n }\n return [x, y, maxCross];\n }\n\n // 每个flexLine的侧轴对齐,单行时就是一行对齐\n __crossAlign(line, alignItems, isDirectionRow, maxCross) {\n let baseLine = 0;\n line.forEach(item => {\n baseLine = Math.max(baseLine, item.firstBaseLine);\n });\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对其,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isVirtual\n * @param isInline\n * @private\n */\n __layoutInline(data, isVirtual, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h, lx,\n lineBoxManager, nowrap, endSpace, selfEndSpace } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [WIDTH]: width,\n } = currentStyle;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__config[NODE_IS_INLINE] = true;\n this.__lineBoxManager = lineBoxManager;\n let baseLine = css.getBaseLine(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(marginLeft || marginRight\n || paddingLeft || paddingRight\n || borderLeftWidth || borderRightWidth) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseLine);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lx = x;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n let contentBoxList;\n if(isInline) {\n contentBoxList = this.__contentBoxList = [];\n lineBoxManager.pushContentBoxList(this);\n }\n let isIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline2 = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isRealInline = isXom && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb\n let isEnd = isInline && (i === length - 1);\n if(isEnd) {\n endSpace += selfEndSpace;\n }\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头,不用考虑是否放得下直接放,i为0强制不换行\n if(x === lx || !i || isInline2 && whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n isInlineBlock2 && (w[1] === AUTO) && (isIbFull = true);\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let fw = (whiteSpace === 'nowrap') ? 0 : item.__tryLayInline(w - x + lx, w - (isEnd ? endSpace : 0));\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n nowrap: whiteSpace === 'nowrap',\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n isInline2 && lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if(x === lx || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n // 第一个Text且父元素声明了nowrap也强制不换行,非第一个则看本身whiteSpace声明\n let focusNoWrap = (!i && nowrap) || whiteSpace === 'nowrap';\n let fw = focusNoWrap ? 0 : item.__tryLayInline(w + lx - x);\n if(!focusNoWrap && fw >= 0 && isEnd && endSpace && item.content.length === 1) {\n let fw2 = fw - endSpace;\n if(fw2 < 0) {\n fw = fw2;\n }\n }\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n y = lineBoxManager.endY;\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n lineBoxManager.addX(selfEndSpace);\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,\n if(isVirtual) {\n this.__inlineSize();\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用maxW\n let maxW = lineBoxManager.__maxX - data.x;\n tw = this.__width = fixedWidth ? w : (isIbFull ? Math.max(w, maxW) : maxW);\n th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isVirtual && !isInline) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return isInline ? lineClampCount : 0;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseLine得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(tw, textAlign) {\n let { contentBoxList, computedStyle, __ox, __oy } = this;\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = tw;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff) {\n this.__offsetX(diff, true);\n }\n }\n this.__width = computedStyle[WIDTH] = 0;\n let th = this.__height = computedStyle[HEIGHT] = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n this.__sx1 = this.sx + marginLeft;\n this.__sy1 = this.sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { sx: x, sy: y, clientWidth, clientHeight, computedStyle } = container;\n let { isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding\n item.__mp(currentStyle, computedStyle, clientWidth);\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let { [LEFT]: left, [TOP]: top, [RIGHT]: right,\n [BOTTOM]: bottom, [WIDTH]: width, [HEIGHT]: height, [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = calAbsolute(currentStyle, 'left', left, clientWidth, this.root);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = calAbsolute(currentStyle, 'right', right, clientWidth, this.root);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = calAbsolute(currentStyle, 'top', top, clientHeight, this.root);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = calAbsolute(currentStyle, 'bottom', bottom, clientHeight, this.root);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = x + clientWidth - computedStyle[RIGHT] - x2;\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n else if(fixedRight) {\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= currentStyle[BORDER_LEFT_WIDTH][0];\n x2 -= currentStyle[BORDER_RIGHT_WIDTH][0];\n }\n else {\n x2 = x + paddingLeft;\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = y + clientHeight - computedStyle[BOTTOM] - y2;\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n }\n else if(fixedBottom) {\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= currentStyle[BORDER_TOP_WIDTH][0];\n y2 -= currentStyle[BORDER_BOTTOM_WIDTH][0];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.prev;\n while(prev) {\n // 目前不考虑margin合并,直接以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else if(height[1] === PX) {\n h2 = height[0];\n }\n }\n // 没设宽高,需手动计算获取最大宽高后,赋给样式再布局\n let needCalWidth;\n if((display === 'block' || ['inlineBlock', 'inline-block'].indexOf(display) > -1) && w2 === undefined) {\n needCalWidth = true;\n }\n else if(display === 'flex') {\n if(w2 === undefined) {\n needCalWidth = true;\n }\n else if(flexDirection === 'column' && h2 === undefined) {\n needCalWidth = true;\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let wl = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let hl = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取孩子宽度最大值\n if(needCalWidth) {\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n }, true, true);\n wl = item.outerWidth;\n }\n // needCalWidth传入,因为自适应尺寸上面已经计算过一次margin/padding了\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n }, false, true);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n this.__execAr();\n }\n\n /**\n * 布局前检查继承的样式以及统计字体测量信息\n * 首次检查为整树遍历,后续检查是节点自发局部检查,不再进入\n * @param renderMode\n * @param ctx\n * @param cb\n * @private\n */\n __computeMeasure(renderMode, ctx, cb) {\n super.__computeMeasure(renderMode, ctx, cb);\n // 即便自己不需要计算,但children还要继续递归检查\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx, cb);\n });\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n super.__destroy();\n }\n\n __emitEvent(e, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e);\n }\n\n // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\n }\n\n appendChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n throw new Error('Invalid parameter in removeChild.');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Xom && item.currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseLine;\n }\n\n get firstBaseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseLine;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from './mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport enums from '../util/enums';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, RGBA } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data) {\n let res = super.__preLayout(data);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\n loadImg.source = cache.source;\n loadImg.width = cache.width;\n loadImg.height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n if(computedStyle[VISIBILITY] !== 'hidden' && (computedStyle[WIDTH] || computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n return res;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\n computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3;\n originY = res.y3;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n if(cross[1] !== AUTO) {\n if(cross[1] === PX) {\n cross = cross[0];\n }\n else if(cross[1] === PERCENT) {\n cross = cross[0] * 0.01 * (isDirectionRow ? h : w);\n }\n else if(cross[1] === REM) {\n cross = cross[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(cross[1] === VW) {\n cross = cross[0] * this.root.width * 0.01;\n }\n else if(cross[1] === VH) {\n cross = cross[0] * this.root.height * 0.01;\n }\n let ratio = __loadImg.width / __loadImg.height;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? __loadImg.width : __loadImg.height;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FONT_SIZE,\n FLEX_BASIS,\n },\n NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_IS_MASK,\n NODE_STYLE,\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend({}, this.__style);\n this.__currentProps = util.clone(this.props);\n let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __tryLayInline(w, total) {\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n // 计算需考虑style的属性\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n [DISPLAY]: display,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n return [display, this.__addMp(isDirectionRow, data.w, currentStyle, [min, max])];\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __layoutBlock(data, isVirtual) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data);\n this.__height = fixedHeight ? h : 0;\n if(isVirtual) {\n this.__width = fixedWidth ? w : 0;\n return;\n }\n this.__width = w;\n this.__ioSize(w, this.height);\n this.__marginAuto(this.currentStyle, data);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __layoutFlex(data) {\n // 无children所以等同于block\n this.__layoutBlock(data);\n }\n\n __layoutInline(data) {\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // 元素的width不能超过父元素w\n let tw = this.__width = fixedWidth ? w : x - data.x;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n else if(item[1] === PERCENT) {\n return item[0] * w * 0.01;\n }\n else if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n else if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n else {\n return 0;\n }\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n computedStyle[STROKE_DASHARRAY] = currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [STROKE, FILL].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = currentStyle[k];\n computedStyle[k] = v;\n let res = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && (item.k === 'linear' || item.k === 'radial' || item.k === 'conic')) {\n res.push(this.__gradient(renderMode, ctx, x3, y3, x4, y4, item));\n }\n else if(item[3] > 0) {\n res.push(int2rgba(item));\n }\n else {\n res.push('none');\n }\n });\n }\n __cacheStyle[k] = res;\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + height * 0.5;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') {\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // geom的cache无内容也不清除\n __releaseWhenEmpty() {}\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasUpdate) {\n child.__hasUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasUpdate) {\n vd.__hasUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_STRUCT];\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { contain, NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n // if(ovd.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\n // }\n // else {\n // elem.removeAttribute('filter');\n // }\n // }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(lv, MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate } = item;\n if(target.isDestroyed) {\n return;\n }\n if(Array.isArray(animate)) {\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n }\n else {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n }\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.__page = new MockPage(texture, width, height);\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = sx1 - bbox[0];\n this.dby = sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n\n get page() {\n return this.__page;\n }\n}\n\nexport default MockCache;\n","import Geom from '../node/geom/Geom';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Cache from './Cache';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport mode from '../node/mode';\n\nconst { canvasPolygon } = painter;\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\n// 依次从list获取首个available可用的cache\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(cache && cache.available) {\n bboxTotal = cache.bbox.slice(0);\n }\n else {\n bboxTotal = node.bbox;\n }\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n },\n } = node2;\n // webgl不能跳过超限\n if(limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n // 防止text的情况,其一定属于某个node,其bbox被计算过,text不应该计算\n if(node2 instanceof Text) {\n continue;\n }\n let bbox, dx = 0, dy = 0, hasTotal;\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox.slice(0);\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox.slice(0);\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.bbox;\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = util.transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,当超限时返回空\n * @param renderMode\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cacheTop\n * @param cache\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, __config, index, total, __structs, cacheTop, cache) {\n if(total === 0) {\n return cache;\n }\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, Cache.MAX);\n if(!bboxTotal) {\n return;\n }\n let { __sx1: sx1, __sy1: sy1 } = node;\n if(cacheTop) {\n cacheTop.reset(bboxTotal, sx1, sy1);\n }\n else {\n cacheTop = Cache.getInstance(bboxTotal, sx1, sy1);\n }\n // 创建失败,再次降级\n if(!cacheTop || !cacheTop.enabled) {\n return;\n }\n cacheTop.__available = true;\n let { x: tx, y: ty, ctx, dbx, dby } = cacheTop;\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n Cache.drawCache(cache, cacheTop);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n ctx.globalAlpha = opacity;\n let m = matrix || mx.identity();\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, 0, ctx, true, tx - sx1 + dbx, ty - sy1 + dby);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx + tx;\n let dy = -sy1 + dby + ty;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n ctx.globalAlpha = opacity;\n if(matrix) {\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n Cache.drawCache(target, cacheTop);\n if(target !== __cache) {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n }\n }\n return cacheTop;\n}\n\nfunction genFilter(node, cache, v) {\n return Cache.genFilter(cache, v);\n}\n\nfunction genMask(node, cache) {\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: transformOrigin } = node.computedStyle;\n let isClip = node.next.isClip;\n return Cache.genMask(cache, node.next, isClip, transform, transformOrigin);\n}\n\nfunction genOverflow(node, cache) {\n let sbox = node.bbox;\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n return Cache.genOverflow(cache, node);\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, width, height);\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n return [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.WEBGL, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'hue-rotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n width += spread * 2;\n height += spread * 2;\n // 防止超限,webgl最大纹理尺寸限制\n let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\n return;\n }\n bbox = bbox.slice(0);\n bbox[0] -= spread;\n bbox[1] -= spread;\n bbox[2] += spread;\n bbox[3] += spread;\n let cx = width * 0.5, cy = height * 0.5;\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `\\nv_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `\\nv_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `\\nv_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texCache, texture, cache.page.texture, i, j,\n width, height, cx, cy, spread, d, sigma);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let sbox = node.bbox.slice(0);\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n let width = sbox[2] - sbox[0], height = sbox[3] - sbox[1];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, sbox[0] - bbox[0], sbox[1] - bbox[1], width, height, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, width, height, sbox);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, __config, cache, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bbox[0], dy = -bbox[1];\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dx;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n while(next && next.isMask) {\n let __config = next.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n if(display === 'none' || visibility === 'hidden') {\n continue;\n }\n // total无用,都是单节点\n let target = getCache([__cacheFilter, __cacheOverflow, __cache]);\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n // m = mx.m2Mat4(m, cx, cy);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, dx, dy);\n }\n // 异常情况超限\n else if(__config[NODE_LIMIT_CACHE]) {\n return;\n }\n next = next.next;\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let isClip = node.next.isClip;\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n list.forEach(item => {\n let [, , type, offscreen] = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getCacheCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n apply.ctx.filter = 'none';\n apply.draw();\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\n inject.releaseCacheCanvas(apply.canvas);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n mask.draw();\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n offscreen.target.draw();\n inject.releaseCacheCanvas(offscreen.target.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n target.draw();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nfunction renderCacheCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在 lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 父不为E时要点乘继承父的\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制limitCache\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n node.render(renderMode, refreshLevel, ctx, true);\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = computedStyle;\n if(!limitCache && (hasMask || position === 'absolute'\n || filter.length || (overflow === 'hidden' && total) || isValidMbm(mixBlendMode))) {\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n hasRecordAsMask[7] = overflow;\n }\n else {\n mergeList.push([i, lv, total, node, __config, hasMask, filter, overflow]);\n }\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n __cacheTotal = genTotal(renderMode, node, __config, i, total || 0, __structs, __cacheTotal, __cache);\n if(__cacheTotal && __cacheTotal !== __cache) {\n __config[NODE_CACHE_TOTAL] = __cacheTotal;\n }\n needGen = true;\n }\n // 防止失败超限,必须有total结果\n if(__cacheTotal && __cacheTotal.available) {\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n __config[NODE_CACHE_OVERFLOW] = genOverflow(node, target);\n needGen = true;\n }\n target = __config[NODE_CACHE_OVERFLOW] || target;\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n __config[NODE_CACHE_FILTER] = genFilter(node, target, filter);\n needGen = true;\n }\n target = __config[NODE_CACHE_FILTER] || target;\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n __config[NODE_CACHE_MASK] = genMask(node, target);\n }\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 超尺寸的依旧要走无cache逻辑render,这部分和无cache渲染很像\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config[NODE_DOM_PARENT].__config;\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrixEvent[0], matrixEvent[1], matrixEvent[4], matrixEvent[5], matrixEvent[12], matrixEvent[13]);\n node.render(renderMode, 0, ctx);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n // 有total的可以直接绘制并跳过子节点索引\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // total的尝试\n if(target) {\n i += (total || 0) + (hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n // 自身cache尝试\n else {\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n // 这里比较特殊,可能会有__cache但超限没被汇聚到total上,需mock出离屏对象数据,还有可能本身就超限\n if(__cache && __cache.available || limitCache) {\n if(__cache && __cache.available) {\n // 有cache但没生成total的都在这\n if(isValidMbm(mixBlendMode)) {\n let c = inject.getCacheCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode: mbmName(mixBlendMode),\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(hasMask) {\n let c = inject.getCacheCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getCacheCanvas(width, height, null, 'filter1');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getCacheCanvas(width, height, null, 'overflow');\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: matrixEvent,\n x: __cache.sx1,\n y: __cache.sy1,\n offsetWidth: node.offsetWidth,\n offsetHeight: node.offsetHeight,\n };\n ctx = c.ctx;\n }\n if(visibility !== 'hidden') {\n Cache.draw(ctx, opacity, matrixEvent, __cache);\n }\n }\n else {\n // 连cache都没生成的超限\n let res = node.render(renderMode, refreshLevel, ctx) || {};\n offscreenBlend = res.offscreenBlend;\n offscreenMask = res.offscreenMask;\n offscreenFilter = res.offscreenFilter;\n offscreenOverflow = res.offscreenOverflow;\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n if(limitCache && node instanceof Geom) {\n node.render(renderMode, refreshLevel, ctx);\n }\n }\n // 没内容的遮罩跳过,比如未加载的img,否则会将遮罩绘制出来\n else if(hasMask) {\n i += (total || 0) + hasMask;\n }\n // 同无cache一样的离屏应用\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n}\n\n/**\n * 无缓存模式canvas渲染,O(n)一次循环完成\n * @param renderMode\n * @param ctx\n * @param root\n */\nfunction renderCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n /**\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性,\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_REFRESH_LV]: refreshLevel,\n } = node.__config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let res = node.render(renderMode, refreshLevel, ctx);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,以及svg的virtualDom也要生成\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = {};\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, TRANSFORM_ALL)) {\n defsCache.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = {};\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start][STRUCT_NODE].isClip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = __config[NODE_VIRTUAL_DOM] = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n util.assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(contain(refreshLevel, FT)) {\n let filter = node.__calFilter(currentStyle, computedStyle);\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(contain(refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_NODE];\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j][STRUCT_NODE];\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.isMask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\n }\n}\n\nfunction renderWebgl(renderMode, gl, root) {\n let { __structs, width, height, texCache } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, 0, gl, true);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // node本身有或者父有perspective都认为需要生成3d渲染上下文\n if(tf.isPerspectiveMatrix(matrix) || parentPm) {\n if(hasRecordAsMask) {\n hasRecordAsMask[9] = true;\n }\n else {\n hasRecordAsMask = [i, lv, total, node, __config, null, null, null, null, true];\n }\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[7] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, true);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, limitCache, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n target = genOverflowWebgl(gl, texCache, node, target, width, height);\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = target;\n }\n }\n // 保存临时的局部根节点\n if(limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n continue;\n }\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + (hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n // let m = mx.m2Mat4(matrixEvent, cx, cy);\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nexport default {\n renderCacheCanvas,\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last[0] !== page || page.update) {\n // page可能为一个已有纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n channels[i] = page;\n }\n else {\n // 可能老的先删除\n if(last) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n channels[i] = page;\n }\n hash[page.uuid] = i;\n }\n else {\n hash[page.uuid] = i;\n }\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n}\n\nexport default TexCache;\n","import Dom from './Dom';\nimport Text from './Text';\nimport Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport mode from './mode';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_MEASURE,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, isGeom, isMeasure } = change;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, true);\n target = target.domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.domParent;\n if(parent) {\n if(parent.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inline-block', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inline-block', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, measureList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_MEASURE]: measure,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasMeasure = measure;\n let hasZ, hasVisibility, hasColor, hasDisplay;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n if(isMeasure(k)) {\n hasMeasure = true;\n }\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n if(k === VISIBILITY) {\n hasVisibility = true;\n }\n if(k === COLOR) {\n hasColor = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // visibility/color变化,影响子继承\n if(hasVisibility || hasColor) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n // text的style指向parent,因此text一定变更\n if(hasVisibility && (node instanceof Text || currentStyle[VISIBILITY][1] === INHERIT)) {\n need = true;\n }\n if(hasColor && (node instanceof Text || currentStyle[COLOR][1] === INHERIT)) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n if(node instanceof Xom) {\n node.clearCache();\n }\n }\n else {\n i += total || 0;\n }\n }\n }\n // mask需清除遮罩对象的缓存\n if(isMask) {\n let prev = node.prev;\n while(prev && (prev.isMask)) {\n prev = prev.prev;\n }\n if(prev && prev.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint/measure相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n // measure需要提前先处理\n if(hasMeasure) {\n measureList.push(node);\n }\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__taskUp = [];\n this.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__children = builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.cache = !!this.props.cache;\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.width) {\n dom.setAttribute('width', this.width);\n }\n if(this.height) {\n dom.setAttribute('height', this.height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n // 没有设置width/height则采用css计算形式\n if(!this.width || !this.height) {\n let css = window.getComputedStyle(dom, null);\n if(!this.width) {\n this.__width = parseFloat(css.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.height) {\n this.__height = parseFloat(css.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 只有canvas有ctx,svg用真实dom\n if(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d');\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', ca);\n this.__renderMode = mode.WEBGL;\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(null, true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.dom.__root && this.dom.__root instanceof Root) {\n this.dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.dom, Root);\n this.dom.__root = this;\n }\n\n refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n this.__computeMeasure(renderMode, ctx);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n // 获取所有字体和大小测量,仅svg需要,canvas直接做\n inject.measureText();\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n // 利用list循环代替tree递归快速渲染\n if(this.cache) {\n struct.renderCacheCanvas(renderMode, ctx, this);\n }\n else {\n struct.renderCanvas(renderMode, ctx, this);\n }\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n if(isFunction(cb)) {\n cb();\n }\n this.emit(Event.REFRESH, this.__rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, this, this.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = [width, PX];\n currentStyle[HEIGHT] = [height, PX];\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n updateHash[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n target[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let measureList = [];\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n let hasUpdate;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, measureList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, measureList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n /**\n * 遍历每项节点,计算测量信息,节点向上向下查找继承信息,如果parent也是继承,先计算parent的\n * 过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n */\n let measureHash = {};\n measureList.forEach(node => {\n let { __config:{ [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId, [NODE_DOM_PARENT]: parent } } = node;\n // 在root下的component变更时root会进入,但其没有__uniqueUpdateId\n if(node !== root) {\n if(measureHash.hasOwnProperty(__uniqueUpdateId)) {\n return;\n }\n measureHash[__uniqueUpdateId] = true;\n }\n let last = node;\n // 检查measure的属性是否是inherit,在root下的component变更时root会进入,但其没有__uniqueUpdateId\n // 另外dom标识表明有dom变更强制进入\n let isInherit = node !== root\n && (updateHash[__uniqueUpdateId][UPDATE_ADD_DOM]\n || change.isMeasureInherit(updateHash[__uniqueUpdateId][UPDATE_STYLE]));\n // 是inherit,需要向上查找,从顶部向下递归计算继承信息\n if(isInherit) {\n while(parent && parent !== root) {\n let { __config: {\n [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId,\n }, currentStyle } = parent;\n let isInherit;\n if(parent.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let style = updateHash[__uniqueUpdateId][UPDATE_STYLE];\n measureHash[__uniqueUpdateId] = true;\n let temp = change.measureInheritList(style);\n isInherit = !!temp.length;\n }\n else {\n isInherit = change.isMeasureInherit(currentStyle);\n }\n // 如果parent有inherit存入列表且继续向上,否则跳出循环\n if(isInherit) {\n last = parent;\n }\n else {\n break;\n }\n // 考虑component下的继续往上继承\n parent = parent.domParent;\n }\n }\n // 自顶向下查找inherit的,利用已有的方法+回调,当递归包含重复时标记防止重复\n last.__computeMeasure(renderMode, ctx, function(target) {\n if(target.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n measureHash[target.__config[NODE_UNIQUE_UPDATE_ID]] = true;\n }\n });\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.prev;\n let hasFlowPrev;\n while(ref) {\n if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.computedStyle[DISPLAY] !== 'none')) {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.prev;\n }\n // 找不到prev以parent为基准,找到则增加自身,排除remove\n if(!removeDom) {\n if(!hasFlowPrev) {\n y += computedStyle[MARGIN_TOP] + computedStyle[BORDER_TOP_WIDTH] + computedStyle[PADDING_TOP];\n }\n x += computedStyle[MARGIN_LEFT] + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, null, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n });\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(cs[DISPLAY]) > -1;\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], null, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 特殊覆盖方法,不需要super()计算自己,因为放在每次checkRoot()做过了\n __computeMeasure(renderMode, ctx) {\n css.computeMeasure(this, true);\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx);\n });\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get taskUp() {\n return this.__taskUp;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\n","import Geom from './Geom';\nimport mode from '../mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA.length >= 2) {\n num++;\n }\n if(controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getNewPoint(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start > 0 || end < 1) {\n if(num === 3) {\n [[x1, y1], controlA, controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = Math.abs(x1 - x2);\n let b = Math.abs(y1 - y2);\n x1 += a * start;\n y1 += b * start;\n x2 -= a * (1 - end);\n y2 -= b * (1 - end);\n }\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__x1.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__x1.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__x1.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\n let {\n sx3,\n sy3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n if(!isMulti) {\n x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[0] = Math.min(bbox[0], xb - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[1] = Math.min(bbox[1], yb - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[2] = Math.max(bbox[2], xb + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n bbox[3] = Math.max(bbox[3], yb + oy);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]], 2);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]], 3);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start >= end) {\n return [];\n }\n let i = 0, j = list.length - 1;\n if(start > 0) {\n i = getIndex(len.increase, start * len.total, i, j);\n }\n if(end < 1) {\n j = getIndex(len.increase, end * len.total, i, j);\n }\n list = util.clone(list);\n end *= len.total;\n let prePercent = 1;\n if(end > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[j + 1] = [current[1] - (1 - t) * a, current[1] - (1 - t) * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], res[3][0], res[3][1]];\n }\n }\n start *= len.total;\n if(start > len.increase[i]) {\n let prev = list[i].slice(list[i].length - 2);\n let current = list[i + 1];\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度\n if(i === j && prePercent !== 1) {\n l *= prePercent;\n }\n let diff = start - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[i] = [prev[0] + t * a, prev[1] + t * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], current[4], current[5]];\n }\n }\n if(j < list.length - 2) {\n list = list.slice(0, j + 2);\n }\n if(i > 0) {\n list = list.slice(i);\n }\n return list;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map((item, i) => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(c && c.length === 2) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from \"../../util/util\";\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n bbox[0] = Math.min(bbox[0], originX - ox);\n bbox[1] = Math.min(bbox[1], originY - oy);\n bbox[2] = Math.max(bbox[2], originX + width + ox);\n bbox[3] = Math.max(bbox[3], originY + height + oy);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - rx - ox;\n let xb = cx + rx + ox;\n let ya = cy - ry - oy;\n let yb = cy + ry + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\nimport inject from '../util/inject';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json && vars) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\nfunction replaceLibraryVars(json, hash, vars) {\n if(vars) {\n // 新版同级vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度\n if(Array.isArray(member) && member.length > 1 && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n let old = target[k];\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n }\n // 兼容老版var-\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n // 直接移除library插槽,防止下面调用replaceVars(json, vars)时报错\n delete json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // 替换图层的值必须是一个有tagName的对象\n if(!value || !value.tagName) {\n return;\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction linkLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n/**\n * 链接child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkChild(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props);\n child.children = libraryItem.children;\n child.library = libraryItem.library;\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n child.libraryId = null;\n // 规定图层实例化的属性和样式在init上,优先使用init,然后才取原型链的props\n let { init } = child;\n if(init) {\n let props = child.props = child.props || {};\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n child.init = null;\n }\n}\n\nfunction parse(karas, json, animateRecords, opt, hash = {}) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, hash);\n });\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkChild(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n json.libraryId = null;\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => {\n linkLibrary(item, hash);\n });\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n json.library = null;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n let style = props.style;\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n // 再替换静态属性,style也作为属性的一种,目前尚未被设计为被替换\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n let animationRecord;\n if(animate) {\n if(Array.isArray(animate)) {\n let has;\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n });\n if(has) {\n animationRecord = {\n animate,\n target: vd,\n };\n }\n }\n else {\n (opt.abbr !== false) && abbr2full(animate, abbrAnimate);\n let { value, options } = animate;\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n animationRecord = {\n animate,\n target: vd,\n };\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n }\n }\n // 产生实际动画运行才存入列表供root调用执行\n if(animationRecord) {\n animateRecords.push(animationRecord);\n }\n return vd;\n}\n\nexport default parse;\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\n\nlet o = {\n parse(karas, json, dom, options = {}) {\n json = util.clone(json);\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, data } = item;\n if(fontFamily && data) {\n font.register(fontFamily, data);\n }\n });\n }\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = dom || {};\n dom = null;\n }\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n animateRecords.forEach(item => {\n item.target = item.target.vd;\n });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(url);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n if(a || b || c) {\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n return res;\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './node/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport $$type from './util/$$type';\nimport builder from './util/builder';\nimport updater from './util/updater';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n return {\n tagName,\n props,\n children,\n $$type: $$type.TYPE_VD,\n };\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return {\n klass,\n props,\n $$type: $$type.TYPE_CP,\n };\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\n});\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_MEASURE","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","enums","Node","__x","__y","__ox","__oy","__width","__height","__baseLine","__config","i","lv","j","root","struct","diff","isLayout","__sx","__sy","x","ox","y","oy","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","calUnit","v","n","parseFloat","test","info","arial","lhr","blr","lgr","padding","f","verdana","tahoma","S","T","Z","c","t","georgia","simsun","support","fontFamily","hasOwnProperty","register","name","emSquare","ascent","descent","lineGap","addPadding","assign","position","gradient","img","identity","multiply","a","b","isE","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","inverse","inverse4","divisor","inv","det","m2m6","point2d","slice","dotProduct","x1","y1","x2","y2","crossProduct","H","Math","sqrt","vector","mx","h","deg","cos","sin","pointInPolygon","vertexes","xmax","ymax","xmin","ymin","len","max","min","pointInQuadrilateral","x4","y4","x3","y3","matrix","w1","w2","w3","w4","angleBySide","theta","pow","acos","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","list","floor","h2","d2r","abs","atan","rx","ry","p1","p2","p4","p3","push","concat","temp","res","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","isRectsInside","calCoordsInNode","px","py","node","computedStyle","width","height","calPercentInNode","ds","Infinity","PI","dt","r2d","bboxBezier2","x0","y0","minX","minY","maxX","maxY","tx","ty","sx","sy","qx","qy","bboxBezier3","cx","cy","bx","by","ax","ay","hx","hy","q","bboxBezier","arguments","norm","order","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","points","startT","endT","at","at3","p0","at2","bezierOrder","derivativeOrder","pointAtBezier","percent","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","start","reverse","pointOnCircle","getConicGradientImage","originX","originY","stop","data","Error","getAngle","dx","dy","increasingList","map","item","color","angle","factor","idx","canvasPolygon","ctx","Array","isArray","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","num","svgLine","canvasFilter","filter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","style","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","indexOf","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","ya","yb","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","xa","xb","ca","calBezierTopLeft","cb","controls1","controls2","limit","pop","endLength","oyr","calBezierTopRight","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","noRadius","target","prev","next","half","calBorderRadiusInline","contentBoxList","first","last","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","fillStyle","fill","closePath","virtualDom","bb","type","tagName","props","TYPE_VD","_","TYPE_GM","TYPE_CP","toString","isType","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","joinDef","joinVd","conClip","children","isMask","content","opacity","transform","visibility","mask","overflow","mixBlendMode","def","uuid","joinItem","rgba2int","charAt","parseInt","match","int2rgba","joinArr","int2invert","arr2hash","hash","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","proto","getPrototypeOf","Ctor","constructor","assignMatrix","isPrimitive","isAuto","flag","charWidth","ELLIPSIS","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","revertY","createTexture","tex","texture","bindTexture","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","drawTextureCache","vtPoint","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","Float32Array","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","texCache","tex1","tex2","spread","sigma","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","defaultFontFamilyData","key","message","debug","document","createElement","setAttribute","body","appendChild","canvas","draw","enabled","available","release","cacheCanvas","cacheWebgl","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","inject","measureText","textCache","html","lengths","chars","ff","fs","fw","inline","char","div","left","top","innerHTML","cns","childNodes","index","css","window","getComputedStyle","text","__measureCb","removeChild","measureTextSync","measureImg","url","state","success","task","Image","onload","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","checkSupportFontFamily","font","checked","context","textAlign","textBaseline","clearRect","fillText","getImageData","loadFont","FontFace","load","then","loadComponent","script","async","head","getLinearDeg","getRadialPosition","center","right","bottom","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","asin","parseGradient","reg","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","add","DOM","display","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","fontStyle","fontWeight","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","boxShadow","pointerEvents","whiteSpace","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","isValid","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","MEASURE","addGeom","ks","isIgnore","isGeom","isRepaint","isMeasure","MEASURE_KEY_SET","isMeasureInherit","measureInheritList","change","TRANSFORM_HASH","compatibleTransform","normalize","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","computeMeasure","isRoot","domParent","parentComputedStyle","getFontFamily","computeReflow","isHost","parent","rem","calNormalLineHeight","ph","setFontStyle","str","getBaseLine","normal","calRelativePercent","calRelative","isWidth","calAbsolute","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","TextBox","wList","__index","__content","__wList","cacheStyle","__endX","__endY","overFill","strokeText","baseLine","__parentLineBox","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","calDeg","pointIndex","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","ac","bc","AB","AC","BC","A","tar","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calOrigin","tfo","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","kernelSize","outerSize","outerSizeByD","gaussianWeight","E","_enums$NODE_KEY","genSingle","dbx","dby","Cache","__init","__bbox","__page","__pos","getCoords","__appendData","__enabled","setTransform","globalAlpha","update","__available","clear","del","ceil","getInstance","blur","isClip","cacheMask","tf","cacheOverflow","cacheFilter","drawCache","globalCompositeOperation","xe","ye","rect","old","newCache","nx","ny","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","value","getLevel","isReflow","isRebuild","Text","__textBoxes","__charWidthList","__charWidth","__textWidth","charWidthList","ffs","__ff","__key","wait","needMeasure","bp","__bp","pff","pffs","pfs","pfw","pKey","__pKey","parentCache","mw","__cache","lx","lineBoxManager","endSpace","lineClampCount","__sx1","__sy1","isDestroyed","textBoxes","beginSpace","maxW","needReduce","lastChar","ew","lineCount","isTextOverflow","__lineBack","textBox","addItem","cw","hasCache","needBack","setNewLine","__ellipsis","lineBox","tb","__offsetX","__offsetY","textWidth","__layout","lineWidth","strokeColor","strokeStyle","render","endX","endY","__cacheStyle","delRefreshTask","__task","addRefreshTask","__before","level","__addUpdate","__after","__style","matrixEvent","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","hasRegister","defineProperty","get","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","me","calBackgroundSize","calBackgroundPosition","container","renderImage","loadBgi","bx2","by2","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","I_NODE_CONFIG","I_ROOT_CONFIG","I_STYLE","I_ASSIGNING","__frameHook","framing","duration","es","offset","translatePath","calByUnit","calDiff","nm","pHash","nHash","keyHash","hasChange","nv","pv","pi","ni","has","pp","nn","clientWidth","eq","isArrP","isArrN","pz","nz","np","len2","pv2","nv2","len3","pv3","nv3","u","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_FRAME_CB","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_CAL_DIFF_TIME","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_OUT_BEGIN_DELAY","I_TIME_STAMP","Animation","__id","nl","__options","op","config","__frameCb","__calDiffTime","iterations","framesR","originStyle","fps","spfLimit","delay","endDelay","playbackRate","current","isFinish","__cancelTask","__currentProps","__currentStyle","isDelay","FRAME","PLAY","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","round","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","inset","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","getInlineBox","diffL","eyt","eyb","pbt","pbb","dom","getInlineWidth","contentBox","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__hasMask","__mpWidth","mp","__clientWidth","__clientHeight","__offsetWidth","__offsetHeight","__outerWidth","__outerHeight","onlyFixedValue","isDirectionRow","isDirectItem","__calMp","isVirtual","fromAbs","isShadowRoot","clearCache","__layoutData","__layoutNone","__mp","__isRealInline","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","nowrap","fixedWidth","fixedHeight","selfEndSpace","offsetWidth","offsetHeight","matrixCache","isScale","clientHeight","x5","x6","y5","y6","__calFilter","bg","bgI","item2","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","hasContent","__calContent","__calPerspective","__calMatrix","__releaseWhenEmpty","limitCache","__calCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","__gradient","isFirst","lastContentBox","lastLineBox","parentLineBox","countW","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","ec","dc","pc","cur","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","hostRoot","pJson","zChildren","zIndexChildren","__spreadBbox","LineBox","__list","__lineHeight","LineBoxManager","__lastX","__lastY","__maxX","__domList","__domStack","__isNewLine","__isEnd","__setLB","nextNewLine","genLineBox","verticalAlign","isNewLine","TAG_NAME","INLINE","BOLD","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","isAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMarginTB","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","firstCharWidth","main","isRow","__calMinMax","min2","max2","countMin","countMax","setNotEnd","__addMp","isFixed","isContent","fixedSize","__lineBoxManager","__preLayout","__ioSize","mergeMarginBottomList","mergeMarginTopList","isXom","isInlineBlock","isImg","reflow","__isIbFull","lastX","lastY","isNone","isEmptyBlock","tw","th","horizonAlign","__inlineSize","domList","__marginAuto","growList","shrinkList","basisList","maxList","minList","orderChildren","__calBasis","containerSize","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","__layoutFlexLine","maxCross","crossSum","crossSumList","between","around","__crossAlign","flexLine","hypotheticalSum","targetMainList","factorSum","factorList","needReset","factorSum2","lbmList","firstBaseLine","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isInline2","isInlineBlock2","focusNoWrap","fw2","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","needCalWidth","wl","hl","__computeMeasure","__deepScan","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","pts","arc","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","onList","__action","__mergeAuto","__on","timestamp","__set","MockPage","genUuid","MockCache","OP","FT","MBM","PPT","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","getCache","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","cacheTop","hasMask","genFilter","genMask","genOverflow","sbox","genFrameBufferWithTexture","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","applyOffscreen","origin","renderCacheCanvas","matrixList","parentMatrix","opacityList","parentOpacity","lastConfig","lastLv","mergeList","refreshLevel","hasRecordAsMask","needGen","maskStartHash","offscreenHash","renderCanvas","renderSvg","maskEffectHash","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","hasMbm","validMbm","isPerspective","limitHash","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","shift","cl","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","measureList","cacheList","zHash","zList","overwrite","focus","measure","removeDom","style2","keys2","hasMeasure","hasZ","hasVisibility","hasColor","hasDisplay","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","getPropertyValue","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","measureHash","__uniqueUpdateId","isInherit","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","startIndex","oldH","nowH","lastIndex","ns","reBuild","base","reBuildC","curveNum","limitStartEnd","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","buildCache","curve","bezierBox","concatPointAndControl","control","getLength","increase","getIndex","getNewList","prePercent","Polyline","__points","__controls","controls","isControl","rebuildSE","__getPoints","__renderPolygon","pointList","controlList","Polygon","getR","dft","Sector","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","replaceVars","vars","slot","member","replaceLibraryVars","linkLibrary","JSON","linkChild","libraryItem","library","libraryId","parse","animateRecords","opt","createGm","createCp","createVd","animationRecord","fonts","loadAndParse","components","imgs","list1","list3","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,WAAS,GAAG;AAChBC,EAAAA,QAAQ,EAAE,CADM;AAEhBC,EAAAA,OAAO,EAAE,CAFO;AAGhBC,EAAAA,GAAG,EAAE,CAHW;AAIhBC,EAAAA,KAAK,EAAE,CAJS;AAKhBC,EAAAA,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EU;AA2EV0L,EAAAA,MAAM,EAANA,MA3EU;AA4EV3X,EAAAA,KAAK,EAALA,KA5EU;AA6EV8/D,EAAAA,MAAM,EAANA,CA7EU;AA8EVvX,EAAAA,OAAO,EAAPA,OA9EU;AA+EVl5B,EAAAA,IAAI,EAAJA,IA/EU;AAgFVmM,EAAAA,OAAO,EAAPA,OAhFU;AAiFVq8B,EAAAA,OAAO,EAAPA,OAjFU;AAkFVhM,EAAAA,OAAO,EAAPA,OAlFU;AAmFV/gE,EAAAA,KAAK,EAALA,KAnFU;;EAoFV,IAAI0rB,KAAJ,CAAU1oB,CAAV,EAAa;AACX0oB,IAAAA,KAAK,CAACrI,IAAN,GAAa,CAAC,CAACrgB,CAAf,CAAA;AACD,GAAA;;AAtFS,EAAZ;AAyFA0tC,OAAO,CAACvB,GAAR,CAAY;AACVvB,EAAAA,GAAG,EAAHA,GADU;AAEVC,EAAAA,GAAG,EAAHA,GAFU;AAGVC,EAAAA,GAAG,EAAHA,GAHU;AAIVC,EAAAA,IAAI,EAAJA,IAJU;AAKVC,EAAAA,SAAS,EAATA,SAAAA;AALU,CAAZ,CAAA,CAAA;;AAQA,IAAG,OAAOhgB,MAAP,KAAkB,WAArB,EAAkC;EAChCA,MAAM,CAACq/C,KAAP,GAAeA,OAAf,CAAA;AACD,CAFD,MAGK,IAAG,OAAO58C,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAAC48C,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"} \ No newline at end of file diff --git a/index.js b/index.js index 7f4cfb66..eafefa00 100644 --- a/index.js +++ b/index.js @@ -12089,12 +12089,12 @@ }, { key: "root", get: function get() { - return this.domParent.root; + return (this.domParent || {}).root; } }, { key: "currentStyle", get: function get() { - return this.domParent.currentStyle; + return (this.domParent || {}).currentStyle; } }, { key: "style", @@ -12104,12 +12104,12 @@ }, { key: "computedStyle", get: function get() { - return this.domParent.computedStyle; + return (this.domParent || {}).computedStyle; } }, { key: "cacheStyle", get: function get() { - return this.domParent.__cacheStyle; + return (this.domParent || {}).__cacheStyle; } }, { key: "bbox", diff --git a/index.js.map b/index.js.map index 4a610148..e341d9ad 100644 --- a/index.js.map +++ b/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["src/util/enums.js","src/node/Node.js","src/node/mode.js","src/style/unit.js","src/style/font.js","src/style/reg.js","src/math/matrix.js","src/math/vector.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/util/$$type.js","src/util/util.js","src/util/debug.js","src/node/textCache.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.js","src/style/gradient.js","src/style/reset.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/style/css.js","src/node/TextBox.js","src/refresh/Page.js","src/math/tar.js","src/math/index.js","src/style/transform.js","src/math/blur.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.js","src/util/Event.js","src/node/Component.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/inline.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/abbr.js","src/parser/parse.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n // GEOM\n FILL: 87,\n STROKE: 88,\n STROKE_WIDTH: 89,\n STROKE_DASHARRAY: 90,\n STROKE_DASHARRAY_STR: 91,\n STROKE_LINECAP: 92,\n STROKE_LINEJOIN: 93,\n STROKE_MITERLIMIT: 94,\n FILL_RULE: 95,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 96,\n BORDER_TOP: 97,\n BORDER_RIGHT: 98,\n BORDER_BOTTOM: 99,\n BORDER_LEFT: 100,\n TRANSLATE_PATH: 101,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_MEASURE: 3,\n UPDATE_COMPONENT: 4,\n UPDATE_OVERWRITE: 5,\n UPDATE_KEYS: 6,\n UPDATE_LIST: 7,\n UPDATE_CONFIG: 8,\n UPDATE_ADD_DOM: 9,\n UPDATE_REMOVE_DOM: 10,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseLine = 0;\n this.__config = {};\n // 默认undefined\n // this.__prev = undefined;\n // this.__next = undefined;\n // this.__parent = undefined;\n // this.__domParent = undefined;\n // this.__root = undefined;\n // this.__host = undefined;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\n }\n\n __offsetX(diff, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += diff;\n }\n\n __destroy() {\n this.__config[NODE_IS_DESTROYED] = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__config[NODE_IS_DESTROYED];\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return [n, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n return [n, o.NUMBER];\n },\n};\n\nexport default o;\n","'use strict';\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n // 个别字符误差,初次之外误差还有根据经验得的比例系数,https://github.com/karasjs/karas/issues/145\n padding: {\n 1: 1,\n f: 0.9,\n },\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n padding: {\n S: 1,\n T: 1,\n Z: 1,\n c: 1,\n f: 0.7,\n i: 1,\n l: 1,\n t: 0.9,\n },\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n padding: {\n f: 0.5,\n },\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n padding: {\n f: 0.5,\n },\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily);\n },\n register(name, info) {\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 67, padding = {} } = info || {};\n this.info[name.toLowerCase()] = {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n padding,\n };\n },\n addPadding(name, padding) {\n Object.assign(this.info[name.toLowerCase()].padding, padding);\n },\n};\n\no.info['宋体'] = o.info.simsun;\n\nexport default o;\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwh%]*)|(left|top|right|bottom|center)){1,2}/ig,\n // tfo: /((-?[\\d.]+(px|%)?)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i];\n let a1 = a[i + 4];\n let a2 = a[i + 8];\n let a3 = a[i + 12];\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let [xmax, ymax] = vertexes[0];\n let [xmin, ymin] = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let [x, y] = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n // 所有向量积均为非负数说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let [x1, y1] = vertexes[i];\n let [x2, y2] = vertexes[(i + 1) % len];\n if(crossProduct(x2 - x1, y2 - y1, x - x1, y - y1) < 0) {\n return false;\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInPolygon(x, y, [\n [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return [\n (a * x1 + b * x2 + c * x3) / (a + b + c),\n (a * y1 + b * y2 + c * y3) / (a + b + c),\n ];\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n * @param a\n * @param b\n */\nfunction isRectsOverlap(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n * @param a\n * @param b\n */\nfunction isRectsInside(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = {} } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + oy];\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let [x1, y1] = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.min(maxX, qx);\n maxY = Math.min(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = (-bx + hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = (-by + hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n if(arguments.length === 4) {\n return [x0, y0, x1, y1];\n }\n if(arguments.length === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(arguments.length === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param order 阶次, 2 和 3\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, order, startT = 0, endT = 1) {\n let derivativeFunc = t => norm(at(t, points, order));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n else {\n // 3阶导数就是常数了,大于3阶的都是0\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n else {\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\nfunction at(t, points, bezierOrder, derivativeOrder = 1) {\n if(bezierOrder === 2) {\n return at2(t, points, derivativeOrder);\n }\n else if(bezierOrder === 3) {\n return at3(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, order, percent, maxIteration, eps) {\n let length = bezierLength(points, order, 0, 1);\n return pointAtBezierWithLength(points, order, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, order, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points, order));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, order, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, order, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, order, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return [\n x - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\n}\n\nexport default {\n pointInPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointOnCircle,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","function canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n ctx.moveTo(list[start][0] + dx, list[start][1] + dy);\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let s = 'M' + list[start][0] + ',' + list[start][1];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'hue-rotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1]\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","// 类型为引用防止json仿造\nconst TYPE_VD = { _: 1 };\nconst TYPE_GM = { _: 2 };\nconst TYPE_CP = { _: 3 };\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\n","import $$type from './$$type';\nimport mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = ``;\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 4) {\n color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n color = color.map(c => Math.floor(c));\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(matrix && !mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n [x, y, , w] = mx.calPoint([x, y], matrix);\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n bbox = [xa, ya, xb, yb];\n }\n else if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n return t;\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n extendAnimate,\n transformBbox,\n assignMatrix,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","export default {\n list: [], // 每次渲染前的更新后,等待测量的文字对象列表\n data: {}, // Text中存入的特殊等待测量的信息,字体+字号+粗细为key\n charWidth: {}, // key的文字宽度hash\n padding: {}, // key的文字宽度偏移,少量字体的少量文字有\n ELLIPSIS: '…',\n};\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl([x, y, z, w], cx, cy, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, z * w, w];\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n // gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, -1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\n vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\n record[0]++;\n });\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\n });\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param texCache\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param cx\n * @param cy\n * @param spread\n * @param d\n * @param sigma\n */\nfunction drawBlur(gl, program, frameBuffer, texCache, tex1, tex2, i, j, width, height, cx, cy, spread, d, sigma) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height - spread], cx, cy);\n let [x2, y1] = convertCoords2Gl([width - spread, spread], cx, cy);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, i, m) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, i);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.programOverflow, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, program) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMbm(gl, program, i, j, W, H) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n};\n","import util from './util';\nimport debug from './debug';\nimport textCache from '../node/textCache';\nimport font from '../style/font';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nlet defaultFontFamilyData;\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\n\nlet inject = {\n measureText() {\n let { list, data } = textCache;\n let html = '';\n let keys = [];\n let lengths = [];\n let chars = [];\n Object.keys(data).forEach(key => {\n let { ff, fs, fw, s } = data[key];\n if(s) {\n keys.push(key);\n lengths.push(s.length);\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n for(let i = 0, len = s.length; i < len; i++) {\n let char = s.charAt(i);\n chars.push(char);\n html += `${char.replace(/`;\n }\n data[key].s = '';\n }\n });\n if(!html) {\n return;\n }\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let { charWidth } = textCache;\n let count = 0, index = 0, key;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n if(count === 0) {\n key = keys[index];\n }\n if(++count === lengths[index]) {\n index++;\n count = 0;\n }\n let char = chars[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n let css = window.getComputedStyle(node, null);\n charWidth[key][char] = parseFloat(css.width);\n }\n list.forEach(text => text.__measureCb());\n textCache.list = [];\n textCache.data = {};\n if(!debug.flag) {\n document.body.removeChild(div);\n }\n },\n measureTextSync(key, ff, fs, fw, char) {\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n let html = `${char}${char}${char}`;\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let w1 = parseFloat(window.getComputedStyle(cns[0], null).width);\n let w2 = parseFloat(window.getComputedStyle(cns[1], null).width);\n return w1 * 2 - w2;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag) {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(window);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(window);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === 'arial') {\n return true;\n }\n if(!font.info.hasOwnProperty(ff)) {\n return false;\n }\n if(font.info[ff].hasOwnProperty('checked')) {\n return font.info[ff].checked;\n }\n let canvas = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px arial';\n context.fillText('a', 8, 8);\n canvas.draw();\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + ff;\n context.fillText('a', 8, 8);\n canvas.draw();\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return font.info[ff].checked = true;\n }\n }\n return font.info[ff].checked = false;\n },\n loadFont(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let f = new FontFace(url, `url(${url})`);\n f.load().then(function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }).catch(function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n });\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../node/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n PERCENT,\n ];\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else {\n list.push([item[0], p[0] / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else {\n cy = y1 + positionY[0];\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n if(size[4] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[4];\n r = Math.max(xl, yl);\n // 看旋转\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n if(!isNil(points[5])) {\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n let v = gradient[2].match(/([-+]?[\\d.]+[pxremvwh%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwh%]+)?/ig) || [];\n o.v = v.map(item => {\n let color = /((?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\)))/i.exec(item);\n let arr = [rgba2int(color[1])];\n let percent = /[-+]?[\\d.]+[pxremvwh%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root) {\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root) {\n let w = x2 - x1;\n let h = y2 - y1;\n let [cx, cy, r, xl, yl, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n res.forEach(item => {\n v.children.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ],\n });\n });\n return ctx.add(v);\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n let clip = ctx.add(v);\n res.forEach(item => {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","const DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: '#000',\n borderRightColor: '#000',\n borderBottomColor: '#000',\n borderLeftColor: '#000',\n borderTopStyle: 'solid',\n borderRightStyle: 'solid',\n borderBottomStyle: 'solid',\n borderLeftStyle: 'solid',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nlet DOM_ENTRY_SET = [];\nlet DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet GEOM_ENTRY_SET = [];\nlet GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet INHERIT = {\n fontFamily: 'arial',\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 1,\n textStrokeOver: 'none',\n};\n\nlet INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwh%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwh%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwh%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwh%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwh%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwh%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR],\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\n};\n","import reset from '../style/reset';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { INHERIT } = unit;\nconst { STYLE_KEY } = enums;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\nconst MEASURE = {\n [STYLE_KEY.FONT_SIZE]: true,\n [STYLE_KEY.FONT_WEIGHT]: true,\n [STYLE_KEY.FONT_FAMILY]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\n MEASURE,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n};\n\no.isIgnore = function(k) {\n return IGNORE.hasOwnProperty(k);\n};\nfunction isGeom(tagName, k) {\n return GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n}\no.isGeom = isGeom;\no.isRepaint = function(k) {\n return REPAINT.hasOwnProperty(k) || isGeom(k);\n};\no.isMeasure = function(k) {\n return MEASURE.hasOwnProperty(k);\n};\no.isValid = function(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n};\n\nlet MEASURE_KEY_SET = o.MEASURE_KEY_SET = Object.keys(MEASURE).map(i => parseInt(i));\nlet len = MEASURE_KEY_SET.length;\no.isMeasureInherit = function(target) {\n if(target) {\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n return true;\n }\n }\n }\n return false;\n};\no.measureInheritList = function(target) {\n let list = [];\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n list.push(k);\n }\n }\n return list;\n};\n\no.addGeom('$line', ['x1', 'y1', 'x2', 'y2', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end']);\n\nexport default o;\n","import unit from './unit';\nimport font from './font';\nimport gradient from './gradient';\nimport reg from './reg';\nimport reset from './reset';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\n\nconst { STYLE_KEY, STYLE_RV_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, calUnit } = unit;\nconst { isNil, rgba2int, equalArr } = util;\nconst { MEASURE_KEY_SET, isGeom, GEOM, GEOM_KEY_SET } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = DEG;\n }\n }\n}\n\n/**\n * 将传入的手写style标准化,并且用reset默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param reset 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, reset = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(!isNil(v) && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n reset.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n if(reg.img.test(item)) {\n return reg.img.exec(item)[2];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [gradient.parseGradient(temp)];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [reg.img.exec(temp)[2]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\n }\n }\n temp = style.backgroundColor;\n if(temp) {\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), RGBA];\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(!isNil(temp)) {\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n PERCENT,\n ];\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwh%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0] === 'contain' || match[0] === 'cover') {\n match[1] = match[0];\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(!isNil(v)) {\n res[STYLE_KEY[style2Upper(k)]] = [rgba2int(v), RGBA];\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(!isNil(v)) {\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push([MATRIX, [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]]);\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, arr]);\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push([ROTATE_3D, arr]);\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push([k2, arr]);\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(!isNil(temp)) {\n let arr = calUnit(temp);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, PERCENT]);\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp) {\n let arr = temp.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n res[ROTATE_3D] = arr;\n }\n }\n temp = style.opacity;\n if(!isNil(temp)) {\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n if(v === 'auto') {\n v = [0, AUTO];\n }\n else {\n v = calUnit(v);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(!isNil(temp)) {\n if(temp === 'content') {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, AUTO];\n }\n }\n temp = style.order;\n if(!isNil(temp)) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[COLOR] = [[], INHERIT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp || temp === 0) {\n if(temp === 'inherit') {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_OVER] = [0, INHERIT];\n }\n else {\n let v = temp.toString();\n if(v !== 'none' && v !== 'fill') {\n v = 'none';\n }\n res[TEXT_STROKE_OVER] = [v, STRING];\n }\n }\n temp = style.fontWeight;\n if(!isNil(temp)) {\n if(temp === 'bold') {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(temp === 'normal') {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(temp === 'lighter') {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(temp === 'inherit') {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_STYLE] = [0, INHERIT];\n }\n else {\n res[FONT_STYLE] = [temp, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.textAlign;\n if(temp) {\n if(temp === 'inherit') {\n res[TEXT_ALIGN] = [0, INHERIT];\n }\n else {\n res[TEXT_ALIGN] = [temp, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp) {\n if(temp === 'inherit') {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, STRING];\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[FILL] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [gradient.parseGradient(temp)];\n }\n else {\n res[FILL] = [rgba2int(temp)];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[STROKE] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [gradient.parseGradient(temp)];\n }\n else {\n res[STROKE] = [rgba2int(temp)];\n }\n }\n temp = style.strokeWidth;\n if(!isNil(temp)) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(!isNil(temp)) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = item.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = temp.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n temp = style.filter;\n if(temp !== undefined) {\n let match = (temp || '').toString().match(/\\b[\\w-]+\\s*\\(\\s*[-+]?[\\d.]+\\s*[pxremvwhdg%]*\\s*\\)\\s*/ig);\n let f = null;\n if(match) {\n f = [];\n match.forEach(item => {\n let m2 = /([\\w-]+)\\s*\\(\\s*([-+]?[\\d.]+\\s*[pxremvwhdg%]*)\\s*\\)\\s*/i.exec(item);\n if(m2) {\n let k = m2[1].toLowerCase(), v = calUnit(m2[2]);\n if(k === 'blur') {\n if(v[0] <= 0 || [DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n f.push([k, v]);\n }\n else if(k === 'hue-rotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push([k, v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = PERCENT;\n f.push([k, v]);\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp) {\n if(temp === 'inherit') {\n res[VISIBILITY] = [0, INHERIT];\n }\n else {\n res[VISIBILITY] = [temp, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp) {\n if(temp === 'inherit') {\n res[POINTER_EVENTS] = [0, INHERIT];\n }\n else {\n res[POINTER_EVENTS] = [temp, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\n let match = (temp || '').match(/([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(((transparent)|(#[0-9a-f]{3,8})|(rgba?\\(.+?\\)))\\s*)?(inset|outset)?\\s*,?/ig);\n if(match) {\n match.forEach(item => {\n let boxShadow = /([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(?:((?:transparent)|(?:#[0-9a-f]{3,8})|(?:rgba?\\(.+\\)))\\s*)?(inset|outset)?/i.exec(item);\n if(boxShadow) {\n bs = bs || [];\n let res = [];\n // v,h,blur,spread,color,inset\n for(let i = 0; i < 4; i++) {\n let v = calUnit(boxShadow[i + 1]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 1 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n res.push(rgba2int(boxShadow[5]));\n res.push(boxShadow[6] || 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = style[k];\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n res[STYLE_KEY[style2Upper(k)]] = Array.isArray(v) ? v : [v];\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\n/**\n * 第一次和REFLOW等级下,刷新前首先执行,生成computedStyle\n * 影响文字测量的只有字体和大小和重量,需要提前处理\n * 继承相关的计算\n * @param node 对象节点\n * @param isRoot 是否是根节点,无继承需使用默认值\n */\nfunction computeMeasure(node, isRoot) {\n let { currentStyle, computedStyle, domParent } = node;\n let parentComputedStyle = !isRoot && domParent.computedStyle;\n MEASURE_KEY_SET.forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v[1] === INHERIT) {\n computedStyle[k] = getFontFamily(isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k]);\n }\n else {\n computedStyle[k] = getFontFamily(v[0]);\n }\n }\n else if(v[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.height * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\n }\n });\n}\n\n/**\n * 每次布局前需要计算的reflow相关的computedStyle\n * @param node 对象节点\n * @param isHost 是否是根节点或组件节点这种局部根节点,无继承需使用默认值\n */\nfunction computeReflow(node, isHost) {\n let { currentStyle, computedStyle, domParent: parent, root } = node;\n let rem = root.computedStyle[FONT_SIZE];\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.computedStyle;\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n if(item[1] === PX) {\n computedStyle[k] = item[0];\n }\n else if(item[1] === REM) {\n computedStyle[k] = item[0] * rem;\n }\n else if(item[1] === VW) {\n computedStyle[k] = item[0] * root.width * 0.01;\n }\n else if(item[1] === VH) {\n computedStyle[k] = item[0] * root.height * 0.01;\n }\n else {\n computedStyle[k] = 0;\n }\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n // 防止为0\n else if(lineHeight[1] === PX) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === PERCENT) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * fontSize * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === REM) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * rem, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VW) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.width * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VH) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.height * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // normal或auto\n else {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing[1] === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else if(letterSpacing[1] === PERCENT) {\n computedStyle[LETTER_SPACING] = fontSize * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === REM) {\n computedStyle[LETTER_SPACING] = rem * letterSpacing[0];\n }\n else if(letterSpacing[1] === VW) {\n computedStyle[LETTER_SPACING] = root.width * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === VH) {\n computedStyle[LETTER_SPACING] = root.height * 0.01 * letterSpacing[0];\n }\n else {\n computedStyle[LETTER_SPACING] = letterSpacing[0];\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\n }\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE];\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + (style[FONT_FAMILY] || 'arial');\n}\n\nfunction getFontFamily(str) {\n let ff = str.split(',');\n let f = 'arial';\n for(let i = 0, len = ff.length; i < len; i++) {\n if(font.support(ff[i])) {\n f = ff[i];\n break;\n }\n }\n return f;\n}\n\nfunction getBaseLine(style) {\n let fontSize = style[FONT_SIZE];\n let ff = getFontFamily(style[FONT_FAMILY]);\n let normal = fontSize * (font.info[ff] || font.info.arial).lhr;\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info.arial).blr;\n}\n\nfunction calNormalLineHeight(style) {\n let ff = getFontFamily(style[FONT_FAMILY]);\n return style[FONT_SIZE] * (font.info[ff] || font.info.arial).lhr;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n return v;\n}\n\nfunction calAbsolute(currentStyle, k, v, size, root) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER, DEG, RGBA, STRING].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n v = v[0] * size * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * root.height * 0.01;\n }\n return v;\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\n }\n if(k === BACKGROUND_SIZE) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equalArr(a, b);\n }\n return a === b;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [COLOR]: true,\n [TEXT_STROKE_COLOR]: true,\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\n};\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n // 可能为null\n if(item && item.k) {\n return util.clone(item);\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变\n // 可能非法为空\n if(item && item.k) {\n return util.clone(item);\n }\n // 颜色\n else {\n return item.slice(0);\n }\n });\n }\n else if(k === TRANSFORM || k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\n }\n }\n return res;\n}\n\nexport default {\n normalize,\n computeMeasure,\n computeReflow,\n setFontStyle,\n getFontFamily,\n getBaseLine,\n calRelative,\n calAbsolute,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n};\n","import mode from './mode';\nimport css from '../style/css';\nimport enums from '../util/enums';\nimport util from '../util/util';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, wList) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n this.__width = w;\n this.__height = h;\n this.__content = content;\n this.__wList = wList;\n this.__virtualDom = {};\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, wList, width } = this;\n let { ox, oy } = parent;\n y += css.getBaseLine(computedStyle);\n x += ox + dx;\n y += oy + dy;\n this.__endX = x + width;\n this.__endY = y;\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n if(overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content.charAt(i), x, y);\n }\n if(!overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n x += wList[i] + letterSpacing;\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', x],\n ['y', y],\n ['fill', cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n props.push(['stroke', cacheStyle[TEXT_STROKE_COLOR]]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseLine() {\n return this.parent.baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get wList() {\n return this.__wList;\n }\n}\n\nexport default TextBox;\n","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.offscreen.canvas;\n }\n\n get ctx() {\n return this.offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, sy3], n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport geom from './geom';\n\nexport default {\n matrix,\n tar,\n geom,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n }\n else if(k === ROTATE_Y) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n }\n else if(k === ROTATE_Z) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r[0]);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let [k, v] = item;\n let t = identity();\n calSingle(t, k, v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\n });\n return res;\n}\n\nfunction calOrigin(transformOrigin, w, h, root) {\n let tfo = [];\n transformOrigin.forEach((item, i) => {\n if(item[1] === PX) {\n tfo.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n tfo.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n tfo.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n tfo.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n tfo.push(item[0] * root.height * 0.01);\n }\n });\n return tfo;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calOrigin,\n calMatrixByPerspective,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\nimport mx from '../math/matrix';\nimport blur from '../math/blur';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n DISPLAY,\n VISIBILITY,\n },\n NODE_KEY: {\n NODE_OPACITY,\n NODE_CACHE,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_HAS_CONTENT,\n NODE_COMPUTED_STYLE,\n },\n} = enums;\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用\nfunction genSingle(cache, message) {\n let { size, sx1, sy1, width, height, bbox } = cache;\n let offscreen = inject.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bbox;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let [x, y] = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始x1/y1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.update = true;\n }\n\n clear() {\n if(this.available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.enabled) {\n this.clear();\n this.page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.enabled) {\n this.clear();\n return;\n }\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get canvas() {\n return this.page.canvas;\n }\n\n get ctx() {\n return this.page.ctx;\n }\n\n get size() {\n return this.page.size;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean, draw()}}\n */\n static genFilter(cache, filter) {\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n let { x, y, size, canvas, sx1, sy1, width, height, bbox } = cache;\n bbox = bbox.slice(0);\n bbox[0] -= d;\n bbox[1] -= d;\n bbox[2] += d;\n bbox[3] += d;\n let offscreen = inject.getCacheCanvas(width + d * 2, height + d * 2, null, 'filter1');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.draw();\n offscreen.bbox = bbox;\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.sx1 = sx1 - d;\n offscreen.sy1 = sy1 - d;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width + d * 2;\n offscreen.height = height + d * 2;\n return offscreen;\n }\n\n static genMask(target, next, isClip, transform, tfo) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n while(next && (next.isMask)) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n let __config = item.__config;\n let cacheOverflow = __config[NODE_CACHE_OVERFLOW], cacheFilter = __config[NODE_CACHE_FILTER], cache = __config[NODE_CACHE];\n let source = cacheOverflow && cacheOverflow.available && cacheOverflow;\n if(!source) {\n source = cacheFilter && cacheFilter.available && cacheFilter;\n }\n if(!source) {\n source = cache && cache.available && cache;\n }\n if(source) {\n ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(\n source, cacheMask,\n __config[NODE_COMPUTED_STYLE][TRANSFORM],\n mx.identity(),\n __config[NODE_COMPUTED_STYLE][TRANSFORM_ORIGIN].slice(0),\n inverse\n );\n }\n // 没有内容或者img没加载成功导致没有内容,有内容且可见则是超限,不可能进这里\n else if(__config[NODE_HAS_CONTENT]\n && __config[NODE_COMPUTED_STYLE][DISPLAY] !== 'none'\n && __config[NODE_COMPUTED_STYLE][VISIBILITY] !== 'hidden') {\n inject.error('CacheMask is oversize');\n }\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n cacheMask.draw(ctx);\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { sx, sy, outerWidth, outerHeight } = node;\n let xe = sx + outerWidth;\n let ye = sy + outerHeight;\n if(bbox[0] < sx || bbox[1] < sy || bbox[2] > xe || bbox[3] > ye) {\n let cacheOverflow = genSingle(target, 'overflow');\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n cacheOverflow.draw(ctx);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(sx - bbox[0], sy - bbox[1], outerWidth, outerHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n /**\n * bbox变化时直接用老的cache内容重设bbox\n * @param cache\n * @param bbox\n */\n static updateCache(cache, bbox) {\n let old = cache.bbox;\n if(!util.equalArr(bbox, old)) {\n let dx = old[0] - bbox[0];\n let dy = old[1] - bbox[1];\n let newCache = Cache.getInstance(bbox);\n if(newCache && newCache.enabled) {\n let { x: ox, y: oy, canvas, width, height } = cache;\n let { x: nx, y: ny } = newCache;\n newCache.sx1 = cache.sx1;\n newCache.sy1 = cache.sy1;\n newCache.dx = cache.dx + dx;\n newCache.dy = cache.dy + dy;\n newCache.dbx = cache.dbx + dx;\n newCache.dby = cache.dby + dy;\n newCache.ctx.drawImage(canvas, ox, oy, width, height, dx + nx, dy + ny, width, height);\n newCache.__available = true;\n cache.release();\n return newCache;\n }\n }\n else {\n return cache;\n }\n }\n\n static drawCache(source, target, transform, matrix, tfo, inverse) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n }\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport mode from './mode';\nimport css from '../style/css';\nimport font from '../style/font';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport textCache from './textCache';\nimport inject from '../util/inject';\nimport Cache from '../refresh/Cache';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_STYLE,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_MEASURE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n} = enums;\n\nconst ELLIPSIS = textCache.ELLIPSIS;\nconst AUTO = unit.AUTO;\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidthList = [];\n this.__charWidth = 0;\n this.__textWidth = 0;\n }\n\n /**\n * 预先计算每个字的宽度,在每次布局渲染前做\n * @param renderMode\n * @param ctx\n * @private\n */\n __computeMeasure(renderMode, ctx) {\n let { content, computedStyle, charWidthList } = this;\n // 每次都要清空重新计算,计算会有缓存\n charWidthList.splice(0);\n let ffs = computedStyle[FONT_FAMILY].split(',');\n let ff = 'arial';\n for(let i = 0, len = ffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(ffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n this.__ff = ff;\n let fs = computedStyle[FONT_SIZE];\n let fw = computedStyle[FONT_WEIGHT];\n let key = this.__key = computedStyle[FONT_SIZE] + ',' + ff + ',' + fw;\n let wait = textCache.data[key] = textCache.data[key] || {\n ff,\n fs,\n fw,\n hash: {},\n s: '',\n };\n let cache = textCache.charWidth[key] = textCache.charWidth[key] || {};\n let sum = 0;\n let needMeasure = false;\n // text-overflow:ellipse需要,即便没有也要先测量,其基于最近非inline父节点的字体\n let bp = this.domParent;\n while(bp.currentStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let parentComputedStyle = bp.computedStyle;\n let pff = 'arial';\n for(let i = 0, pffs = parentComputedStyle[FONT_FAMILY].split(','), len = pffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(pffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n let pfs = parentComputedStyle[FONT_SIZE];\n let pfw = parentComputedStyle[FONT_WEIGHT];\n let pKey = this.__pKey = pfs + ',' + pff + ',' + pfw;\n let parentCache = textCache.charWidth[pKey] = textCache.charWidth[pKey] || {};\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(renderMode === mode.WEBGL) {\n ctx = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__').ctx;\n }\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n ctx.font = css.setFontStyle(parentComputedStyle);\n parentCache[ELLIPSIS] = ctx.measureText(ELLIPSIS).width;\n }\n ctx.font = css.setFontStyle(computedStyle);\n }\n else if(renderMode === mode.SVG) {\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n parentCache[ELLIPSIS] = 0;\n let wait = textCache.data[pKey] = textCache.data[pKey] || {\n ff: pff,\n fs: pfs,\n fw: pfw,\n hash: {},\n s: '',\n };\n wait.s += ELLIPSIS;\n needMeasure = true;\n }\n }\n // 逐字测量,canvas可瞬间得到信息,svg先预存统一进行\n for(let i = 0, length = content.length; i < length; i++) {\n let char = content.charAt(i);\n let mw;\n if(cache.hasOwnProperty(char)) {\n mw = cache[char];\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n mw = cache[char] = ctx.measureText(char).width;\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else {\n if(!wait.hash.hasOwnProperty(char)) {\n wait.s += char;\n }\n wait.hash[char] = true;\n // 先预存标识位-1,测量完后替换它\n charWidthList.push(-1);\n needMeasure = true;\n }\n }\n this.__textWidth = sum;\n if(needMeasure) {\n textCache.list.push(this);\n }\n }\n\n __measureCb() {\n let { content, charWidthList } = this;\n let key = this.__key;\n let cache = textCache.charWidth[key];\n let sum = 0;\n for(let i = 0, len = charWidthList.length; i < len; i++) {\n if(charWidthList[i] < 0) {\n let mw = charWidthList[i] = cache[content.charAt(i)];\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n }\n this.__textWidth = sum;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layout(data) {\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, lx = x, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0 } = data;\n this.__x = this.__sx1 = x;\n this.__y = this.__sy1 = y;\n let { isDestroyed, content, currentStyle, computedStyle, textBoxes, charWidthList, root, __ff, __key } = this;\n textBoxes.splice(0);\n let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\n // 空内容w/h都为0可以提前跳出\n if(isDestroyed || currentStyle[DISPLAY] === 'none' || !content) {\n return lineClampCount;\n }\n this.__ox = this.__oy = 0;\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let begin = 0;\n let i = 0;\n let beginSpace = x - lx; // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n let count = beginSpace;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n } = computedStyle;\n // 特殊字体中特殊字符连续时需减少一定的padding量\n let padding = font.info[__ff].padding;\n let needReduce = !!padding;\n let lastChar;\n let ew = textCache.charWidth[this.__pKey][ELLIPSIS];\n let lineCount = 0;\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow;\n // block的overflow:hidden和textOverflow:clip/ellipsis才生效,inline要看最近非inline父元素\n let bp = this.__bp;\n let {\n [DISPLAY]: display,\n [OVERFLOW]: overflow,\n [WIDTH]: width,\n [TEXT_OVERFLOW]: textOverflow,\n } = bp.currentStyle;\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n while(i < length) {\n count += charWidthList[i] + letterSpacing;\n if(count > w) {\n // block/flex无需宽度,inline-block需要设置宽度才生效\n if(display === 'block' || display === 'flex') {\n isTextOverflow = true;\n }\n else if(width[1] !== AUTO) {\n isTextOverflow = true;\n }\n break;\n }\n i++;\n }\n }\n else {\n while(i < length) {\n count += charWidthList[i++] + letterSpacing;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n }\n // 默认clip跟随overflow:hidden,无需感知\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, count - beginSpace, lineHeight,\n content, charWidthList);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n maxW = count - beginSpace;\n y += lineHeight;\n }\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let cw = charWidthList[i] + letterSpacing;\n count += cw;\n // 连续字符减少padding,除了连续还需判断char是否在padding的hash中\n if(needReduce) {\n let char = content[i];\n if(char === lastChar && padding.hasOwnProperty(char) && padding[char]) {\n let hasCache, p = textCache.padding[__key] = textCache.padding[__key] || {};\n if(textCache.padding.hasOwnProperty(__key)) {\n if(p.hasOwnProperty(char)) {\n hasCache = true;\n count -= p[char];\n }\n }\n if(!hasCache) {\n let n = 0;\n if(root.renderMode === mode.CANVAS) {\n root.ctx.font = css.setFontStyle(computedStyle);\n let w1 = root.ctx.measureText(char).width;\n let w2 = root.ctx.measureText(char + char).width;\n n = w1 * 2 - w2;\n n *= padding[char];\n }\n else if(root.renderMode === mode.SVG) {\n n = inject.measureTextSync(__key, __ff, fontSize, fontWeight, char);\n n *= padding[char];\n }\n count -= n;\n p[char] = n;\n }\n }\n lastChar = char;\n }\n // 忽略零宽字符\n if(cw === 0) {\n i++;\n continue;\n }\n // 换行都要判断i不是0的时候,第1个字符强制不换行\n if(count === w) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n let textBox;\n // 特殊情况,恰好最后一行最后一个排满,此时查看末尾mpb,要防止i为0的情况首个字符特殊不回退,无需看开头mpb\n if(i === length - 1 && count > w - endSpace && i) {\n count -= charWidthList[i--];\n }\n i++;\n if(!lineCount) {\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, count);\n }\n // 必须先添加再设置y,当有diff的lineHeight时,第一个换行不影响,再换行时第2个换行即第3行会被第1行影响\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null; // 换行后连续字符reduce不生效重新计数\n }\n // 奇怪的精度问题,暂时不用相等判断,而是为原本w宽度加一点点冗余1e-10\n else if(count > w + (1e-10)) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n // 普通非多行文本阶段逻辑\n let width;\n // 宽度不足时无法跳出循环,至少也要塞个字符形成一行,无需判断第1行,因为是否放得下逻辑在dom中做过了,\n // 如果第1行放不下,一定会另起一行,此时作为开头再放不下才会进这里,这个if只有0或1个字符的情况\n if(i <= begin) {\n width = count;\n }\n // 超过2个字符回退1个\n else {\n width = count - charWidthList[i--];\n }\n i++;\n // 根据是否第一行分开处理行首空白\n let textBox;\n if(!lineCount) {\n maxW = width - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, width);\n }\n // 必须先添加再设置y,同上\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null;\n }\n else {\n i++;\n }\n }\n // 换行后Text的x重设为lx\n if(!lineCount) {\n this.__x = this.__sx1 = lx;\n }\n // 最后一行,只有一行未满时也进这里,需查看末尾mpb,排不下回退一个字符\n // 声明了lineClamp时特殊考虑,这里一定是最后一行,要对比行数不能超过,超过忽略掉这些文本\n if(begin < length && (!lineClamp || lineCount + lineClampCount < lineClamp)) {\n let textBox;\n if(!lineCount) {\n let needBack;\n // 防止开头第一个begin=0时回退,这在inline有padding且是第一个child时会发生\n if(begin && count > w - endSpace) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n else {\n let needBack;\n // 防止begin在结尾时回退,必须要有个字符,这在最后一行1个字符排不下时会出现\n if(count > w - endSpace && begin < length - 1) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n maxW = Math.max(maxW, count);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n }\n }\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseLine = css.getBaseLine(computedStyle);\n return lineCount;\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount, lineHeight, lx, x, y, maxW,\n textBoxes, content, charWidthList, lineBoxManager) {\n for(; i >= begin; i--) {\n count -= charWidthList[i] + letterSpacing;\n if(count + ew + endSpace <= w) {\n // 至少1个字符不用回退,到0也没找到需要回退\n if(i) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n break;\n }\n }\n }\n // 最后也没找到,看是否要查找前一个inline节点,还是本身是行首兜底首字母\n if(i < 0) {\n let lineBox = lineBoxManager.lineBox;\n // lineBox为空是行首,至少放1个字符\n if(!lineBox.size) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.charAt(begin), charWidthList.slice(begin, begin + 1));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n }\n // 向前查找inline节点,可能会有前面inline嵌套,因此直接用lineBox,不会出现inlineBlock,\n // 这里和css不同,ib强制超限换行不会同行\n else {\n let list = lineBox.list;\n outer:\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n let { content, wList, width } = tb;\n // 整体减去可以说明可能在这个tb中,只要最后发现不是空文本节点就行,否则继续;第0个强制进入保证1字符\n if(count - width + ew <= w || !j) {\n // 找到可以跳出outer循环,找不到继续,注意第0个且1个字符判断\n for(let k = wList.length - 1; k >= 0; k--) {\n if(!k && !j || count + ew <= w) {\n tb.__content = content;\n tb.__width = width;\n tb.parent.__ellipsis = true;\n break outer;\n }\n else {\n let w2 = wList[k];\n tb.__endY -= w2;\n width -= w2;\n content = content.slice(0, k);\n count -= w2;\n wList.pop();\n }\n }\n }\n // 不够则看前一个tb并且删掉这个\n else {\n count -= width;\n }\n list.pop();\n tb.parent.textBoxes.pop();\n }\n }\n }\n return [y, maxW];\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__sx1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__sy1 += diff;\n }\n\n __tryLayInline(w) {\n return w - this.charWidthList[0];\n }\n\n __inlineSize() {\n let minX, maxX;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n minX = Math.min(minX, item.x);\n maxX = Math.max(maxX, item.x + item.width);\n }\n else {\n minX = item.x;\n maxX = item.x + item.width;\n }\n });\n this.__x = minX;\n this.__sx = this.__sx1 = minX + this.ox;\n this.__width = maxX - minX;\n }\n\n __calMaxAndMinWidth() {\n let n = 0;\n this.charWidthList.forEach(item => {\n n = Math.max(n, item);\n });\n return { max: this.textWidth, min: n };\n }\n\n __calAbsWidth(x, y, w) {\n this.__layout({\n x,\n y,\n w,\n }, true);\n return this.width;\n }\n\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __ellipsis, __bp, __config } = this;\n if(renderMode === mode.SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === mode.WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\n }\n if(__cache && __cache.enabled) {\n __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += -sx + __cache.x;\n dy += -sy + __cache.y;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let strokeColor = cacheStyle[TEXT_STROKE_COLOR];\n if(ctx.strokeStyle !== strokeColor) {\n ctx.strokeStyle = strokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === mode.SVG) {\n this.virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n // textOverflow的省略号font使用最近非inline的父节点\n if(__ellipsis) {\n let last = textBoxes[textBoxes.length - 1];\n let { endX, endY } = last;\n let computedStyle = __bp.computedStyle;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = __bp.__cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n ctx.fillText(ELLIPSIS, endX, endY);\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', endX],\n ['y', endY],\n ['fill', __bp.__cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n this.virtualDom.children.push({\n type: 'item',\n tagName: 'text',\n props,\n content: ELLIPSIS,\n });\n }\n }\n }\n\n __deepScan(cb) {\n cb(this);\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidthList() {\n return this.__charWidthList;\n }\n\n get charWidth() {\n return this.__charWidth;\n }\n\n get firstCharWidth() {\n return this.charWidthList[0] || 0;\n }\n\n get textWidth() {\n return this.__textWidth;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get root() {\n return this.domParent.root;\n }\n\n get currentStyle() {\n return this.domParent.currentStyle;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.domParent.computedStyle;\n }\n\n get cacheStyle() {\n return this.domParent.__cacheStyle;\n }\n\n get bbox() {\n let { sx, sy, width, height, computedStyle: { [TEXT_STROKE_WIDTH]: textStrokeWidth = 0 } } = this;\n textStrokeWidth *= 0.5;\n return [sx - textStrokeWidth, sy - textStrokeWidth, sx + width + textStrokeWidth, sy + height + textStrokeWidth];\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get matrix() {\n return this.domParent.matrix;\n }\n\n get matrixEvent() {\n return this.domParent.matrixEvent;\n }\n}\n\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\n","import util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasUpdate) {\n return;\n }\n cp.__hasUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must implement render()');\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseLine',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__calMp',\n '__calAbs',\n '__renderAsMask',\n '__renderByMask',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n '__deepScan',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { PERCENT, NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, NUMBER]],\n ];\n let tfo = transform.calOrigin([[0, PERCENT], [0, PERCENT]], w, h);\n tfo[0] += x;\n tfo[1] += y;\n return transform.calMatrixWithOrigin(list, tfo, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport unit from './unit';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { AUTO, PX, PERCENT, STRING, REM, VW, VH } = unit;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr, method = 'fill', isInline) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction calBackgroundSize(value, w, h, root) {\n let res = [];\n value.forEach((item, i) => {\n if(item[1] === PX) {\n res.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n res.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n res.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n res.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n res.push(item[0] * root.height * 0.01);\n }\n else if(item[1] === AUTO) {\n res.push(-1);\n }\n else if(item[1] === STRING) {\n res.push(item[0] === 'contain' ? -2 : -3);\n }\n });\n return res;\n}\n\nfunction calBackgroundPosition(position, container, size, root) {\n if(Array.isArray(position)) {\n if(position[1] === PX) {\n return position[0];\n }\n else if(position[1] === PERCENT) {\n return (container - size) * position[0] * 0.01;\n }\n else if(position[1] === REM) {\n return position[0] * root.computedStyle[FONT_SIZE];\n }\n else if(position[1] === VW) {\n return position[0] * root.width * 0.01;\n }\n else if(position[1] === VH) {\n return position[0] * root.height * 0.01;\n }\n }\n return 0;\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, isInline) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = bx1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_X][i], bgW, w, xom.root);\n let bgY = by1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_Y][i], bgH, h, xom.root);\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeat-x', 'repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeat-y', 'repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = [bx1, by1];\n let p2 = [bx2, by2];\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n calBackgroundSize,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || (!task.length && !taskCp.length)) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n style[k] = target.currentStyle[k];\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵\nfunction inherit(frames, keys, target) {\n let computedStyle = target.computedStyle;\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.outerWidth;\n let oh = target.outerHeight;\n let m = tf.calMatrix(v, ow, oh);\n style[k] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => calUnit(item));\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,忽视顺序按hash计算,为空视为默认值,如blur默认0,brightness默认1\n let pHash = {}, nHash = {}, keyHash = {};\n if(p) {\n p.forEach(item => {\n keyHash[item[0]] = true;\n pHash[item[0]] = item[1];\n });\n }\n if(n) {\n n.forEach(item => {\n keyHash[item[0]] = true;\n nHash[item[0]] = item[1];\n })\n }\n let v = {}, hasChange;\n // 只有blur支持px/rem/vw/vh,其余都是特殊固定单位\n Object.keys(keyHash).forEach(k => {\n if(k === 'blur') {\n if(!pHash[k]) {\n v[k] = nHash[k].slice(0);\n hasChange = true;\n }\n else if(!nHash[k]) {\n v[k] = [-pHash[k][0], pHash[k][1]];\n hasChange = true;\n }\n else {\n let v2 = calByUnit(pHash[k], nHash[k], 0, target.root);\n v[k] = [v2, pHash[k][1]];\n hasChange = true;\n }\n }\n else if(k === 'hue-rotate') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let nv = isNil(nHash[k]) ? 100 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 100 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'grayscale') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n });\n if(!hasChange) {\n return;\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || isString(pi) || isString(ni)) {\n res[1].push(null);\n continue;\n }\n if(pi.k !== ni.k) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n // 渐变\n if(pi.k === 'linear' || pi.k === 'radial' || pi.k === 'conic') {\n let pv = pi.v;\n let nv = ni.v;\n temp[0] = [];\n let { clientWidth } = target;\n let eq = equalArr(pv, nv);\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\n }\n else {\n let v = calByUnit(a[1], b[1], clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n // 线性渐变有角度差值变化\n if(pi.k === 'linear') {\n let isArrP = Array.isArray(pi.d);\n let isArrN = Array.isArray(ni.d);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n let v = [ni.d[0] - pi.d[0], ni.d[1] - pi.d[1], ni.d[2] - pi.d[2], ni.d[3] - pi.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n else {\n let v = ni.d - pi.d;\n if(eq && v === 0) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n }\n // 径向渐变的位置\n else if(pi.k === 'radial') {\n let isArrP = Array.isArray(pi.z);\n let isArrN = Array.isArray(ni.z);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n temp[2] = [];\n for(let i = 0; i < 5; i++) {\n let pz = pi.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = ni.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n if(eq && equalArr(res[4], [0, 0, 0, 0, 0])) {\n res[1].push(null);\n }\n }\n else {\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = pi.p[i];\n let np = ni.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n else if(pi.k === 'conic') {\n temp[1].push(n.d - p.d);\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && res[2] !== 0 && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n // 纯色\n else {\n if(equalArr(n, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n n = n[0];\n p = p[0];\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res[1] = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n res[1].push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res[1] = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure') {\n return;\n }\n else {\n res[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\n }\n });\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n // 将已有的样式按key存入引用来操作\n let hash = {};\n st.forEach(item => {\n hash[item[0]] = item[1];\n });\n Object.keys(v).forEach(k => {\n if(hash.hasOwnProperty(k)) {\n hash[k][0] += v[k][0] * percent;\n }\n else {\n // 2个关键帧中有1个未声明,需新建样式存入\n if(k === 'blur' || k === 'hue-rotate' || k === 'grayscale') {\n let n = v[k].slice(0);\n n[0] *= percent;\n st.push([k, n]);\n }\n // 默认值是1而非0\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let n = v[k].slice(0);\n n[0] = 100 + n[0] * percent;\n st.push([k, n]);\n }\n }\n });\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let [c, d, p, z] = v2;\n if(GRADIENT_TYPE.hasOwnProperty(st2.k)) {\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[k];\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] += n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] += item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] += n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nlet uuid = 0;\n\nconst I_ASSIGNING = 0;\nconst I_IN_FPS = 1;\nconst I_IS_DELAY = 2;\nconst I_BEGIN = 3;\nconst I_END = 4;\nconst I_FINISHED = 5;\nconst I_NEXT_END = 6;\nconst I_FIRST_PLAY = 7;\nconst I_FRAME_CB = 8;\nconst I_PLAY_CB = 9;\nconst I_TARGET = 10;\nconst I_ROOT = 11;\nconst I_FRAMES = 12;\nconst I_FRAMES_R = 13;\nconst I_CURRENT_TIME = 14;\nconst I_NEXT_TIME = 15;\nconst I_STYLE = 16;\nconst I_DURATION = 17;\nconst I_ITERATIONS = 18;\nconst I_FILL = 19;\nconst I_PLAYBACK_RATE = 20;\nconst I_PLAY_COUNT = 21;\nconst I_PLAY_STATE = 22;\nconst I_DESTROYED = 23;\nconst I_START_TIME = 24;\nconst I_FPS_TIME = 25;\nconst I_EASING = 26;\nconst I_ENTER_FRAME = 27;\nconst I_DELAY = 28;\nconst I_END_DELAY = 29;\nconst I_KEYS = 30;\nconst I_ORIGIN_STYLE = 31;\nconst I_CURRENT_FRAMES = 32;\nconst I_CURRENT_FRAME = 33;\nconst I_SPF_LIMIT = 34;\nconst I_FPS = 35;\nconst I_DIRECTION = 36;\nconst I_CAL_DIFF_TIME = 37;\nconst I_FIRST_ENTER = 38;\nconst I_STAY_BEGIN = 39;\nconst I_STAY_END = 40;\nconst I_IS2 = 41;\nconst I_END_TIME = 42;\nconst I_NODE_CONFIG = 43;\nconst I_ROOT_CONFIG = 44;\nconst I_OUT_BEGIN_DELAY = 45;\nconst I_TIME_STAMP = 46;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n false, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n this.__frameCb,\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n this.__calDiffTime,\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let [frames, framesR, keys, originStyle] = this.__init(list, iterations, duration, op.easing, target);\n config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_TRANSITION] = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n __frameCb(__config, diff, isDelay) {\n this.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n this.emit(Event.PLAY);\n }\n if(isFunction(__config[I_PLAY_CB])) {\n __config[I_PLAY_CB].call(this, diff, isDelay);\n __config[I_PLAY_CB] = null;\n }\n }\n\n __calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n __config[I_NEXT_TIME] += diff;\n return [v, diff];\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = __config[I_PLAY_COUNT];\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = __config[I_CAL_DIFF_TIME](__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效\n if(playCount === 0 && currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧,仅首轮\n if(playCount === 0) {\n currentTime -= delay;\n }\n if(currentTime === 0 || __config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n __config[I_NEXT_TIME] -= duration;\n playCount = ++__config[I_PLAY_COUNT];\n __config[I_BEGIN] = true;\n round = true;\n }\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n this.__clean(true);\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n __config[I_FRAME_CB].call(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += __config[I_DELAY];\n }\n // 超过一轮去掉delay\n if(v > duration + __config[I_DELAY]) {\n v -= __config[I_DELAY];\n }\n // 超过时间长度需要累加次数\n __config[I_PLAY_COUNT] = 0;\n while(v > duration && __config[I_PLAY_COUNT] < __config[I_ITERATIONS] - 1) {\n __config[I_PLAY_COUNT]++;\n v -= duration;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = __config[I_PLAY_COUNT] % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_ITERATIONS];\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\n }\n}\n\nexport default Animation;\n","import mode from '../node/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h) {\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0 && (sigma > 0 || spread > 0)) {\n if(renderMode === mode.CANVAS | renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__config[NODE_DEFS_CACHE].push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__config[NODE_DEFS_CACHE].push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n 'color-dodge': true,\n 'color-burn': true,\n 'hard-light': true,\n 'soft-light': true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(mbmName(v));\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseLine\n * @param lineHeight\n * @param diffL\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, contentBoxList, start, end, lineBox, baseLine, lineHeight, diffL, isStart, isEnd,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let eyt = 0, eyb = 0;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n eyt = paddingTop;\n eyb = paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n eyt = paddingTop + borderTopWidth;\n eyb = paddingBottom + borderBottomWidth;\n }\n // 同y的border伸展范围,其影响border渲染\n let pbt = paddingTop + borderTopWidth;\n let pbb = paddingBottom + borderBottomWidth;\n // inline的baseLine和lineBox的差值\n let diff = lineBox.baseLine - baseLine;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseLine对齐后计算的\n let x1 = start.x;\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n dom = dom.domParent;\n }\n let bx1 = x1;\n if(isStart) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n bx1 -= paddingLeft + borderLeftWidth;\n }\n let y1 = lineBox.y + diff - eyt;\n let by1 = lineBox.y + diff - pbt;\n let x2 = end.x + end.outerWidth;\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n let bx2 = x2;\n if(isEnd) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x2 += paddingRight;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x2 += paddingRight + borderRightWidth;\n }\n bx2 += paddingRight + borderRightWidth;\n }\n let y2 = lineBox.y + diff + lineHeight - diffL + eyb;\n let by2 = lineBox.y + diff + lineHeight - diffL + pbb;\n // x要考虑xom的ox值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList) {\n let sum = 0;\n let length = contentBoxList.length;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n sum += contentBox.width;\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n if(contentBox === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import Node from './Node';\nimport mode from './mode';\nimport Component from './Component';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport blur from '../math/blur';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport Cache from '../refresh/Cache';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport inline from './inline';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n }\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, REM, VW, VH, DEG } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil } = util;\nconst { calRelative } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d } = mx;\n\nconst {\n contain,\n NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n} = level;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__config[NODE_IS_INLINE]) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = {}; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = {}; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = {}; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__isClip = !!this.props.clip;\n let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__mpWidth(currentStyle[a], w);\n computedStyle[b] = this.__mpWidth(currentStyle[b], w);\n });\n }\n\n __mpWidth(mp, w) {\n if(mp[1] === PX) {\n return mp[0];\n }\n else if(mp[1] === PERCENT) {\n return mp[0] * w * 0.01;\n }\n else if(mp[1] === REM) {\n return mp[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(mp[1] === VW) {\n return mp[0] * this.root.width * 0.01;\n }\n else if(mp[1] === VH) {\n return mp[0] * this.root.height * 0.01;\n }\n return 0;\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n\n // 换算margin/padding为px单位,onlyFixedValue只考虑绝对值,不考虑百分比等\n __calMp(v, w, onlyFixedValue) {\n let n = 0;\n if(v[1] === PX) {\n n += v[0];\n }\n else if(v[1] === PERCENT && !onlyFixedValue) {\n v[0] *= w * 0.01;\n v[1] = PX;\n n += v[0];\n }\n else if(v[1] === REM) {\n n += v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n n += v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n n += v[0] * this.root.height * 0.01;\n }\n return n;\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMp(isDirectionRow, w, currentStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w, !isDirectItem)\n + this.__calMp(marginRight, w, !isDirectItem)\n + this.__calMp(paddingLeft, w, !isDirectItem)\n + this.__calMp(paddingRight, w, !isDirectItem);\n if(borderLeftWidth[1] === PX) {\n mp += borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n mp += borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n mp += borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n mp += borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n mp += borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n mp += borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n mp += borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n mp += borderRightWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n else {\n let mp = this.__calMp(marginTop, w, !isDirectItem)\n + this.__calMp(marginBottom, w, !isDirectItem)\n + this.__calMp(paddingTop, w, !isDirectItem)\n + this.__calMp(paddingBottom, w, !isDirectItem);\n if(borderTopWidth[1] === PX) {\n mp += borderTopWidth[0];\n }\n else if(borderTopWidth[1] === REM) {\n mp += borderTopWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderTopWidth[1] === VW) {\n mp += borderTopWidth[0] * this.root.width * 0.01;\n }\n else if(borderTopWidth[1] === VH) {\n mp += borderTopWidth[0] * this.root.height * 0.01;\n }\n if(borderBottomWidth[1] === PX) {\n mp += borderBottomWidth[0];\n }\n else if(borderBottomWidth[1] === REM) {\n mp += borderBottomWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderBottomWidth[1] === VW) {\n mp += borderBottomWidth[0] * this.root.width * 0.01;\n }\n else if(borderBottomWidth[1] === VH) {\n mp += borderBottomWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n return res;\n }\n\n // absolute且无尺寸时,isVirtual标明先假布局一次计算尺寸,还有flex列计算时\n // fromAbs为absolute节点特有省略计算标识,本节点是abs时真正布局传入\n __layout(data, isVirtual, fromAbs) {\n css.computeReflow(this, this.isShadowRoot);\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config } = this;\n let {\n [DISPLAY]: display,\n } = computedStyle;\n let {\n [WIDTH]: width,\n [POSITION]: position,\n } = currentStyle;\n this.clearCache();\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n };\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = false;\n // 防止display:none不统计mask,isVirtual忽略,abs布局后续会真正来走一遍\n if(!isVirtual) {\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.isMask && next && (next.isMask)) {\n let count = 0;\n while(next) {\n if(next.isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\n if(isDestroyed || display === 'none') {\n this.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n return;\n }\n // margin/padding在abs前已经计算过了,无需二次计算\n if(!fromAbs) {\n this.__mp(currentStyle, computedStyle, w);\n }\n // inline的width/height无效,其它有效\n if(width[1] !== AUTO) {\n if(this.__isRealInline() && currentStyle[DISPLAY] === 'inline') {\n width[0] = 0;\n width[1] = AUTO;\n }\n else {\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n }\n let lineClampCount = 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n this.__layoutFlex(data, isVirtual);\n }\n else if(display === 'inlineBlock' || display === 'inline-block') {\n lineClampCount = this.__layoutInline(data, isVirtual);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isVirtual, true);\n }\n else {\n this.__layoutBlock(data, isVirtual);\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let { [TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left } = currentStyle;\n let { parent } = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if(right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if(position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\n x = this.__sx1 = x + computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.width;\n x = this.__sx5 = x + computedStyle[PADDING_RIGHT];\n this.__sx6 = x + computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.height;\n y = this.__sy5 = y + computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + computedStyle[BORDER_BOTTOM_WIDTH];\n }\n computedStyle[WIDTH] = this.width;\n computedStyle[HEIGHT] = this.height;\n // abs布局的不执行,在__layoutAbs末尾做,防止未布局没有尺寸从而动画计算错误\n if(!fromAbs) {\n this.__execAr();\n }\n return lineClampCount;\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\n computedStyle[MARGIN_TOP]\n = computedStyle[MARGIN_RIGHT]\n = computedStyle[MARGIN_BOTTOM]\n = computedStyle[MARGIN_LEFT]\n = computedStyle[PADDING_TOP]\n = computedStyle[PADDING_RIGHT]\n = computedStyle[PADDING_BOTTOM]\n = computedStyle[PADDING_LEFT]\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, nowrap, lineBoxManager, endSpace = 0 } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width[1] !== AUTO) {\n fixedWidth = true;\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n else if(height[1] !== AUTO) {\n fixedHeight = true;\n switch(height[1]) {\n case PX:\n h = height[0];\n break;\n case PERCENT:\n h *= height[0] * 0.01;\n break;\n case REM:\n h = height[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n h = height[0] * this.root.width * 0.01;\n break;\n case VH:\n h = height[0] * this.root.height * 0.01;\n break;\n }\n }\n // margin/padding/border影响x和y和尺寸,注意inline的y不受mpb影响\n x += borderLeftWidth + marginLeft + paddingLeft;\n data.x = x;\n if(!isInline) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mpb,其一定是block和inline互斥\n if(!isInline) {\n if(width[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n nowrap,\n endSpace,\n selfEndSpace,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')\n && (width[1] !== AUTO || this.tagName === 'img') && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = currentStyle[TRANSLATE_X];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n x = v - (computedStyle[TRANSLATE_X] || 0);\n computedStyle[TRANSLATE_X] = v;\n computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = currentStyle[TRANSLATE_Y];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetHeight * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n y = v - (computedStyle[TRANSLATE_Y] || 0);\n computedStyle[TRANSLATE_Y] = v;\n computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n z = v - (computedStyle[TRANSLATE_Z] || 0);\n computedStyle[TRANSLATE_Z] = v;\n computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n computedStyle[TRANSFORM_ORIGIN] = tf.calOrigin(currentStyle[TRANSFORM_ORIGIN], offsetWidth, offsetHeight, this.root);\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(currentStyle[TRANSFORM]) {\n matrix = tf.calMatrix(currentStyle[TRANSFORM], offsetWidth, offsetHeight, this.root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete computedStyle[k];\n let v = currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n computedStyle[k] = [v[0], v[1], v[2], v[3][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 0) {\n return;\n }\n if(v[1] === PERCENT) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * offsetWidth * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * offsetHeight * 0.01;\n }\n }\n else if(v[1] === REM) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n }\n else if(v[1] === VW) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n }\n else if(v[1] === VH) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n }\n temp.push([k, v]);\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, offsetWidth, offsetHeight, this.root);\n }\n }\n computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = computedStyle[TRANSFORM];\n let tfo = computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += sx1 || 0;\n tfo[1] += sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox' || backgroundClip === 'content-box') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\n if(isInline && !this.contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n computedStyle[BACKGROUND_SIZE] = (currentStyle[BACKGROUND_SIZE] || []).map(item => {\n return bg.calBackgroundSize(item, bx2 - bx1, by2 - by1, this.root);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = computedStyle[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE].slice(0);\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[BACKGROUND_IMAGE];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = BACKGROUND_IMAGE;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi;\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\n });\n }\n return true;\n }\n else if(!isInline && bgi.k) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n computedStyle[BOX_SHADOW] = (currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n let v = item2[0];\n if(item2[1] === PERCENT) {\n if(i % 2 === 0) {\n v *= 0.01 * (bx2 - bx1);\n }\n else {\n v *= 0.01 * (by2 - by1);\n }\n }\n else if(item2[1] === REM) {\n v = v * this.root.computedStyle[FONT_SIZE];\n }\n else if(item2[1] === VW) {\n v = v * this.root.width * 0.01;\n }\n else if(item2[1] === VH) {\n v = v * this.root.height * 0.01;\n }\n return v;\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(computedStyle[k] = currentStyle[k][0]);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.contentBoxList, currentStyle, computedStyle, this.root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(offsetWidth, offsetHeight, currentStyle, computedStyle, this.root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === INHERIT) {\n computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n computedStyle[FONT_STYLE] = currentStyle[FONT_STYLE][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n if(currentStyle[COLOR][1] === INHERIT) {\n computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : [0, 0, 0, 1];\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n else if(isNil(__cacheStyle[COLOR])) {\n computedStyle[COLOR] = rgba2int(currentStyle[COLOR][0]);\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n if(currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : [0, 0, 0, 1];\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n computedStyle[TEXT_STROKE_COLOR] = rgba2int(currentStyle[TEXT_STROKE_COLOR][0]);\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : 0;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = currentStyle[TEXT_STROKE_WIDTH];\n if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : 'none';\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = currentStyle[TEXT_STROKE_OVER][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === INHERIT) {\n computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n computedStyle[POINTER_EVENTS] = currentStyle[POINTER_EVENTS][0];\n }\n __cacheStyle[POINTER_EVENTS] = computedStyle[POINTER_EVENTS];\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = 0;\n if(v[1] === REM) {\n ppt = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n ppt = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n ppt = v[0] * this.root.height * 0.01;\n }\n else {\n ppt = v[0];\n }\n computedStyle[PERSPECTIVE] = ppt;\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n computedStyle[PERSPECTIVE_ORIGIN] = tf.calOrigin(currentStyle[PERSPECTIVE_ORIGIN], this.offsetWidth, this.offsetHeight, this.root);\n }\n if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\n return computedStyle[FILTER] = (currentStyle[FILTER] || []).map(item => {\n let [k, v] = item;\n // 部分%单位的滤镜强制使用数字\n if(v[1] === PX || v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n return [k, v];\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\n let visibility = currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][3] > 0) {\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT],\n paddingTop = computedStyle[PADDING_TOP], paddingRight = computedStyle[PADDING_RIGHT],\n paddingBottom = computedStyle[PADDING_BOTTOM], paddingLeft = computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]][0][3] > 0) {\n return true;\n }\n }\n let bs = currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && (item[2] > 0 || item[3] > 0)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @param lv\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否开启缓存\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT才会进入这里,清空bbox\n this.__bbox = null;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList);\n ih = lineHeight;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n let uuid = gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseLine,再减去lineBox的baseLine得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n let ff = css.getFontFamily(fontFamily);\n let baseLine = css.getBaseLine(computedStyle);\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - diffL\n let diffL = fontSize * (font.info[ff].lgr || 0);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0, countW = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseLine, lineHeight, diffL, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n countW += w;\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n count++;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseLine, lineHeight, diffL, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0]);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR]);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR]);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR]);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR]);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n root.delRefreshTask(this.__loadBgi.cb);\n root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\n this.clearCache();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.isClip;\n let hasEmitMask;\n while(next && next.isMask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, computedStyle } = this;\n if(computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd);\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.cx, gd.cy, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.cx],\n ['cy', gd.cy],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { cx, cy, r, deg, stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n else if(renderMode === SVG) {\n let offset = 0.5;\n let prev;\n // 根据2个stop之间的百分比得角度差划分块数,每0.5°一块,不足也算\n let list = [];\n for(let i = 0, len = stop.length; i < len - 1; i++) {\n let begin = stop[i][1] * 360;\n let end = stop[i + 1][1] * 360;\n let diff = end - begin;\n let n = Math.ceil(diff);\n let per = diff / n;\n // 计算每块的2个弧端点\n let bc = stop[i][0];\n let ec = stop[i + 1][0];\n let dc = [ec[0] - bc[0], ec[1] - bc[1], ec[2] - bc[2], ec[3] - bc[3]];\n let pc = [dc[0] / n, dc[1] / n, dc[2] / n, dc[3] / n];\n for(let j = 0; j < n; j++) {\n let [x1, y1] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg - offset);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg + offset);\n list.push([\n x1, y1,\n x2, y2,\n Math.round(bc[0] + pc[0] * j),\n Math.round(bc[1] + pc[1] * j),\n Math.round(bc[2] + pc[2] * j),\n Math.round(bc[3] + pc[3] * j),\n ]);\n }\n }\n // 最后一段补自己末尾颜色特殊处理\n let end = list[0].slice(0);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, deg);\n end[2] = x2;\n end[3] = y2;\n let s = stop[stop.length - 1][0];\n end[4] = s[0];\n end[5] = s[1];\n end[6] = s[2];\n end[7] = s[3];\n list.push(end);\n for(let i = 0, len = list.length; i < len; i++) {\n let cur = list[i];\n if(prev) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', prev[0]],\n ['y1', prev[1]],\n ['x2', cur[2]],\n ['y2', cur[3]],\n ],\n children: [\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([prev[4], prev[5], prev[6], prev[7]])],\n ['offset', '0%'],\n ],\n },\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([cur[4], cur[5], cur[6], cur[7]])],\n ['offset', '100%'],\n ],\n },\n ],\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n res.push([[[cx, cy], [prev[0], prev[1]], [cur[2], cur[3]]], 'url(#' + uuid + ')']);\n }\n prev = cur;\n }\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\n return animation;\n }\n this.animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(util.isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n __computeMeasure(renderMode, ctx, cb) {\n css.computeMeasure(this);\n if(util.isFunction(cb)) {\n cb(this);\n }\n }\n\n __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative/margin/flex/vertical等\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData.y += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n }\n\n __resizeX(diff, lv) {\n this.computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData.w += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n this.computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __spreadBbox(boxShadow) {\n let ox = 0, oy = 0;\n if(Array.isArray(boxShadow)) {\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, , inset] = item;\n if(inset !== 'inset') {\n let d = blur.outerSize(sigma);\n d += spread;\n ox = Math.max(ox, x + d);\n oy = Math.max(oy, y + d);\n }\n });\n }\n return [ox, oy];\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\n }\n\n getComputedStyle(key) {\n let computedStyle = this.computedStyle;\n let res = {};\n let keys;\n if(key) {\n if(Array.isArray(key)) {\n keys = key;\n }\n else {\n keys = [key];\n }\n keys = keys.map(s => {\n return STYLE_KEY[style2Upper(s)];\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect() {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent } = this;\n let p1 = point2d(mx.calPoint([__sx1, __sy1], matrixEvent));\n let p2 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1], matrixEvent));\n let p3 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1 + offsetHeight], matrixEvent));\n let p4 = point2d(mx.calPoint([__sx1, __sy1 + offsetHeight], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n let zChildren = domParent.zIndexChildren;\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(i === -1 || j === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n zChildren.splice(j, 1);\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(util.isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, clientWidth, clientHeight,\n currentStyle: {\n [BORDER_TOP_WIDTH]: borderTopWidth = [0],\n [BORDER_RIGHT_WIDTH]: borderRightWidth = [0],\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth = [0],\n [BORDER_LEFT_WIDTH]: borderLeftWidth = [0],\n [BOX_SHADOW]: boxShadow = [],\n } = {},\n } = this;\n let [ox, oy] = this.__spreadBbox(boxShadow);\n clientWidth += borderLeftWidth[0] + borderRightWidth[0];\n clientHeight += borderTopWidth[0] + borderBottomWidth[0];\n this.__bbox = [__sx1 - ox, __sy1 - oy, __sx1 + clientWidth + ox, __sy1 + clientHeight + oy];\n }\n return this.__bbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseLine() {\n return this.offsetHeight;\n }\n\n get firstBaseLine() {\n return this.offsetHeight;\n }\n\n get isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n}\n\nexport default Xom;\n","import enums from '../util/enums';\nimport TextBox from './TextBox';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_LEFT,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_RIGHT_WIDTH,\n MARGIN_RIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseLine,inlineBlock等节点按最后一行baseLine\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseLine) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseLine\n this.__baseLine = baseLine;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign() {\n let n = this.baseLine;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseLine发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n let m = item.baseLine;\n if(m !== n) {\n item.__offsetY(n - m);\n }\n });\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseLine,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseLine = Math.max(b, this.__baseLine);\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n return this.lineHeight;\n }\n\n get baseLine() {\n let baseLine = 0;\n this.list.forEach(item => {\n baseLine = Math.max(baseLine, item.baseLine);\n });\n return Math.max(this.__baseLine, baseLine);\n }\n\n get lineHeight() {\n let lineHeight = 0;\n // 只有TextBox和InlineBlock\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return Math.max(this.__lineHeight, lineHeight);\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseLine) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__maxX = x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseLine = baseLine;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n setLbOrGenLineBoxByInline(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n let lineBox;\n let list = this.list;\n if(this.__isNewLine) {\n lineBox = new LineBox(x, y, lineHeight, baseLine);\n list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n else {\n let length = list.length;\n lineBox = list[length - 1];\n lineBox.__setLB(l, b);\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox;\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n this.__maxX = Math.max(this.__maxX, o.x + o.outerWidth);\n return lineBox;\n }\n\n horizonAlign(w, textAlign) {\n this.list.forEach(lineBox => {\n let diff = w - lineBox.width;\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n lineBox.__offsetX(diff);\n lineBox.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n });\n }\n\n verticalAlign() {\n this.list.forEach(lineBox => {\n lineBox.verticalAlign();\n });\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n return n + list[length - 1].baseLine;\n }\n return 0;\n }\n\n get firstBaseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseLine;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.currentStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMarginTB(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[0];\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMarginTB,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport mode from './mode';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n FONT_WEIGHT,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n // PERSPECTIVE,\n // TRANSFORM,\n },\n NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n UPDATE_MEASURE,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH } = unit;\nconst { calAbsolute, isRelativeOrAbsolute } = css;\n\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.isMask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n inlineBlock: true,\n 'inline-block': true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = util.extend({}, this.__style);\n this.__children = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n child.__config[NODE_STRUCT][STRUCT_CHILD_INDEX] = i;\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + child[STRUCT_TOTAL] + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\n })\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param w 剩余宽度\n * @param total 容器尺寸\n * @returns {number|*}\n * @private\n */\n __tryLayInline(w, total) {\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n w = first.__tryLayInline(w, total);\n }\n else {\n w -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(w < 0) {\n return w;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n w = item.__tryLayInline(w, total);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n w -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n }\n // 还要减去开头的mpb\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto等对齐用\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n // 记得偏移LineBox\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n // item的递归子节点求min/max,只考虑固定值单位,忽略百分比,同时按方向和display\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h, lineBoxManager } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n else {\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n else if(display === 'block') {\n let countMin = 0, countMax = 0;\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n else {\n if(display === 'inlineBlock' || display === 'inline-block') {\n lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n if(isDirectionRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else if(isDirectionRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n });\n }\n }\n return [display, this.__addMp(isDirectionRow, w, currentStyle, [min, max])];\n }\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时isVirtual状态参与计算,文本抵达边界才进行换行\n * @param isDirectionRow\n * @param data\n * @param isVirtual abs非固定尺寸时先进行虚拟布局标识\n * @private\n */\n __calBasis(isDirectionRow, data, isVirtual) {\n css.computeReflow(this, this.isShadowRoot);\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n [FLEX_BASIS]: flexBasis,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = fixedSize = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = fixedSize = (isDirectionRow ? w : h) * flexBasis[0] * 0.01;\n }\n else if(flexBasis[1] === REM) {\n b = fixedSize = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = fixedSize = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = fixedSize = flexBasis[0] * this.root.height * 0.01;\n }\n }\n // 已声明主轴尺寸的,当basis是auto时为值\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1) && isAuto) {\n if(main[1] === PX) {\n b = fixedSize = main[0];\n }\n else if(main[1] === PERCENT) {\n b = fixedSize = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = fixedSize = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = fixedSize = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = fixedSize = main[0] * this.root.height * 0.01;\n }\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n // flex的item还是flex时\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n // flex的item是block/inline时,inline也会变成block统一对待\n else {\n let countMin = 0, countMax = 0;\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n if(isContent) {\n b = max;\n }\n // 直接item的mpb影响basis\n return this.__addMp(isDirectionRow, w, currentStyle, [b, min, max], true);\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isVirtual abs无尺寸时提前虚拟布局计算尺寸\n * @private\n */\n __layoutBlock(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxW = 0;\n let cw = 0;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isImg = item.tagName === 'img';\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || isInline && whiteSpace === 'nowrap') {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // abs统计宽度\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let fw = item.__tryLayInline(w + data.x - x, w);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(fw >= (-1e-10)) {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n // 非开头,说明之前的text未换行,需要增加行数\n if(x !== data.x && flowChildren[i - 1] instanceof Text) {\n lineClampCount++;\n }\n x = data.x;\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layout({\n x,\n y,\n w,\n h,\n }, isVirtual);\n let isNone = item.currentStyle[DISPLAY] === 'none';\n // 自身无内容\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n // absolute/flex前置虚拟计算\n if(isVirtual) {\n maxW = Math.max(maxW, item.outerWidth);\n cw = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n item.__offsetY(diff, true);\n y += diff;\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n }\n }\n // 文字和inline类似\n else {\n // lineClamp作用域为block下的inline(同LineBox上下文)\n if(lineClamp && lineClampCount >= lineClamp) {\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let fw = item.__tryLayInline(w - x + data.x);\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, item.width);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n }\n let tw = this.__width = (fixedWidth || !isVirtual) ? w : maxW;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isVirtual) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n this.__marginAuto(currentStyle, data);\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let maxX = 0;\n let isDirectionRow = ['column', 'column-reverse', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n // abs虚拟布局计算时纵向也是看横向宽度\n let [b, min, max] = item.__calBasis(isVirtual ? true : isDirectionRow, { x, y, w, h }, isVirtual);\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += max;\n }\n else {\n maxX = Math.max(maxX, max);\n }\n return;\n }\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += item.textWidth;\n }\n else {\n maxX = Math.max(maxX, item.textWidth);\n }\n return;\n }\n growList.push(0);\n shrinkList.push(1);\n if(isDirectionRow) {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n let h = item.height;\n basisList.push(h);\n minList.push(h);\n }\n }\n });\n // abs时,只需关注宽度即可,无需真正布局\n if(isVirtual) {\n let tw = this.__width = Math.min(maxX, w);\n this.__ioSize(tw, this.height);\n return;\n }\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = flexWrap === 'wrap' || ['wrap-reverse', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross] = this.__layoutFlexLine(clone, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n offset += length;\n });\n let tw = this.__width = w;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'row-reverse' || flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true);\n }\n });\n });\n }\n else if(flexDirection === 'column-reverse' || flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(['wrapReverse', 'wrap-reverse'].indexOf(flexWrap) > -1 && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(!isVirtual && length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true);\n }\n else {\n item.__offsetX(per, true);\n }\n });\n }\n else if(alignContent === 'flex-start' || alignContent === 'flexStart') {}\n else if(alignContent === 'flex-end' || alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n else if(alignContent === 'space-between' || alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true);\n }\n else {\n item.__offsetX(between, true);\n }\n });\n }\n });\n }\n else if(alignContent === 'space-around' || alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true);\n }\n else {\n item.__offsetX(around * (i + 1), true);\n }\n });\n });\n }\n // 默认stretch\n else {\n per = diff / length;\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true);\n }\n else {\n item.__offsetX(per * i, true);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行cross对齐,在alignContent为stretch时计算每行的高度\n if(!isVirtual) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__crossAlign(item, alignItems, isDirectionRow, maxCross);\n });\n }\n else if(length) {\n let maxCross = maxCrossList[0];\n if(isDirectionRow) {\n if(fixedHeight) {\n maxCross = h;\n }\n }\n else {\n maxCross = w;\n }\n this.__crossAlign(__flexLine[0], alignItems, isDirectionRow, maxCross);\n }\n }\n this.__marginAuto(currentStyle, data);\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free);\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) {\n let n = item * basisList[i];\n factorSum += n;\n return n;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layout({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n });\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n });\n }\n }\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lbmList.push(lineBoxManager);\n item.__layout({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n // 计算主轴剩余时要用真实剩余空间而不能用伸缩剩余空间\n let diff = isDirectionRow ? (w - x + data.x) : (h - y + data.y);\n // 主轴对齐方式\n if(diff > 0) {\n let len = orderChildren.length;\n if(justifyContent === 'flexEnd' || justifyContent === 'flex-end') {\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(diff, true) : child.__offsetY(diff, true);\n }\n }\n else if(justifyContent === 'center') {\n let center = diff * 0.5;\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(center, true) : child.__offsetY(center, true);\n }\n }\n else if(justifyContent === 'spaceBetween' || justifyContent === 'space-between') {\n let between = diff / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(between * i, true) : child.__offsetY(between * i, true);\n }\n }\n else if(justifyContent === 'spaceAround' || justifyContent === 'space-around') {\n let around = diff / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true) : child.__offsetY(around * (i + 1), true);\n }\n }\n }\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(item.width, textAlign);\n })\n }\n return [x, y, maxCross];\n }\n\n // 每个flexLine的侧轴对齐,单行时就是一行对齐\n __crossAlign(line, alignItems, isDirectionRow, maxCross) {\n let baseLine = 0;\n line.forEach(item => {\n baseLine = Math.max(baseLine, item.firstBaseLine);\n });\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对其,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isVirtual\n * @param isInline\n * @private\n */\n __layoutInline(data, isVirtual, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h, lx,\n lineBoxManager, nowrap, endSpace, selfEndSpace } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [WIDTH]: width,\n } = currentStyle;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__config[NODE_IS_INLINE] = true;\n this.__lineBoxManager = lineBoxManager;\n let baseLine = css.getBaseLine(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(marginLeft || marginRight\n || paddingLeft || paddingRight\n || borderLeftWidth || borderRightWidth) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseLine);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lx = x;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n let contentBoxList;\n if(isInline) {\n contentBoxList = this.__contentBoxList = [];\n lineBoxManager.pushContentBoxList(this);\n }\n let isIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline2 = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isRealInline = isXom && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb\n let isEnd = isInline && (i === length - 1);\n if(isEnd) {\n endSpace += selfEndSpace;\n }\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头,不用考虑是否放得下直接放,i为0强制不换行\n if(x === lx || !i || isInline2 && whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n isInlineBlock2 && (w[1] === AUTO) && (isIbFull = true);\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let fw = (whiteSpace === 'nowrap') ? 0 : item.__tryLayInline(w - x + lx, w - (isEnd ? endSpace : 0));\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n nowrap: whiteSpace === 'nowrap',\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n isInline2 && lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if(x === lx || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n // 第一个Text且父元素声明了nowrap也强制不换行,非第一个则看本身whiteSpace声明\n let focusNoWrap = (!i && nowrap) || whiteSpace === 'nowrap';\n let fw = focusNoWrap ? 0 : item.__tryLayInline(w + lx - x);\n if(!focusNoWrap && fw >= 0 && isEnd && endSpace && item.content.length === 1) {\n let fw2 = fw - endSpace;\n if(fw2 < 0) {\n fw = fw2;\n }\n }\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n y = lineBoxManager.endY;\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n lineBoxManager.addX(selfEndSpace);\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,\n if(isVirtual) {\n this.__inlineSize();\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用maxW\n let maxW = lineBoxManager.__maxX - data.x;\n tw = this.__width = fixedWidth ? w : (isIbFull ? Math.max(w, maxW) : maxW);\n th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isVirtual && !isInline) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return isInline ? lineClampCount : 0;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseLine得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(tw, textAlign) {\n let { contentBoxList, computedStyle, __ox, __oy } = this;\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = tw;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff) {\n this.__offsetX(diff, true);\n }\n }\n this.__width = computedStyle[WIDTH] = 0;\n let th = this.__height = computedStyle[HEIGHT] = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n this.__sx1 = this.sx + marginLeft;\n this.__sy1 = this.sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { sx: x, sy: y, clientWidth, clientHeight, computedStyle } = container;\n let { isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding\n item.__mp(currentStyle, computedStyle, clientWidth);\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let { [LEFT]: left, [TOP]: top, [RIGHT]: right,\n [BOTTOM]: bottom, [WIDTH]: width, [HEIGHT]: height, [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = calAbsolute(currentStyle, 'left', left, clientWidth, this.root);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = calAbsolute(currentStyle, 'right', right, clientWidth, this.root);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = calAbsolute(currentStyle, 'top', top, clientHeight, this.root);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = calAbsolute(currentStyle, 'bottom', bottom, clientHeight, this.root);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = x + clientWidth - computedStyle[RIGHT] - x2;\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n else if(fixedRight) {\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= currentStyle[BORDER_LEFT_WIDTH][0];\n x2 -= currentStyle[BORDER_RIGHT_WIDTH][0];\n }\n else {\n x2 = x + paddingLeft;\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = y + clientHeight - computedStyle[BOTTOM] - y2;\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n }\n else if(fixedBottom) {\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= currentStyle[BORDER_TOP_WIDTH][0];\n y2 -= currentStyle[BORDER_BOTTOM_WIDTH][0];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.prev;\n while(prev) {\n // 目前不考虑margin合并,直接以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else if(height[1] === PX) {\n h2 = height[0];\n }\n }\n // 没设宽高,需手动计算获取最大宽高后,赋给样式再布局\n let needCalWidth;\n if((display === 'block' || ['inlineBlock', 'inline-block'].indexOf(display) > -1) && w2 === undefined) {\n needCalWidth = true;\n }\n else if(display === 'flex') {\n if(w2 === undefined) {\n needCalWidth = true;\n }\n else if(flexDirection === 'column' && h2 === undefined) {\n needCalWidth = true;\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let wl = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let hl = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取孩子宽度最大值\n if(needCalWidth) {\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n }, true, true);\n wl = item.outerWidth;\n }\n // needCalWidth传入,因为自适应尺寸上面已经计算过一次margin/padding了\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n }, false, true);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n this.__execAr();\n }\n\n /**\n * 布局前检查继承的样式以及统计字体测量信息\n * 首次检查为整树遍历,后续检查是节点自发局部检查,不再进入\n * @param renderMode\n * @param ctx\n * @param cb\n * @private\n */\n __computeMeasure(renderMode, ctx, cb) {\n super.__computeMeasure(renderMode, ctx, cb);\n // 即便自己不需要计算,但children还要继续递归检查\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx, cb);\n });\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n super.__destroy();\n }\n\n __emitEvent(e, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e);\n }\n\n // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\n }\n\n appendChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n throw new Error('Invalid parameter in removeChild.');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Xom && item.currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseLine;\n }\n\n get firstBaseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseLine;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from './mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport enums from '../util/enums';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, RGBA } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data) {\n let res = super.__preLayout(data);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\n loadImg.source = cache.source;\n loadImg.width = cache.width;\n loadImg.height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n if(computedStyle[VISIBILITY] !== 'hidden' && (computedStyle[WIDTH] || computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n return res;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\n computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3;\n originY = res.y3;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n if(cross[1] !== AUTO) {\n if(cross[1] === PX) {\n cross = cross[0];\n }\n else if(cross[1] === PERCENT) {\n cross = cross[0] * 0.01 * (isDirectionRow ? h : w);\n }\n else if(cross[1] === REM) {\n cross = cross[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(cross[1] === VW) {\n cross = cross[0] * this.root.width * 0.01;\n }\n else if(cross[1] === VH) {\n cross = cross[0] * this.root.height * 0.01;\n }\n let ratio = __loadImg.width / __loadImg.height;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? __loadImg.width : __loadImg.height;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FONT_SIZE,\n FLEX_BASIS,\n },\n NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_IS_MASK,\n NODE_STYLE,\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend({}, this.__style);\n this.__currentProps = util.clone(this.props);\n let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __tryLayInline(w, total) {\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n // 计算需考虑style的属性\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n [DISPLAY]: display,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n return [display, this.__addMp(isDirectionRow, data.w, currentStyle, [min, max])];\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __layoutBlock(data, isVirtual) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data);\n this.__height = fixedHeight ? h : 0;\n if(isVirtual) {\n this.__width = fixedWidth ? w : 0;\n return;\n }\n this.__width = w;\n this.__ioSize(w, this.height);\n this.__marginAuto(this.currentStyle, data);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __layoutFlex(data) {\n // 无children所以等同于block\n this.__layoutBlock(data);\n }\n\n __layoutInline(data) {\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // 元素的width不能超过父元素w\n let tw = this.__width = fixedWidth ? w : x - data.x;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n else if(item[1] === PERCENT) {\n return item[0] * w * 0.01;\n }\n else if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n else if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n else {\n return 0;\n }\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n computedStyle[STROKE_DASHARRAY] = currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [STROKE, FILL].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = currentStyle[k];\n computedStyle[k] = v;\n let res = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && (item.k === 'linear' || item.k === 'radial' || item.k === 'conic')) {\n res.push(this.__gradient(renderMode, ctx, x3, y3, x4, y4, item));\n }\n else if(item[3] > 0) {\n res.push(int2rgba(item));\n }\n else {\n res.push('none');\n }\n });\n }\n __cacheStyle[k] = res;\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + height * 0.5;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') {\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // geom的cache无内容也不清除\n __releaseWhenEmpty() {}\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasUpdate) {\n child.__hasUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasUpdate) {\n vd.__hasUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_STRUCT];\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { contain, NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n // if(ovd.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\n // }\n // else {\n // elem.removeAttribute('filter');\n // }\n // }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(lv, MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate } = item;\n if(target.isDestroyed) {\n return;\n }\n if(Array.isArray(animate)) {\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n }\n else {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n }\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.__page = new MockPage(texture, width, height);\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = sx1 - bbox[0];\n this.dby = sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n\n get page() {\n return this.__page;\n }\n}\n\nexport default MockCache;\n","import Geom from '../node/geom/Geom';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Cache from './Cache';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport mode from '../node/mode';\n\nconst { canvasPolygon } = painter;\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\n// 依次从list获取首个available可用的cache\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(cache && cache.available) {\n bboxTotal = cache.bbox.slice(0);\n }\n else {\n bboxTotal = node.bbox;\n }\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n },\n } = node2;\n // webgl不能跳过超限\n if(limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n // 防止text的情况,其一定属于某个node,其bbox被计算过,text不应该计算\n if(node2 instanceof Text) {\n continue;\n }\n let bbox, dx = 0, dy = 0, hasTotal;\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox.slice(0);\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox.slice(0);\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.bbox;\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = util.transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,当超限时返回空\n * @param renderMode\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cacheTop\n * @param cache\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, __config, index, total, __structs, cacheTop, cache) {\n if(total === 0) {\n return cache;\n }\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, Cache.MAX);\n if(!bboxTotal) {\n return;\n }\n let { __sx1: sx1, __sy1: sy1 } = node;\n if(cacheTop) {\n cacheTop.reset(bboxTotal, sx1, sy1);\n }\n else {\n cacheTop = Cache.getInstance(bboxTotal, sx1, sy1);\n }\n // 创建失败,再次降级\n if(!cacheTop || !cacheTop.enabled) {\n return;\n }\n cacheTop.__available = true;\n let { x: tx, y: ty, ctx, dbx, dby } = cacheTop;\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n Cache.drawCache(cache, cacheTop);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n ctx.globalAlpha = opacity;\n let m = matrix || mx.identity();\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, 0, ctx, true, tx - sx1 + dbx, ty - sy1 + dby);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx + tx;\n let dy = -sy1 + dby + ty;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n ctx.globalAlpha = opacity;\n if(matrix) {\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n Cache.drawCache(target, cacheTop);\n if(target !== __cache) {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n }\n }\n return cacheTop;\n}\n\nfunction genFilter(node, cache, v) {\n return Cache.genFilter(cache, v);\n}\n\nfunction genMask(node, cache) {\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: transformOrigin } = node.computedStyle;\n let isClip = node.next.isClip;\n return Cache.genMask(cache, node.next, isClip, transform, transformOrigin);\n}\n\nfunction genOverflow(node, cache) {\n let sbox = node.bbox;\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n return Cache.genOverflow(cache, node);\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, width, height);\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n return [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.WEBGL, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'hue-rotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n width += spread * 2;\n height += spread * 2;\n // 防止超限,webgl最大纹理尺寸限制\n let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\n return;\n }\n bbox = bbox.slice(0);\n bbox[0] -= spread;\n bbox[1] -= spread;\n bbox[2] += spread;\n bbox[3] += spread;\n let cx = width * 0.5, cy = height * 0.5;\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `\\nv_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `\\nv_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `\\nv_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texCache, texture, cache.page.texture, i, j,\n width, height, cx, cy, spread, d, sigma);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let sbox = node.bbox.slice(0);\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n let width = sbox[2] - sbox[0], height = sbox[3] - sbox[1];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, sbox[0] - bbox[0], sbox[1] - bbox[1], width, height, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, width, height, sbox);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, __config, cache, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bbox[0], dy = -bbox[1];\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dx;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n while(next && next.isMask) {\n let __config = next.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n if(display === 'none' || visibility === 'hidden') {\n continue;\n }\n // total无用,都是单节点\n let target = getCache([__cacheFilter, __cacheOverflow, __cache]);\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n // m = mx.m2Mat4(m, cx, cy);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, dx, dy);\n }\n // 异常情况超限\n else if(__config[NODE_LIMIT_CACHE]) {\n return;\n }\n next = next.next;\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let isClip = node.next.isClip;\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n list.forEach(item => {\n let [, , type, offscreen] = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getCacheCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n apply.ctx.filter = 'none';\n apply.draw();\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\n inject.releaseCacheCanvas(apply.canvas);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n mask.draw();\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n offscreen.target.draw();\n inject.releaseCacheCanvas(offscreen.target.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n target.draw();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nfunction renderCacheCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在 lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 父不为E时要点乘继承父的\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制limitCache\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n node.render(renderMode, refreshLevel, ctx, true);\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = computedStyle;\n if(!limitCache && (hasMask || position === 'absolute'\n || filter.length || (overflow === 'hidden' && total) || isValidMbm(mixBlendMode))) {\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n hasRecordAsMask[7] = overflow;\n }\n else {\n mergeList.push([i, lv, total, node, __config, hasMask, filter, overflow]);\n }\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n __cacheTotal = genTotal(renderMode, node, __config, i, total || 0, __structs, __cacheTotal, __cache);\n if(__cacheTotal && __cacheTotal !== __cache) {\n __config[NODE_CACHE_TOTAL] = __cacheTotal;\n }\n needGen = true;\n }\n // 防止失败超限,必须有total结果\n if(__cacheTotal && __cacheTotal.available) {\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n __config[NODE_CACHE_OVERFLOW] = genOverflow(node, target);\n needGen = true;\n }\n target = __config[NODE_CACHE_OVERFLOW] || target;\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n __config[NODE_CACHE_FILTER] = genFilter(node, target, filter);\n needGen = true;\n }\n target = __config[NODE_CACHE_FILTER] || target;\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n __config[NODE_CACHE_MASK] = genMask(node, target);\n }\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 超尺寸的依旧要走无cache逻辑render,这部分和无cache渲染很像\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config[NODE_DOM_PARENT].__config;\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrixEvent[0], matrixEvent[1], matrixEvent[4], matrixEvent[5], matrixEvent[12], matrixEvent[13]);\n node.render(renderMode, 0, ctx);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n // 有total的可以直接绘制并跳过子节点索引\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // total的尝试\n if(target) {\n i += (total || 0) + (hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n // 自身cache尝试\n else {\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n // 这里比较特殊,可能会有__cache但超限没被汇聚到total上,需mock出离屏对象数据,还有可能本身就超限\n if(__cache && __cache.available || limitCache) {\n if(__cache && __cache.available) {\n // 有cache但没生成total的都在这\n if(isValidMbm(mixBlendMode)) {\n let c = inject.getCacheCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode: mbmName(mixBlendMode),\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(hasMask) {\n let c = inject.getCacheCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getCacheCanvas(width, height, null, 'filter1');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getCacheCanvas(width, height, null, 'overflow');\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: matrixEvent,\n x: __cache.sx1,\n y: __cache.sy1,\n offsetWidth: node.offsetWidth,\n offsetHeight: node.offsetHeight,\n };\n ctx = c.ctx;\n }\n if(visibility !== 'hidden') {\n Cache.draw(ctx, opacity, matrixEvent, __cache);\n }\n }\n else {\n // 连cache都没生成的超限\n let res = node.render(renderMode, refreshLevel, ctx) || {};\n offscreenBlend = res.offscreenBlend;\n offscreenMask = res.offscreenMask;\n offscreenFilter = res.offscreenFilter;\n offscreenOverflow = res.offscreenOverflow;\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n if(limitCache && node instanceof Geom) {\n node.render(renderMode, refreshLevel, ctx);\n }\n }\n // 没内容的遮罩跳过,比如未加载的img,否则会将遮罩绘制出来\n else if(hasMask) {\n i += (total || 0) + hasMask;\n }\n // 同无cache一样的离屏应用\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n}\n\n/**\n * 无缓存模式canvas渲染,O(n)一次循环完成\n * @param renderMode\n * @param ctx\n * @param root\n */\nfunction renderCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n /**\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性,\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_REFRESH_LV]: refreshLevel,\n } = node.__config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let res = node.render(renderMode, refreshLevel, ctx);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,以及svg的virtualDom也要生成\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = {};\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, TRANSFORM_ALL)) {\n defsCache.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = {};\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start][STRUCT_NODE].isClip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = __config[NODE_VIRTUAL_DOM] = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n util.assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(contain(refreshLevel, FT)) {\n let filter = node.__calFilter(currentStyle, computedStyle);\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(contain(refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_NODE];\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j][STRUCT_NODE];\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.isMask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\n }\n}\n\nfunction renderWebgl(renderMode, gl, root) {\n let { __structs, width, height, texCache } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, 0, gl, true);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // node本身有或者父有perspective都认为需要生成3d渲染上下文\n if(tf.isPerspectiveMatrix(matrix) || parentPm) {\n if(hasRecordAsMask) {\n hasRecordAsMask[9] = true;\n }\n else {\n hasRecordAsMask = [i, lv, total, node, __config, null, null, null, null, true];\n }\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[7] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, true);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, limitCache, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n target = genOverflowWebgl(gl, texCache, node, target, width, height);\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = target;\n }\n }\n // 保存临时的局部根节点\n if(limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n continue;\n }\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + (hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n // let m = mx.m2Mat4(matrixEvent, cx, cy);\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nexport default {\n renderCacheCanvas,\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last[0] !== page || page.update) {\n // page可能为一个已有纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n channels[i] = page;\n }\n else {\n // 可能老的先删除\n if(last) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n channels[i] = page;\n }\n hash[page.uuid] = i;\n }\n else {\n hash[page.uuid] = i;\n }\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n}\n\nexport default TexCache;\n","import Dom from './Dom';\nimport Text from './Text';\nimport Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport mode from './mode';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_MEASURE,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, isGeom, isMeasure } = change;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, true);\n target = target.domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.domParent;\n if(parent) {\n if(parent.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inline-block', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inline-block', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, measureList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_MEASURE]: measure,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasMeasure = measure;\n let hasZ, hasVisibility, hasColor, hasDisplay;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n if(isMeasure(k)) {\n hasMeasure = true;\n }\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n if(k === VISIBILITY) {\n hasVisibility = true;\n }\n if(k === COLOR) {\n hasColor = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // visibility/color变化,影响子继承\n if(hasVisibility || hasColor) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n // text的style指向parent,因此text一定变更\n if(hasVisibility && (node instanceof Text || currentStyle[VISIBILITY][1] === INHERIT)) {\n need = true;\n }\n if(hasColor && (node instanceof Text || currentStyle[COLOR][1] === INHERIT)) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n if(node instanceof Xom) {\n node.clearCache();\n }\n }\n else {\n i += total || 0;\n }\n }\n }\n // mask需清除遮罩对象的缓存\n if(isMask) {\n let prev = node.prev;\n while(prev && (prev.isMask)) {\n prev = prev.prev;\n }\n if(prev && prev.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint/measure相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n // measure需要提前先处理\n if(hasMeasure) {\n measureList.push(node);\n }\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__taskUp = [];\n this.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__children = builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.cache = !!this.props.cache;\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.width) {\n dom.setAttribute('width', this.width);\n }\n if(this.height) {\n dom.setAttribute('height', this.height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n // 没有设置width/height则采用css计算形式\n if(!this.width || !this.height) {\n let css = window.getComputedStyle(dom, null);\n if(!this.width) {\n this.__width = parseFloat(css.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.height) {\n this.__height = parseFloat(css.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 只有canvas有ctx,svg用真实dom\n if(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d');\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', ca);\n this.__renderMode = mode.WEBGL;\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(null, true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.dom.__root && this.dom.__root instanceof Root) {\n this.dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.dom, Root);\n this.dom.__root = this;\n }\n\n refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n this.__computeMeasure(renderMode, ctx);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n // 获取所有字体和大小测量,仅svg需要,canvas直接做\n inject.measureText();\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n // 利用list循环代替tree递归快速渲染\n if(this.cache) {\n struct.renderCacheCanvas(renderMode, ctx, this);\n }\n else {\n struct.renderCanvas(renderMode, ctx, this);\n }\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n if(isFunction(cb)) {\n cb();\n }\n this.emit(Event.REFRESH, this.__rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, this, this.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = [width, PX];\n currentStyle[HEIGHT] = [height, PX];\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n updateHash[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n target[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let measureList = [];\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n let hasUpdate;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, measureList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, measureList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n /**\n * 遍历每项节点,计算测量信息,节点向上向下查找继承信息,如果parent也是继承,先计算parent的\n * 过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n */\n let measureHash = {};\n measureList.forEach(node => {\n let { __config:{ [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId, [NODE_DOM_PARENT]: parent } } = node;\n // 在root下的component变更时root会进入,但其没有__uniqueUpdateId\n if(node !== root) {\n if(measureHash.hasOwnProperty(__uniqueUpdateId)) {\n return;\n }\n measureHash[__uniqueUpdateId] = true;\n }\n let last = node;\n // 检查measure的属性是否是inherit,在root下的component变更时root会进入,但其没有__uniqueUpdateId\n // 另外dom标识表明有dom变更强制进入\n let isInherit = node !== root\n && (updateHash[__uniqueUpdateId][UPDATE_ADD_DOM]\n || change.isMeasureInherit(updateHash[__uniqueUpdateId][UPDATE_STYLE]));\n // 是inherit,需要向上查找,从顶部向下递归计算继承信息\n if(isInherit) {\n while(parent && parent !== root) {\n let { __config: {\n [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId,\n }, currentStyle } = parent;\n let isInherit;\n if(parent.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let style = updateHash[__uniqueUpdateId][UPDATE_STYLE];\n measureHash[__uniqueUpdateId] = true;\n let temp = change.measureInheritList(style);\n isInherit = !!temp.length;\n }\n else {\n isInherit = change.isMeasureInherit(currentStyle);\n }\n // 如果parent有inherit存入列表且继续向上,否则跳出循环\n if(isInherit) {\n last = parent;\n }\n else {\n break;\n }\n // 考虑component下的继续往上继承\n parent = parent.domParent;\n }\n }\n // 自顶向下查找inherit的,利用已有的方法+回调,当递归包含重复时标记防止重复\n last.__computeMeasure(renderMode, ctx, function(target) {\n if(target.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n measureHash[target.__config[NODE_UNIQUE_UPDATE_ID]] = true;\n }\n });\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.prev;\n let hasFlowPrev;\n while(ref) {\n if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.computedStyle[DISPLAY] !== 'none')) {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.prev;\n }\n // 找不到prev以parent为基准,找到则增加自身,排除remove\n if(!removeDom) {\n if(!hasFlowPrev) {\n y += computedStyle[MARGIN_TOP] + computedStyle[BORDER_TOP_WIDTH] + computedStyle[PADDING_TOP];\n }\n x += computedStyle[MARGIN_LEFT] + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, null, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n });\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(cs[DISPLAY]) > -1;\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], null, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 特殊覆盖方法,不需要super()计算自己,因为放在每次checkRoot()做过了\n __computeMeasure(renderMode, ctx) {\n css.computeMeasure(this, true);\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx);\n });\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get taskUp() {\n return this.__taskUp;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\n","import Geom from './Geom';\nimport mode from '../mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA.length >= 2) {\n num++;\n }\n if(controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getNewPoint(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start > 0 || end < 1) {\n if(num === 3) {\n [[x1, y1], controlA, controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = Math.abs(x1 - x2);\n let b = Math.abs(y1 - y2);\n x1 += a * start;\n y1 += b * start;\n x2 -= a * (1 - end);\n y2 -= b * (1 - end);\n }\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__x1.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__x1.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__x1.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\n let {\n sx3,\n sy3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n if(!isMulti) {\n x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[0] = Math.min(bbox[0], xb - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[1] = Math.min(bbox[1], yb - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[2] = Math.max(bbox[2], xb + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n bbox[3] = Math.max(bbox[3], yb + oy);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]], 2);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]], 3);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start >= end) {\n return [];\n }\n let i = 0, j = list.length - 1;\n if(start > 0) {\n i = getIndex(len.increase, start * len.total, i, j);\n }\n if(end < 1) {\n j = getIndex(len.increase, end * len.total, i, j);\n }\n list = util.clone(list);\n end *= len.total;\n let prePercent = 1;\n if(end > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[j + 1] = [current[1] - (1 - t) * a, current[1] - (1 - t) * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], res[3][0], res[3][1]];\n }\n }\n start *= len.total;\n if(start > len.increase[i]) {\n let prev = list[i].slice(list[i].length - 2);\n let current = list[i + 1];\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度\n if(i === j && prePercent !== 1) {\n l *= prePercent;\n }\n let diff = start - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[i] = [prev[0] + t * a, prev[1] + t * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], current[4], current[5]];\n }\n }\n if(j < list.length - 2) {\n list = list.slice(0, j + 2);\n }\n if(i > 0) {\n list = list.slice(i);\n }\n return list;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map((item, i) => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(c && c.length === 2) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from \"../../util/util\";\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n bbox[0] = Math.min(bbox[0], originX - ox);\n bbox[1] = Math.min(bbox[1], originY - oy);\n bbox[2] = Math.max(bbox[2], originX + width + ox);\n bbox[3] = Math.max(bbox[3], originY + height + oy);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - rx - ox;\n let xb = cx + rx + ox;\n let ya = cy - ry - oy;\n let yb = cy + ry + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\nimport inject from '../util/inject';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json && vars) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\nfunction replaceLibraryVars(json, hash, vars) {\n if(vars) {\n // 新版同级vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度\n if(Array.isArray(member) && member.length > 1 && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n let old = target[k];\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n }\n // 兼容老版var-\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n // 直接移除library插槽,防止下面调用replaceVars(json, vars)时报错\n delete json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // 替换图层的值必须是一个有tagName的对象\n if(!value || !value.tagName) {\n return;\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction linkLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n/**\n * 链接child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkChild(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props);\n child.children = libraryItem.children;\n child.library = libraryItem.library;\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n child.libraryId = null;\n // 规定图层实例化的属性和样式在init上,优先使用init,然后才取原型链的props\n let { init } = child;\n if(init) {\n let props = child.props = child.props || {};\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n child.init = null;\n }\n}\n\nfunction parse(karas, json, animateRecords, opt, hash = {}) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, hash);\n });\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkChild(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n json.libraryId = null;\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => {\n linkLibrary(item, hash);\n });\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n json.library = null;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n let style = props.style;\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n // 再替换静态属性,style也作为属性的一种,目前尚未被设计为被替换\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n let animationRecord;\n if(animate) {\n if(Array.isArray(animate)) {\n let has;\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n });\n if(has) {\n animationRecord = {\n animate,\n target: vd,\n };\n }\n }\n else {\n (opt.abbr !== false) && abbr2full(animate, abbrAnimate);\n let { value, options } = animate;\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n animationRecord = {\n animate,\n target: vd,\n };\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n }\n }\n // 产生实际动画运行才存入列表供root调用执行\n if(animationRecord) {\n animateRecords.push(animationRecord);\n }\n return vd;\n}\n\nexport default parse;\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\n\nlet o = {\n parse(karas, json, dom, options = {}) {\n json = util.clone(json);\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, data } = item;\n if(fontFamily && data) {\n font.register(fontFamily, data);\n }\n });\n }\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = dom || {};\n dom = null;\n }\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n animateRecords.forEach(item => {\n item.target = item.target.vd;\n });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(url);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n if(a || b || c) {\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n return res;\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './node/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport $$type from './util/$$type';\nimport builder from './util/builder';\nimport updater from './util/updater';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n return {\n tagName,\n props,\n children,\n $$type: $$type.TYPE_VD,\n };\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return {\n klass,\n props,\n $$type: $$type.TYPE_CP,\n };\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\n});\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_MEASURE","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","enums","Node","__x","__y","__ox","__oy","__width","__height","__baseLine","__config","i","lv","j","root","struct","diff","isLayout","__sx","__sy","x","ox","y","oy","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","calUnit","v","n","parseFloat","test","info","arial","lhr","blr","lgr","padding","f","verdana","tahoma","S","T","Z","c","t","georgia","simsun","support","fontFamily","hasOwnProperty","register","name","emSquare","ascent","descent","lineGap","addPadding","assign","position","gradient","img","identity","multiply","a","b","isE","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","inverse","inverse4","divisor","inv","det","m2m6","point2d","slice","dotProduct","x1","y1","x2","y2","crossProduct","H","Math","sqrt","vector","mx","h","deg","cos","sin","pointInPolygon","vertexes","xmax","ymax","xmin","ymin","len","max","min","pointInQuadrilateral","x4","y4","x3","y3","matrix","w1","w2","w3","w4","angleBySide","theta","pow","acos","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","list","floor","h2","d2r","abs","atan","rx","ry","p1","p2","p4","p3","push","concat","temp","res","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","isRectsInside","calCoordsInNode","px","py","node","computedStyle","width","height","calPercentInNode","ds","Infinity","PI","dt","r2d","bboxBezier2","x0","y0","minX","minY","maxX","maxY","tx","ty","sx","sy","qx","qy","bboxBezier3","cx","cy","bx","by","ax","ay","hx","hy","q","bboxBezier","arguments","norm","order","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","points","startT","endT","at","at3","p0","at2","bezierOrder","derivativeOrder","pointAtBezier","percent","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","start","reverse","pointOnCircle","getConicGradientImage","originX","originY","stop","data","Error","getAngle","dx","dy","increasingList","map","item","color","angle","factor","idx","canvasPolygon","ctx","Array","isArray","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","num","svgLine","canvasFilter","filter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","style","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","indexOf","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","ya","yb","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","xa","xb","ca","calBezierTopLeft","cb","controls1","controls2","limit","pop","endLength","oyr","calBezierTopRight","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","noRadius","target","prev","next","half","calBorderRadiusInline","contentBoxList","first","last","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","fillStyle","fill","closePath","virtualDom","bb","type","tagName","props","TYPE_VD","_","TYPE_GM","TYPE_CP","toString","isType","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","joinDef","joinVd","conClip","children","isMask","content","opacity","transform","visibility","mask","overflow","mixBlendMode","def","uuid","joinItem","rgba2int","charAt","parseInt","match","int2rgba","joinArr","int2invert","arr2hash","hash","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","proto","getPrototypeOf","Ctor","constructor","assignMatrix","isPrimitive","isAuto","flag","charWidth","ELLIPSIS","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","revertY","createTexture","tex","texture","bindTexture","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","drawTextureCache","vtPoint","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","Float32Array","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","texCache","tex1","tex2","spread","sigma","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","defaultFontFamilyData","key","message","debug","document","createElement","setAttribute","body","appendChild","canvas","draw","enabled","available","release","cacheCanvas","cacheWebgl","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","inject","measureText","textCache","html","lengths","chars","ff","fs","fw","inline","char","div","left","top","innerHTML","cns","childNodes","index","css","window","getComputedStyle","text","__measureCb","removeChild","measureTextSync","measureImg","url","state","success","task","Image","onload","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","checkSupportFontFamily","font","checked","context","textAlign","textBaseline","clearRect","fillText","getImageData","loadFont","FontFace","load","then","loadComponent","script","async","head","getLinearDeg","getRadialPosition","center","right","bottom","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","asin","parseGradient","reg","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","add","DOM","display","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","fontStyle","fontWeight","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","boxShadow","pointerEvents","whiteSpace","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","isValid","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","MEASURE","addGeom","ks","isIgnore","isGeom","isRepaint","isMeasure","MEASURE_KEY_SET","isMeasureInherit","measureInheritList","change","TRANSFORM_HASH","compatibleTransform","normalize","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","computeMeasure","isRoot","domParent","parentComputedStyle","getFontFamily","computeReflow","isHost","parent","rem","calNormalLineHeight","ph","setFontStyle","str","getBaseLine","normal","calRelativePercent","calRelative","isWidth","calAbsolute","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","TextBox","wList","__index","__content","__wList","cacheStyle","__endX","__endY","overFill","strokeText","baseLine","__parentLineBox","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","calDeg","pointIndex","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","ac","bc","AB","AC","BC","A","tar","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calOrigin","tfo","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","kernelSize","outerSize","outerSizeByD","gaussianWeight","E","_enums$NODE_KEY","genSingle","dbx","dby","Cache","__init","__bbox","__page","__pos","getCoords","__appendData","__enabled","setTransform","globalAlpha","update","__available","clear","del","ceil","getInstance","blur","isClip","cacheMask","tf","cacheOverflow","cacheFilter","drawCache","globalCompositeOperation","xe","ye","rect","old","newCache","nx","ny","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","value","getLevel","isReflow","isRebuild","Text","__textBoxes","__charWidthList","__charWidth","__textWidth","charWidthList","ffs","__ff","__key","wait","needMeasure","bp","__bp","pff","pffs","pfs","pfw","pKey","__pKey","parentCache","mw","__cache","lx","lineBoxManager","endSpace","lineClampCount","__sx1","__sy1","isDestroyed","textBoxes","beginSpace","maxW","needReduce","lastChar","ew","lineCount","isTextOverflow","__lineBack","textBox","addItem","cw","hasCache","needBack","setNewLine","__ellipsis","lineBox","tb","__offsetX","__offsetY","textWidth","__layout","lineWidth","strokeColor","strokeStyle","render","endX","endY","__cacheStyle","delRefreshTask","__task","addRefreshTask","__before","level","__addUpdate","__after","__style","matrixEvent","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","hasRegister","defineProperty","get","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","me","calBackgroundSize","calBackgroundPosition","container","renderImage","loadBgi","bx2","by2","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","I_NODE_CONFIG","I_ROOT_CONFIG","I_STYLE","I_ASSIGNING","__frameHook","framing","duration","es","offset","translatePath","calByUnit","calDiff","nm","pHash","nHash","keyHash","hasChange","nv","pv","pi","ni","has","pp","nn","clientWidth","eq","isArrP","isArrN","pz","nz","np","len2","pv2","nv2","len3","pv3","nv3","u","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_FRAME_CB","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_CAL_DIFF_TIME","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_OUT_BEGIN_DELAY","I_TIME_STAMP","Animation","__id","nl","__options","op","config","__frameCb","__calDiffTime","iterations","framesR","originStyle","fps","spfLimit","delay","endDelay","playbackRate","current","isFinish","__cancelTask","__currentProps","__currentStyle","isDelay","FRAME","PLAY","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","round","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","inset","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","getInlineBox","diffL","eyt","eyb","pbt","pbb","dom","getInlineWidth","contentBox","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__hasMask","__mpWidth","mp","__clientWidth","__clientHeight","__offsetWidth","__offsetHeight","__outerWidth","__outerHeight","onlyFixedValue","isDirectionRow","isDirectItem","__calMp","isVirtual","fromAbs","isShadowRoot","clearCache","__layoutData","__layoutNone","__mp","__isRealInline","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","nowrap","fixedWidth","fixedHeight","selfEndSpace","offsetWidth","offsetHeight","matrixCache","isScale","clientHeight","x5","x6","y5","y6","__calFilter","bg","bgI","item2","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","hasContent","__calContent","__calPerspective","__calMatrix","__releaseWhenEmpty","limitCache","__calCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","__gradient","isFirst","lastContentBox","lastLineBox","parentLineBox","countW","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","ec","dc","pc","cur","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","hostRoot","pJson","zChildren","zIndexChildren","__spreadBbox","LineBox","__list","__lineHeight","LineBoxManager","__lastX","__lastY","__maxX","__domList","__domStack","__isNewLine","__isEnd","__setLB","nextNewLine","genLineBox","verticalAlign","isNewLine","TAG_NAME","INLINE","BOLD","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","isAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMarginTB","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","firstCharWidth","main","isRow","__calMinMax","min2","max2","countMin","countMax","setNotEnd","__addMp","isFixed","isContent","fixedSize","__lineBoxManager","__preLayout","__ioSize","mergeMarginBottomList","mergeMarginTopList","isXom","isInlineBlock","isImg","reflow","__isIbFull","lastX","lastY","isNone","isEmptyBlock","tw","th","horizonAlign","__inlineSize","domList","__marginAuto","growList","shrinkList","basisList","maxList","minList","orderChildren","__calBasis","containerSize","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","__layoutFlexLine","maxCross","crossSum","crossSumList","between","around","__crossAlign","flexLine","hypotheticalSum","targetMainList","factorSum","factorList","needReset","factorSum2","lbmList","firstBaseLine","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isInline2","isInlineBlock2","focusNoWrap","fw2","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","needCalWidth","wl","hl","__computeMeasure","__deepScan","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","pts","arc","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","onList","__action","__mergeAuto","__on","timestamp","__set","MockPage","genUuid","MockCache","OP","FT","MBM","PPT","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","getCache","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","cacheTop","hasMask","genFilter","genMask","genOverflow","sbox","genFrameBufferWithTexture","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","applyOffscreen","origin","renderCacheCanvas","matrixList","parentMatrix","opacityList","parentOpacity","lastConfig","lastLv","mergeList","refreshLevel","hasRecordAsMask","needGen","maskStartHash","offscreenHash","renderCanvas","renderSvg","maskEffectHash","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","hasMbm","validMbm","isPerspective","limitHash","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","shift","cl","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","measureList","cacheList","zHash","zList","overwrite","focus","measure","removeDom","style2","keys2","hasMeasure","hasZ","hasVisibility","hasColor","hasDisplay","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","getPropertyValue","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","measureHash","__uniqueUpdateId","isInherit","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","startIndex","oldH","nowH","lastIndex","ns","reBuild","base","reBuildC","curveNum","limitStartEnd","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","buildCache","curve","bezierBox","concatPointAndControl","control","getLength","increase","getIndex","getNewList","prePercent","Polyline","__points","__controls","controls","isControl","rebuildSE","__getPoints","__renderPolygon","pointList","controlList","Polygon","getR","dft","Sector","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","replaceVars","vars","slot","member","replaceLibraryVars","linkLibrary","JSON","linkChild","libraryItem","library","libraryId","parse","animateRecords","opt","createGm","createCp","createVd","animationRecord","fonts","loadAndParse","components","imgs","list1","list3","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA,GAAG,EAAHA,GAtEU;EAuEVC,EAAAA,GAAG,EAAHA,GAvEU;EAwEV05B,EAAAA,IAAI,EAAJA,IAxEU;EAyEVn4B,EAAAA,KAAK,EAALA,KAzEU;EA0EVluB,EAAAA,IAAI,EAAJA,IA1EU;EA2EV0L,EAAAA,MAAM,EAANA,MA3EU;EA4EV3X,EAAAA,KAAK,EAALA,KA5EU;EA6EV8/D,EAAAA,MAAM,EAANA,CA7EU;EA8EVvX,EAAAA,OAAO,EAAPA,OA9EU;EA+EVl5B,EAAAA,IAAI,EAAJA,IA/EU;EAgFVmM,EAAAA,OAAO,EAAPA,OAhFU;EAiFVq8B,EAAAA,OAAO,EAAPA,OAjFU;EAkFVhM,EAAAA,OAAO,EAAPA,OAlFU;EAmFV/gE,EAAAA,KAAK,EAALA,KAnFU;;IAoFV,IAAI0rB,KAAJ,CAAU1oB,CAAV,EAAa;EACX0oB,IAAAA,KAAK,CAACrI,IAAN,GAAa,CAAC,CAACrgB,CAAf,CAAA;EACD,GAAA;;EAtFS,EAAZ;EAyFA0tC,OAAO,CAACvB,GAAR,CAAY;EACVvB,EAAAA,GAAG,EAAHA,GADU;EAEVC,EAAAA,GAAG,EAAHA,GAFU;EAGVC,EAAAA,GAAG,EAAHA,GAHU;EAIVC,EAAAA,IAAI,EAAJA,IAJU;EAKVC,EAAAA,SAAS,EAATA,SAAAA;EALU,CAAZ,CAAA,CAAA;;EAQA,IAAG,OAAOhgB,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAACq/C,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAO58C,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAAC48C,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["src/util/enums.js","src/node/Node.js","src/node/mode.js","src/style/unit.js","src/style/font.js","src/style/reg.js","src/math/matrix.js","src/math/vector.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/util/$$type.js","src/util/util.js","src/util/debug.js","src/node/textCache.js","src/gl/ca.js","src/gl/webgl.js","src/util/inject.js","src/style/gradient.js","src/style/reset.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/style/css.js","src/node/TextBox.js","src/refresh/Page.js","src/math/tar.js","src/math/index.js","src/style/transform.js","src/math/blur.js","src/refresh/Cache.js","src/refresh/level.js","src/node/Text.js","src/util/flatten.js","src/util/builder.js","src/util/Event.js","src/node/Component.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/inline.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/refresh/reflow.js","src/node/Dom.js","src/node/Img.js","src/node/Defs.js","src/node/geom/Geom.js","src/util/updater.js","src/util/diff.js","src/animate/Controller.js","src/gl/MockPage.js","src/gl/MockCache.js","src/refresh/struct.js","src/gl/TexCache.js","src/node/Root.js","src/node/geom/Line.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/abbr.js","src/parser/parse.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n // GEOM\n FILL: 87,\n STROKE: 88,\n STROKE_WIDTH: 89,\n STROKE_DASHARRAY: 90,\n STROKE_DASHARRAY_STR: 91,\n STROKE_LINECAP: 92,\n STROKE_LINEJOIN: 93,\n STROKE_MITERLIMIT: 94,\n FILL_RULE: 95,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 96,\n BORDER_TOP: 97,\n BORDER_RIGHT: 98,\n BORDER_BOTTOM: 99,\n BORDER_LEFT: 100,\n TRANSLATE_PATH: 101,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n STYLE2LOWER_MAP[s] = STYLE2LOWER_MAP[s] || s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n\n return STYLE2LOWER_MAP[s];\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n STYLE2UPPER_MAP[s] = STYLE2UPPER_MAP[s] || s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n\n return STYLE2UPPER_MAP[s];\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\n// Root的update过程使用\nconst UPDATE_KEY = {\n UPDATE_NODE: 0,\n UPDATE_STYLE: 1,\n UPDATE_FOCUS: 2,\n UPDATE_MEASURE: 3,\n UPDATE_COMPONENT: 4,\n UPDATE_OVERWRITE: 5,\n UPDATE_KEYS: 6,\n UPDATE_LIST: 7,\n UPDATE_CONFIG: 8,\n UPDATE_ADD_DOM: 9,\n UPDATE_REMOVE_DOM: 10,\n};\n\n// animation计算每帧使用\nconst KEY_FRAME_KEY = {\n FRAME_STYLE: 0,\n FRAME_TIME: 1,\n FRAME_EASING: 2,\n FRAME_TRANSITION: 3,\n};\n\n// 节点使用\nconst NODE_KEY = {\n NODE_DOM_PARENT: 0,\n NODE_OPACITY: 1,\n NODE_MATRIX: 2,\n NODE_MATRIX_EVENT: 3,\n NODE_CACHE: 4,\n NODE_CACHE_TOTAL: 5,\n NODE_CACHE_FILTER: 6,\n NODE_CACHE_MASK: 7,\n NODE_CACHE_OVERFLOW: 8,\n NODE_STRUCT: 9,\n NODE_TAG_NAME: 10,\n NODE_CURRENT_STYLE: 11,\n NODE_CURRENT_PROPS: 12,\n NODE_COMPUTED_STYLE: 13,\n NODE_CACHE_STYLE: 14,\n NODE_CACHE_PROPS: 15,\n NODE_LIMIT_CACHE: 16,\n NODE_IS_MASK: 17,\n NODE_IS_INLINE: 18,\n NODE_HAS_CONTENT: 19,\n NODE_REFRESH_LV: 20,\n NODE_IS_DESTROYED: 21,\n NODE_STYLE: 22,\n NODE_UPDATE_HASH: 23,\n NODE_UNIQUE_UPDATE_ID: 24,\n NODE_DEFS_CACHE: 25,\n NODE_PERSPECTIVE_MATRIX: 26,\n NODE_VIRTUAL_DOM: 27,\n};\n\n// struct用\nconst STRUCT_KEY = {\n STRUCT_NODE: 0,\n STRUCT_INDEX: 1,\n STRUCT_CHILD_INDEX: 2,\n STRUCT_LV: 3,\n STRUCT_NUM: 4,\n STRUCT_TOTAL: 5,\n STRUCT_HAS_MASK: 6,\n};\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n UPDATE_KEY,\n KEY_FRAME_KEY,\n NODE_KEY,\n STRUCT_KEY,\n};\n","import enums from '../util/enums';\n\nconst {\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_INDEX,\n STRUCT_CHILD_INDEX,\n STRUCT_LV,\n },\n NODE_KEY: {\n NODE_IS_DESTROYED,\n NODE_STRUCT,\n },\n} = enums;\n\nclass Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__ox = 0; // relative造成的偏移量\n this.__oy = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseLine = 0;\n this.__config = {};\n // 默认undefined\n // this.__prev = undefined;\n // this.__next = undefined;\n // this.__parent = undefined;\n // this.__domParent = undefined;\n // this.__root = undefined;\n // this.__host = undefined;\n }\n\n __structure(i, lv, j) {\n return this.__config[NODE_STRUCT] = {\n [STRUCT_NODE]: this,\n [STRUCT_INDEX]: i,\n [STRUCT_CHILD_INDEX]: j,\n [STRUCT_LV]: lv,\n };\n }\n\n __modifyStruct(root, offset = 0) {\n let struct = this.__config[NODE_STRUCT];\n return [struct, 0];\n }\n\n __offsetX(diff, isLayout) {\n if(isLayout) {\n this.__x += diff;\n }\n else {\n this.__ox += diff;\n }\n this.__sx += diff;\n }\n\n __offsetY(diff, isLayout) {\n if(isLayout) {\n this.__y += diff;\n }\n else {\n this.__oy += diff;\n }\n this.__sy += diff;\n }\n\n __destroy() {\n this.__config[NODE_IS_DESTROYED] = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get sx() {\n return this.x + this.ox;\n }\n\n get sy() {\n return this.y + this.oy;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__config[NODE_IS_DESTROYED];\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","let o = {\n AUTO: 0,\n PX: 1,\n PERCENT: 2,\n NUMBER: 3,\n INHERIT: 4,\n DEG: 5,\n STRING: 6,\n RGBA: 7,\n REM: 8,\n EM: 9,\n VW: 10,\n VH: 11,\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return [n, o.PERCENT];\n }\n else if(/px$/i.test(v)) {\n return [n, o.PX];\n }\n else if(/deg$/i.test(v)) {\n return [n, o.DEG];\n }\n else if(/rem$/i.test(v)) {\n return [n, o.REM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n else if(/em$/i.test(v)) {\n return [n, o.EM];\n }\n else if(/vw$/i.test(v)) {\n return [n, o.VW];\n }\n else if(/vh$/i.test(v)) {\n return [n, o.VH];\n }\n return [n, o.NUMBER];\n },\n};\n\nexport default o;\n","'use strict';\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n // 个别字符误差,初次之外误差还有根据经验得的比例系数,https://github.com/karasjs/karas/issues/145\n padding: {\n 1: 1,\n f: 0.9,\n },\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n padding: {\n S: 1,\n T: 1,\n Z: 1,\n c: 1,\n f: 0.7,\n i: 1,\n l: 1,\n t: 0.9,\n },\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n padding: {\n f: 0.5,\n },\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n padding: {\n f: 0.5,\n },\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily);\n },\n register(name, info) {\n let { emSquare = 2048, ascent = 1854, descent = 434, lineGap = 67, padding = {} } = info || {};\n this.info[name.toLowerCase()] = {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n padding,\n };\n },\n addPadding(name, padding) {\n Object.assign(this.info[name.toLowerCase()].padding, padding);\n },\n};\n\no.info['宋体'] = o.info.simsun;\n\nexport default o;\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwh%]*)|(left|top|right|bottom|center)){1,2}/ig,\n // tfo: /((-?[\\d.]+(px|%)?)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i];\n let a1 = a[i + 4];\n let a2 = a[i + 8];\n let a3 = a[i + 12];\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\nfunction calPoint(point, m) {\n let [x, y, z, w] = point;\n if(w === undefined) {\n w = 1;\n }\n if(m && !isE(m)) {\n if(m.length === 16) {\n z = z || 0;\n let [a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4] = m;\n w *= x * d1 + y * d2 + z * d3 + d4;\n return [\n (x * a1 + y * a2 + z * a3 + a4),\n (x * b1 + y * b2 + z * b3 + b4),\n (x * c1 + y * c2 + z * c3 + c4),\n w\n ];\n }\n // 6位类型\n let [a, b, c, d, e, f] = m;\n return [a * x + c * y + e, b * x + d * y + f];\n }\n return [x, y, z, w];\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n * @param m\n * @returns {number[]|*}\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let [a, b, c, d, e, f] = m;\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nexport default {\n identity,\n multiply,\n calPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nexport default {\n dotProduct,\n crossProduct,\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let [xmax, ymax] = vertexes[0];\n let [xmin, ymin] = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let [x, y] = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n // 所有向量积均为非负数说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let [x1, y1] = vertexes[i];\n let [x2, y2] = vertexes[(i + 1) % len];\n if(crossProduct(x2 - x1, y2 - y1, x - x1, y - y1) < 0) {\n return false;\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n [x1, y1,, w1] = calPoint([x1, y1], matrix);\n [x2, y2,, w2] = calPoint([x2, y2], matrix);\n [x3, y3,, w3] = calPoint([x3, y3], matrix);\n [x4, y4,, w4] = calPoint([x4, y4], matrix);\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInPolygon(x, y, [\n [x1, y1],\n [x2, y2],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return [\n (a * x1 + b * x2 + c * x3) / (a + b + c),\n (a * y1 + b * y2 + c * y3) / (a + b + c),\n ];\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n * @param a\n * @param b\n */\nfunction isRectsOverlap(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n * @param a\n * @param b\n */\nfunction isRectsInside(a, b) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = {} } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n [px, py] = calPoint([px * width - ox, py * height - oy], matrix);\n return [px + ox, py + oy];\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let [x1, y1] = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return [\n (ox + dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n d2 = -Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.min(maxX, qx);\n maxY = Math.min(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = (-bx + hx) / ax;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = (-by + hy) / ay;\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n if(arguments.length === 4) {\n return [x0, y0, x1, y1];\n }\n if(arguments.length === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(arguments.length === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param order 阶次, 2 和 3\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, order, startT = 0, endT = 1) {\n let derivativeFunc = t => norm(at(t, points, order));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n else {\n // 3阶导数就是常数了,大于3阶的都是0\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n else {\n x = 0;\n y = 0;\n }\n return [x, y];\n}\n\nfunction at(t, points, bezierOrder, derivativeOrder = 1) {\n if(bezierOrder === 2) {\n return at2(t, points, derivativeOrder);\n }\n else if(bezierOrder === 3) {\n return at3(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, order, percent, maxIteration, eps) {\n let length = bezierLength(points, order, 0, 1);\n return pointAtBezierWithLength(points, order, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, order, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points, order));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, order, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, order, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, order, 0);\n}\n\nfunction sliceBezier(points, t) {\n let [[x1, y1], [x2, y2], [x3, y3], p4] = points;\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n let [x4, y4] = p4;\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return [\n x - Math.cos(deg) * r,\n y - Math.sin(deg) * r,\n ];\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return [\n x - Math.sin(deg) * r,\n y + Math.cos(deg) * r,\n ];\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return [\n x + Math.cos(deg) * r,\n y + Math.sin(deg) * r,\n ];\n }\n else {\n deg = d2r(deg);\n return [\n x + Math.sin(deg) * r,\n y - Math.cos(deg) * r,\n ];\n }\n}\n\nexport default {\n pointInPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointOnCircle,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","function canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n ctx.moveTo(list[start][0] + dx, list[start][1] + dy);\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let s = 'M' + list[start][0] + ',' + list[start][1];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'hue-rotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item[0] > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item[1] === PX) {\n return Math.max(0, item[0]);\n }\n else if(item[1] === PERCENT) {\n return Math.max(0, item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n return Math.max(0, item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n return Math.max(0, item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n return Math.max(0, item[0] * root.height * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1]\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item[1] === PX) {\n v = Math.max(0, item[0]);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item[0] * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","// 类型为引用防止json仿造\nconst TYPE_VD = { _: 1 };\nconst TYPE_GM = { _: 2 };\nconst TYPE_CP = { _: 3 };\n\nexport default {\n TYPE_VD,\n TYPE_GM,\n TYPE_CP,\n};\n","import $$type from './$$type';\nimport mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/ {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = ``;\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += ' {\n if(item.isMask) {\n return;\n }\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 4) {\n color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n color = color.map(c => Math.floor(c));\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n // parse递归会出现内部先返回解析好的json,外部parse不能clone\n if(obj.$$type === $$type.TYPE_VD\n || obj.$$type === $$type.TYPE_GM\n || obj.$$type === $$type.TYPE_CP) {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction extendAnimate(ovd, nvd) {\n let list = nvd.__animationList = ovd.animationList.splice(0);\n list.forEach(item => {\n item.__setTarget(nvd);\n // 事件队列的缘故,可能动画本帧刚执行过,然后再继承,就会缺失,需再次赋值一遍;也有可能停留最后\n if(item.assigning || item.finished && item.__stayEnd()) {\n item.assignCurrentStyle();\n }\n });\n // 帧动画继承\n nvd.__frameAnimateList = ovd.__frameAnimateList.splice(0);\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(matrix && !mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n [x1, y1, , w] = mx.calPoint([x1, y1], matrix);\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n [x, y, , w] = mx.calPoint([x, y], matrix);\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n bbox = [xa, ya, xb, yb];\n }\n else if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n return t;\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n extendAnimate,\n transformBbox,\n assignMatrix,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","export default {\n list: [], // 每次渲染前的更新后,等待测量的文字对象列表\n data: {}, // Text中存入的特殊等待测量的信息,字体+字号+粗细为key\n charWidth: {}, // key的文字宽度hash\n padding: {}, // key的文字宽度偏移,少量字体的少量文字有\n ELLIPSIS: '…',\n};\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n // depth: true,\n // stencil: true,\n};\n","import mx from '../math/matrix';\n\nconst calPoint = mx.calPoint;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl([x, y, z, w], cx, cy, revertY) {\n if(z === undefined) {\n z = 0;\n }\n if(w === undefined) {\n w = 1;\n }\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (y - cy) / cy;\n if(revertY) {\n y = -y;\n }\n }\n return [x * w, y * w, z * w, w];\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n // gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, -1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n * @param gl\n * @param list\n * @param hash\n * @param cx\n * @param cy\n * @param revertY\n */\nfunction drawTextureCache(gl, list, hash, cx, cy, revertY) {\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let lastChannel; // 上一个dom的单元号\n let record = [0]; // [num, channel]每一批的数量和单元号记录\n let stack = [record]; // 所有批的数据记录集合\n list.forEach((item, i) => {\n let [cache, opacity, matrix, dx, dy] = item;\n if(i) {\n let channel = hash[cache.page.uuid];\n // 和上一个单元号不同时,生成新的批次记录\n if(lastChannel !== channel) {\n lastChannel = channel;\n record = [0, lastChannel];\n stack.push(record);\n }\n }\n else {\n lastChannel = hash[cache.page.uuid];\n record[1] = lastChannel;\n }\n let { x, y, width, height, page, bbox } = cache;\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let [xa, ya] = [bx + (dx || 0), by + height + (dy || 0)];\n let [xb, yb] = [bx + width + (dx || 0), by + (dy || 0)];\n let [x1, y1, , w1] = calPoint([xa, ya], matrix);\n let [x2, y2, , w2] = calPoint([xb, ya], matrix);\n let [x3, y3, , w3] = calPoint([xb, yb], matrix);\n let [x4, y4, , w4] = calPoint([xa, yb], matrix);\n [x1, y1] = convertCoords2Gl([x1, y1, 0, w1], cx, cy, revertY);\n [x2, y2] = convertCoords2Gl([x2, y2, 0, w2], cx, cy, revertY);\n [x3, y3] = convertCoords2Gl([x3, y3, 0, w3], cx, cy, revertY);\n [x4, y4] = convertCoords2Gl([x4, y4, 0, w4], cx, cy, revertY);\n vtPoint.push(x1, y1, 0, w1, x4, y4, 0, w4, x2, y2, 0, w2, x4, y4, 0, w4, x2, y2, 0, w2, x3, y3, 0, w3);\n let tx1 = x / page.width, ty1 = (y + height) / page.height;\n let tx2 = (x + width) / page.width, ty2 = y / page.height;\n vtTex.push(tx1, ty1, tx1, ty2, tx2, ty1, tx1, ty2, tx2, ty1, tx2, ty2);\n vtOpacity.push(opacity, opacity, opacity, opacity, opacity, opacity);\n record[0]++;\n });\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n let count = 0;\n // 循环按批次渲染\n stack.forEach(record => {\n let [num, channel] = record;\n gl.uniform1i(u_texture, channel);\n num *= 6;\n gl.drawArrays(gl.TRIANGLES, count, num);\n count += num;\n });\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为total和filter的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n * 因此第一次绘制时坐标非1,后面则固定1\n * @param gl\n * @param program\n * @param frameBuffer\n * @param texCache\n * @param tex1 初次绘制目标纹理\n * @param tex2 初次绘制源纹理\n * @param i 初次绘制目标纹理单元\n * @param j 初次绘制源纹理单元\n * @param width\n * @param height\n * @param cx\n * @param cy\n * @param spread\n * @param d\n * @param sigma\n */\nfunction drawBlur(gl, program, frameBuffer, texCache, tex1, tex2, i, j, width, height, cx, cy, spread, d, sigma) {\n // 第一次将total绘制到blur上,此时尺寸存在spread差值,因此不加模糊防止坐标计算问题,仅作为扩展纹理尺寸\n let [x1, y2] = convertCoords2Gl([spread, height - spread], cx, cy);\n let [x2, y1] = convertCoords2Gl([width - spread, spread], cx, cy);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // direction全0,即无模糊,此时只是进行扩展尺寸操作,还没到模糊所以传0\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n gl.uniform2f(u_direction, 0, 0);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // fbo绑定切换纹理对象和单元索引,同时注意不能向源纹理绘制,因为源是cacheTotal,需要重新生成一个,y方向再来一次\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n /**\n * 反复执行共3次,坐标等均不变,只是切换fbo绑定对象和纹理单元\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n */\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n for(let k = 0; k < 3; k++) {\n let tex3 = createTexture(gl, null, j, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n let tex4 = createTexture(gl, null, i, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex4, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n tex1 = tex4;\n recycle.push(tex3);\n }\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, i, m) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, i);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\n/**\n * 根据total/filter生成overflow\n * @param gl\n * @param i 输入纹理单元\n * @param dx 二者偏移值\n * @param dy\n * @param width 最终大小\n * @param height\n * @param w 输入纹理大小\n * @param h\n */\nfunction drawOverflow(gl, i, dx, dy, width, height, w, h) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.programOverflow, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer,原本大小width/height,使用其中的w/h\n let x1 = dx / w, y1 = dy / h, x2 = (width + dx) / w, y2 = (height + dy) /h;\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.programOverflow, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.programOverflow, 'u_texture');\n gl.uniform1i(u_texture, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n}\n\nfunction drawMask(gl, i, j, program) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, j);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, i);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMbm(gl, program, i, j, W, H) {\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, i);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, j);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nexport default {\n initShaders,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n};\n","import util from './util';\nimport debug from './debug';\nimport textCache from '../node/textCache';\nimport font from '../style/font';\nimport ca from '../gl/ca';\nimport webgl from '../gl/webgl';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst WEBGL = {};\nconst CANVAS_LIST = [];\nconst WEBGL_LIST = [];\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && util.isFunction(OffscreenCanvas.prototype.getContext);\n\nlet defaultFontFamilyData;\n\nfunction cache(key, width, height, hash, message) {\n let o;\n if(!key) {\n let target = hash === CANVAS ? CANVAS_LIST : WEBGL_LIST;\n if(target.length) {\n o = target.pop();\n }\n else {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n }\n else if(!hash[key]) {\n o = hash[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = hash[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n o.setAttribute('type', hash === CANVAS ? 'canvas' : 'webgl');\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx;\n if(hash === CANVAS) {\n ctx = o.getContext('2d');\n }\n else {\n ctx = o.getContext('webgl', ca) || o.getContext('experimental-webgl', ca);\n }\n return {\n canvas: o,\n ctx,\n draw() {\n // 空函数,仅对小程序提供hook特殊处理,flush缓冲\n },\n enabled: true,\n available: true,\n release() {\n if(!key && this.available) {\n if(hash === CANVAS) {\n CANVAS_LIST.push(this.canvas);\n }\n else {\n WEBGL_LIST.push(this.canvas);\n }\n }\n this.available = false;\n },\n };\n}\n\nfunction cacheCanvas(key, width, height, message) {\n return cache(key, width, height, CANVAS, message);\n}\n\nfunction cacheWebgl(key, width, height, message) {\n return cache(key, width, height, WEBGL, message);\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\n\nlet inject = {\n measureText() {\n let { list, data } = textCache;\n let html = '';\n let keys = [];\n let lengths = [];\n let chars = [];\n Object.keys(data).forEach(key => {\n let { ff, fs, fw, s } = data[key];\n if(s) {\n keys.push(key);\n lengths.push(s.length);\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n for(let i = 0, len = s.length; i < len; i++) {\n let char = s.charAt(i);\n chars.push(char);\n html += `${char.replace(/`;\n }\n data[key].s = '';\n }\n });\n if(!html) {\n return;\n }\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let { charWidth } = textCache;\n let count = 0, index = 0, key;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n if(count === 0) {\n key = keys[index];\n }\n if(++count === lengths[index]) {\n index++;\n count = 0;\n }\n let char = chars[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n let css = window.getComputedStyle(node, null);\n charWidth[key][char] = parseFloat(css.width);\n }\n list.forEach(text => text.__measureCb());\n textCache.list = [];\n textCache.data = {};\n if(!debug.flag) {\n document.body.removeChild(div);\n }\n },\n measureTextSync(key, ff, fs, fw, char) {\n let inline = `position:absolute;font-family:${ff};font-size:${fs}px;font-weight:${fw}`;\n let html = `${char}${char}${char}`;\n let div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n document.body.appendChild(div);\n div.innerHTML = html;\n let cns = div.childNodes;\n let w1 = parseFloat(window.getComputedStyle(cns[0], null).width);\n let w2 = parseFloat(window.getComputedStyle(cns[1], null).width);\n return w1 * 2 - w2;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag) {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(window);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(window);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasCacheCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getCacheCanvas(width, height, key, message) {\n return cacheCanvas(key, width, height, message);\n },\n releaseCacheCanvas(o) {\n CANVAS_LIST.push(o);\n },\n delCacheCanvas(key) {\n key && delete CANVAS[key];\n },\n hasCacheWebgl(key) {\n return key && WEBGL.hasOwnProperty(key);\n },\n getCacheWebgl(width, height, key, message) {\n return cacheWebgl(key, width, height, message);\n },\n releaseCacheWebgl(o) {\n WEBGL_LIST.push(o);\n },\n delCacheWebgl(key) {\n key && delete WEBGL[key];\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === 'arial') {\n return true;\n }\n if(!font.info.hasOwnProperty(ff)) {\n return false;\n }\n if(font.info[ff].hasOwnProperty('checked')) {\n return font.info[ff].checked;\n }\n let canvas = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__');\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px arial';\n context.fillText('a', 8, 8);\n canvas.draw();\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + ff;\n context.fillText('a', 8, 8);\n canvas.draw();\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return font.info[ff].checked = true;\n }\n }\n return font.info[ff].checked = false;\n },\n loadFont(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let f = new FontFace(url, `url(${url})`);\n f.load().then(function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }).catch(function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n });\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../node/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n PERCENT,\n ];\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p[1] === PERCENT) {\n list.push([item[0], p[0] * 0.01]);\n }\n else if(p[1] === REM) {\n list.push([item[0], p[0] * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p[1] === VW) {\n list.push([item[0], p[0] * root.width / length]);\n }\n else if(p[1] === VH) {\n list.push([item[0], p[0] * root.height / length]);\n }\n else {\n list.push([item[0], p[0] / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX[1] === PERCENT) {\n cx = x1 + positionX[0] * iw * 0.01;\n }\n else if(positionX[1] === REM) {\n cx = x1 + positionX[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionX[1] === VW) {\n cx = x1 + positionX[0] * root.width * 0.01;\n }\n else if(positionX[1] === VH) {\n cx = x1 + positionX[0] * root.height * 0.01;\n }\n else {\n cx = x1 + positionX[0];\n }\n if(positionY[1] === PERCENT) {\n cy = y1 + positionY[0] * ih * 0.01;\n }\n else if(positionY[1] === REM) {\n cy = y1 + positionY[0] * root.computedStyle[FONT_SIZE];\n }\n else if(positionY[1] === VW) {\n cy = y1 + positionY[0] * root.width * 0.01;\n }\n else if(positionY[1] === VH) {\n cy = y1 + positionY[0] * root.height * 0.01;\n }\n else {\n cy = y1 + positionY[0];\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n if(size[4] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[4];\n r = Math.max(xl, yl);\n // 看旋转\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n if(!isNil(points[5])) {\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwh%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [[50, PERCENT], [50, PERCENT]];\n }\n }\n let v = gradient[2].match(/([-+]?[\\d.]+[pxremvwh%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwh%]+)?/ig) || [];\n o.v = v.map(item => {\n let color = /((?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\)))/i.exec(item);\n let arr = [rgba2int(color[1])];\n let percent = /[-+]?[\\d.]+[pxremvwh%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root) {\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root) {\n let w = x2 - x1;\n let h = y2 - y1;\n let [cx, cy, r, xl, yl, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n res.forEach(item => {\n v.children.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ],\n });\n });\n return ctx.add(v);\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n let clip = ctx.add(v);\n res.forEach(item => {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","const DOM = {\n position: 'static',\n display: 'block',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: '#000',\n borderRightColor: '#000',\n borderBottomColor: '#000',\n borderLeftColor: '#000',\n borderTopStyle: 'solid',\n borderRightStyle: 'solid',\n borderBottomStyle: 'solid',\n borderLeftStyle: 'solid',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nlet DOM_ENTRY_SET = [];\nlet DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet GEOM_ENTRY_SET = [];\nlet GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nlet INHERIT = {\n fontFamily: 'arial',\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 1,\n textStrokeOver: 'none',\n};\n\nlet INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwh%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwh%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwh%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwh%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwh%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwh%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst KEY_COLOR = [\n [STYLE_KEY.BACKGROUND_COLOR],\n [STYLE_KEY.BORDER_BOTTOM_COLOR],\n [STYLE_KEY.BORDER_LEFT_COLOR],\n [STYLE_KEY.BORDER_RIGHT_COLOR],\n [STYLE_KEY.BORDER_TOP_COLOR],\n [STYLE_KEY.COLOR],\n [STYLE_KEY.TEXT_STROKE_COLOR],\n];\n\nconst KEY_LENGTH = [\n [STYLE_KEY.FONT_SIZE],\n [STYLE_KEY.BORDER_BOTTOM_WIDTH],\n [STYLE_KEY.BORDER_LEFT_WIDTH],\n [STYLE_KEY.BORDER_RIGHT_WIDTH],\n [STYLE_KEY.BORDER_TOP_WIDTH],\n [STYLE_KEY.LEFT],\n [STYLE_KEY.TOP],\n [STYLE_KEY.RIGHT],\n [STYLE_KEY.BOTTOM],\n [STYLE_KEY.FLEX_BASIS],\n [STYLE_KEY.WIDTH],\n [STYLE_KEY.HEIGHT],\n [STYLE_KEY.LINE_HEIGHT],\n [STYLE_KEY.MARGIN_BOTTOM],\n [STYLE_KEY.MARGIN_LEFT],\n [STYLE_KEY.MARGIN_TOP],\n [STYLE_KEY.MARGIN_RIGHT],\n [STYLE_KEY.PADDING_TOP],\n [STYLE_KEY.PADDING_RIGHT],\n [STYLE_KEY.PADDING_BOTTOM],\n [STYLE_KEY.PADDING_LEFT],\n [STYLE_KEY.STROKE_WIDTH],\n [STYLE_KEY.STROKE_MITERLIMIT],\n [STYLE_KEY.LETTER_SPACING],\n [STYLE_KEY.PERSPECTIVE],\n [STYLE_KEY.TEXT_STROKE_WIDTH],\n];\n\nconst KEY_GRADIENT = [\n [STYLE_KEY.BACKGROUND_IMAGE],\n [STYLE_KEY.FILL],\n [STYLE_KEY.STROKE],\n];\n\nconst KEY_RADIUS = [\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS],\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS],\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS],\n];\n\nconst COLOR_HASH = {};\nKEY_COLOR.forEach(k => {\n COLOR_HASH[k] = true;\n});\n\nconst LENGTH_HASH = {};\nKEY_LENGTH.forEach(k => {\n LENGTH_HASH[k] = true;\n});\n\nconst RADIUS_HASH = {};\nKEY_RADIUS.forEach(k => {\n RADIUS_HASH[k] = true;\n});\n\nconst GRADIENT_HASH = {};\nKEY_GRADIENT.forEach(k => {\n GRADIENT_HASH[k] = true;\n});\n\nconst GRADIENT_TYPE = {\n linear: true,\n radial: true,\n conic: true,\n};\n\nconst KEY_EXPAND = [\n [STYLE_KEY.TRANSLATE_X],\n [STYLE_KEY.TRANSLATE_Y],\n [STYLE_KEY.TRANSLATE_Z],\n [STYLE_KEY.SKEW_X],\n [STYLE_KEY.SKEW_Y],\n [STYLE_KEY.SCALE_X],\n [STYLE_KEY.SCALE_Y],\n [STYLE_KEY.SCALE_Z],\n [STYLE_KEY.ROTATE_X],\n [STYLE_KEY.ROTATE_Y],\n [STYLE_KEY.ROTATE_Z],\n];\n\nconst EXPAND_HASH = {};\nKEY_EXPAND.forEach(k => {\n EXPAND_HASH[k] = true;\n});\n\nexport default {\n KEY_COLOR,\n KEY_EXPAND,\n KEY_GRADIENT,\n KEY_LENGTH,\n KEY_RADIUS,\n COLOR_HASH,\n EXPAND_HASH,\n GRADIENT_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_TYPE,\n};\n","import reset from '../style/reset';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { INHERIT } = unit;\nconst { STYLE_KEY } = enums;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\nconst IGNORE = {\n [STYLE_KEY.POINTER_EVENTS]: true,\n};\nconst REPAINT = {\n [STYLE_KEY.TRANSFORM]: true,\n [STYLE_KEY.TRANSLATE_X]: true,\n [STYLE_KEY.TRANSLATE_Y]: true,\n [STYLE_KEY.SKEW_X]: true,\n [STYLE_KEY.SKEW_Y]: true,\n [STYLE_KEY.SCALE_X]: true,\n [STYLE_KEY.SCALE_Y]: true,\n [STYLE_KEY.ROTATE_Z]: true,\n [STYLE_KEY.COLOR]: true,\n [STYLE_KEY.FONT_STYLE]: true,\n [STYLE_KEY.STROKE_WIDTH]: true,\n [STYLE_KEY.FILL]: true,\n [STYLE_KEY.STROKE_DASHARRAY]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.BACKGROUND_COLOR]: true,\n [STYLE_KEY.BACKGROUND_IMAGE]: true,\n [STYLE_KEY.BACKGROUND_POSITION_X]: true,\n [STYLE_KEY.BACKGROUND_POSITION_Y]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [STYLE_KEY.BACKGROUND_SIZE]: true,\n [STYLE_KEY.STROKE]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [STYLE_KEY.VISIBILITY]: true,\n [STYLE_KEY.OPACITY]: true,\n [STYLE_KEY.Z_INDEX]: true,\n [STYLE_KEY.FILTER]: true,\n [STYLE_KEY.BOX_SHADOW]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.BACKGROUND_CLIP]: true,\n [STYLE_KEY.TEXT_STROKE_WIDTH]: true,\n [STYLE_KEY.TEXT_STROKE_COLOR]: true,\n [STYLE_KEY.TEXT_STROKE_OVER]: true,\n};\nconst MEASURE = {\n [STYLE_KEY.FONT_SIZE]: true,\n [STYLE_KEY.FONT_WEIGHT]: true,\n [STYLE_KEY.FONT_FAMILY]: true,\n};\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n IGNORE,\n REPAINT,\n MEASURE,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n};\n\no.isIgnore = function(k) {\n return IGNORE.hasOwnProperty(k);\n};\nfunction isGeom(tagName, k) {\n return GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n}\no.isGeom = isGeom;\no.isRepaint = function(k) {\n return REPAINT.hasOwnProperty(k) || isGeom(k);\n};\no.isMeasure = function(k) {\n return MEASURE.hasOwnProperty(k);\n};\no.isValid = function(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n};\n\nlet MEASURE_KEY_SET = o.MEASURE_KEY_SET = Object.keys(MEASURE).map(i => parseInt(i));\nlet len = MEASURE_KEY_SET.length;\no.isMeasureInherit = function(target) {\n if(target) {\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n return true;\n }\n }\n }\n return false;\n};\no.measureInheritList = function(target) {\n let list = [];\n for(let i = 0; i < len; i++) {\n let k = MEASURE_KEY_SET[i];\n if(target.hasOwnProperty(k) && target[k][1] === INHERIT) {\n list.push(k);\n }\n }\n return list;\n};\n\no.addGeom('$line', ['x1', 'y1', 'x2', 'y2', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end']);\n\nexport default o;\n","import unit from './unit';\nimport font from './font';\nimport gradient from './gradient';\nimport reg from './reg';\nimport reset from './reset';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\n\nconst { STYLE_KEY, STYLE_RV_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n DISPLAY,\n FLEX_DIRECTION,\n FLEX_GROW,\n FLEX_SHRINK,\n FLEX_BASIS,\n JUSTIFY_CONTENT,\n ALIGN_SELF,\n ALIGN_ITEMS,\n MATRIX,\n LETTER_SPACING,\n BACKGROUND_CLIP,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, REM, VW, VH, calUnit } = unit;\nconst { isNil, rgba2int, equalArr } = util;\nconst { MEASURE_KEY_SET, isGeom, GEOM, GEOM_KEY_SET } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr[1] = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr[1] === NUMBER) {\n arr[1] = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr[1]) > -1) {\n arr[1] = PX;\n }\n }\n else {\n if(arr[1] === NUMBER) {\n arr[1] = DEG;\n }\n }\n}\n\n/**\n * 将传入的手写style标准化,并且用reset默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param reset 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, reset = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(!isNil(v) && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n reset.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [null];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n if(reg.img.test(item)) {\n return reg.img.exec(item)[2];\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(reg.gradient.test(temp)) {\n res[BACKGROUND_IMAGE] = [gradient.parseGradient(temp)];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [reg.img.exec(temp)[2]];\n }\n else {\n res[BACKGROUND_IMAGE] = [null];\n }\n }\n temp = style.backgroundColor;\n if(temp) {\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = [rgba2int(bgc[0]), RGBA];\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = [rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), RGBA];\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(!isNil(temp)) {\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n return v;\n }\n else {\n return [\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n PERCENT,\n ];\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwh%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0] === 'contain' || match[0] === 'cover') {\n match[1] = match[0];\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push([item, STRING]);\n }\n else {\n v.push([0, AUTO]);\n }\n }\n return v;\n }\n else {\n return [\n [0, AUTO],\n [0, AUTO],\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(!isNil(v)) {\n res[STYLE_KEY[style2Upper(k)]] = [rgba2int(v), RGBA];\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(!isNil(v)) {\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n if(n[0] < 0) {\n n[0] = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = [0, PX];\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push([MATRIX, [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]]);\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push([MATRIX, arr]);\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push([PERSPECTIVE, arr]);\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push([ROTATE_3D, arr]);\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push([k2, arr]);\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push([k1, arr1]);\n transform.push([k2, arr2]);\n transform.push([k3, arr3]);\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(!isNil(temp)) {\n let arr = calUnit(temp);\n if(arr[0] < 0) {\n arr[0] = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n[1]) > -1) {\n n[1] = PX;\n }\n arr.push(n);\n }\n else {\n arr.push([\n {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n PERCENT,\n ]);\n // 不规范的写法变默认值50%\n if(isNil(arr[i][0])) {\n arr[i][0] = 50;\n }\n }\n }\n }\n else {\n arr.push([50, PERCENT]);\n arr.push([50, PERCENT]);\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp) {\n let arr = temp.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0]);\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n res[ROTATE_3D] = arr;\n }\n }\n temp = style.opacity;\n if(!isNil(temp)) {\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n if(v === 'auto') {\n v = [0, AUTO];\n }\n else {\n v = calUnit(v);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v[0] < 0) {\n v[0] = 0;\n }\n });\n temp = style.flexBasis;\n if(!isNil(temp)) {\n if(temp === 'content') {\n res[FLEX_BASIS] = [temp, STRING];\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v[0] = Math.max(v[0], 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n }\n else {\n res[FLEX_BASIS] = [0, AUTO];\n }\n }\n temp = style.order;\n if(!isNil(temp)) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[COLOR] = [[], INHERIT];\n }\n else {\n res[COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.textStrokeColor;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_COLOR] = [[], INHERIT];\n }\n else {\n res[TEXT_STROKE_COLOR] = [rgba2int(temp), RGBA];\n }\n }\n temp = style.fontSize;\n if(temp || temp === 0) {\n if(temp === 'inherit') {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为负数,否则为继承\n if(v < 0) {\n res[FONT_SIZE] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.textStrokeWidth;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = [0, INHERIT];\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(!isNil(temp)) {\n if(temp === 'inherit') {\n res[TEXT_STROKE_OVER] = [0, INHERIT];\n }\n else {\n let v = temp.toString();\n if(v !== 'none' && v !== 'fill') {\n v = 'none';\n }\n res[TEXT_STROKE_OVER] = [v, STRING];\n }\n }\n temp = style.fontWeight;\n if(!isNil(temp)) {\n if(temp === 'bold') {\n res[FONT_WEIGHT] = [700, NUMBER];\n }\n else if(temp === 'normal') {\n res[FONT_WEIGHT] = [400, NUMBER];\n }\n else if(temp === 'lighter') {\n res[FONT_WEIGHT] = [200, NUMBER];\n }\n else if(temp === 'inherit') {\n res[FONT_WEIGHT] = [0, INHERIT];\n }\n else {\n res[FONT_WEIGHT] = [Math.max(0, parseInt(temp)) || 400, NUMBER];\n }\n }\n temp = style.fontStyle;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_STYLE] = [0, INHERIT];\n }\n else {\n res[FONT_STYLE] = [temp, STRING];\n }\n }\n temp = style.fontFamily;\n if(temp) {\n if(temp === 'inherit') {\n res[FONT_FAMILY] = [0, INHERIT];\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = [temp.toString().toLowerCase().replace(/['\"]/, '').replace(/\\s*,\\s*/g, ','), STRING];\n }\n }\n temp = style.textAlign;\n if(temp) {\n if(temp === 'inherit') {\n res[TEXT_ALIGN] = [0, INHERIT];\n }\n else {\n res[TEXT_ALIGN] = [temp, STRING];\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LINE_HEIGHT] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LINE_HEIGHT] = [0, AUTO];\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v[1]) > -1) {\n v[1] = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = [null, AUTO];\n }\n else {\n res[LINE_HEIGHT] = [n, NUMBER];\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === 'inherit') {\n res[LETTER_SPACING] = [0, INHERIT];\n }\n else if(temp === 'normal') {\n res[LETTER_SPACING] = [0, PX];\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = [parseFloat(temp) || 0, PX];\n }\n }\n temp = style.whiteSpace;\n if(temp) {\n if(temp === 'inherit') {\n res[WHITE_SPACE] = [0, INHERIT];\n }\n else {\n res[WHITE_SPACE] = [temp, STRING];\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n temp = style.fill;\n if(temp !== undefined) {\n if(!temp) {\n res[FILL] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[FILL] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[FILL] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[FILL] = [gradient.parseGradient(temp)];\n }\n else {\n res[FILL] = [rgba2int(temp)];\n }\n }\n temp = style.stroke;\n if(temp !== undefined) {\n if(!temp) {\n res[STROKE] = ['none'];\n }\n else if(Array.isArray(temp)) {\n if(temp.length) {\n res[STROKE] = temp.map(item => {\n if(!item) {\n return 'none';\n }\n else if(reg.gradient.test(item)) {\n return gradient.parseGradient(item);\n }\n else {\n return rgba2int(item);\n }\n });\n }\n else {\n res[STROKE] = ['none'];\n }\n }\n else if(reg.gradient.test(temp)) {\n res[STROKE] = [gradient.parseGradient(temp)];\n }\n else {\n res[STROKE] = [rgba2int(temp)];\n }\n }\n temp = style.strokeWidth;\n if(!isNil(temp)) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n v[0] = Math.max(v[0], 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(!isNil(temp)) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = item.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = temp.toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n temp = style.filter;\n if(temp !== undefined) {\n let match = (temp || '').toString().match(/\\b[\\w-]+\\s*\\(\\s*[-+]?[\\d.]+\\s*[pxremvwhdg%]*\\s*\\)\\s*/ig);\n let f = null;\n if(match) {\n f = [];\n match.forEach(item => {\n let m2 = /([\\w-]+)\\s*\\(\\s*([-+]?[\\d.]+\\s*[pxremvwhdg%]*)\\s*\\)\\s*/i.exec(item);\n if(m2) {\n let k = m2[1].toLowerCase(), v = calUnit(m2[2]);\n if(k === 'blur') {\n if(v[0] <= 0 || [DEG, PERCENT].indexOf(v[1]) > -1) {\n return;\n }\n if(v[1] === NUMBER) {\n v[1] = PX;\n }\n f.push([k, v]);\n }\n else if(k === 'hue-rotate') {\n if([NUMBER, DEG].indexOf(v[1]) === -1) {\n return;\n }\n v[1] = DEG;\n f.push([k, v]);\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast') {\n if([NUMBER, PERCENT].indexOf(v[1]) === -1) {\n return;\n }\n v[0] = Math.max(v[0], 0);\n v[1] = PERCENT;\n f.push([k, v]);\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp) {\n if(temp === 'inherit') {\n res[VISIBILITY] = [0, INHERIT];\n }\n else {\n res[VISIBILITY] = [temp, STRING];\n }\n }\n temp = style.pointerEvents;\n if(temp) {\n if(temp === 'inherit') {\n res[POINTER_EVENTS] = [0, INHERIT];\n }\n else {\n res[POINTER_EVENTS] = [temp, STRING];\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = null;\n let match = (temp || '').match(/([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(((transparent)|(#[0-9a-f]{3,8})|(rgba?\\(.+?\\)))\\s*)?(inset|outset)?\\s*,?/ig);\n if(match) {\n match.forEach(item => {\n let boxShadow = /([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*)\\s*([-+]?[\\d.]+[pxremvwh%]*\\s*)?([-+]?[\\d.]+[pxremvwh%]*\\s*)?(?:((?:transparent)|(?:#[0-9a-f]{3,8})|(?:rgba?\\(.+\\)))\\s*)?(inset|outset)?/i.exec(item);\n if(boxShadow) {\n bs = bs || [];\n let res = [];\n // v,h,blur,spread,color,inset\n for(let i = 0; i < 4; i++) {\n let v = calUnit(boxShadow[i + 1]);\n if([NUMBER, DEG].indexOf(v[1]) > -1) {\n v[1] = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 1 && v[0] < 0) {\n v = 0;\n }\n res.push(v);\n }\n res.push(rgba2int(boxShadow[5]));\n res.push(boxShadow[6] || 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = style[k];\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(!isNil(temp)) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n res[STYLE_KEY[style2Upper(k)]] = Array.isArray(v) ? v : [v];\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\n/**\n * 第一次和REFLOW等级下,刷新前首先执行,生成computedStyle\n * 影响文字测量的只有字体和大小和重量,需要提前处理\n * 继承相关的计算\n * @param node 对象节点\n * @param isRoot 是否是根节点,无继承需使用默认值\n */\nfunction computeMeasure(node, isRoot) {\n let { currentStyle, computedStyle, domParent } = node;\n let parentComputedStyle = !isRoot && domParent.computedStyle;\n MEASURE_KEY_SET.forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v[1] === INHERIT) {\n computedStyle[k] = getFontFamily(isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k]);\n }\n else {\n computedStyle[k] = getFontFamily(v[0]);\n }\n }\n else if(v[1] === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // 只有fontSize会有%\n else if(v[1] === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (parentComputedStyle[k] * v[0] * 0.01);\n }\n else if(v[1] === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.computedStyle[FONT_SIZE] * v[0]);\n }\n else if(v[1] === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.width * 0.01 * v[0]);\n }\n else if(v[1] === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (node.root.height * 0.01 * v[0]);\n }\n else {\n computedStyle[k] = v[0];\n }\n });\n}\n\n/**\n * 每次布局前需要计算的reflow相关的computedStyle\n * @param node 对象节点\n * @param isHost 是否是根节点或组件节点这种局部根节点,无继承需使用默认值\n */\nfunction computeReflow(node, isHost) {\n let { currentStyle, computedStyle, domParent: parent, root } = node;\n let rem = root.computedStyle[FONT_SIZE];\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.computedStyle;\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n if(item[1] === PX) {\n computedStyle[k] = item[0];\n }\n else if(item[1] === REM) {\n computedStyle[k] = item[0] * rem;\n }\n else if(item[1] === VW) {\n computedStyle[k] = item[0] * root.width * 0.01;\n }\n else if(item[1] === VH) {\n computedStyle[k] = item[0] * root.height * 0.01;\n }\n else {\n computedStyle[k] = 0;\n }\n });\n [\n POSITION,\n DISPLAY,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign[1] === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign[0];\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight[1] === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph[1] !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph[1]) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph[0], 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n // 防止为0\n else if(lineHeight[1] === PX) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === PERCENT) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * fontSize * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === REM) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * rem, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VW) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.width * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === VH) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0] * root.height * 0.01, 0) || calNormalLineHeight(computedStyle);\n }\n else if(lineHeight[1] === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight[0], 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // normal或auto\n else {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing[1] === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else if(letterSpacing[1] === PERCENT) {\n computedStyle[LETTER_SPACING] = fontSize * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === REM) {\n computedStyle[LETTER_SPACING] = rem * letterSpacing[0];\n }\n else if(letterSpacing[1] === VW) {\n computedStyle[LETTER_SPACING] = root.width * 0.01 * letterSpacing[0];\n }\n else if(letterSpacing[1] === VH) {\n computedStyle[LETTER_SPACING] = root.height * 0.01 * letterSpacing[0];\n }\n else {\n computedStyle[LETTER_SPACING] = letterSpacing[0];\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace[1] === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace[0];\n }\n}\n\nfunction setFontStyle(style) {\n let fontSize = style[FONT_SIZE];\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + (style[FONT_FAMILY] || 'arial');\n}\n\nfunction getFontFamily(str) {\n let ff = str.split(',');\n let f = 'arial';\n for(let i = 0, len = ff.length; i < len; i++) {\n if(font.support(ff[i])) {\n f = ff[i];\n break;\n }\n }\n return f;\n}\n\nfunction getBaseLine(style) {\n let fontSize = style[FONT_SIZE];\n let ff = getFontFamily(style[FONT_FAMILY]);\n let normal = fontSize * (font.info[ff] || font.info.arial).lhr;\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info.arial).blr;\n}\n\nfunction calNormalLineHeight(style) {\n let ff = getFontFamily(style[FONT_FAMILY]);\n return style[FONT_SIZE] * (font.info[ff] || font.info.arial).lhr;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style[1] === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style[1] === PX) {\n return n * style[0];\n }\n else if(style[1] === PERCENT) {\n n *= style[0] * 0.01;\n parent = parent.domParent;\n }\n else if(style[1] === REM) {\n return n * style[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style[1] === VW) {\n return n * style[0] * parent.root.width * 0.01;\n }\n else if(style[1] === VH) {\n return n * style[0] * parent.root.height * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v[0], parent, WIDTH);\n }\n else {\n v = calRelativePercent(v[0], parent, HEIGHT);\n }\n }\n else if(v[1] === REM) {\n v = v[0] * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * parent.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * parent.root.height * 0.01;\n }\n return v;\n}\n\nfunction calAbsolute(currentStyle, k, v, size, root) {\n if(v[1] === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER, DEG, RGBA, STRING].indexOf(v[1]) > -1) {\n v = v[0];\n }\n else if(v[1] === PERCENT) {\n v = v[0] * size * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * root.height * 0.01;\n }\n return v;\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa[0] !== ob[0]) {\n return false;\n }\n // translate/matrix等都是数组\n if(!equalArr(oa[1], ob[1])) {\n return false;\n }\n }\n return true;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equalArr(a[i], b[i])) {\n return false;\n }\n }\n }\n if(k === BACKGROUND_SIZE) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0][0] !== bb[0][0] || aa[0][1] !== bb[0][1] || aa[1][0] !== bb[1][0] || aa[1][1] !== bb[1][1]) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || RADIUS_HASH.hasOwnProperty(k)) {\n return a[0][0] === b[0][0] && a[0][1] === b[0][1]\n && a[1][0] === b[1][0] && a[1][1] === b[1][1];\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y\n || LENGTH_HASH.hasOwnProperty(k) || EXPAND_HASH.hasOwnProperty(k)) {\n return a[0] === b[0] && a[1] === b[1];\n }\n if(k === BOX_SHADOW) {\n return equalArr(a, b);\n }\n if(COLOR_HASH.hasOwnProperty(k)) {\n return a[1] === b[1] && equalArr(a[0], b[0]);\n }\n if(GRADIENT_HASH.hasOwnProperty(k) && a.k === b.k && GRADIENT_TYPE.hasOwnProperty(a.k)) {\n let av = a.v;\n let bv = b.v;\n if(a.d !== b.d || av.length !== bv.length) {\n return false;\n }\n for(let i = 0, len = av.length; i < len; i++) {\n let ai = av[i];\n let bi = bv[i];\n if(ai.length !== bi.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(ai[0][j] !== bi[0][j]) {\n return false;\n }\n }\n if(ai.length > 1) {\n if(ai[1][0] !== bi[1][0] || ai[1][1] !== bi[1][1]) {\n return false;\n }\n }\n }\n return true;\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equalArr(a, b);\n }\n return a === b;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nconst VALUE = {\n [POSITION]: true,\n [DISPLAY]: true,\n [STYLE_KEY.BACKGROUND_REPEAT]: true,\n [FLEX_DIRECTION]: true,\n [FLEX_GROW]: true,\n [FLEX_SHRINK]: true,\n [FLEX_WRAP]: true,\n [JUSTIFY_CONTENT]: true,\n [ALIGN_ITEMS]: true,\n [ALIGN_SELF]: true,\n [STYLE_KEY.OVERFLOW]: true,\n [STYLE_KEY.MIX_BLEND_MODE]: true,\n [STYLE_KEY.STROKE_LINECAP]: true,\n [STYLE_KEY.STROKE_LINEJOIN]: true,\n [STYLE_KEY.STROKE_MITERLIMIT]: true,\n [STYLE_KEY.FILL_RULE]: true,\n [OPACITY]: true,\n [Z_INDEX]: true,\n [BACKGROUND_CLIP]: true,\n [TEXT_OVERFLOW]: true,\n [LINE_CLAMP]: true,\n};\n// 仅1维数组\nconst ARRAY_0 = {\n [COLOR]: true,\n [TEXT_STROKE_COLOR]: true,\n [BACKGROUND_COLOR]: true,\n [STYLE_KEY.BORDER_TOP_COLOR]: true,\n [STYLE_KEY.BORDER_RIGHT_COLOR]: true,\n [STYLE_KEY.BORDER_BOTTOM_COLOR]: true,\n [STYLE_KEY.BORDER_LEFT_COLOR]: true,\n};\n// 仅2维数组且只有2个值\nconst ARRAY_0_1 = {\n [STYLE_KEY.BORDER_TOP_LEFT_RADIUS]: true,\n [STYLE_KEY.BORDER_TOP_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_RIGHT_RADIUS]: true,\n [STYLE_KEY.BORDER_BOTTOM_LEFT_RADIUS]: true,\n [TRANSFORM_ORIGIN]: true,\n [PERSPECTIVE_ORIGIN]: true,\n};\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 渐变特殊处理\n if(k === BACKGROUND_IMAGE) {\n res[k] = v.map(item => {\n // 可能为null\n if(item && item.k) {\n return util.clone(item);\n }\n else {\n return item;\n }\n });\n }\n else if(k === FILL || k === STROKE) {\n res[k] = v.map(item => {\n // 渐变\n // 可能非法为空\n if(item && item.k) {\n return util.clone(item);\n }\n // 颜色\n else {\n return item.slice(0);\n }\n });\n }\n else if(k === TRANSFORM || k === FILTER) {\n if(v) {\n let n = v.slice(0);\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n res[k] = n;\n }\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = item.slice(0);\n n[4] = n[4].slice(0);\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => item.slice(0));\n }\n }\n // position等直接值类型赋值\n else if(VALUE.hasOwnProperty(k)) {\n res[k] = v;\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // 其余皆是数组或空,默认是一维数组只需slice即可\n else if(v) {\n let n = res[k] = v.slice(0);\n // 特殊引用里数组某项再次clone\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n n[i][0] = n[i][0].slice(0);\n n[i][1] = n[i][1].slice(0);\n }\n }\n else if(ARRAY_0.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n }\n else if(ARRAY_0_1.hasOwnProperty(k)) {\n n[0] = n[0].slice(0);\n n[1] = n[1].slice(0);\n }\n else if(k === TRANSFORM) {\n for(let i = 0, len = n.length; i < len; i++) {\n n[i] = n[i].slice(0);\n }\n }\n else if(k === ROTATE_3D) {\n n[3] = n[3].slice(0);\n }\n }\n }\n return res;\n}\n\nexport default {\n normalize,\n computeMeasure,\n computeReflow,\n setFontStyle,\n getFontFamily,\n getBaseLine,\n calRelative,\n calAbsolute,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n};\n","import mode from './mode';\nimport css from '../style/css';\nimport enums from '../util/enums';\nimport util from '../util/util';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n} } = enums;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, wList) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n this.__width = w;\n this.__height = h;\n this.__content = content;\n this.__wList = wList;\n this.__virtualDom = {};\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, wList, width } = this;\n let { ox, oy } = parent;\n y += css.getBaseLine(computedStyle);\n x += ox + dx;\n y += oy + dy;\n this.__endX = x + width;\n this.__endY = y;\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n if(overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content.charAt(i), x, y);\n }\n if(!overFill) {\n ctx.fillText(content.charAt(i), x, y);\n }\n x += wList[i] + letterSpacing;\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', x],\n ['y', y],\n ['fill', cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3)) {\n props.push(['stroke', cacheStyle[TEXT_STROKE_COLOR]]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseLine() {\n return this.parent.baseLine;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get wList() {\n return this.__wList;\n }\n}\n\nexport default TextBox;\n","import inject from '../util/inject';\n\nlet SIZE = [8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192];\nlet NUMBER = [128, 64, 32, 16, 8, 4, 2, 1, 1, 1, 1];\nlet MAX = SIZE[SIZE.length - 1];\nconst HASH_CANVAS = {};\n\nlet uuid = 0;\n\nclass Page {\n constructor(size, number) {\n this.__size = size;\n this.__number = number;\n this.__free = this.__total = number * number;\n size *= number;\n this.__width = size;\n this.__height = size;\n let offscreen = this.__canvas = inject.getCacheCanvas(size, size, null, number);\n if(offscreen) {\n this.__offscreen = offscreen;\n }\n // 1/0标识n*n个单元格是否空闲可用,一维数组表示\n this.__grid = [];\n for(let i = 0; i < this.__total; i++) {\n this.__grid.push(1);\n }\n this.__uuid = uuid++;\n // webgl贴图缓存使用,一旦更新则标识记录,绑定某号纹理单元查看变化才更新贴图\n this.__update = false;\n this.time = 0;\n }\n\n add() {\n let { number, grid } = this;\n for(let i = 0; i < number; i++) {\n for(let j = 0; j < number; j++) {\n let index = i * number + j;\n if(grid[index]) {\n grid[index] = 0;\n this.__free--;\n return index;\n }\n }\n }\n // 理论不可能进入,除非bug\n throw new Error('Can not find free page');\n }\n\n del(pos) {\n if(!this.grid[pos]) {\n this.grid[pos] = 1;\n this.__free++;\n }\n }\n\n getCoords(pos) {\n let { size, number } = this;\n let x = pos % number;\n let y = Math.floor(pos / number);\n return [x * size, y * size];\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get total() {\n return this.__total;\n }\n\n get free() {\n return this.__free;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.offscreen.canvas;\n }\n\n get ctx() {\n return this.offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(size) {\n if(size > MAX) {\n return;\n }\n let s = SIZE[0];\n let n = NUMBER[0];\n // 使用刚好满足的尺寸\n for(let i = 0, len = SIZE.length; i < len; i++) {\n s = SIZE[i];\n n = NUMBER[i];\n if(SIZE[i] >= size) {\n break;\n }\n }\n let list = HASH_CANVAS[s] = HASH_CANVAS[s] || [];\n // 从hash列表中尝试取可用的一页,找不到就生成新的页\n let page;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item.free) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new Page(s, n);\n if(!page.offscreen) {\n inject.error('Can not create off-screen for page');\n return;\n }\n list.push(page);\n }\n let pos = page.add();\n return { page, pos };\n }\n\n static set CONFIG(v) {\n if(!v || !Array.isArray(v.SIZE) || !Array.isArray(v.NUMBER)) {\n return;\n }\n SIZE = v.SIZE;\n NUMBER = v.NUMBER;\n MAX = SIZE[SIZE.length - 1];\n }\n\n static get CONFIG() {\n return {\n SIZE,\n NUMBER,\n };\n }\n\n static get MAX() {\n return MAX;\n }\n\n static genUuid() {\n return uuid++;\n }\n}\n\nexport default Page;\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint([sx3, sy3], m)[1]);\n let lt2 = Math.abs(matrix.calPoint([tx3, ty3], n)[1]);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let [ax1, ay1] = matrix.calPoint([sx1, sy1], n);\n let [ax2, ay2] = matrix.calPoint([sx2, sy2], n);\n let [ax3, ay3] = matrix.calPoint([sx3, sy3], n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport geom from './geom';\n\nexport default {\n matrix,\n tar,\n geom,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport math from '../math/index';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { matrix, geom } = math;\nconst { identity, multiply, isE } = matrix;\nconst { d2r } = geom;\n\nfunction calSingle(t, k, v) {\n if(k === TRANSLATE_X) {\n t[12] = v;\n }\n else if(k === TRANSLATE_Y) {\n t[13] = v;\n }\n else if(k === TRANSLATE_Z) {\n t[14] = v;\n }\n else if(k === SCALE_X) {\n t[0] = v;\n }\n else if(k === SCALE_Y) {\n t[5] = v;\n }\n else if(k === SCALE_Z) {\n t[10] = v;\n }\n else if(k === SKEW_X) {\n v = d2r(v);\n t[4] = Math.tan(v);\n }\n else if(k === SKEW_Y) {\n v = d2r(v);\n t[1] = Math.tan(v);\n }\n else if(k === ROTATE_X) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n }\n else if(k === ROTATE_Y) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n }\n else if(k === ROTATE_Z) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n }\n else if(k === ROTATE_3D) {\n let [x, y, z, r] = v;\n r = d2r(r[0]);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n }\n else if(k === PERSPECTIVE && v > 0) {\n v = Math.max(v, 1);\n t[11] = -1 / v;\n }\n else if(k === MATRIX) {\n util.assignMatrix(t, v);\n }\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let list = normalize(transform, ow, oh, root);\n let m = identity();\n list.forEach(item => {\n let [k, v] = item;\n let t = identity();\n calSingle(t, k, v);\n m = multiply(m, t);\n });\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, transformOrigin) {\n let [ox, oy] = transformOrigin;\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, transformOrigin, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, transformOrigin);\n}\n\nfunction normalizeSingle(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n if(v[1] === PERCENT) {\n return v[0] * ow * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === TRANSLATE_Y) {\n if(v[1] === PERCENT) {\n return v[0] * oh * 0.01;\n }\n else if(v[1] === REM) {\n return v[0] * root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n return v[0] * root.width * 0.01;\n }\n else if(v[1] === VH) {\n return v[0] * root.height * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v[0];\n}\n\nfunction normalize(transform, ow, oh, root) {\n let res = [];\n transform.forEach(item => {\n let [k, v] = item;\n res.push([k, normalizeSingle(k, v, ow, oh, root)]);\n });\n return res;\n}\n\nfunction calOrigin(transformOrigin, w, h, root) {\n let tfo = [];\n transformOrigin.forEach((item, i) => {\n if(item[1] === PX) {\n tfo.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n tfo.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n tfo.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n tfo.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n tfo.push(item[0] * root.height * 0.01);\n }\n });\n return tfo;\n}\n\nfunction calMatrixByPerspective(m, pm) {\n if(!isE(pm)) {\n m = multiply(pm, m);\n }\n return m;\n}\n\nfunction calPerspectiveMatrix(ppt, po) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n let [ox, oy] = po;\n if(ox || oy) {\n res = multiply([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, ox, oy, 0, 1], res);\n res = multiply(res, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -ox, -oy, 0, 1]);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!(m[3] || m[7] || m[11]);\n}\n\nexport default {\n calMatrix,\n calOrigin,\n calMatrixByPerspective,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import Page from './Page';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport enums from '../util/enums';\nimport painter from '../util/painter';\nimport debug from '../util/debug';\nimport tf from '../style/transform';\nimport mx from '../math/matrix';\nimport blur from '../math/blur';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n DISPLAY,\n VISIBILITY,\n },\n NODE_KEY: {\n NODE_OPACITY,\n NODE_CACHE,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_HAS_CONTENT,\n NODE_COMPUTED_STYLE,\n },\n} = enums;\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用\nfunction genSingle(cache, message) {\n let { size, sx1, sy1, width, height, bbox } = cache;\n let offscreen = inject.getCacheCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bbox;\n offscreen.size = size;\n offscreen.sx1 = sx1;\n offscreen.sy1 = sy1;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nclass Cache {\n constructor(w, h, bbox, page, pos, x1, y1) {\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let [x, y] = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n this.__appendData(x1, y1);\n if(page.canvas) {\n this.__enabled = true;\n let ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(debug.flag) {\n page.canvas.setAttribute && page.canvas.setAttribute('size', page.size);\n }\n }\n }\n\n __appendData(sx1, sy1) {\n this.sx1 = sx1; // 去除margin的左上角原点坐标\n this.sy1 = sy1;\n let bbox = this.bbox;\n this.dx = this.x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.y - bbox[1];\n this.dbx = sx1 - bbox[0]; // 原始x1/y1和box原点的差值\n this.dby = sy1 - bbox[1];\n this.update();\n }\n\n update() {\n this.page.update = true;\n }\n\n clear() {\n if(this.available) {\n let ctx = this.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n let size = this.page.size;\n ctx.clearRect(this.x, this.y, size, size);\n this.__available = false;\n }\n }\n\n release() {\n if(this.enabled) {\n this.clear();\n this.page.del(this.pos);\n this.__page = null;\n this.__enabled = false;\n }\n }\n\n reset(bbox, x1, y1) {\n // 尺寸没变复用之前的并清空\n if(util.equalArr(this.bbox, bbox) && this.enabled) {\n this.clear();\n return;\n }\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n this.__enabled = false;\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get canvas() {\n return this.page.canvas;\n }\n\n get ctx() {\n return this.page.ctx;\n }\n\n get size() {\n return this.page.size;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n static get MAX() {\n return Page.MAX;\n }\n\n static getInstance(bbox, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = Page.getInstance(Math.max(w, h));\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new Cache(w, h, bbox, page, pos, x1, y1);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n * @returns {{canvas: *, ctx: *, release(): void, available: boolean, draw()}}\n */\n static genFilter(cache, filter) {\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n let { x, y, size, canvas, sx1, sy1, width, height, bbox } = cache;\n bbox = bbox.slice(0);\n bbox[0] -= d;\n bbox[1] -= d;\n bbox[2] += d;\n bbox[3] += d;\n let offscreen = inject.getCacheCanvas(width + d * 2, height + d * 2, null, 'filter1');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.draw();\n offscreen.bbox = bbox;\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.sx1 = sx1 - d;\n offscreen.sy1 = sy1 - d;\n offscreen.dx = cache.dx;\n offscreen.dy = cache.dy;\n offscreen.dbx = cache.dbx;\n offscreen.dby = cache.dby;\n offscreen.width = width + d * 2;\n offscreen.height = height + d * 2;\n return offscreen;\n }\n\n static genMask(target, next, isClip, transform, tfo) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n while(next && (next.isMask)) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n tfo[0] += x + dbx;\n tfo[1] += y + dby;\n let inverse = tf.calMatrixByOrigin(transform, tfo);\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身,因为都是img所以1个就够了\n list.forEach(item => {\n let __config = item.__config;\n let cacheOverflow = __config[NODE_CACHE_OVERFLOW], cacheFilter = __config[NODE_CACHE_FILTER], cache = __config[NODE_CACHE];\n let source = cacheOverflow && cacheOverflow.available && cacheOverflow;\n if(!source) {\n source = cacheFilter && cacheFilter.available && cacheFilter;\n }\n if(!source) {\n source = cache && cache.available && cache;\n }\n if(source) {\n ctx.globalAlpha = __config[NODE_OPACITY];\n Cache.drawCache(\n source, cacheMask,\n __config[NODE_COMPUTED_STYLE][TRANSFORM],\n mx.identity(),\n __config[NODE_COMPUTED_STYLE][TRANSFORM_ORIGIN].slice(0),\n inverse\n );\n }\n // 没有内容或者img没加载成功导致没有内容,有内容且可见则是超限,不可能进这里\n else if(__config[NODE_HAS_CONTENT]\n && __config[NODE_COMPUTED_STYLE][DISPLAY] !== 'none'\n && __config[NODE_COMPUTED_STYLE][VISIBILITY] !== 'hidden') {\n inject.error('CacheMask is oversize');\n }\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n Cache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n cacheMask.draw(ctx);\n return cacheMask;\n }\n\n /**\n * 如果不超过bbox,直接用已有的total/filter/mask,否则生成一个新的\n */\n static genOverflow(target, node) {\n let { bbox } = target;\n let { sx, sy, outerWidth, outerHeight } = node;\n let xe = sx + outerWidth;\n let ye = sy + outerHeight;\n if(bbox[0] < sx || bbox[1] < sy || bbox[2] > xe || bbox[3] > ye) {\n let cacheOverflow = genSingle(target, 'overflow');\n let ctx = cacheOverflow.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n Cache.drawCache(target, cacheOverflow);\n cacheOverflow.draw(ctx);\n ctx.globalCompositeOperation = 'destination-in';\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n ctx.rect(sx - bbox[0], sy - bbox[1], outerWidth, outerHeight);\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n return cacheOverflow;\n }\n }\n\n /**\n * bbox变化时直接用老的cache内容重设bbox\n * @param cache\n * @param bbox\n */\n static updateCache(cache, bbox) {\n let old = cache.bbox;\n if(!util.equalArr(bbox, old)) {\n let dx = old[0] - bbox[0];\n let dy = old[1] - bbox[1];\n let newCache = Cache.getInstance(bbox);\n if(newCache && newCache.enabled) {\n let { x: ox, y: oy, canvas, width, height } = cache;\n let { x: nx, y: ny } = newCache;\n newCache.sx1 = cache.sx1;\n newCache.sy1 = cache.sy1;\n newCache.dx = cache.dx + dx;\n newCache.dy = cache.dy + dy;\n newCache.dbx = cache.dbx + dx;\n newCache.dby = cache.dby + dy;\n newCache.ctx.drawImage(canvas, ox, oy, width, height, dx + nx, dy + ny, width, height);\n newCache.__available = true;\n cache.release();\n return newCache;\n }\n }\n else {\n return cache;\n }\n }\n\n static drawCache(source, target, transform, matrix, tfo, inverse) {\n let { x: tx, y: ty, sx1, sy1, ctx, dbx, dby } = target;\n let { x, y, canvas, sx1: sx2, sy1: sy2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + sx2 - sx1 + dbx - dbx2;\n let oy = ty + sy2 - sy1 + dby - dby2;\n if(transform && matrix && tfo) {\n tfo[0] += ox;\n tfo[1] += oy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n matrix = mx.multiply(matrix, m);\n if(inverse) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(matrix, inverse)) {\n matrix = mx.identity();\n }\n else {\n inverse = mx.inverse(inverse);\n matrix = mx.multiply(inverse, matrix);\n }\n }\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n\n static draw(ctx, opacity, matrix, cache) {\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n let { x, y, canvas, sx1, sy1, dbx, dby, width, height } = cache;\n ctx.drawImage(canvas, x, y, width, height, sx1 - dbx, sy1 - dby, width, height);\n }\n}\n\nexport default Cache;\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY, STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n OPACITY,\n FILTER,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n} } = enums;\n\nconst ENUM = {\n // 低位表示 0;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(change.isIgnore(k)) {\n return ENUM.NONE;\n }\n if(k === TRANSLATE_X) {\n return ENUM.TRANSLATE_X;\n }\n else if(k === TRANSLATE_Y) {\n return ENUM.TRANSLATE_Y;\n }\n else if(k === TRANSLATE_Z) {\n return ENUM.TRANSLATE_Z;\n }\n else if(TRANSFORMS.hasOwnProperty(k)) {\n return ENUM.TRANSFORM;\n }\n else if(k === OPACITY) {\n return ENUM.OPACITY;\n }\n else if(k === FILTER) {\n return ENUM.FILTER;\n }\n else if(k === PERSPECTIVE || k === PERSPECTIVE_ORIGIN) {\n return ENUM.PERSPECTIVE;\n }\n else if(change.isRepaint(k)) {\n return ENUM.REPAINT;\n }\n return ENUM.REFLOW;\n },\n isReflow(lv) {\n return !this.isRepaint(lv);\n },\n isRepaint(lv) {\n return lv < ENUM.REFLOW;\n },\n isRebuild(lv) {\n return lv >= ENUM.REBUILD;\n },\n}, ENUM);\no.TRANSFORMS = TRANSFORMS;\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport mode from './mode';\nimport css from '../style/css';\nimport font from '../style/font';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport textCache from './textCache';\nimport inject from '../util/inject';\nimport Cache from '../refresh/Cache';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_STYLE,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_LIMIT_CACHE,\n NODE_DOM_PARENT,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_VIRTUAL_DOM,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_MEASURE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n} = enums;\n\nconst ELLIPSIS = textCache.ELLIPSIS;\nconst AUTO = unit.AUTO;\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidthList = [];\n this.__charWidth = 0;\n this.__textWidth = 0;\n }\n\n /**\n * 预先计算每个字的宽度,在每次布局渲染前做\n * @param renderMode\n * @param ctx\n * @private\n */\n __computeMeasure(renderMode, ctx) {\n let { content, computedStyle, charWidthList } = this;\n // 每次都要清空重新计算,计算会有缓存\n charWidthList.splice(0);\n let ffs = computedStyle[FONT_FAMILY].split(',');\n let ff = 'arial';\n for(let i = 0, len = ffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(ffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n this.__ff = ff;\n let fs = computedStyle[FONT_SIZE];\n let fw = computedStyle[FONT_WEIGHT];\n let key = this.__key = computedStyle[FONT_SIZE] + ',' + ff + ',' + fw;\n let wait = textCache.data[key] = textCache.data[key] || {\n ff,\n fs,\n fw,\n hash: {},\n s: '',\n };\n let cache = textCache.charWidth[key] = textCache.charWidth[key] || {};\n let sum = 0;\n let needMeasure = false;\n // text-overflow:ellipse需要,即便没有也要先测量,其基于最近非inline父节点的字体\n let bp = this.domParent;\n while(bp.currentStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let parentComputedStyle = bp.computedStyle;\n let pff = 'arial';\n for(let i = 0, pffs = parentComputedStyle[FONT_FAMILY].split(','), len = pffs.length; i < len; i++) {\n if(inject.checkSupportFontFamily(pffs[i])) {\n ff = ffs[i];\n break;\n }\n }\n let pfs = parentComputedStyle[FONT_SIZE];\n let pfw = parentComputedStyle[FONT_WEIGHT];\n let pKey = this.__pKey = pfs + ',' + pff + ',' + pfw;\n let parentCache = textCache.charWidth[pKey] = textCache.charWidth[pKey] || {};\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(renderMode === mode.WEBGL) {\n ctx = inject.getCacheCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__').ctx;\n }\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n ctx.font = css.setFontStyle(parentComputedStyle);\n parentCache[ELLIPSIS] = ctx.measureText(ELLIPSIS).width;\n }\n ctx.font = css.setFontStyle(computedStyle);\n }\n else if(renderMode === mode.SVG) {\n if(!parentCache.hasOwnProperty(ELLIPSIS)) {\n parentCache[ELLIPSIS] = 0;\n let wait = textCache.data[pKey] = textCache.data[pKey] || {\n ff: pff,\n fs: pfs,\n fw: pfw,\n hash: {},\n s: '',\n };\n wait.s += ELLIPSIS;\n needMeasure = true;\n }\n }\n // 逐字测量,canvas可瞬间得到信息,svg先预存统一进行\n for(let i = 0, length = content.length; i < length; i++) {\n let char = content.charAt(i);\n let mw;\n if(cache.hasOwnProperty(char)) {\n mw = cache[char];\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n mw = cache[char] = ctx.measureText(char).width;\n charWidthList.push(mw);\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n else {\n if(!wait.hash.hasOwnProperty(char)) {\n wait.s += char;\n }\n wait.hash[char] = true;\n // 先预存标识位-1,测量完后替换它\n charWidthList.push(-1);\n needMeasure = true;\n }\n }\n this.__textWidth = sum;\n if(needMeasure) {\n textCache.list.push(this);\n }\n }\n\n __measureCb() {\n let { content, charWidthList } = this;\n let key = this.__key;\n let cache = textCache.charWidth[key];\n let sum = 0;\n for(let i = 0, len = charWidthList.length; i < len; i++) {\n if(charWidthList[i] < 0) {\n let mw = charWidthList[i] = cache[content.charAt(i)];\n sum += mw;\n this.__charWidth = Math.max(this.charWidth, mw);\n }\n }\n this.__textWidth = sum;\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layout(data) {\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, lx = x, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0 } = data;\n this.__x = this.__sx1 = x;\n this.__y = this.__sy1 = y;\n let { isDestroyed, content, currentStyle, computedStyle, textBoxes, charWidthList, root, __ff, __key } = this;\n textBoxes.splice(0);\n let __config = this.__config;\n __config[NODE_LIMIT_CACHE] = false;\n // 空内容w/h都为0可以提前跳出\n if(isDestroyed || currentStyle[DISPLAY] === 'none' || !content) {\n return lineClampCount;\n }\n this.__ox = this.__oy = 0;\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let begin = 0;\n let i = 0;\n let beginSpace = x - lx; // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n let count = beginSpace;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n } = computedStyle;\n // 特殊字体中特殊字符连续时需减少一定的padding量\n let padding = font.info[__ff].padding;\n let needReduce = !!padding;\n let lastChar;\n let ew = textCache.charWidth[this.__pKey][ELLIPSIS];\n let lineCount = 0;\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow;\n // block的overflow:hidden和textOverflow:clip/ellipsis才生效,inline要看最近非inline父元素\n let bp = this.__bp;\n let {\n [DISPLAY]: display,\n [OVERFLOW]: overflow,\n [WIDTH]: width,\n [TEXT_OVERFLOW]: textOverflow,\n } = bp.currentStyle;\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n while(i < length) {\n count += charWidthList[i] + letterSpacing;\n if(count > w) {\n // block/flex无需宽度,inline-block需要设置宽度才生效\n if(display === 'block' || display === 'flex') {\n isTextOverflow = true;\n }\n else if(width[1] !== AUTO) {\n isTextOverflow = true;\n }\n break;\n }\n i++;\n }\n }\n else {\n while(i < length) {\n count += charWidthList[i++] + letterSpacing;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n }\n // 默认clip跟随overflow:hidden,无需感知\n else {\n let textBox = new TextBox(this, textBoxes.length, x, y, count - beginSpace, lineHeight,\n content, charWidthList);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n maxW = count - beginSpace;\n y += lineHeight;\n }\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let cw = charWidthList[i] + letterSpacing;\n count += cw;\n // 连续字符减少padding,除了连续还需判断char是否在padding的hash中\n if(needReduce) {\n let char = content[i];\n if(char === lastChar && padding.hasOwnProperty(char) && padding[char]) {\n let hasCache, p = textCache.padding[__key] = textCache.padding[__key] || {};\n if(textCache.padding.hasOwnProperty(__key)) {\n if(p.hasOwnProperty(char)) {\n hasCache = true;\n count -= p[char];\n }\n }\n if(!hasCache) {\n let n = 0;\n if(root.renderMode === mode.CANVAS) {\n root.ctx.font = css.setFontStyle(computedStyle);\n let w1 = root.ctx.measureText(char).width;\n let w2 = root.ctx.measureText(char + char).width;\n n = w1 * 2 - w2;\n n *= padding[char];\n }\n else if(root.renderMode === mode.SVG) {\n n = inject.measureTextSync(__key, __ff, fontSize, fontWeight, char);\n n *= padding[char];\n }\n count -= n;\n p[char] = n;\n }\n }\n lastChar = char;\n }\n // 忽略零宽字符\n if(cw === 0) {\n i++;\n continue;\n }\n // 换行都要判断i不是0的时候,第1个字符强制不换行\n if(count === w) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n let textBox;\n // 特殊情况,恰好最后一行最后一个排满,此时查看末尾mpb,要防止i为0的情况首个字符特殊不回退,无需看开头mpb\n if(i === length - 1 && count > w - endSpace && i) {\n count -= charWidthList[i--];\n }\n i++;\n if(!lineCount) {\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, count);\n }\n // 必须先添加再设置y,当有diff的lineHeight时,第一个换行不影响,再换行时第2个换行即第3行会被第1行影响\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null; // 换行后连续字符reduce不生效重新计数\n }\n // 奇怪的精度问题,暂时不用相等判断,而是为原本w宽度加一点点冗余1e-10\n else if(count > w + (1e-10)) {\n // 多行文本截断,这里肯定需要回退\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n [y, maxW] = this.__lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount,\n lineHeight, lx, x, y, maxW, textBoxes, content, charWidthList, lineBoxManager);\n lineCount++;\n break;\n }\n // 普通非多行文本阶段逻辑\n let width;\n // 宽度不足时无法跳出循环,至少也要塞个字符形成一行,无需判断第1行,因为是否放得下逻辑在dom中做过了,\n // 如果第1行放不下,一定会另起一行,此时作为开头再放不下才会进这里,这个if只有0或1个字符的情况\n if(i <= begin) {\n width = count;\n }\n // 超过2个字符回退1个\n else {\n width = count - charWidthList[i--];\n }\n i++;\n // 根据是否第一行分开处理行首空白\n let textBox;\n if(!lineCount) {\n maxW = width - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n }\n else {\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n maxW = Math.max(maxW, width);\n }\n // 必须先添加再设置y,同上\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n begin = i;\n count = 0;\n lineCount++;\n lastChar = null;\n }\n else {\n i++;\n }\n }\n // 换行后Text的x重设为lx\n if(!lineCount) {\n this.__x = this.__sx1 = lx;\n }\n // 最后一行,只有一行未满时也进这里,需查看末尾mpb,排不下回退一个字符\n // 声明了lineClamp时特殊考虑,这里一定是最后一行,要对比行数不能超过,超过忽略掉这些文本\n if(begin < length && (!lineClamp || lineCount + lineClampCount < lineClamp)) {\n let textBox;\n if(!lineCount) {\n let needBack;\n // 防止开头第一个begin=0时回退,这在inline有padding且是第一个child时会发生\n if(begin && count > w - endSpace) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n maxW = count - beginSpace;\n textBox = new TextBox(this, textBoxes.length, x, y, maxW, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n else {\n let needBack;\n // 防止begin在结尾时回退,必须要有个字符,这在最后一行1个字符排不下时会出现\n if(count > w - endSpace && begin < length - 1) {\n needBack = true;\n count -= charWidthList[length - 1];\n }\n textBox = new TextBox(this, textBoxes.length, lx, y, count, lineHeight,\n content.slice(begin, needBack ? length - 1 : length), charWidthList.slice(begin, needBack ? length - 1 : length));\n maxW = Math.max(maxW, count);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n if(needBack) {\n let width = charWidthList[length - 1];\n textBox = new TextBox(this, textBoxes.length, lx, y, width, lineHeight,\n content.slice(length - 1), charWidthList.slice(length - 1));\n maxW = Math.max(maxW, width);\n textBoxes.push(textBox);\n lineBoxManager.setNewLine();\n lineBoxManager.addItem(textBox);\n y += lineHeight;\n lineCount++;\n }\n }\n }\n }\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseLine = css.getBaseLine(computedStyle);\n return lineCount;\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(count, w, beginSpace, endSpace, ew, letterSpacing, begin, i, length, lineCount, lineHeight, lx, x, y, maxW,\n textBoxes, content, charWidthList, lineBoxManager) {\n for(; i >= begin; i--) {\n count -= charWidthList[i] + letterSpacing;\n if(count + ew + endSpace <= w) {\n // 至少1个字符不用回退,到0也没找到需要回退\n if(i) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.slice(begin, i), charWidthList.slice(begin, i));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n break;\n }\n }\n }\n // 最后也没找到,看是否要查找前一个inline节点,还是本身是行首兜底首字母\n if(i < 0) {\n let lineBox = lineBoxManager.lineBox;\n // lineBox为空是行首,至少放1个字符\n if(!lineBox.size) {\n maxW = count - (lineCount ? 0 : beginSpace);\n let textBox = new TextBox(this, textBoxes.length, lineCount ? lx : x, y, maxW, lineHeight,\n content.charAt(begin), charWidthList.slice(begin, begin + 1));\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, true);\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n this.__ellipsis = true;\n }\n // 向前查找inline节点,可能会有前面inline嵌套,因此直接用lineBox,不会出现inlineBlock,\n // 这里和css不同,ib强制超限换行不会同行\n else {\n let list = lineBox.list;\n outer:\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n let { content, wList, width } = tb;\n // 整体减去可以说明可能在这个tb中,只要最后发现不是空文本节点就行,否则继续;第0个强制进入保证1字符\n if(count - width + ew <= w || !j) {\n // 找到可以跳出outer循环,找不到继续,注意第0个且1个字符判断\n for(let k = wList.length - 1; k >= 0; k--) {\n if(!k && !j || count + ew <= w) {\n tb.__content = content;\n tb.__width = width;\n tb.parent.__ellipsis = true;\n break outer;\n }\n else {\n let w2 = wList[k];\n tb.__endY -= w2;\n width -= w2;\n content = content.slice(0, k);\n count -= w2;\n wList.pop();\n }\n }\n }\n // 不够则看前一个tb并且删掉这个\n else {\n count -= width;\n }\n list.pop();\n tb.parent.textBoxes.pop();\n }\n }\n }\n return [y, maxW];\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__sx1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__sy1 += diff;\n }\n\n __tryLayInline(w) {\n return w - this.charWidthList[0];\n }\n\n __inlineSize() {\n let minX, maxX;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n minX = Math.min(minX, item.x);\n maxX = Math.max(maxX, item.x + item.width);\n }\n else {\n minX = item.x;\n maxX = item.x + item.width;\n }\n });\n this.__x = minX;\n this.__sx = this.__sx1 = minX + this.ox;\n this.__width = maxX - minX;\n }\n\n __calMaxAndMinWidth() {\n let n = 0;\n this.charWidthList.forEach(item => {\n n = Math.max(n, item);\n });\n return { max: this.textWidth, min: n };\n }\n\n __calAbsWidth(x, y, w) {\n this.__layout({\n x,\n y,\n w,\n }, true);\n return this.width;\n }\n\n render(renderMode, lv, ctx, cache, dx = 0, dy = 0) {\n let { isDestroyed, computedStyle, textBoxes, cacheStyle, __ellipsis, __bp, __config } = this;\n if(renderMode === mode.SVG) {\n __config[NODE_VIRTUAL_DOM] = this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n return;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // webgl借用离屏canvas绘制文本,cache标识为true是普通绘制,否则是超限降级情况\n if(renderMode === mode.WEBGL) {\n if(cache) {\n let { sx, sy, bbox } = this;\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.reset(bbox, sx, sy);\n }\n else {\n __cache = Cache.getInstance(bbox, sx, sy);\n }\n if(__cache && __cache.enabled) {\n __config[NODE_CACHE] = __cache;\n __cache.__available = true;\n ctx = __cache.ctx;\n dx += -sx + __cache.x;\n dy += -sy + __cache.y;\n __config[NODE_LIMIT_CACHE] = false;\n }\n else {\n __config[NODE_LIMIT_CACHE] = true;\n return;\n }\n }\n else {\n let root = this.root;\n let c = inject.getCacheCanvas(root.width, root.height, '__$$OVERSIZE$$__');\n ctx = c.ctx;\n let {\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: m,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n ctx.globalAlpha = opacity;\n }\n }\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let strokeColor = cacheStyle[TEXT_STROKE_COLOR];\n if(ctx.strokeStyle !== strokeColor) {\n ctx.strokeStyle = strokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === mode.SVG) {\n this.virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n // textOverflow的省略号font使用最近非inline的父节点\n if(__ellipsis) {\n let last = textBoxes[textBoxes.length - 1];\n let { endX, endY } = last;\n let computedStyle = __bp.computedStyle;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = __bp.__cacheStyle[COLOR];\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n ctx.fillText(ELLIPSIS, endX, endY);\n }\n else if(renderMode === mode.SVG) {\n let props = [\n ['x', endX],\n ['y', endY],\n ['fill', __bp.__cacheStyle[COLOR]],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n this.virtualDom.children.push({\n type: 'item',\n tagName: 'text',\n props,\n content: ELLIPSIS,\n });\n }\n }\n }\n\n __deepScan(cb) {\n cb(this);\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n let self = this;\n if(s === self.__content) {\n if(util.isFunction(cb)) {\n cb(-1);\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__content = s;\n let res = {};\n let vd = self.domParent;\n res[UPDATE_NODE] = vd;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = vd.__config;\n let root = vd.root;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.__content = v;\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidthList() {\n return this.__charWidthList;\n }\n\n get charWidth() {\n return this.__charWidth;\n }\n\n get firstCharWidth() {\n return this.charWidthList[0] || 0;\n }\n\n get textWidth() {\n return this.__textWidth;\n }\n\n get baseLine() {\n return this.__baseLine;\n }\n\n get root() {\n return (this.domParent || {}).root;\n }\n\n get currentStyle() {\n return (this.domParent || {}).currentStyle;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return (this.domParent || {}).computedStyle;\n }\n\n get cacheStyle() {\n return (this.domParent || {}).__cacheStyle;\n }\n\n get bbox() {\n let { sx, sy, width, height, computedStyle: { [TEXT_STROKE_WIDTH]: textStrokeWidth = 0 } } = this;\n textStrokeWidth *= 0.5;\n return [sx - textStrokeWidth, sy - textStrokeWidth, sx + width + textStrokeWidth, sy + height + textStrokeWidth];\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get matrix() {\n return this.domParent.matrix;\n }\n\n get matrixEvent() {\n return this.domParent.matrixEvent;\n }\n}\n\nText.prototype.__renderByMask = Text.prototype.render;\n\nexport default Text;\n","import util from './util';\nimport $$type from './$$type';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\n/**\n * 2. 打平children中的数组,变成一维\n * 3. 合并相连的Text节点,即string内容\n */\nfunction flattenJson(parent) {\n if(Array.isArray(parent)) {\n return parent.map(item => flattenJson(item));\n }\n else if(!parent || [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(parent.$$type) === -1 || !Array.isArray(parent.children)) {\n return parent;\n }\n let list = [];\n traverseJson(list, parent.children, {\n lastText: null,\n });\n parent.children = list;\n return parent;\n}\n\nfunction traverseJson(list, children, options) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n traverseJson(list, item, options);\n });\n }\n else if(children && (children.$$type === TYPE_VD || children.$$type === TYPE_GM)) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n if(children.$$type === TYPE_VD) {\n flattenJson(children);\n }\n list.push(children);\n options.lastText = null;\n }\n else if(children && children.$$type === TYPE_CP) {\n list.push(children);\n // 强制component即便返回text也形成一个独立的节点,合并在layout布局中做\n options.lastText = null;\n }\n // 排除掉空的文本,连续的text合并\n else if(!util.isNil(children) && children !== '') {\n if(options.lastText !== null) {\n list[list.length - 1] = options.lastText += children;\n }\n else {\n list.push(children);\n }\n }\n}\n\nexport default flattenJson;\n","import Text from '../node/Text';\nimport util from './util';\nimport $$type from './$$type';\nimport enums from './enums';\nimport flatten from './flatten';\n\nconst { NODE_KEY: {\n NODE_DOM_PARENT,\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n} } = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet Xom, Dom, Img, Geom, Component;\n\nfunction initRoot(cd, root) {\n let c = flatten({\n tagName: root.tagName,\n props: {},\n children: cd,\n $$type: TYPE_VD,\n });\n root.__json = c;\n root.__host = root;\n let children = build(c.children, root, root);\n return relation(root, children);\n}\n\nfunction initDom(json, root, host, parent) {\n let vd = build(json, root, host);\n return relation(parent, vd);\n}\n\nfunction initCp(json, root, host) {\n if(util.isObject(json)) {\n // cp的flatten在__init中自己做\n return build(json, root, host);\n }\n // text的relation会由上层如Root设置\n else {\n return new Text(json);\n }\n}\n\nfunction initCp2(json, root, host, parent) {\n let vd = new json.klass(json.props);\n vd.__tagName = json.tagName || vd.__tagName;\n vd.__root = root;\n vd.__host = host;\n vd.__json = json;\n vd.__init();\n return relation(parent, vd);\n}\n\n/**\n * 将初始json文件生成virtualDom\n * @param json\n * @param root\n * @param host\n * @param hasP 出现过p标签\n * @returns vd\n */\nfunction build(json, root, host, hasP) {\n if(Array.isArray(json)) {\n return json.map(item => build(item, root, host, hasP));\n }\n let vd;\n if(util.isObject(json) && json.$$type) {\n let { tagName, props, children, klass, $$type, __inheritAnimate, __animateRecords } = json;\n // 更新过程中无变化的cp直接使用原来生成的\n if($$type === TYPE_CP && json.__placeholder) {\n return json.__placeholder;\n }\n if($$type === TYPE_VD) {\n if(tagName === 'img') {\n vd = new Img(tagName, props);\n if(Array.isArray(children) && children.length) {\n throw new Error('Img can not contain children');\n }\n }\n else {\n vd = new Dom(tagName, props);\n }\n // 检查p不能包含div\n if(tagName === 'p') {\n hasP = true;\n }\n else if(tagName === 'div' && hasP) {\n throw new Error('Markup p can not contain div');\n }\n if(Array.isArray(children)) {\n children = relation(vd, build(children, root, host, hasP));\n }\n else {\n children = [];\n }\n vd.__children = children;\n }\n else if($$type === TYPE_GM) {\n let klass = Geom.getRegister(tagName);\n vd = new klass(tagName, props);\n }\n else if($$type === TYPE_CP) {\n vd = new klass(props);\n vd.__tagName = tagName || vd.__tagName;\n }\n else {\n return new Text(json);\n }\n // 根parse需要用到真正的vd引用,然后vd也要引用json,用以做domApi\n json.vd = vd;\n vd.__json = json;\n // 递归parse中的动画记录需特殊处理,将target改为真正的vd引用\n if(__animateRecords) {\n vd.__animateRecords = __animateRecords;\n __animateRecords.list.forEach(item => {\n item.target = item.target.vd;\n });\n delete json.__animateRecords;\n }\n // 更新过程中key相同或者普通相同的vd继承动画\n if(__inheritAnimate) {\n util.extendAnimate(__inheritAnimate, vd);\n delete json.__inheritAnimate;\n }\n vd.__root = root;\n vd.__host = host;\n if($$type === TYPE_CP) {\n vd.__init();\n }\n let ref = props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = vd;\n }\n else if(util.isFunction(ref)) {\n ref(vd);\n }\n return vd;\n }\n return new Text(json);\n}\n\n/**\n * 设置关系,父子和兄弟\n * @param parent\n * @param children\n * @param options\n * @returns {Xom|Text|Component}\n */\nfunction relation(parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__parent = parent;\n children.__domParent = parent;\n // 极为恶心,为了v8的性能优化,text复用parent的__config部分,但domParent重设\n if(children instanceof Text) {\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n if(children.__config) {\n children.__config[NODE_DOM_PARENT] = parent;\n }\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n // 文字视作为父节点的直接文字子节点\n if(children instanceof Component) {\n let sr = children.shadowRoot;\n if(sr instanceof Text) {\n sr.__parent = parent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n children.__config[k] = parent.__config[k];\n });\n }\n sr.__domParent = parent;\n if(sr.__config) {\n sr.__config[NODE_DOM_PARENT] = parent;\n }\n }\n }\n return children;\n}\n\nexport default {\n ref(o) {\n Xom = o.Xom;\n Dom = o.Dom;\n Img = o.Img;\n Geom = o.Geom;\n Component = o.Component;\n },\n initRoot,\n initDom,\n initCp,\n initCp2,\n relation,\n};\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport builder from '../util/builder';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport flatten from '../util/flatten';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, clone, extend } = util;\n\nconst REGISTER = {};\n\n/**\n * 向上设置cp类型叶子节点,表明从root到本节点这条链路有更新,使得无链路更新的节约递归\n * 在check时树递归会用到,判断是否需要查找cp更新\n * @param cp\n */\nfunction setUpdateFlag(cp) {\n // 去重\n if(cp.__hasUpdate) {\n return;\n }\n cp.__hasUpdate = true;\n let host = cp.host;\n if(host) {\n setUpdateFlag(host);\n }\n}\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.state = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n setState(n, cb) {\n let self = this;\n if(isNil(n)) {\n n = {};\n }\n else if(isFunction(n)) {\n return;\n }\n else {\n if(Object.keys(n).length === 0) {\n if(isFunction(cb)) {\n cb.call(self);\n }\n return;\n }\n let state = clone(self.state);\n n = extend(state, n);\n }\n let root = self.root;\n if(root && self.__isMounted) {\n // 一帧之内多次调用,需合并\n if(self.__nextState) {\n Object.assign(self.__nextState, n);\n self.__taskList.push(cb);\n }\n else {\n self.__nextState = n;\n self.__taskList = [cb];\n // 回调更新列表,before执行时splice出来供after执行,防止中途产生的后续setState干扰\n let list = [];\n let t = self.__task = {\n __before: () => {\n list = self.__taskList.splice(0);\n // 标识更新\n setUpdateFlag(this);\n },\n __after: () => {\n // self.__nextState = null; 由updater.js每次refresh前同步执行清空,这里不能异步清除,否则frame动画会乱序\n list.forEach(cb => {\n if(isFunction(cb)) {\n cb.call(self);\n }\n });\n },\n };\n root.addRefreshCp(t);\n }\n }\n // 构造函数中调用还未render,\n else if(isFunction(cb)) {\n self.state = n;\n cb.call(self);\n }\n }\n\n /**\n * build中调用初始化,json有值时是update过程才有,且处理过flatten\n * @param json\n * @private\n */\n __init(json) {\n this.__ref = {};\n let root = this.root;\n let cd = json || flatten(this.render());\n let sr = builder.initCp(cd, root, this);\n this.__cd = cd;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点,在builder里做\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n else if(!(sr instanceof Component)) {\n // 本身build是递归的,子cp已经初始化了\n throw new Error('Component render() must return a dom/text: ' + this);\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n // shadow指向直接renderRoot,shadowRoot考虑到返回Component的递归即hoc高阶组件\n // host是直接所属,hostRoot同考虑到高阶组件\n this.__shadow = sr;\n sr.__host = this;\n // 递归下去,多层级时执行顺序由里到外,最终会被最上层执行替换\n while(sr instanceof Component) {\n sr.__hostRoot = this;\n sr.shadow.__host = sr;\n sr = sr.shadow;\n }\n this.__shadowRoot = sr;\n sr.__hostRoot = this;\n if(!this.__isMounted) {\n this.__isMounted = true;\n if(isFunction(this.componentDidMount)) {\n root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n }\n\n render() {\n inject.warn('Component must implement render()');\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n this.root.delRefreshTask(this.__task);\n if(this.shadowRoot) {\n this.shadowRoot.__destroy();\n }\n this.__parent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get state() {\n return this.__state;\n }\n\n set state(v) {\n this.__state = v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'ox',\n 'oy',\n 'sx',\n 'sy',\n // '__sx1',\n // '__sx2',\n // '__sx3',\n // '__sx4',\n // '__sx5',\n // '__sx6',\n // '__sy1',\n // '__sy2',\n // '__sy3',\n // '__sy4',\n // '__sy5',\n // '__sy6',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'animationList',\n 'animateStyle',\n 'currentStyle',\n 'computedStyle',\n 'currentProps',\n 'baseLine',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n 'availableAnimating',\n 'effectiveAnimating',\n 'displayAnimating',\n 'visibilityAnimating',\n 'bbox',\n '__config',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__calMp',\n '__calAbs',\n '__renderAsMask',\n '__renderByMask',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n '__deepScan',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { PERCENT, NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n [SCALE_X, [targetWidth / imgWidth, NUMBER]],\n [SCALE_Y, [targetHeight / imgHeight, NUMBER]],\n ];\n let tfo = transform.calOrigin([[0, PERCENT], [0, PERCENT]], w, h);\n tfo[0] += x;\n tfo[1] += y;\n return transform.calMatrixWithOrigin(list, tfo, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../node/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport unit from './unit';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n FONT_SIZE,\n },\n NODE_KEY: {\n NODE_DEFS_CACHE,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { AUTO, PX, PERCENT, STRING, REM, VW, VH } = unit;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr, method = 'fill', isInline) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction calBackgroundSize(value, w, h, root) {\n let res = [];\n value.forEach((item, i) => {\n if(item[1] === PX) {\n res.push(item[0]);\n }\n else if(item[1] === PERCENT) {\n res.push(item[0] * (i ? h : w) * 0.01);\n }\n else if(item[1] === REM) {\n res.push(item[0] * root.computedStyle[FONT_SIZE]);\n }\n else if(item[1] === VW) {\n res.push(item[0] * root.width * 0.01);\n }\n else if(item[1] === VH) {\n res.push(item[0] * root.height * 0.01);\n }\n else if(item[1] === AUTO) {\n res.push(-1);\n }\n else if(item[1] === STRING) {\n res.push(item[0] === 'contain' ? -2 : -3);\n }\n });\n return res;\n}\n\nfunction calBackgroundPosition(position, container, size, root) {\n if(Array.isArray(position)) {\n if(position[1] === PX) {\n return position[0];\n }\n else if(position[1] === PERCENT) {\n return (container - size) * position[0] * 0.01;\n }\n else if(position[1] === REM) {\n return position[0] * root.computedStyle[FONT_SIZE];\n }\n else if(position[1] === VW) {\n return position[0] * root.width * 0.01;\n }\n else if(position[1] === VH) {\n return position[0] * root.height * 0.01;\n }\n }\n return 0;\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, isInline) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width;\n h = height;\n }\n }\n else if(w === -3) {\n if(bgW > width && bgH > height) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(bgW > width) {\n w = bgW;\n h = w * height / width;\n }\n else if(bgH > height) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = bx1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_X][i], bgW, w, xom.root);\n let bgY = by1 + calBackgroundPosition(currentStyle[BACKGROUND_POSITION_Y][i], bgH, h, xom.root);\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeat-x', 'repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeat-y', 'repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = [bx1, by1];\n let p2 = [bx2, by2];\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1[0]},${p1[1]}L${p2[0]},${p1[1]}L${p2[0]},${p2[1]}L${p1[0]},${p2[1]}L${p1[0]},${p1[1]}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__config[NODE_DEFS_CACHE].push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n calBackgroundSize,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversal(list, length, diff, after) {\n if(after) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[1]) {\n item[1](diff);\n }\n else {\n item.__after && item.__after(diff);\n }\n }\n }\n else {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n if(item[0]) {\n item[0](diff);\n }\n else {\n item.__before && item.__before(diff);\n }\n }\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__hookTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__taskCp = []; // 区别于task,component专用,和animate等其它不同流水线,在最后执行,防止混了 #122\n this.__now = null;\n }\n\n __init() {\n let self = this;\n let { task, taskCp } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || (!task.length && !taskCp.length)) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let cloneCp = taskCp.splice(0); // task要常驻,taskCp只1次直接splice清空\n let length = clone.length;\n let lengthCp = cloneCp.length;\n traversal(clone, length, diff, false);\n traversal(cloneCp, lengthCp, diff, false);\n // 执行动画造成的每个Root的刷新并清空\n let list = self.__hookTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item();\n }\n // 普通的before/after\n traversal(clone, length, diff, true);\n traversal(cloneCp, lengthCp, diff, true);\n // 还有则继续,没有则停止节省性能\n if(task.length || taskCp.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n __nextFrameCp(handle) {\n let { task, taskCp } = this;\n if(!task.length && !taskCp.length) {\n this.__init();\n }\n taskCp.push(handle);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n },\n KEY_FRAME_KEY: {\n FRAME_STYLE,\n FRAME_TIME,\n FRAME_EASING,\n FRAME_TRANSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, isString, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle } = css;\nconst { isGeom, GEOM } = change;\n\nconst {\n COLOR_HASH,\n LENGTH_HASH,\n RADIUS_HASH,\n GRADIENT_HASH,\n EXPAND_HASH,\n GRADIENT_TYPE,\n} = key;\n\nconst NUM_CAL_HASH = {\n};\nObject.assign(NUM_CAL_HASH, LENGTH_HASH);\nObject.assign(NUM_CAL_HASH, EXPAND_HASH);\n\nfunction unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n style[k] = target.getProps(k);\n }\n else {\n style[k] = target.currentStyle[k];\n }\n }\n });\n });\n return keys;\n}\n\n// 每次初始化时处理继承值,以及转换transform为单matrix矩阵\nfunction inherit(frames, keys, target) {\n let computedStyle = target.computedStyle;\n frames.forEach(item => {\n let style = item[FRAME_STYLE];\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n let ow = target.outerWidth;\n let oh = target.outerHeight;\n let m = tf.calMatrix(v, ow, oh);\n style[k] = [[MATRIX, m]];\n }\n else if(v[1] === INHERIT) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = [util.rgba2int(computedStyle[k]), RGBA];\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n style[k] = [computedStyle[k], PX];\n }\n else if(k === FONT_WEIGHT) {\n style[k] = [computedStyle[k], NUMBER];\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = [computedStyle[k], STRING];\n }\n }\n });\n });\n}\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param style\n * @param keys 样式所有的key\n * @param __config\n * @param root\n * @param node\n */\nfunction genBeforeRefresh(style, keys, __config, root, node) {\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = keys;\n res[UPDATE_CONFIG] = __config[I_NODE_CONFIG];\n root.__addUpdate(node, __config[I_NODE_CONFIG], root, __config[I_ROOT_CONFIG], res);\n __config[I_STYLE] = style;\n __config[I_ASSIGNING] = true;\n // frame每帧回调时,下方先执行计算好变更的样式,这里特殊插入一个hook,让root增加一个刷新操作\n // 多个动画调用因为相同root也只会插入一个,这样在所有动画执行完毕后frame里检查同步进行刷新,解决单异步问题\n root.__frameHook();\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n * @returns {{style: *, time: number, easing: *, transition: []}}\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => calUnit(item));\n }\n let res = [];\n res[FRAME_STYLE] = style;\n res[FRAME_TIME] = offset * duration;\n res[FRAME_EASING] = easing || es;\n res[FRAME_TRANSITION] = [];\n return res;\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p[1] === PX) {\n if(n[1] === PERCENT) {\n return n[0] * 0.01 * container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 - p[0];\n }\n }\n else if(p[1] === PERCENT) {\n if(n[1] === PX) {\n return n[0] * 100 / container - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * root.computedStyle[FONT_SIZE] * 100 / container - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / container - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / container - p[0];\n }\n }\n else if(p[1] === REM) {\n if(n[1] === PX) {\n return n[0] / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * 0.01 * container / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height * 0.01 / root.computedStyle[FONT_SIZE] - p[0];\n }\n }\n else if(p[1] === VW) {\n if(n[1] === PX) {\n return n[0] * 100 / root.width - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.width - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.width - p[0];\n }\n else if(n[1] === VH) {\n return n[0] * root.height / root.width - p[0];\n }\n }\n else if(p[1] === VH) {\n if(n[1] === PX) {\n return n[0] * 100 / root.height - p[0];\n }\n else if(n[1] === REM) {\n return n[0] * 100 * root.computedStyle[FONT_SIZE] / root.height - p[0];\n }\n else if(n[1] === VW) {\n return n[0] * root.width / root.height - p[0];\n }\n else if(n[1] === PERCENT) {\n return n[0] * container / root.height - p[0];\n }\n }\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算,不返回来标识无过度效果\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n * @param tagName dom名\n * @returns {{k: *, v: *}}\n */\nfunction calDiff(prev, next, k, target, tagName) {\n let res = [k];\n let p = prev[k];\n let n = next[k];\n if(k === TRANSFORM) {\n // transform因默认值null很特殊,不存在时需给默认矩阵\n if(!p && !n) {\n return;\n }\n let pm, nm;\n if(p) {\n pm = p[0][1];\n }\n else {\n pm = mx.identity();\n }\n if(n) {\n nm = n[0][1];\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res[1] = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n return res;\n }\n else if(k === ROTATE_3D) {\n if(equalArr(p, n)) {\n return;\n }\n res[1] = [n[0] - n[0], n[1] - p[1], n[2] - p[2], [n[3][0] - p[3][0], n[3][1]]];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,忽视顺序按hash计算,为空视为默认值,如blur默认0,brightness默认1\n let pHash = {}, nHash = {}, keyHash = {};\n if(p) {\n p.forEach(item => {\n keyHash[item[0]] = true;\n pHash[item[0]] = item[1];\n });\n }\n if(n) {\n n.forEach(item => {\n keyHash[item[0]] = true;\n nHash[item[0]] = item[1];\n })\n }\n let v = {}, hasChange;\n // 只有blur支持px/rem/vw/vh,其余都是特殊固定单位\n Object.keys(keyHash).forEach(k => {\n if(k === 'blur') {\n if(!pHash[k]) {\n v[k] = nHash[k].slice(0);\n hasChange = true;\n }\n else if(!nHash[k]) {\n v[k] = [-pHash[k][0], pHash[k][1]];\n hasChange = true;\n }\n else {\n let v2 = calByUnit(pHash[k], nHash[k], 0, target.root);\n v[k] = [v2, pHash[k][1]];\n hasChange = true;\n }\n }\n else if(k === 'hue-rotate') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let nv = isNil(nHash[k]) ? 100 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 100 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n else if(k === 'grayscale') {\n let nv = isNil(nHash[k]) ? 0 : nHash[k][0];\n let pv = isNil(pHash[k]) ? 0 : pHash[k][0];\n if(pv !== nv) {\n v[k] = [nv - pv, PERCENT];\n hasChange = true;\n }\n }\n });\n if(!hasChange) {\n return;\n }\n res[1] = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi[1] === ni[1]) {\n res[1].push(ni[0] - pi[0]);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n if(equalArr(res[1], [0, 0])) {\n return;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n if(pi[1] === ni[1]) {\n let v = ni[0] - pi[0];\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n else {\n let k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n if(!v) {\n res[1].push(null);\n return;\n }\n res[1].push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n v.push(b[j] - a[j]);\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res[1].push(v);\n }\n }\n else if(EXPAND_HASH.hasOwnProperty(k)) {\n if(p[1] === n[1]) {\n let v = n[0] - p[0];\n if(v === 0) {\n return;\n }\n res[1] = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res[1] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res[1] = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp[1] === nn[1]) {\n temp.push(nn[0] - pp[0]);\n }\n else {\n let k2 = i ? 'offsetWidth' : 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v || 0);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res[1].push(null);\n }\n else {\n res[1].push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res[1] = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || isString(pi) || isString(ni)) {\n res[1].push(null);\n continue;\n }\n if(pi.k !== ni.k) {\n res[1].push(null);\n continue;\n }\n let temp = [];\n // 渐变\n if(pi.k === 'linear' || pi.k === 'radial' || pi.k === 'conic') {\n let pv = pi.v;\n let nv = ni.v;\n temp[0] = [];\n let { clientWidth } = target;\n let eq = equalArr(pv, nv);\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1][1] === b[1][1]) {\n t.push(b[1][0] - a[1][0]);\n }\n else {\n let v = calByUnit(a[1], b[1], clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n // 线性渐变有角度差值变化\n if(pi.k === 'linear') {\n let isArrP = Array.isArray(pi.d);\n let isArrN = Array.isArray(ni.d);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n let v = [ni.d[0] - pi.d[0], ni.d[1] - pi.d[1], ni.d[2] - pi.d[2], ni.d[3] - pi.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n else {\n let v = ni.d - pi.d;\n if(eq && v === 0) {\n res[1].push(null);\n continue;\n }\n temp[1] = v;\n }\n }\n // 径向渐变的位置\n else if(pi.k === 'radial') {\n let isArrP = Array.isArray(pi.z);\n let isArrN = Array.isArray(ni.z);\n if(isArrN !== isArrP) {\n res[1].push(null);\n continue;\n }\n if(isArrP) {\n temp[2] = [];\n for(let i = 0; i < 5; i++) {\n let pz = pi.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = ni.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n if(eq && equalArr(res[4], [0, 0, 0, 0, 0])) {\n res[1].push(null);\n }\n }\n else {\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = pi.p[i];\n let np = ni.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n else if(pi.k === 'conic') {\n temp[1].push(n.d - p.d);\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n if(eq && res[2] !== 0 && equalArr(res[3], [0, 0])) {\n res[1].push(null);\n }\n }\n }\n // 纯色\n else {\n if(equalArr(n, pi)) {\n res[1].push(null);\n }\n temp[0] = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res[1].push(temp);\n }\n }\n else if(COLOR_HASH.hasOwnProperty(k)) {\n n = n[0];\n p = p[0];\n if(equalArr(n, p) || n[3] === 0 && p[3] === 0) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n // x/y都相等无需\n if(n[0][0] === p[0][0] && n[0][1] === p[0][1]\n && n[1][0] === p[1][0] && n[1][1] === p[1][1]) {\n return;\n }\n res[1] = [];\n for(let i = 0; i < 2; i++) {\n if(n[i][1] === p[i][1]) {\n res[1].push(n[i][0] - p[i][0]);\n }\n else {\n let v = calByUnit(p[i], n[i], target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res[1].push(v || 0);\n }\n }\n }\n else if(LENGTH_HASH.hasOwnProperty(k)) {\n // auto不做动画\n if(p[1] === AUTO || n[1] === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p[1] === n[1]) {\n diff = n[0] - p[0];\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p[1] !== AUTO && n[1] !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res[1] = diff;\n }\n else if(GEOM.hasOwnProperty(k)) {\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res[1] = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n res[1].push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res[1] = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res[1].push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res[1].push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res[1] = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure') {\n return;\n }\n else {\n res[1] = n - p;\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res[1] = n - p;\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n res[1] = p.map((item, i) => {\n let [v, u] = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return [(parseFloat(v) || 0) * 0.01 * target[k1], PX];\n }\n else {\n return [(parseFloat(v) || 0) * 0.01 * target[k2], PX];\n }\n }\n else if(u === REM) {\n return [(parseFloat(v) || 0) * root.computedStyle[FONT_SIZE] * 100, PX];\n }\n else if(u === VW) {\n return [(parseFloat(v) || 0) * 0.01 * root.width, PX];\n }\n else if(u === VH) {\n return [(parseFloat(v) || 0) * 0.01 * root.height, PX];\n }\n else {\n return [parseFloat(v) || 0, PX];\n }\n });\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 计算两帧之间不相同的变化,存入transition,相同的忽略\nfunction calFrame(prev, next, keys, target, tagName) {\n keys.forEach(k => {\n let ts = calDiff(prev[FRAME_STYLE], next[FRAME_STYLE], k, target, tagName);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n prev[FRAME_TRANSITION].push(ts);\n }\n });\n return next;\n}\n\nfunction binarySearch(i, j, time, frames) {\n if(i === j) {\n let frame = frames[i];\n if(frame[FRAME_TIME] > time) {\n return i - 1;\n }\n return i;\n }\n else {\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame[FRAME_TIME] === time) {\n return middle;\n }\n else if(frame[FRAME_TIME] > time) {\n return binarySearch(i, Math.max(middle - 1, i), time, frames);\n }\n else {\n return binarySearch(Math.min(middle + 1, j), j, time, frames);\n }\n }\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * 根据百分比和缓动函数计算中间态样式\n * 当easing定义为steps时,优先计算\n * @param frame 当前帧\n * @param keys 所有样式key\n * @param percent 到下一帧时间的百分比\n * @param target vd\n * @returns {*}\n */\nfunction calIntermediateStyle(frame, keys, percent, target) {\n let style = cloneStyle(frame[FRAME_STYLE], keys);\n let timingFunction = getEasing(frame[FRAME_EASING]);\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n let transition = frame[FRAME_TRANSITION];\n for(let i = 0, len = transition.length; i < len; i++) {\n let [k, v] = transition[i];\n let st = style[k];\n // transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\n if(k === TRANSFORM) {\n if(!st) {\n st = style[k] = [[MATRIX, mx.identity()]];\n }\n for(let i = 0; i < 16; i++) {\n st[0][1][i] += v[i] * percent;\n }\n }\n // 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\n else if(k === TRANSLATE_PATH) {\n let t = 1 - percent;\n if(v.length === 8) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t * t\n + 3 * v[2][0] * percent * t * t\n + 3 * v[4][0] * percent * percent * t\n + v[6][0] * percent * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t * t\n + 3 * v[3][0] * percent * t * t\n + 3 * v[5][0] * percent * percent * t\n + v[7][0] * percent * percent * percent,\n PX,\n ];\n }\n else if(v.length === 6) {\n style[TRANSLATE_X] = [\n v[0][0] * t * t\n + 2 * v[2][0] * percent * t\n + v[4][0] * percent * percent,\n PX,\n ];\n style[TRANSLATE_Y] = [\n v[1][0] * t * t\n + 3 * v[3][0] * percent * t\n + v[5][0] * percent * percent,\n PX,\n ];\n }\n }\n else if(k === ROTATE_3D) {\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3][0] += v[3][0] * percent;\n }\n else if(NUM_CAL_HASH.hasOwnProperty(k)) {\n if(v) {\n st[0] += v * percent;\n }\n }\n else if(k === FILTER) {\n // 只有1个样式声明了filter另外一个为空,会造成无样式,需初始化数组并在下面计算出样式存入\n if(!st) {\n st = style[k] = [];\n }\n // 将已有的样式按key存入引用来操作\n let hash = {};\n st.forEach(item => {\n hash[item[0]] = item[1];\n });\n Object.keys(v).forEach(k => {\n if(hash.hasOwnProperty(k)) {\n hash[k][0] += v[k][0] * percent;\n }\n else {\n // 2个关键帧中有1个未声明,需新建样式存入\n if(k === 'blur' || k === 'hue-rotate' || k === 'grayscale') {\n let n = v[k].slice(0);\n n[0] *= percent;\n st.push([k, n]);\n }\n // 默认值是1而非0\n else if(k === 'saturate' || k === 'brightness' || k === 'contrast') {\n let n = v[k].slice(0);\n n[0] = 100 + n[0] * percent;\n st.push([k, n]);\n }\n }\n });\n }\n else if(RADIUS_HASH.hasOwnProperty(k)) {\n for(let i = 0; i < 2; i++) {\n st[i][0] += v[i] * percent;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN) {\n if(v[0] !== 0) {\n st[0][0] += v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1][0] += v[1] * percent;\n }\n }\n else if(k === BOX_SHADOW) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j] += v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] += v[i][4][j] * percent;\n }\n }\n }\n else if(k === BACKGROUND_SIZE) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0][0] += v[i][0] * percent;\n item[1][0] += v[i][1] * percent;\n }\n });\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n st.forEach((item, i) => {\n if(v[i]) {\n item[0] += v[i] * percent;\n }\n });\n }\n else if(GRADIENT_HASH.hasOwnProperty(k)) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let [c, d, p, z] = v2;\n if(GRADIENT_TYPE.hasOwnProperty(st2.k)) {\n for(let i = 0, len = Math.min(st2.v.length, c.length); i < len; i++) {\n let a = st2.v[i];\n let b = c[i];\n a[0][0] += b[0][0] * percent;\n a[0][1] += b[0][1] * percent;\n a[0][2] += b[0][2] * percent;\n a[0][3] += b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1][0] += b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] += d[0] * percent;\n st2.d[1] += d[1] * percent;\n st2.d[2] += d[2] * percent;\n st2.d[3] += d[3] * percent;\n }\n else {\n st2.d += d * percent;\n }\n }\n if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] += z[0] * percent;\n st2.z[1] += z[1] * percent;\n st2.z[2] += z[2] * percent;\n st2.z[3] += z[3] * percent;\n st2.z[4] += z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d += d * percent;\n st2.p[0][0] += p[0] * percent;\n st2.p[1][0] += p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2[0] += c[0] * percent;\n st2[1] += c[1] * percent;\n st2[2] += c[2] * percent;\n st2[3] += c[3] * percent;\n }\n });\n }\n // color可能超限[0,255],但浏览器已经做了限制,无需关心\n else if(COLOR_HASH.hasOwnProperty(k)) {\n st = st[0];\n st[0] += v[0] * percent;\n st[1] += v[1] * percent;\n st[2] += v[2] * percent;\n st[3] += v[3] * percent;\n }\n else if(GEOM.hasOwnProperty(k)) {\n let st = style[k];\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n style[k] = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n style[k] = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] += n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item) && !isNil(st2)) {\n for(let i = 0, len = Math.min(st2.length, item.length); i < len; i++) {\n let o = st2[i];\n let n = item[i];\n if(!isNil(o) && !isNil(n)) {\n st2[i] += n * percent;\n }\n }\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] += item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] += n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] += v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] += v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n style[k] += v * percent;\n }\n }\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n style[k] += v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(style[k] < 0) {\n style[k] = 0;\n }\n else if(style[k] > 1) {\n style[k] = 1;\n }\n }\n }\n }\n return style;\n}\n\nfunction gotoOverload(options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n return [options || {}, cb];\n}\n\nlet uuid = 0;\n\nconst I_ASSIGNING = 0;\nconst I_IN_FPS = 1;\nconst I_IS_DELAY = 2;\nconst I_BEGIN = 3;\nconst I_END = 4;\nconst I_FINISHED = 5;\nconst I_NEXT_END = 6;\nconst I_FIRST_PLAY = 7;\nconst I_FRAME_CB = 8;\nconst I_PLAY_CB = 9;\nconst I_TARGET = 10;\nconst I_ROOT = 11;\nconst I_FRAMES = 12;\nconst I_FRAMES_R = 13;\nconst I_CURRENT_TIME = 14;\nconst I_NEXT_TIME = 15;\nconst I_STYLE = 16;\nconst I_DURATION = 17;\nconst I_ITERATIONS = 18;\nconst I_FILL = 19;\nconst I_PLAYBACK_RATE = 20;\nconst I_PLAY_COUNT = 21;\nconst I_PLAY_STATE = 22;\nconst I_DESTROYED = 23;\nconst I_START_TIME = 24;\nconst I_FPS_TIME = 25;\nconst I_EASING = 26;\nconst I_ENTER_FRAME = 27;\nconst I_DELAY = 28;\nconst I_END_DELAY = 29;\nconst I_KEYS = 30;\nconst I_ORIGIN_STYLE = 31;\nconst I_CURRENT_FRAMES = 32;\nconst I_CURRENT_FRAME = 33;\nconst I_SPF_LIMIT = 34;\nconst I_FPS = 35;\nconst I_DIRECTION = 36;\nconst I_CAL_DIFF_TIME = 37;\nconst I_FIRST_ENTER = 38;\nconst I_STAY_BEGIN = 39;\nconst I_STAY_END = 40;\nconst I_IS2 = 41;\nconst I_END_TIME = 42;\nconst I_NODE_CONFIG = 43;\nconst I_ROOT_CONFIG = 44;\nconst I_OUT_BEGIN_DELAY = 45;\nconst I_TIME_STAMP = 46;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n let root = target.root;\n let config = this.__config = [\n false, // assigning\n false, // inFps\n false, // isDelay\n false, // begin\n false, // end\n false, // finished\n false, // nextBegin\n true, // firstPlay\n this.__frameCb,\n null, // playCb\n target,\n root,\n null, // frames\n null, // framesR\n 0, // currentTime\n 0, // nextTime\n {}, // style\n 0, // duration\n 1, // iterations\n 'none', // fill\n 1, // playbackRate\n 0, // playCount\n 'idle',\n false, // destroy\n 0, // startTime\n 0, // fpsTime\n op.easing,\n false, // enterFrame\n 0, // delay\n 0, // endDelay\n null, // keys,\n null, // originStyle,\n null, // currentFrames\n null, // currentFrame\n false, // spfLimit\n 60, // fps\n 'normal', // direction\n this.__calDiffTime,\n true, // firstEnter,\n false, // stayBegin\n false, // stayEnd\n false, // is2\n 0, // endTime\n target.__config, // nodeConfig\n root && root.__config, // rootConfig,destroy后root可能为空\n false, // outBeginDelay\n ];\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let [frames, framesR, keys, originStyle] = this.__init(list, iterations, duration, op.easing, target);\n config[I_FRAMES] = frames;\n config[I_FRAMES_R] = framesR;\n config[I_KEYS] = keys;\n config[I_ORIGIN_STYLE] = originStyle;\n if(frames.length === 2) {\n config[I_IS2] = true;\n config[I_END_TIME] = frames[1][FRAME_TIME];\n }\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n // 时间戳\n config[I_TIME_STAMP] = frame.__now;\n // 性能优化访问\n this[0] = this.__before;\n this[1] = this.__after;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return [[], [], [], {}];\n }\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n let tagName = target.tagName;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的时间\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n // 换算每一关键帧样式标准化\n list.forEach(item => {\n frames.push(framing(item, duration, easing));\n });\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = unify(frames, target);\n inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { style, props } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(tagName, k)) {\n originStyle[k] = props[k];\n }\n originStyle[k] = style[k];\n });\n // 再计算两帧之间的变化,存入transition属性\n let length = frames.length;\n let prev = frames[0];\n for(let i = 1; i < length; i++) {\n let next = frames[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item[FRAME_TIME] = duration - item[FRAME_TIME];\n item[FRAME_TRANSITION] = [];\n });\n prev = framesR[0];\n for(let i = 1; i < length; i++) {\n let next = framesR[i];\n prev = calFrame(prev, next, keys, target, tagName);\n }\n return [frames, framesR, keys, originStyle];\n }\n\n __clean(isFinish) {\n let __config = this.__config;\n this.__cancelTask();\n __config[I_NEXT_TIME] = 0;\n let restore;\n let style = __config[I_STYLE];\n let keys = __config[I_KEYS];\n let target = __config[I_TARGET];\n if(isFinish) {\n __config[I_CURRENT_TIME] = __config[I_DELAY] + __config[I_DURATION] + __config[I_END_DELAY];\n if(__config[I_PLAY_STATE] === 'finish') {\n return;\n }\n __config[I_PLAY_STATE] = 'finish';\n // cancel需要清除finish根据情况保留\n if(!__config[I_STAY_END]) {\n __config[I_STYLE] = {};\n restore = true;\n }\n }\n else {\n __config[I_PLAY_COUNT] = __config[I_CURRENT_TIME] = 0;\n if(__config[I_PLAY_STATE] === 'idle') {\n return;\n }\n __config[I_PLAY_STATE] = 'idle';\n __config[I_STYLE] = {};\n restore = true;\n }\n // 动画取消结束不停留在最后一帧需要还原target原本的样式,需要对比目前是否是由本动画赋值的\n if(restore) {\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n if(target.__currentProps[k] === style[k]) {\n target.__currentProps[k] = target.props[k];\n }\n }\n else {\n if(target.__currentStyle[k] === style[k]) {\n target.__currentStyle[k] = target.style[k];\n }\n }\n });\n }\n }\n\n __frameCb(__config, diff, isDelay) {\n this.emit(Event.FRAME, diff, isDelay);\n if(__config[I_FIRST_PLAY]) {\n __config[I_FIRST_PLAY] = false;\n this.emit(Event.PLAY);\n }\n if(isFunction(__config[I_PLAY_CB])) {\n __config[I_PLAY_CB].call(this, diff, isDelay);\n __config[I_PLAY_CB] = null;\n }\n }\n\n __calDiffTime(__config, diff) {\n let playbackRate = __config[I_PLAYBACK_RATE];\n let spfLimit = __config[I_SPF_LIMIT];\n let fps = __config[I_FPS];\n let v = __config[I_CURRENT_TIME] = __config[I_NEXT_TIME];\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n __config[I_NEXT_TIME] += diff;\n return [v, diff];\n }\n\n play(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n __config[I_PLAY_CB] = cb;\n __config[I_PLAY_STATE] = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n __config[I_FIRST_PLAY] = true;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!__config[I_ENTER_FRAME]) {\n __config[I_ENTER_FRAME] = true;\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n // 初始化根据方向确定帧序列\n __config[I_CURRENT_FRAMES] = {\n reverse: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction) ? framesR : frames;\n __config[I_CURRENT_TIME] = __config[I_NEXT_TIME] = __config[I_FPS_TIME] = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n frame.offFrame(this);\n frame.onFrame(this);\n __config[I_START_TIME] = frame.__now;\n __config[I_END] = false;\n return this;\n }\n\n __before(diff) {\n let __config = this.__config;\n __config[I_TIME_STAMP] = frame.__now;\n let target = __config[I_TARGET];\n let fps = __config[I_FPS];\n let playCount = __config[I_PLAY_COUNT];\n let currentFrames = __config[I_CURRENT_FRAMES];\n let iterations = __config[I_ITERATIONS];\n let stayBegin = __config[I_STAY_BEGIN];\n let stayEnd = __config[I_STAY_END];\n let delay = __config[I_DELAY];\n let root = __config[I_ROOT];\n let is2 = __config[I_IS2];\n let endTime = __config[I_END_TIME];\n let duration = __config[I_DURATION];\n let endDelay = __config[I_END_DELAY];\n let length = currentFrames.length;\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n let [currentTime, d] = __config[I_CAL_DIFF_TIME](__config, diff);\n diff = d;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!__config[I_FIRST_ENTER] && fps < 60) {\n diff = __config[I_FPS_TIME] += diff;\n if(diff < 1000 / fps) {\n __config[I_IN_FPS] = true;\n return;\n }\n __config[I_FPS_TIME] = 0;\n }\n __config[I_FIRST_ENTER] = false;\n // delay仅第一次生效\n if(playCount === 0 && currentTime < delay) {\n if(stayBegin) {\n let currentFrame = __config[I_CURRENT_FRAME] = currentFrames[0];\n let current = currentFrame[FRAME_STYLE];\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n }\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n __config[I_OUT_BEGIN_DELAY] = true;\n __config[I_IS_DELAY] = true;\n return;\n }\n // 减去delay,计算在哪一帧,仅首轮\n if(playCount === 0) {\n currentTime -= delay;\n }\n if(currentTime === 0 || __config[I_OUT_BEGIN_DELAY]) {\n __config[I_OUT_BEGIN_DELAY] = false;\n __config[I_BEGIN] = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let round;\n while(currentTime >= duration && playCount < iterations - 1) {\n currentTime -= duration;\n __config[I_NEXT_TIME] -= duration;\n playCount = ++__config[I_PLAY_COUNT];\n __config[I_BEGIN] = true;\n round = true;\n }\n // 如果发生轮换,需重新确定正反向\n if(round) {\n let direction = __config[I_DIRECTION];\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let isAlternate = {\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction);\n // 有正反向播放需要重设帧序列\n if(isAlternate) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n currentFrames = __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(is2) {\n i = currentTime < endTime ? 0 : 1;\n frameTime = endTime;\n }\n else {\n i = binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i][FRAME_TIME];\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(is2) {\n percent = currentTime / duration;\n }\n else {\n let total = currentFrames[i + 1][FRAME_TIME] - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i], current;\n __config[I_CURRENT_FRAME] = currentFrame;\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n if(isLastFrame) {\n inEndDelay = currentTime < duration + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n current = cloneStyle(currentFrame[FRAME_STYLE], __config[I_KEYS]);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n current = cloneStyle(__config[I_ORIGIN_STYLE], __config[I_KEYS]);\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n __config[I_NEXT_END] = true;\n if(!inEndDelay) {\n __config[I_PLAY_COUNT]++;\n __config[I_FINISHED] = true;\n frame.offFrame(this);\n needClean = true;\n __config[I_NEXT_TIME] = 0;\n }\n }\n else {\n current = calIntermediateStyle(currentFrame, __config[I_KEYS], percent, target);\n }\n // 无论两帧之间是否有变化,都生成计算结果赋给style,去重在root做\n genBeforeRefresh(current, __config[I_KEYS], __config, root, target);\n if(needClean) {\n this.__clean(true);\n }\n }\n\n __after(diff) {\n let __config = this.__config;\n __config[I_ASSIGNING] = false;\n if(__config[I_IN_FPS]) {\n __config[I_IN_FPS] = false;\n return;\n }\n __config[I_FRAME_CB].call(this, __config, diff, __config[I_IS_DELAY]);\n __config[I_IS_DELAY] = false;\n if(__config[I_BEGIN]) {\n __config[I_BEGIN] = false;\n this.emit(Event.BEGIN, __config[I_PLAY_COUNT]);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(__config[I_NEXT_END] && !__config[I_END]) {\n __config[I_END] = true;\n this.emit(Event.END, __config[I_PLAY_COUNT] - 1);\n }\n if(__config[I_FINISHED]) {\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n __config[I_PLAY_STATE] = 'finished';\n this.emit(Event.FINISH);\n }\n }\n\n pause(silence) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || frames.length < 1 || playState === 'finished' || playState === 'idle') {\n return self;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n let current;\n // 停留在最后一帧\n if(__config[I_STAY_END]) {\n __config[I_CURRENT_FRAME] = frames[frames.length - 1];\n current = frames[frames.length - 1][FRAME_STYLE];\n }\n else {\n current = originStyle;\n }\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(current, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean(true);\n },\n __after(diff) {\n if(!self.__hasFin) {\n self.__hasFin = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.FINISH);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n cancel(cb) {\n let self = this;\n let __config = self.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let playState = __config[I_PLAY_STATE];\n let frames = __config[I_FRAMES];\n if(isDestroyed || duration <= 0 || playState === 'idle' || frames.length < 1) {\n return self;\n }\n self.__cancelTask();\n let root = __config[I_ROOT];\n let originStyle = __config[I_ORIGIN_STYLE];\n if(root) {\n root.addRefreshTask({\n __before() {\n __config[I_ASSIGNING] = true;\n genBeforeRefresh(originStyle, __config[I_KEYS], __config, root, __config[I_TARGET]);\n self.__clean();\n },\n __after(diff) {\n if(!self.__hasCancel) {\n self.__hasCancel = true;\n __config[I_ASSIGNING] = false;\n __config[I_FRAME_CB].call(self, __config, diff);\n __config[I_BEGIN] = __config[I_END] = __config[I_IS_DELAY] = __config[I_FINISHED]\n = __config[I_IN_FPS] = __config[I_ENTER_FRAME] = false;\n self.emit(Event.CANCEL);\n }\n if(isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n return self;\n }\n\n gotoAndPlay(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let __config = this.__config;\n let isDestroyed = __config[I_DESTROYED];\n let duration = __config[I_DURATION];\n let frames = __config[I_FRAMES];\n let delay = __config[I_DELAY];\n let endDelay = __config[I_END_DELAY];\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n [options, cb] = gotoOverload(options, cb);\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > duration + delay + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(diff => {\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb.call(this, diff);\n }\n });\n }\n\n // 同步赋予,用在extendAnimate\n assignCurrentStyle() {\n let __config = this.__config;\n let style = __config[I_STYLE];\n let target = __config[I_TARGET];\n let keys = __config[I_KEYS];\n keys.forEach(i => {\n if(style.hasOwnProperty(i)) {\n let v = style[i];\n // geom的属性变化\n if(GEOM.hasOwnProperty(i)) {\n target.currentProps[i] = v;\n }\n // 样式\n else {\n // 将动画样式直接赋给currentStyle\n target.currentStyle[i] = v;\n }\n }\n });\n }\n\n __goto(v, isFrame, excludeDelay) {\n let __config = this.__config;\n let duration = __config[I_DURATION];\n __config[I_PLAY_STATE] = 'paused';\n this.__cancelTask();\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += __config[I_DELAY];\n }\n // 超过一轮去掉delay\n if(v > duration + __config[I_DELAY]) {\n v -= __config[I_DELAY];\n }\n // 超过时间长度需要累加次数\n __config[I_PLAY_COUNT] = 0;\n while(v > duration && __config[I_PLAY_COUNT] < __config[I_ITERATIONS] - 1) {\n __config[I_PLAY_COUNT]++;\n v -= duration;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n __config[I_NEXT_TIME] = v;\n // 防止play()重置时间和当前帧组,提前计算好\n __config[I_ENTER_FRAME] = true;\n let frames = __config[I_FRAMES];\n let framesR = __config[I_FRAMES_R];\n let direction = __config[I_DIRECTION];\n if({\n alternate: true,\n 'alternate-reverse': true,\n }.hasOwnProperty(direction)) {\n let isEven = __config[I_PLAY_COUNT] % 2 === 0;\n if(direction === 'alternate') {\n __config[I_CURRENT_FRAMES] = isEven ? frames : framesR;\n }\n else {\n __config[I_CURRENT_FRAMES] = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let ac = this.root.animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __stayBegin() {\n return {\n backwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __stayEnd() {\n return {\n forwards: true,\n both: true,\n }.hasOwnProperty(this.fill);\n }\n\n __setTarget(target) {\n this.__target = target;\n this.__config[I_TARGET] = target;\n this.__config[I_NODE_CONFIG] = target.__config;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__config[I_PLAY_CB] = null;\n }\n\n __destroy(sync) {\n let self = this;\n let __config = self.__config;\n if(__config[I_DESTROYED]) {\n return;\n }\n self.removeControl();\n // clean异步执行,因为里面的样式还原需要等到下一帧,否则同步执行清除后,紧接着的新同步动画获取不到currentStyle\n if(sync) {\n self.__clean();\n __config[I_TARGET] = null;\n }\n else {\n frame.nextFrame({\n __before() {\n self.__clean();\n __config[I_TARGET] = null;\n },\n });\n }\n __config[I_START_TIME] = 0;\n __config[I_DESTROYED] = true;\n }\n\n __checkModify() {\n let __config = this.__config;\n if(__config[I_PLAY_STATE] !== 'idle' && __config[I_PLAY_STATE] !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__config[I_TARGET];\n }\n\n get root() {\n return this.__config[I_ROOT];\n }\n\n get keys() {\n return this.__config[I_KEYS];\n }\n\n get style() {\n return this.__config[I_STYLE];\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__config[I_DURATION];\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DURATION] !== v) {\n __config[I_DURATION] = v;\n __config[I_END_TIME] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__config[I_DELAY];\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_DELAY] !== v) {\n __config[I_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__config[I_END_DELAY];\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_END_DELAY] !== v) {\n __config[I_END_DELAY] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__config[I_FPS];\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n let __config = this.__config;\n if(__config[I_FPS] !== v) {\n if(v <= 0) {\n v = 60;\n }\n __config[I_FPS] = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__config[I_ITERATIONS];\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n let __config = this.__config;\n if(__config[I_ITERATIONS] !== v) {\n __config[I_ITERATIONS] = v;\n }\n return v;\n }\n\n get fill() {\n return this.__config[I_FILL];\n }\n\n set fill(v) {\n v = v || 'none';\n let __config = this.__config;\n if(__config[I_FILL] !== v) {\n __config[I_FILL] = v;\n this.__checkModify();\n }\n __config[I_STAY_BEGIN] = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n __config[I_STAY_END] = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__config[I_DIRECTION];\n }\n\n set direction(v) {\n v = v || 'normal';\n let __config = this.__config;\n if(__config[I_DIRECTION] !== v) {\n __config[I_DIRECTION] = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__config[I_FRAMES];\n }\n\n get framesR() {\n return this.__config[I_FRAMES_R];\n }\n\n get playbackRate() {\n return this.__config[I_PLAYBACK_RATE];\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n let __config = this.__config;\n if(__config[I_PLAYBACK_RATE] !== v) {\n __config[I_PLAYBACK_RATE] = v;\n }\n return v;\n }\n\n get easing() {\n return this.__config[I_EASING];\n }\n\n get startTime() {\n return this.__config[I_START_TIME];\n }\n\n get currentTime() {\n return this.__config[I_CURRENT_TIME];\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_CURRENT_TIME] !== v) {\n __config[I_CURRENT_TIME] = v;\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__config[I_NEXT_TIME];\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n let __config = this.__config;\n if(__config[I_NEXT_TIME] !== v) {\n __config[I_NEXT_TIME] = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__config[I_TIME_STAMP];\n }\n\n get pending() {\n return this.__config[I_PLAY_STATE] !== 'running';\n }\n\n get finished() {\n return this.__config[I_PLAY_STATE] === 'finished';\n }\n\n get playState() {\n return this.__config[I_PLAY_STATE];\n }\n\n get playCount() {\n return this.__config[I_PLAY_COUNT];\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n let __config = this.__config;\n if(__config[I_PLAY_COUNT] !== v) {\n __config[I_PLAY_COUNT] = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__config[I_DESTROYED];\n }\n\n get animating() {\n let __config = this.__config;\n let playState = __config[I_PLAY_STATE];\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || __config[I_STAY_END] || __config[I_STAY_BEGIN];\n }\n\n get spfLimit() {\n let __config = this.__config;\n return __config[I_SPF_LIMIT];\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n let __config = this.__config;\n if(__config[I_SPF_LIMIT] !== v) {\n __config[I_SPF_LIMIT] = v;\n }\n return v;\n }\n\n get assigning() {\n return this.__config[I_ASSIGNING];\n }\n}\n\nexport default Animation;\n","import mode from '../node/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\n\nconst {\n NODE_KEY: {\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h) {\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0 && (sigma > 0 || spread > 0)) {\n if(renderMode === mode.CANVAS | renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__config[NODE_DEFS_CACHE].push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__config[NODE_DEFS_CACHE].push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__config[NODE_DEFS_CACHE].push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const MBM_HASH = {\n multiply: true,\n screen: true,\n overlay: true,\n darken: true,\n lighten: true,\n 'color-dodge': true,\n 'color-burn': true,\n 'hard-light': true,\n 'soft-light': true,\n difference: true,\n exclusion: true,\n hue: true,\n saturation: true,\n color: true,\n luminosity: true,\n};\n\nfunction mbmName(v) {\n if(v) {\n return v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n return MBM_HASH.hasOwnProperty(mbmName(v));\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseLine\n * @param lineHeight\n * @param diffL\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, contentBoxList, start, end, lineBox, baseLine, lineHeight, diffL, isStart, isEnd,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let eyt = 0, eyb = 0;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n eyt = paddingTop;\n eyb = paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n eyt = paddingTop + borderTopWidth;\n eyb = paddingBottom + borderBottomWidth;\n }\n // 同y的border伸展范围,其影响border渲染\n let pbt = paddingTop + borderTopWidth;\n let pbb = paddingBottom + borderBottomWidth;\n // inline的baseLine和lineBox的差值\n let diff = lineBox.baseLine - baseLine;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseLine对齐后计算的\n let x1 = start.x;\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n dom = dom.domParent;\n }\n let bx1 = x1;\n if(isStart) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n bx1 -= paddingLeft + borderLeftWidth;\n }\n let y1 = lineBox.y + diff - eyt;\n let by1 = lineBox.y + diff - pbt;\n let x2 = end.x + end.outerWidth;\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n let bx2 = x2;\n if(isEnd) {\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n x2 += paddingRight;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n x2 += paddingRight + borderRightWidth;\n }\n bx2 += paddingRight + borderRightWidth;\n }\n let y2 = lineBox.y + diff + lineHeight - diffL + eyb;\n let by2 = lineBox.y + diff + lineHeight - diffL + pbb;\n // x要考虑xom的ox值\n x1 += xom.ox;\n x2 += xom.ox;\n bx1 += xom.ox;\n bx2 += xom.ox;\n y1 += xom.oy;\n y2 += xom.oy;\n by1 += xom.oy;\n by2 += xom.oy;\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList) {\n let sum = 0;\n let length = contentBoxList.length;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n sum += contentBox.width;\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n if(contentBox === list[list.length - 1]) {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import Node from './Node';\nimport mode from './mode';\nimport Component from './Component';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport blur from '../math/blur';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport Cache from '../refresh/Cache';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport inline from './inline';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_STYLE,\n UPDATE_OVERWRITE,\n UPDATE_KEYS,\n UPDATE_CONFIG,\n UPDATE_REMOVE_DOM,\n },\n STRUCT_KEY: {\n STRUCT_HAS_MASK,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_OPACITY,\n NODE_MATRIX_EVENT,\n NODE_MATRIX,\n NODE_LIMIT_CACHE,\n NODE_HAS_CONTENT,\n NODE_REFRESH_LV,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_MASK,\n NODE_CACHE_OVERFLOW,\n NODE_IS_DESTROYED,\n NODE_DEFS_CACHE,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n NODE_PERSPECTIVE_MATRIX,\n NODE_IS_MASK,\n NODE_VIRTUAL_DOM,\n }\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, REM, VW, VH, DEG } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil } = util;\nconst { calRelative } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d } = mx;\n\nconst {\n contain,\n NONE,\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n} = level;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__config[NODE_IS_INLINE]) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = {}; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = {}; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.listener[k] = v;\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = {}; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__isClip = !!this.props.clip;\n let isMask = this.__isMask = isClip || !!this.props.mask;\n let config = this.__config;\n config[NODE_TAG_NAME] = tagName;\n config[NODE_CACHE_STYLE] = this.__cacheStyle;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_COMPUTED_STYLE] = this.__computedStyle;\n config[NODE_REFRESH_LV] = REFLOW;\n config[NODE_STYLE] = this.__style;\n config[NODE_MATRIX] = [];\n config[NODE_MATRIX_EVENT] = [];\n config[NODE_DEFS_CACHE] = this.__cacheDefs;\n config[NODE_IS_MASK] = isMask;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n // this.__json domApi需要获取生成时的json引用,builder过程添加,如appendChild时json也需要跟着变更\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i, lv, j);\n if(this.__hasMask) {\n res[STRUCT_HAS_MASK] = this.__hasMask;\n }\n this.__config[NODE_STRUCT] = res;\n return res;\n }\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__mpWidth(currentStyle[a], w);\n computedStyle[b] = this.__mpWidth(currentStyle[b], w);\n });\n }\n\n __mpWidth(mp, w) {\n if(mp[1] === PX) {\n return mp[0];\n }\n else if(mp[1] === PERCENT) {\n return mp[0] * w * 0.01;\n }\n else if(mp[1] === REM) {\n return mp[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(mp[1] === VW) {\n return mp[0] * this.root.width * 0.01;\n }\n else if(mp[1] === VH) {\n return mp[0] * this.root.height * 0.01;\n }\n return 0;\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.computedStyle;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n\n // 换算margin/padding为px单位,onlyFixedValue只考虑绝对值,不考虑百分比等\n __calMp(v, w, onlyFixedValue) {\n let n = 0;\n if(v[1] === PX) {\n n += v[0];\n }\n else if(v[1] === PERCENT && !onlyFixedValue) {\n v[0] *= w * 0.01;\n v[1] = PX;\n n += v[0];\n }\n else if(v[1] === REM) {\n n += v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n n += v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n n += v[0] * this.root.height * 0.01;\n }\n return n;\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMp(isDirectionRow, w, currentStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w, !isDirectItem)\n + this.__calMp(marginRight, w, !isDirectItem)\n + this.__calMp(paddingLeft, w, !isDirectItem)\n + this.__calMp(paddingRight, w, !isDirectItem);\n if(borderLeftWidth[1] === PX) {\n mp += borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n mp += borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n mp += borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n mp += borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n mp += borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n mp += borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n mp += borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n mp += borderRightWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n else {\n let mp = this.__calMp(marginTop, w, !isDirectItem)\n + this.__calMp(marginBottom, w, !isDirectItem)\n + this.__calMp(paddingTop, w, !isDirectItem)\n + this.__calMp(paddingBottom, w, !isDirectItem);\n if(borderTopWidth[1] === PX) {\n mp += borderTopWidth[0];\n }\n else if(borderTopWidth[1] === REM) {\n mp += borderTopWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderTopWidth[1] === VW) {\n mp += borderTopWidth[0] * this.root.width * 0.01;\n }\n else if(borderTopWidth[1] === VH) {\n mp += borderTopWidth[0] * this.root.height * 0.01;\n }\n if(borderBottomWidth[1] === PX) {\n mp += borderBottomWidth[0];\n }\n else if(borderBottomWidth[1] === REM) {\n mp += borderBottomWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderBottomWidth[1] === VW) {\n mp += borderBottomWidth[0] * this.root.width * 0.01;\n }\n else if(borderBottomWidth[1] === VH) {\n mp += borderBottomWidth[0] * this.root.height * 0.01;\n }\n res = res.map(item => item + mp);\n }\n return res;\n }\n\n // absolute且无尺寸时,isVirtual标明先假布局一次计算尺寸,还有flex列计算时\n // fromAbs为absolute节点特有省略计算标识,本节点是abs时真正布局传入\n __layout(data, isVirtual, fromAbs) {\n css.computeReflow(this, this.isShadowRoot);\n let { w } = data;\n let { isDestroyed, currentStyle, computedStyle, __config } = this;\n let {\n [DISPLAY]: display,\n } = computedStyle;\n let {\n [WIDTH]: width,\n [POSITION]: position,\n } = currentStyle;\n this.clearCache();\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n };\n __config[NODE_REFRESH_LV] = REFLOW;\n __config[NODE_LIMIT_CACHE] = false;\n __config[NODE_IS_INLINE] = false;\n // 防止display:none不统计mask,isVirtual忽略,abs布局后续会真正来走一遍\n if(!isVirtual) {\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.isMask && next && (next.isMask)) {\n let count = 0;\n while(next) {\n if(next.isMask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n this.__ox = this.__oy = 0;\n if(isDestroyed || display === 'none') {\n this.__width = this.__height\n = this.__clientWidth = this.__clientHeight\n = this.__offsetWidth = this.__offsetHeight\n = this.__outerWidth = this.__outerHeight\n = computedStyle[WIDTH] = computedStyle[HEIGHT] = 0;\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n return;\n }\n // margin/padding在abs前已经计算过了,无需二次计算\n if(!fromAbs) {\n this.__mp(currentStyle, computedStyle, w);\n }\n // inline的width/height无效,其它有效\n if(width[1] !== AUTO) {\n if(this.__isRealInline() && currentStyle[DISPLAY] === 'inline') {\n width[0] = 0;\n width[1] = AUTO;\n }\n else {\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n }\n let lineClampCount = 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n this.__layoutFlex(data, isVirtual);\n }\n else if(display === 'inlineBlock' || display === 'inline-block') {\n lineClampCount = this.__layoutInline(data, isVirtual);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isVirtual, true);\n }\n else {\n this.__layoutBlock(data, isVirtual);\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let { [TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left } = currentStyle;\n let { parent } = this;\n if(top[1] !== AUTO) {\n let n = calRelative(currentStyle, TOP, top, parent);\n this.__offsetY(n);\n computedStyle[TOP] = n;\n computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom[1] !== AUTO) {\n let n = calRelative(currentStyle, BOTTOM, bottom, parent);\n this.__offsetY(-n);\n computedStyle[BOTTOM] = n;\n computedStyle[TOP] = 'auto';\n }\n else {\n computedStyle[TOP] = computedStyle[BOTTOM] = 'auto';\n }\n if(left[1] !== AUTO) {\n let n = calRelative(currentStyle, LEFT, left, parent, true);\n this.__offsetX(n);\n computedStyle[LEFT] = n;\n computedStyle[RIGHT] = 'auto';\n }\n else if(right[1] !== AUTO) {\n let n = calRelative(currentStyle, RIGHT, right, parent, true);\n this.__offsetX(-n);\n computedStyle[RIGHT] = n;\n computedStyle[LEFT] = 'auto';\n }\n else {\n computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n }\n else if(position !== 'absolute') {\n computedStyle[TOP] = computedStyle[BOTTOM] = computedStyle[LEFT] = computedStyle[RIGHT] = 'auto';\n }\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__sx = this.x + this.ox;\n let y = this.__sy = this.y + this.oy;\n if(!__config[NODE_IS_INLINE]) {\n x = this.__sx1 = x + computedStyle[MARGIN_LEFT];\n x = this.__sx2 = x + computedStyle[BORDER_LEFT_WIDTH];\n x = this.__sx3 = x + computedStyle[PADDING_LEFT];\n x = this.__sx4 = x + this.width;\n x = this.__sx5 = x + computedStyle[PADDING_RIGHT];\n this.__sx6 = x + computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__sy1 = y + computedStyle[MARGIN_TOP];\n y = this.__sy2 = y + computedStyle[BORDER_TOP_WIDTH];\n y = this.__sy3 = y + computedStyle[PADDING_TOP];\n y = this.__sy4 = y + this.height;\n y = this.__sy5 = y + computedStyle[PADDING_BOTTOM];\n this.__sy6 = y + computedStyle[BORDER_BOTTOM_WIDTH];\n }\n computedStyle[WIDTH] = this.width;\n computedStyle[HEIGHT] = this.height;\n // abs布局的不执行,在__layoutAbs末尾做,防止未布局没有尺寸从而动画计算错误\n if(!fromAbs) {\n this.__execAr();\n }\n return lineClampCount;\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n let { computedStyle } = this;\n computedStyle[DISPLAY] = 'none';\n computedStyle[MARGIN_TOP]\n = computedStyle[MARGIN_RIGHT]\n = computedStyle[MARGIN_BOTTOM]\n = computedStyle[MARGIN_LEFT]\n = computedStyle[PADDING_TOP]\n = computedStyle[PADDING_RIGHT]\n = computedStyle[PADDING_BOTTOM]\n = computedStyle[PADDING_LEFT]\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, nowrap, lineBoxManager, endSpace = 0 } = data;\n this.__x = x;\n this.__y = y;\n let { currentStyle, computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width[1] !== AUTO) {\n fixedWidth = true;\n switch(width[1]) {\n case PX:\n w = width[0];\n break;\n case PERCENT:\n w *= width[0] * 0.01;\n break;\n case REM:\n w = width[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n w = width[0] * this.root.width * 0.01;\n break;\n case VH:\n w = width[0] * this.root.height * 0.01;\n break;\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n else if(height[1] !== AUTO) {\n fixedHeight = true;\n switch(height[1]) {\n case PX:\n h = height[0];\n break;\n case PERCENT:\n h *= height[0] * 0.01;\n break;\n case REM:\n h = height[0] * this.root.computedStyle[FONT_SIZE];\n break;\n case VW:\n h = height[0] * this.root.width * 0.01;\n break;\n case VH:\n h = height[0] * this.root.height * 0.01;\n break;\n }\n }\n // margin/padding/border影响x和y和尺寸,注意inline的y不受mpb影响\n x += borderLeftWidth + marginLeft + paddingLeft;\n data.x = x;\n if(!isInline) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mpb,其一定是block和inline互斥\n if(!isInline) {\n if(width[1] === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height[1] === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n nowrap,\n endSpace,\n selfEndSpace,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')\n && (width[1] !== AUTO || this.tagName === 'img') && marginLeft[1] === AUTO && marginRight[1] === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true);\n }\n }\n }\n\n __calMatrix(lv, __cacheStyle, currentStyle, computedStyle, __config, sx1, sy1, offsetWidth, offsetHeight) {\n if(__config[NODE_IS_INLINE]) {\n computedStyle[TRANSFORM_ORIGIN] = [sx1, sy1];\n return __cacheStyle[MATRIX] = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // tx/ty变化特殊优化\n if(matrixCache && lv < REFLOW && !contain(lv, TF)) {\n let x = 0, y = 0, z = 0;\n if(contain(lv, TX)) {\n let v = currentStyle[TRANSLATE_X];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n x = v - (computedStyle[TRANSLATE_X] || 0);\n computedStyle[TRANSLATE_X] = v;\n computedStyle[TRANSFORM][12] += x;\n matrixCache[12] += x;\n }\n if(contain(lv, TY)) {\n let v = currentStyle[TRANSLATE_Y];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetHeight * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n y = v - (computedStyle[TRANSLATE_Y] || 0);\n computedStyle[TRANSLATE_Y] = v;\n computedStyle[TRANSFORM][13] += y;\n matrixCache[13] += y;\n }\n if(contain(lv, TZ)) {\n let v = currentStyle[TRANSLATE_Z];\n if(isNil(v)) {\n v = 0;\n }\n else if(v[1] === PERCENT) {\n v = v[0] * this.offsetWidth * 0.01;\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n z = v - (computedStyle[TRANSLATE_Z] || 0);\n computedStyle[TRANSLATE_Z] = v;\n computedStyle[TRANSFORM][14] += z;\n matrixCache[14] += z;\n }\n __cacheStyle[MATRIX] = matrixCache;\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n offsetWidth = this.offsetWidth;\n offsetHeight = this.offsetHeight;\n }\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n computedStyle[TRANSFORM_ORIGIN] = tf.calOrigin(currentStyle[TRANSFORM_ORIGIN], offsetWidth, offsetHeight, this.root);\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n let matrix;\n // transform相对于自身\n if(currentStyle[TRANSFORM]) {\n matrix = tf.calMatrix(currentStyle[TRANSFORM], offsetWidth, offsetHeight, this.root);\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n let temp = [];\n [\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ].forEach(k => {\n // 删除之前遗留的\n delete computedStyle[k];\n let v = currentStyle[k];\n if(isNil(v)) {\n return;\n }\n if(k === ROTATE_3D) {\n computedStyle[k] = [v[0], v[1], v[2], v[3][0]];\n if(v[3][0] === 0) {\n return;\n }\n temp.push([k, v]);\n return;\n }\n computedStyle[k] = v[0];\n // scale为1和其它为0避免计算浪费\n let isScale = k === SCALE_X || k === SCALE_Y || k === SCALE_Z;\n if(v[0] === 1 && isScale || !isScale && v[0] === 0) {\n return;\n }\n if(v[1] === PERCENT) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * offsetWidth * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * offsetHeight * 0.01;\n }\n }\n else if(v[1] === REM) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n }\n else if(v[1] === VW) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.width * 0.01;\n }\n }\n else if(v[1] === VH) {\n if(k === TRANSLATE_X || k === TRANSLATE_Z) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n else if(k === TRANSLATE_Y) {\n computedStyle[k] = v[0] * this.root.height * 0.01;\n }\n }\n temp.push([k, v]);\n });\n if(temp.length) {\n matrix = tf.calMatrix(temp, offsetWidth, offsetHeight, this.root);\n }\n }\n computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = computedStyle[TRANSFORM];\n let tfo = computedStyle[TRANSFORM_ORIGIN].slice(0);\n tfo[0] += sx1 || 0;\n tfo[1] += sy1 || 0;\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo);\n }\n }\n return matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算\n * @param renderMode\n * @param ctx\n * @param parent\n * @param __cacheStyle\n * @param currentStyle\n * @param computedStyle\n * @param clientWidth\n * @param clientHeight\n * @param offsetWidth\n * @param offsetHeight\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param x1\n * @param x2\n * @param x3\n * @param x4\n * @param x5\n * @param x6\n * @param y1\n * @param y2\n * @param y3\n * @param y4\n * @param y5\n * @param y6\n * @returns {*[]}\n * @private\n */\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let bx1 = x1, by1 = y1, bx2 = x6, by2 = y6;\n let backgroundClip = computedStyle[BACKGROUND_CLIP] = currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n bx1 = x2;\n by1 = y2;\n bx2 = x5;\n by2 = y5;\n }\n else if(backgroundClip === 'contentBox' || backgroundClip === 'content-box') {\n bx1 = x3;\n by1 = y3;\n bx2 = x4;\n by2 = y4;\n }\n let isInline = this.__config[NODE_IS_INLINE];\n if(isInline && !this.contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n __cacheStyle[FILTER] = true;\n this.__calFilter(currentStyle, computedStyle);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = currentStyle;\n computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n if(item[1] === PERCENT) {\n return item[0] + '%';\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n computedStyle[BACKGROUND_SIZE] = (currentStyle[BACKGROUND_SIZE] || []).map(item => {\n return bg.calBackgroundSize(item, bx2 - bx1, by2 - by1, this.root);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = computedStyle[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE].slice(0);\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[BACKGROUND_IMAGE];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = BACKGROUND_IMAGE;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi;\n loadBgi.source = null;\n let node = this;\n let root = node.root;\n inject.measureImg(bgi, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n root.delRefreshTask(loadBgi.cb);\n root.addRefreshTask(loadBgi.cb = {\n __before() {\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_FOCUS] = REPAINT;\n res[UPDATE_CONFIG] = node.__config;\n root.__addUpdate(node, node.__config, root, root.__config, res);\n },\n });\n }\n }, {\n ctx,\n root,\n width: bx2 - bx1,\n height: by2 - by1,\n });\n }\n return true;\n }\n else if(!isInline && bgi.k) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n computedStyle[BOX_SHADOW] = (currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n let v = item2[0];\n if(item2[1] === PERCENT) {\n if(i % 2 === 0) {\n v *= 0.01 * (bx2 - bx1);\n }\n else {\n v *= 0.01 * (by2 - by1);\n }\n }\n else if(item2[1] === REM) {\n v = v * this.root.computedStyle[FONT_SIZE];\n }\n else if(item2[1] === VW) {\n v = v * this.root.width * 0.01;\n }\n else if(item2[1] === VH) {\n v = v * this.root.height * 0.01;\n }\n return v;\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(computedStyle[k] = currentStyle[k][0]);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.contentBoxList, currentStyle, computedStyle, this.root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(offsetWidth, offsetHeight, currentStyle, computedStyle, this.root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, computedStyle[ks], deg1, deg2,\n x1, x2, x5, x6, y1, y2, y5, y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parentComputedStyle = parent && parent.computedStyle;\n if(currentStyle[FONT_STYLE][1] === INHERIT) {\n computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n computedStyle[FONT_STYLE] = currentStyle[FONT_STYLE][0];\n }\n __cacheStyle[FONT_STYLE] = computedStyle[FONT_STYLE];\n if(currentStyle[COLOR][1] === INHERIT) {\n computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : [0, 0, 0, 1];\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n else if(isNil(__cacheStyle[COLOR])) {\n computedStyle[COLOR] = rgba2int(currentStyle[COLOR][0]);\n __cacheStyle[COLOR] = int2rgba(computedStyle[COLOR]);\n }\n if(currentStyle[TEXT_STROKE_COLOR][1] === INHERIT) {\n computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : [0, 0, 0, 1];\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n computedStyle[TEXT_STROKE_COLOR] = rgba2int(currentStyle[TEXT_STROKE_COLOR][0]);\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(computedStyle[TEXT_STROKE_COLOR]);\n }\n if(currentStyle[TEXT_STROKE_WIDTH][1] === INHERIT) {\n computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : 0;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = currentStyle[TEXT_STROKE_WIDTH];\n if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n else {\n v = v[0];\n }\n computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(currentStyle[TEXT_STROKE_OVER][1] === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : 'none';\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = computedStyle[TEXT_STROKE_OVER] = currentStyle[TEXT_STROKE_OVER][0];\n }\n if(currentStyle[VISIBILITY][1] === INHERIT) {\n computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n computedStyle[VISIBILITY] = currentStyle[VISIBILITY][0];\n }\n __cacheStyle[VISIBILITY] = computedStyle[VISIBILITY];\n if(currentStyle[POINTER_EVENTS][1] === INHERIT) {\n computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n computedStyle[POINTER_EVENTS] = currentStyle[POINTER_EVENTS][0];\n }\n __cacheStyle[POINTER_EVENTS] = computedStyle[POINTER_EVENTS];\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__cacheStyle, currentStyle, computedStyle, __config, sx1, sy1) {\n let rebuild;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = currentStyle[PERSPECTIVE];\n let ppt = 0;\n if(v[1] === REM) {\n ppt = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n ppt = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n ppt = v[0] * this.root.height * 0.01;\n }\n else {\n ppt = v[0];\n }\n computedStyle[PERSPECTIVE] = ppt;\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n computedStyle[PERSPECTIVE_ORIGIN] = tf.calOrigin(currentStyle[PERSPECTIVE_ORIGIN], this.offsetWidth, this.offsetHeight, this.root);\n }\n if(rebuild) {\n if(sx1 === undefined) {\n sx1 = this.__sx1;\n sy1 = this.__sy1;\n }\n let po = computedStyle[PERSPECTIVE_ORIGIN].slice(0);\n po[0] += sx1 || 0;\n po[1] += sy1 || 0;\n __config[NODE_PERSPECTIVE_MATRIX] = tf.calPerspectiveMatrix(computedStyle[PERSPECTIVE], po);\n }\n }\n\n __calFilter(currentStyle, computedStyle) {\n return computedStyle[FILTER] = (currentStyle[FILTER] || []).map(item => {\n let [k, v] = item;\n // 部分%单位的滤镜强制使用数字\n if(v[1] === PX || v[1] === DEG || v[1] === PERCENT || v[1] === NUMBER) {\n v = v[0];\n }\n else if(v[1] === REM) {\n v = v[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(v[1] === VW) {\n v = v[0] * this.root.width * 0.01;\n }\n else if(v[1] === VH) {\n v = v[0] * this.root.height * 0.01;\n }\n return [k, v];\n });\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(lv < REPAINT) {\n return this.__hasContent;\n }\n let visibility = currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return true;\n }\n }\n }\n if(currentStyle[BACKGROUND_COLOR][0][3] > 0) {\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT],\n paddingTop = computedStyle[PADDING_TOP], paddingRight = computedStyle[PADDING_RIGHT],\n paddingBottom = computedStyle[PADDING_BOTTOM], paddingLeft = computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]][0][3] > 0) {\n return true;\n }\n }\n let bs = currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && (item[2] > 0 || item[3] > 0)) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @param lv\n * @param ctx canvas/svg/webgl共用\n * @param cache 是否开启缓存\n * @return Object\n * x1/x2/x3/x4/y1/y2/y3/y4 坐标\n * break svg判断无变化提前跳出\n * cacheError 离屏申请失败,仅canvas\n * offscreenBlend 无cache时的离屏canvas,仅canvas\n * offscreenFilter 无cache时的离屏canvas,仅canvas\n * offscreenMask 无cache时的离屏canvas,仅canvas\n * offscreenOverflow 无cache时的离屏canvas,仅canvas\n */\n render(renderMode, lv, ctx, cache) {\n let {\n isDestroyed,\n root,\n __config,\n } = this;\n let __cache = __config[NODE_CACHE];\n let __cacheStyle = __config[NODE_CACHE_STYLE];\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let computedStyle = __config[NODE_COMPUTED_STYLE];\n // 渲染完认为完全无变更,等布局/动画/更新重置\n __config[NODE_REFRESH_LV] = NONE;\n // >=REPAINT才会进入这里,清空bbox\n this.__bbox = null;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList);\n ih = lineHeight;\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getCacheCanvas(iw, ih, '__$$INLINE_BGI$$__');\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n let uuid = gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseLine,再减去lineBox的baseLine得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n let ff = css.getFontFamily(fontFamily);\n let baseLine = css.getBaseLine(computedStyle);\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - diffL\n let diffL = fontSize * (font.info[ff].lgr || 0);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0, countW = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseLine, lineHeight, diffL, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n countW += w;\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n count++;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseLine, lineHeight, diffL, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], null,\n ix1 + dx, iy1 + dy, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0]);\n }\n let w = ix2 - ix1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n ctx.drawImage(offscreen.canvas, countW, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n ['d', `M${countW},${0}L${w+countW},${0}L${w+countW},${ih}L${countW},${ih},L${countW},${0}`],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', ix1 - countW],\n ['y', iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, __cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, __cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === backgroundImage[i]) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n currentStyle, i, backgroundSize, backgroundRepeat, __config);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_TOP], __cacheStyle[BORDER_TOP_COLOR]);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_RIGHT], __cacheStyle[BORDER_RIGHT_COLOR]);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_BOTTOM], __cacheStyle[BORDER_BOTTOM_COLOR]);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, __cacheStyle[BORDER_LEFT], __cacheStyle[BORDER_LEFT_COLOR]);\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n super.__destroy();\n let { root } = this;\n this.clearAnimate();\n this.clearFrameAnimate();\n root.delRefreshTask(this.__loadBgi.cb);\n root.delRefreshTask(this.__task);\n this.__task = null;\n this.__root = null;\n this.clearCache();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n let { event: { type } } = e;\n let { listener, __hasMask } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.isClip;\n let hasEmitMask;\n while(next && next.isMask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, computedStyle } = this;\n if(computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd);\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.cx, gd.cy, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.cx],\n ['cy', gd.cy],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { cx, cy, r, deg, stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n else if(renderMode === SVG) {\n let offset = 0.5;\n let prev;\n // 根据2个stop之间的百分比得角度差划分块数,每0.5°一块,不足也算\n let list = [];\n for(let i = 0, len = stop.length; i < len - 1; i++) {\n let begin = stop[i][1] * 360;\n let end = stop[i + 1][1] * 360;\n let diff = end - begin;\n let n = Math.ceil(diff);\n let per = diff / n;\n // 计算每块的2个弧端点\n let bc = stop[i][0];\n let ec = stop[i + 1][0];\n let dc = [ec[0] - bc[0], ec[1] - bc[1], ec[2] - bc[2], ec[3] - bc[3]];\n let pc = [dc[0] / n, dc[1] / n, dc[2] / n, dc[3] / n];\n for(let j = 0; j < n; j++) {\n let [x1, y1] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg - offset);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, begin + per * j + deg + offset);\n list.push([\n x1, y1,\n x2, y2,\n Math.round(bc[0] + pc[0] * j),\n Math.round(bc[1] + pc[1] * j),\n Math.round(bc[2] + pc[2] * j),\n Math.round(bc[3] + pc[3] * j),\n ]);\n }\n }\n // 最后一段补自己末尾颜色特殊处理\n let end = list[0].slice(0);\n let [x2, y2] = geom.pointOnCircle(cx, cy, r, deg);\n end[2] = x2;\n end[3] = y2;\n let s = stop[stop.length - 1][0];\n end[4] = s[0];\n end[5] = s[1];\n end[6] = s[2];\n end[7] = s[3];\n list.push(end);\n for(let i = 0, len = list.length; i < len; i++) {\n let cur = list[i];\n if(prev) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', prev[0]],\n ['y1', prev[1]],\n ['x2', cur[2]],\n ['y2', cur[3]],\n ],\n children: [\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([prev[4], prev[5], prev[6], prev[7]])],\n ['offset', '0%'],\n ],\n },\n {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba([cur[4], cur[5], cur[6], cur[7]])],\n ['offset', '100%'],\n ],\n },\n ],\n };\n let uuid = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n res.push([[[cx, cy], [prev[0], prev[1]], [cur[2], cur[3]]], 'url(#' + uuid + ')']);\n }\n prev = cur;\n }\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __config = this.__config;\n let __cacheTotal = __config[NODE_CACHE_TOTAL];\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n let __cacheMask = __config[NODE_CACHE_MASK];\n let __cacheOverflow = __config[NODE_CACHE_OVERFLOW];\n if(!onlyTotal) {\n __config[NODE_CACHE_STYLE] = this.__cacheStyle = {};\n let __cache = __config[NODE_CACHE];\n if(__cache) {\n __cache.release();\n }\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n if(__cacheOverflow) {\n __cacheOverflow.release();\n }\n }\n\n updateStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n let formatStyle = css.normalize(style);\n // 有root说明被添加渲染过了\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = formatStyle;\n res[UPDATE_OVERWRITE] = style; // 标识盖原有style样式不仅仅是修改currentStyle,不同于animate\n res[UPDATE_KEYS] = Object.keys(formatStyle).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, formatStyle);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let node = this;\n let { root, __config } = node;\n if(root) {\n root.addRefreshTask(node.__task = {\n __before() {\n node.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = node;\n res[UPDATE_STYLE] = style;\n res[UPDATE_KEYS] = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n res[UPDATE_CONFIG] = __config;\n root.__addUpdate(node, __config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(node, diff);\n }\n },\n });\n }\n // 没有是在如parse()还未添加的时候,可以直接同步覆盖\n else {\n Object.assign(this.currentStyle, style);\n if(util.isFunction(cb)) {\n cb.call(node, -1);\n }\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.isDestroyed) {\n animation.__destroy(true);\n return animation;\n }\n this.animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(util.isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n __computeMeasure(renderMode, ctx, cb) {\n css.computeMeasure(this);\n if(util.isFunction(cb)) {\n cb(this);\n }\n }\n\n __deepScan(cb, options) {\n return cb(this, options);\n }\n\n // isLayout为false时,为relative/margin/flex/vertical等\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.__layoutData.x += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sx1 += diff;\n this.__sx2 += diff;\n this.__sx3 += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.__layoutData.y += diff;\n this.clearCache();\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.__sy1 += diff;\n this.__sy2 += diff;\n this.__sy3 += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n }\n\n __resizeX(diff, lv) {\n this.computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData.w += diff;\n this.__sx4 += diff;\n this.__sx5 += diff;\n this.__sx6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n this.computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__sy4 += diff;\n this.__sy5 += diff;\n this.__sy6 += diff;\n if(diff < 0) {\n this.__config[NODE_LIMIT_CACHE] = false;\n }\n if(lv !== undefined) {\n this.__config[NODE_REFRESH_LV] |= lv;\n }\n this.clearCache();\n }\n\n __spreadBbox(boxShadow) {\n let ox = 0, oy = 0;\n if(Array.isArray(boxShadow)) {\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, , inset] = item;\n if(inset !== 'inset') {\n let d = blur.outerSize(sigma);\n d += spread;\n ox = Math.max(ox, x + d);\n oy = Math.max(oy, y + d);\n }\n });\n }\n return [ox, oy];\n }\n\n __releaseWhenEmpty(__cache) {\n if(__cache && __cache.available) {\n __cache.release();\n }\n return true;\n }\n\n getComputedStyle(key) {\n let computedStyle = this.computedStyle;\n let res = {};\n let keys;\n if(key) {\n if(Array.isArray(key)) {\n keys = key;\n }\n else {\n keys = [key];\n }\n keys = keys.map(s => {\n return STYLE_KEY[style2Upper(s)];\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect() {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent } = this;\n let p1 = point2d(mx.calPoint([__sx1, __sy1], matrixEvent));\n let p2 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1], matrixEvent));\n let p3 = point2d(mx.calPoint([__sx1 + offsetWidth, __sy1 + offsetHeight], matrixEvent));\n let p4 = point2d(mx.calPoint([__sx1, __sy1 + offsetHeight], matrixEvent));\n return {\n left: Math.min(p1[0], Math.min(p2[0], Math.min(p3[0], p4[0]))),\n top: Math.min(p1[1], Math.min(p2[1], Math.min(p3[1], p4[1]))),\n right: Math.max(p1[0], Math.max(p2[0], Math.max(p3[0], p4[0]))),\n bottom: Math.max(p1[1], Math.max(p2[1], Math.max(p3[1], p4[1]))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let self = this;\n if(self.isDestroyed) {\n inject.warn('Remove target is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n let { root, domParent } = self;\n let target = self.isShadowRoot ? self.hostRoot : self;\n // 特殊情况连续append/remove时候,还未被添加进来找不到所以无需删除\n if(domParent.children.indexOf(target) === -1) {\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n let pJson = domParent.__json;\n let i = pJson.children.indexOf(self.isShadowRoot ? self.hostRoot.__json : self.__json);\n let zChildren = domParent.zIndexChildren;\n let j = zChildren.indexOf(self.isShadowRoot ? self.hostRoot : self);\n if(i === -1 || j === -1) {\n throw new Error('Remove index Exception.')\n }\n pJson.children.splice(i, 1);\n domParent.children.splice(i, 1);\n zChildren.splice(j, 1);\n if(self.__prev) {\n self.__prev.__next = self.__next;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_REMOVE_DOM] = true;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after(diff) {\n self.isShadowRoot ? self.hostRoot.__destroy() : self.__destroy();\n if(util.isFunction(cb)) {\n cb.call(self, diff);\n }\n },\n });\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get sx() {\n return this.__sx;\n }\n\n get sy() {\n return this.__sy;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx1, __sy1, clientWidth, clientHeight,\n currentStyle: {\n [BORDER_TOP_WIDTH]: borderTopWidth = [0],\n [BORDER_RIGHT_WIDTH]: borderRightWidth = [0],\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth = [0],\n [BORDER_LEFT_WIDTH]: borderLeftWidth = [0],\n [BOX_SHADOW]: boxShadow = [],\n } = {},\n } = this;\n let [ox, oy] = this.__spreadBbox(boxShadow);\n clientWidth += borderLeftWidth[0] + borderRightWidth[0];\n clientHeight += borderTopWidth[0] + borderBottomWidth[0];\n this.__bbox = [__sx1 - ox, __sy1 - oy, __sx1 + clientWidth + ox, __sy1 + clientHeight + oy];\n }\n return this.__bbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get matrix() {\n return this.__config[NODE_MATRIX];\n }\n\n get matrixEvent() {\n return this.__config[NODE_MATRIX_EVENT];\n }\n\n get perspectiveMatrix() {\n return this.__config[NODE_PERSPECTIVE_MATRIX];\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseLine() {\n return this.offsetHeight;\n }\n\n get firstBaseLine() {\n return this.offsetHeight;\n }\n\n get isMask() {\n return this.__isMask;\n }\n\n get isClip() {\n return this.__isClip;\n }\n}\n\nexport default Xom;\n","import enums from '../util/enums';\nimport TextBox from './TextBox';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_LEFT,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_RIGHT_WIDTH,\n MARGIN_RIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseLine,inlineBlock等节点按最后一行baseLine\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseLine) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseLine\n this.__baseLine = baseLine;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign() {\n let n = this.baseLine;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseLine发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n let m = item.baseLine;\n if(m !== n) {\n item.__offsetY(n - m);\n }\n });\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseLine,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseLine = Math.max(b, this.__baseLine);\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n return this.lineHeight;\n }\n\n get baseLine() {\n let baseLine = 0;\n this.list.forEach(item => {\n baseLine = Math.max(baseLine, item.baseLine);\n });\n return Math.max(this.__baseLine, baseLine);\n }\n\n get lineHeight() {\n let lineHeight = 0;\n // 只有TextBox和InlineBlock\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return Math.max(this.__lineHeight, lineHeight);\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseLine) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__maxX = x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseLine = baseLine;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseLine);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n setLbOrGenLineBoxByInline(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseLine = Math.max(this.__baseLine, b);\n let lineBox;\n let list = this.list;\n if(this.__isNewLine) {\n lineBox = new LineBox(x, y, lineHeight, baseLine);\n list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n else {\n let length = list.length;\n lineBox = list[length - 1];\n lineBox.__setLB(l, b);\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox;\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n this.__maxX = Math.max(this.__maxX, o.x + o.outerWidth);\n return lineBox;\n }\n\n horizonAlign(w, textAlign) {\n this.list.forEach(lineBox => {\n let diff = w - lineBox.width;\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n lineBox.__offsetX(diff);\n lineBox.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n });\n }\n\n verticalAlign() {\n this.list.forEach(lineBox => {\n lineBox.verticalAlign();\n });\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n return n + list[length - 1].baseLine;\n }\n return 0;\n }\n\n get firstBaseLine() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseLine;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n HEIGHT,\n },\n} = enums;\nconst { AUTO, PX, PERCENT } = unit;\nconst { REFLOW } = level;\n\nfunction offsetAndResizeByNodeOnY(node, root, reflowHash, dy, inDirectAbsList) {\n if(dy) {\n let last;\n do {\n // component的sr没有next兄弟,视为component的next\n while(node.isShadowRoot) {\n node = node.host;\n }\n last = node;\n let isContainer, parent = node.domParent;\n if(parent) {\n let cs = parent.computedStyle;\n let ps = cs[POSITION];\n isContainer = parent === root || parent.isShadowRoot || ps === 'relative' || ps === 'absolute';\n }\n // 先偏移next,忽略有定位的absolute,本身非container也忽略\n let next = node.next;\n let container;\n while(next) {\n if(next.currentStyle[DISPLAY] !== 'none') {\n if(next.currentStyle[POSITION] === 'absolute') {\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = next.currentStyle;\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO || bottom[1] === PX) {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n }\n else if(top[1] === PERCENT) {\n let v = top[0] * 0.01 * dy;\n next.__offsetY(v, true, REFLOW);\n next.clearCache();\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, next);\n }\n else {\n if(!container) {\n container = parent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, next]);\n }\n }\n }\n else {\n next.__offsetY(dy, true, REFLOW);\n next.clearCache();\n }\n }\n next = next.next;\n }\n // root本身没domParent\n if(!parent) {\n break;\n }\n node = parent;\n // parent判断是否要resize\n let { currentStyle } = node;\n let isAbs = currentStyle[POSITION] === 'absolute';\n let need;\n if(isAbs) {\n if(currentStyle[HEIGHT][1] === AUTO\n && (currentStyle[TOP][1] === AUTO || currentStyle[BOTTOM][1] === AUTO)) {\n need = true;\n }\n }\n // height不定则需要\n else if(currentStyle[HEIGHT][1] === AUTO) {\n need = true;\n }\n if(need) {\n node.__resizeY(dy, REFLOW);\n node.clearCache();\n }\n // abs或者高度不需要继续向上调整提前跳出\n else {\n break;\n }\n if(node === root) {\n break;\n }\n }\n while(true);\n // 最后一个递归向上取消总缓存,防止过程中重复next多次无用递归\n while(last) {\n last.clearCache(true);\n last = last.domParent;\n }\n }\n}\n\nfunction clearUniqueReflowId(hash) {\n for(let i in hash) {\n if(hash.hasOwnProperty(i)) {\n let { node } = hash[i];\n delete node.__uniqueReflowId;\n }\n }\n}\n\nfunction getMergeMarginTB(topList, bottomList) {\n let total = 0;\n let max = topList[0];\n let min = topList[0];\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let diff = 0;\n if(max > 0 && min > 0) {\n diff = Math.max(max, min) - total;\n }\n else if(max < 0 && min < 0) {\n diff = Math.min(max, min) - total;\n }\n else if(max !== 0 || min !== 0) {\n diff = max + min - total;\n }\n return diff;\n}\n\nexport default {\n offsetAndResizeByNodeOnY,\n clearUniqueReflowId,\n getMergeMarginTB,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport mode from './mode';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport $$type from '../util/$$type';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from '../util/builder';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n FONT_WEIGHT,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n // PERSPECTIVE,\n // TRANSFORM,\n },\n NODE_KEY: {\n NODE_CURRENT_STYLE,\n NODE_STYLE,\n NODE_STRUCT,\n NODE_DOM_PARENT,\n NODE_IS_INLINE,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_ADD_DOM,\n UPDATE_CONFIG,\n UPDATE_MEASURE,\n },\n STRUCT_KEY: {\n STRUCT_NUM,\n STRUCT_LV,\n STRUCT_TOTAL,\n STRUCT_CHILD_INDEX,\n STRUCT_INDEX,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH } = unit;\nconst { calAbsolute, isRelativeOrAbsolute } = css;\n\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.isMask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n inlineBlock: true,\n 'inline-block': true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = util.extend({}, this.__style);\n this.__children = children || [];\n this.__flexLine = []; // flex布局多行模式时存储行\n let config = this.__config;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __structure(i, lv, j) {\n let res = super.__structure(i++, lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, j) => {\n let temp = child.__structure(i, lv + 1, j);\n if(Array.isArray(temp)) {\n i += temp.length;\n arr = arr.concat(temp);\n }\n else {\n i++;\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res[STRUCT_NUM] = zIndexChildren.length;\n res[STRUCT_TOTAL] = total;\n return arr;\n }\n\n __modifyStruct(root, offset = 0) {\n let __config = this.__config;\n let struct = __config[NODE_STRUCT];\n let total = struct[STRUCT_TOTAL] || 0;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct[STRUCT_INDEX], struct[STRUCT_LV], struct[STRUCT_CHILD_INDEX]);\n root.__structs.splice(struct[STRUCT_INDEX] + offset, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = __config[NODE_STRUCT];\n d = (struct[STRUCT_TOTAL] || 0) - total;\n let ps = __config[NODE_DOM_PARENT].__config[NODE_STRUCT];\n ps[STRUCT_TOTAL] = ps[STRUCT_TOTAL] || 0;\n ps[STRUCT_TOTAL] += d;\n }\n return [struct, d];\n }\n\n /**\n * 因为zIndex/abs的变化造成的更新,只需重排这一段顺序即可\n * 即便包含component造成的dom变化也不影响,component作为子节点reflow会再执行,这里重排老的vd\n * @param structs\n * @private\n */\n __updateStruct(structs) {\n let { [STRUCT_INDEX]: index, [STRUCT_TOTAL]: total = 0 } = this.__config[NODE_STRUCT];\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n zIndexChildren.forEach((child, i) => {\n child.__config[NODE_STRUCT][STRUCT_CHILD_INDEX] = i;\n });\n // 按直接子节点划分为相同数量的若干段进行排序\n let arr = [];\n let source = [];\n for(let i = index + 1; i <= index + total; i++) {\n let child = structs[i];\n let o = {\n child,\n list: structs.slice(child[STRUCT_INDEX], child[STRUCT_INDEX] + child[STRUCT_TOTAL] + 1),\n };\n arr.push(o);\n source.push(o);\n i += child[STRUCT_TOTAL] || 0;\n }\n arr.sort(function(a, b) {\n return a.child[STRUCT_CHILD_INDEX] - b.child[STRUCT_CHILD_INDEX];\n });\n // 是否有变更,有才进行重新计算\n let needSort;\n for(let i = 0, len = source.length; i < len; i++) {\n if(source[i] !== arr[i]) {\n needSort = true;\n break;\n }\n }\n if(needSort) {\n let list = [];\n arr.forEach(item => {\n list = list.concat(item.list);\n });\n list.forEach((struct, i) => {\n struct[STRUCT_INDEX] = index + i + 1;\n })\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param w 剩余宽度\n * @param total 容器尺寸\n * @returns {number|*}\n * @private\n */\n __tryLayInline(w, total) {\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n w = first.__tryLayInline(w, total);\n }\n else {\n w -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(w < 0) {\n return w;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n w = item.__tryLayInline(w, total);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n w -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n }\n // 还要减去开头的mpb\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto等对齐用\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n // 记得偏移LineBox\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(isLayout && !this.__config[NODE_IS_INLINE] && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n // item的递归子节点求min/max,只考虑固定值单位,忽略百分比,同时按方向和display\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h, lineBoxManager } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n else {\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n else if(display === 'block') {\n let countMin = 0, countMax = 0;\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n else {\n if(display === 'inlineBlock' || display === 'inline-block') {\n lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n if(isDirectionRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else if(isDirectionRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n });\n }\n }\n return [display, this.__addMp(isDirectionRow, w, currentStyle, [min, max])];\n }\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时isVirtual状态参与计算,文本抵达边界才进行换行\n * @param isDirectionRow\n * @param data\n * @param isVirtual abs非固定尺寸时先进行虚拟布局标识\n * @private\n */\n __calBasis(isDirectionRow, data, isVirtual) {\n css.computeReflow(this, this.isShadowRoot);\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, currentStyle, computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [WIDTH]: width,\n [HEIGHT]: height,\n [FLEX_BASIS]: flexBasis,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis[1] === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = fixedSize = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = fixedSize = (isDirectionRow ? w : h) * flexBasis[0] * 0.01;\n }\n else if(flexBasis[1] === REM) {\n b = fixedSize = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = fixedSize = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = fixedSize = flexBasis[0] * this.root.height * 0.01;\n }\n }\n // 已声明主轴尺寸的,当basis是auto时为值\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1) && isAuto) {\n if(main[1] === PX) {\n b = fixedSize = main[0];\n }\n else if(main[1] === PERCENT) {\n b = fixedSize = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = fixedSize = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = fixedSize = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = fixedSize = main[0] * this.root.height * 0.01;\n }\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n // flex的item还是flex时\n if(display === 'flex') {\n let isRow = flexDirection !== 'column';\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let [, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h });\n if(isDirectionRow) {\n if(isRow) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n else {\n if(isRow) {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n else {\n min += min2;\n max += max2;\n }\n }\n }\n else if(isDirectionRow) {\n if(isRow) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n if(isRow) {\n min = Math.max(min, item.height);\n max = Math.max(max, item.height);\n }\n else {\n min += item.height;\n max += item.height;\n }\n }\n });\n }\n // flex的item是block/inline时,inline也会变成block统一对待\n else {\n let countMin = 0, countMax = 0;\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [display, [min2, max2]] = item.__calMinMax(isDirectionRow, { x, y, w, h, lineBoxManager });\n // 块级查看之前是否有行内元素,设置换行\n if((display === 'block' || display === 'flex') && lineBoxManager.isEnd) {\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n if(isDirectionRow) {\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n if(display === 'block' || display === 'flex') {\n // 之前行积累的极值,并清空\n min += countMin;\n max += countMax;\n countMin = countMax = 0;\n // 本身的\n min += min2;\n max += max2;\n }\n else {\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, min2);\n countMax = Math.max(countMax, max2);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n }\n }\n else if(isDirectionRow) {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n });\n // 行内取极值,最后一个记得应用\n countMin = Math.max(countMin, item.height);\n countMax = Math.max(countMax, item.height);\n if(i === length - 1) {\n min += countMin;\n max += countMax;\n }\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n if(isContent) {\n b = max;\n }\n // 直接item的mpb影响basis\n return this.__addMp(isDirectionRow, w, currentStyle, [b, min, max], true);\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isVirtual abs无尺寸时提前虚拟布局计算尺寸\n * @private\n */\n __layoutBlock(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxW = 0;\n let cw = 0;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isImg = item.tagName === 'img';\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || isInline && whiteSpace === 'nowrap') {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // abs统计宽度\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let fw = item.__tryLayInline(w + data.x - x, w);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(fw >= (-1e-10)) {\n item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n x = data.x;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || isImg) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.outerWidth;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n // 非开头,说明之前的text未换行,需要增加行数\n if(x !== data.x && flowChildren[i - 1] instanceof Text) {\n lineClampCount++;\n }\n x = data.x;\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layout({\n x,\n y,\n w,\n h,\n }, isVirtual);\n let isNone = item.currentStyle[DISPLAY] === 'none';\n // 自身无内容\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n // absolute/flex前置虚拟计算\n if(isVirtual) {\n maxW = Math.max(maxW, item.outerWidth);\n cw = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n item.__offsetY(diff, true);\n y += diff;\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n y += diff;\n }\n }\n }\n }\n // 文字和inline类似\n else {\n // lineClamp作用域为block下的inline(同LineBox上下文)\n if(lineClamp && lineClampCount >= lineClamp) {\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if(x === data.x || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, cw);\n cw = item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let fw = item.__tryLayInline(w - x + data.x);\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = data.x;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx: data.x,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(isVirtual) {\n maxW = Math.max(maxW, item.width);\n cw = 0;\n }\n }\n if(isVirtual) {\n cw += item.width;\n maxW = Math.max(maxW, cw);\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n y = lineBoxManager.endY;\n }\n let tw = this.__width = (fixedWidth || !isVirtual) ? w : maxW;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isVirtual) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n this.__marginAuto(currentStyle, data);\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isVirtual) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let maxX = 0;\n let isDirectionRow = ['column', 'column-reverse', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n // flex的child如果是inline,变为block,在计算autoBasis前就要\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n // abs虚拟布局计算时纵向也是看横向宽度\n let [b, min, max] = item.__calBasis(isVirtual ? true : isDirectionRow, { x, y, w, h }, isVirtual);\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += max;\n }\n else {\n maxX = Math.max(maxX, max);\n }\n return;\n }\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n if(isVirtual) {\n if(isDirectionRow) {\n maxX += item.textWidth;\n }\n else {\n maxX = Math.max(maxX, item.textWidth);\n }\n return;\n }\n growList.push(0);\n shrinkList.push(1);\n if(isDirectionRow) {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n else {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n item.__layout({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n let h = item.height;\n basisList.push(h);\n minList.push(h);\n }\n }\n });\n // abs时,只需关注宽度即可,无需真正布局\n if(isVirtual) {\n let tw = this.__width = Math.min(maxX, w);\n this.__ioSize(tw, this.height);\n return;\n }\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = flexWrap === 'wrap' || ['wrap-reverse', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross] = this.__layoutFlexLine(clone, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n offset += length;\n });\n let tw = this.__width = w;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'row-reverse' || flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true);\n }\n });\n });\n }\n else if(flexDirection === 'column-reverse' || flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(['wrapReverse', 'wrap-reverse'].indexOf(flexWrap) > -1 && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(!isVirtual && length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true);\n }\n else {\n item.__offsetX(per, true);\n }\n });\n }\n else if(alignContent === 'flex-start' || alignContent === 'flexStart') {}\n else if(alignContent === 'flex-end' || alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true);\n }\n else {\n item.__offsetX(diff, true);\n }\n });\n }\n else if(alignContent === 'space-between' || alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true);\n }\n else {\n item.__offsetX(between, true);\n }\n });\n }\n });\n }\n else if(alignContent === 'space-around' || alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true);\n }\n else {\n item.__offsetX(around * (i + 1), true);\n }\n });\n });\n }\n // 默认stretch\n else {\n per = diff / length;\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true);\n }\n else {\n item.__offsetX(per * i, true);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行cross对齐,在alignContent为stretch时计算每行的高度\n if(!isVirtual) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__crossAlign(item, alignItems, isDirectionRow, maxCross);\n });\n }\n else if(length) {\n let maxCross = maxCrossList[0];\n if(isDirectionRow) {\n if(fixedHeight) {\n maxCross = h;\n }\n }\n else {\n maxCross = w;\n }\n this.__crossAlign(__flexLine[0], alignItems, isDirectionRow, maxCross);\n }\n }\n this.__marginAuto(currentStyle, data);\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, containerSize,\n fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems, orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free);\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) {\n let n = item * basisList[i];\n factorSum += n;\n return n;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum < 1) {\n free *= factorSum;\n }\n let needReset, factorSum2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n free -= basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸\n }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n }\n }\n });\n if(!needReset) {\n break;\n }\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layout({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n });\n }\n else {\n item.__layout({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n });\n }\n }\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lbmList.push(lineBoxManager);\n item.__layout({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n // 计算主轴剩余时要用真实剩余空间而不能用伸缩剩余空间\n let diff = isDirectionRow ? (w - x + data.x) : (h - y + data.y);\n // 主轴对齐方式\n if(diff > 0) {\n let len = orderChildren.length;\n if(justifyContent === 'flexEnd' || justifyContent === 'flex-end') {\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(diff, true) : child.__offsetY(diff, true);\n }\n }\n else if(justifyContent === 'center') {\n let center = diff * 0.5;\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(center, true) : child.__offsetY(center, true);\n }\n }\n else if(justifyContent === 'spaceBetween' || justifyContent === 'space-between') {\n let between = diff / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(between * i, true) : child.__offsetY(between * i, true);\n }\n }\n else if(justifyContent === 'spaceAround' || justifyContent === 'space-around') {\n let around = diff / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = orderChildren[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true) : child.__offsetY(around * (i + 1), true);\n }\n }\n }\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(item.width, textAlign);\n })\n }\n return [x, y, maxCross];\n }\n\n // 每个flexLine的侧轴对齐,单行时就是一行对齐\n __crossAlign(line, alignItems, isDirectionRow, maxCross) {\n let baseLine = 0;\n line.forEach(item => {\n baseLine = Math.max(baseLine, item.firstBaseLine);\n });\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetY(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height[1] === AUTO && item.outerHeight < maxCross) {\n item.__layout(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height[1] === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__sy4 += d;\n item.__sy5 += d;\n item.__sy6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignSelf === 'flexEnd' || alignSelf === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart' || alignSelf === 'flex-start') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true);\n }\n }\n else if(alignItems === 'flexEnd' || alignItems === 'flex-end') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseLine - item.firstBaseLine;\n if(diff !== 0) {\n item.__offsetX(diff, true);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width[1] === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__sx4 += d;\n item.__sx5 += d;\n item.__sx6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对其,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isVirtual\n * @param isInline\n * @private\n */\n __layoutInline(data, isVirtual, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let { fixedWidth, fixedHeight, x, y, w, h, lx,\n lineBoxManager, nowrap, endSpace, selfEndSpace } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(fixedWidth && isVirtual) {\n this.__width = w;\n this.__ioSize(w, this.height);\n return;\n }\n let {\n [WIDTH]: width,\n } = currentStyle;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__config[NODE_IS_INLINE] = true;\n this.__lineBoxManager = lineBoxManager;\n let baseLine = css.getBaseLine(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(marginLeft || marginRight\n || paddingLeft || paddingRight\n || borderLeftWidth || borderRightWidth) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseLine);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseLine);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight, css.getBaseLine(computedStyle));\n lx = x;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n let contentBoxList;\n if(isInline) {\n contentBoxList = this.__contentBoxList = [];\n lineBoxManager.pushContentBoxList(this);\n }\n let isIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isInline2 = isXom && item.currentStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && ['inlineBlock', 'inline-block'].indexOf(item.currentStyle[DISPLAY]) > -1;\n let isRealInline = isXom && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb\n let isEnd = isInline && (i === length - 1);\n if(isEnd) {\n endSpace += selfEndSpace;\n }\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头,不用考虑是否放得下直接放,i为0强制不换行\n if(x === lx || !i || isInline2 && whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样\n if(item.__isIbFull) {\n isInlineBlock2 && (w[1] === AUTO) && (isIbFull = true);\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let fw = (whiteSpace === 'nowrap') ? 0 : item.__tryLayInline(w - x + lx, w - (isEnd ? endSpace : 0));\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n nowrap: whiteSpace === 'nowrap',\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n isInline2 && lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull) {\n lineBoxManager.addItem(item);\n x = lx;\n y += item.outerHeight;\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if(x === lx || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n // 第一个Text且父元素声明了nowrap也强制不换行,非第一个则看本身whiteSpace声明\n let focusNoWrap = (!i && nowrap) || whiteSpace === 'nowrap';\n let fw = focusNoWrap ? 0 : item.__tryLayInline(w + lx - x);\n if(!focusNoWrap && fw >= 0 && isEnd && endSpace && item.content.length === 1) {\n let fw2 = fw - endSpace;\n if(fw2 < 0) {\n fw = fw2;\n }\n }\n // 放得下继续\n if(fw >= (-1e-10)) {\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n x = lx;\n y = lineBoxManager.endY;\n lineBoxManager.setNewLine();\n lineClampCount = item.__layout({\n x,\n y,\n w,\n h,\n lx,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n }, isVirtual);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1 && width[1] === AUTO) {\n isIbFull = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n y = lineBoxManager.endY;\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n lineBoxManager.addX(selfEndSpace);\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,\n if(isVirtual) {\n this.__inlineSize();\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用maxW\n let maxW = lineBoxManager.__maxX - data.x;\n tw = this.__width = fixedWidth ? w : (isIbFull ? Math.max(w, maxW) : maxW);\n th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isVirtual && !isInline) {\n lineBoxManager.verticalAlign();\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(tw, textAlign);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(tw, textAlign);\n });\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return isInline ? lineClampCount : 0;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseLine得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(tw, textAlign) {\n let { contentBoxList, computedStyle, __ox, __oy } = this;\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__sx = minOX + __ox;\n this.__sy = minOY + __oy;\n this.__sx1 = minFX + __ox;\n this.__sy1 = minFY + __oy;\n this.__sx2 = minCX + __ox;\n this.__sy2 = minCY + __oy;\n this.__sx3 = minX + __ox;\n this.__sy3 = minY + __oy;\n this.__sx4 = maxX + __ox;\n this.__sy4 = maxY + __oy;\n this.__sx5 = maxCX + __ox;\n this.__sy5 = maxCY + __oy;\n this.__sx6 = maxFX + __ox;\n this.__sy6 = maxFY + __oy;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize();\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = tw;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff) {\n this.__offsetX(diff, true);\n }\n }\n this.__width = computedStyle[WIDTH] = 0;\n let th = this.__height = computedStyle[HEIGHT] = lineHeight;\n this.__ioSize(0, th);\n this.__sy -= marginTop + paddingTop + borderTopWidth;\n this.__sx1 = this.sx + marginLeft;\n this.__sy1 = this.sy + marginTop;\n this.__sx2 = this.__sx1 + borderLeftWidth;\n this.__sy2 = this.__sy1 + borderTopWidth;\n this.__sx4 = this.__sx3 = this.__sx2 + paddingLeft;\n this.__sy4 = this.__sy3 = this.__sy2 + paddingTop;\n this.__sx5 = this.__sx4 + paddingRight;\n this.__sy5 = this.__sy4 + th + paddingBottom;\n this.__sx6 = this.__sx5 + borderRightWidth;\n this.__sy6 = this.__sy5 + borderBottomWidth;\n this.__clientWidth = this.__sx5 - this.__sx2;\n this.__clientHeight = this.__sy5 - this.__sy2;\n this.__offsetWidth = this.__sx6 - this.__sx1;\n this.__offsetHeight = this.__sy6 - this.__sy1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { sx: x, sy: y, clientWidth, clientHeight, computedStyle } = container;\n let { isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding\n item.__mp(currentStyle, computedStyle, clientWidth);\n if(currentStyle[DISPLAY] !== 'block' && currentStyle[DISPLAY] !== 'flex') {\n currentStyle[DISPLAY] = computedStyle[DISPLAY] = 'block';\n }\n let { [LEFT]: left, [TOP]: top, [RIGHT]: right,\n [BOTTOM]: bottom, [WIDTH]: width, [HEIGHT]: height, [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left[1] !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = calAbsolute(currentStyle, 'left', left, clientWidth, this.root);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right[1] !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = calAbsolute(currentStyle, 'right', right, clientWidth, this.root);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top[1] !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = calAbsolute(currentStyle, 'top', top, clientHeight, this.root);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom[1] !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = calAbsolute(currentStyle, 'bottom', bottom, clientHeight, this.root);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = x + clientWidth - computedStyle[RIGHT] - x2;\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n else if(fixedRight) {\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= currentStyle[BORDER_LEFT_WIDTH][0];\n x2 -= currentStyle[BORDER_RIGHT_WIDTH][0];\n }\n else {\n x2 = x + paddingLeft;\n if(width[1] !== AUTO) {\n if(width[1] === PERCENT) {\n w2 = width[0] * clientWidth * 0.01;\n }\n else if(width[1] === REM) {\n w2 = width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w2 = width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w2 = width[0] * this.root.height * 0.01;\n }\n else {\n w2 = width[0];\n }\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = y + clientHeight - computedStyle[BOTTOM] - y2;\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n }\n else if(fixedBottom) {\n if(height[1] !== AUTO) {\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else {\n h2 = height[0];\n }\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= currentStyle[BORDER_TOP_WIDTH][0];\n y2 -= currentStyle[BORDER_BOTTOM_WIDTH][0];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.prev;\n while(prev) {\n // 目前不考虑margin合并,直接以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || prev.computedStyle[POSITION] !== 'absolute') {\n y2 = prev.y + prev.outerHeight;\n break;\n }\n prev = prev.prev;\n }\n if(height[1] === PERCENT) {\n h2 = height[0] * clientHeight * 0.01;\n }\n else if(height[1] === REM) {\n h2 = height[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(height[1] === VW) {\n h2 = height[0] * this.root.width * 0.01;\n }\n else if(height[1] === VH) {\n h2 = height[0] * this.root.height * 0.01;\n }\n else if(height[1] === PX) {\n h2 = height[0];\n }\n }\n // 没设宽高,需手动计算获取最大宽高后,赋给样式再布局\n let needCalWidth;\n if((display === 'block' || ['inlineBlock', 'inline-block'].indexOf(display) > -1) && w2 === undefined) {\n needCalWidth = true;\n }\n else if(display === 'flex') {\n if(w2 === undefined) {\n needCalWidth = true;\n }\n else if(flexDirection === 'column' && h2 === undefined) {\n needCalWidth = true;\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let wl = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let hl = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取孩子宽度最大值\n if(needCalWidth) {\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n }, true, true);\n wl = item.outerWidth;\n }\n // needCalWidth传入,因为自适应尺寸上面已经计算过一次margin/padding了\n item.__layout({\n x: x2,\n y: y2,\n w: wl,\n h: hl,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n }, false, true);\n if(onlyRight) {\n item.__offsetX(-item.outerWidth, true);\n }\n if(onlyBottom) {\n item.__offsetY(-item.outerHeight, true);\n }\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data);\n }\n }\n });\n this.__execAr();\n }\n\n /**\n * 布局前检查继承的样式以及统计字体测量信息\n * 首次检查为整树遍历,后续检查是节点自发局部检查,不再进入\n * @param renderMode\n * @param ctx\n * @param cb\n * @private\n */\n __computeMeasure(renderMode, ctx, cb) {\n super.__computeMeasure(renderMode, ctx, cb);\n // 即便自己不需要计算,但children还要继续递归检查\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx, cb);\n });\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n super.__destroy();\n }\n\n __emitEvent(e, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { isDestroyed, computedStyle, isMask } = this;\n if(isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || isMask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(util.isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e);\n }\n\n // 深度遍历执行所有子节点,包含自己,如果cb返回true,提前跳出不继续深度遍历\n __deepScan(cb, options) {\n if(super.__deepScan(cb, options)) {\n return;\n }\n this.children.forEach(node => {\n node.__deepScan(cb, options);\n });\n }\n\n appendChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null; // 清除在before,防止after的回调增加新的task误删\n self.__json.children.push(json);\n let len = self.children.length;\n if(len) {\n let last = self.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n self.children.push(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in appendChild.');\n }\n }\n }\n\n prependChild(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed) {\n let { root, host } = self;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, self);\n }\n else {\n vd = builder.initDom(json, root, host, self);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n self.__json.children.unshift(json);\n let len = self.children.length;\n if(len) {\n let first = self.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n self.children.unshift(vd);\n self.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in prependChild.');\n }\n }\n }\n\n insertBefore(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('InsertBefore exception.');\n }\n // 插入注意开头位置处理\n if(i) {\n children.splice(i, 0, json);\n vd.__next = self;\n vd.__prev = self.__prev;\n self.__prev = vd;\n domParent.children.splice(i, 0, vd);\n }\n else {\n if(len) {\n let first = domParent.children[0];\n first.__prev = vd;\n vd.__next = first;\n }\n children.unshift(json);\n domParent.children.unshift(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertBefore.');\n }\n }\n }\n\n insertAfter(json, cb) {\n let self = this;\n if(!util.isNil(json) && !self.isDestroyed && self.domParent) {\n let { root, domParent } = self;\n let host = domParent.hostRoot;\n if([$$type.TYPE_VD, $$type.TYPE_GM, $$type.TYPE_CP].indexOf(json.$$type) > -1) {\n if(json.vd) {\n root.delRefreshTask(json.vd.__task);\n json.vd.remove();\n }\n let vd;\n if($$type.TYPE_CP === json.$$type) {\n vd = builder.initCp2(json, root, host, domParent);\n }\n else {\n vd = builder.initDom(json, root, host, domParent);\n }\n root.addRefreshTask(vd.__task = {\n __before() {\n vd.__task = null;\n let i = 0, has, __json = domParent.__json, children = __json.children, len = children.length;\n let pJson = self.isShadowRoot ? self.hostRoot.__json : self.__json;\n for(; i < len; i++) {\n if(children[i] === pJson) {\n has = true;\n break;\n }\n }\n if(!has) {\n throw new Error('insertAfter exception.');\n }\n // 插入注意末尾位置处理\n if(i < len - 1) {\n children.splice(i + 1, 0, json);\n vd.__prev = self;\n vd.__next = self.__next;\n self.__next = vd;\n domParent.children.splice(i + 1, 0, vd);\n }\n else {\n if(len) {\n let last = domParent.children[len - 1];\n last.__next = vd;\n vd.__prev = last;\n }\n children.push(json);\n domParent.children.push(vd);\n }\n domParent.__zIndexChildren = null;\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = vd;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_ADD_DOM] = true;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_CONFIG] = vd.__config;\n root.__addUpdate(vd, vd.__config, root, root.__config, res);\n },\n __after(diff) {\n if(util.isFunction(cb)) {\n cb.call(vd, diff);\n }\n },\n });\n }\n else {\n throw new Error('Invalid parameter in insertAfter.');\n }\n }\n }\n\n removeChild(target, cb) {\n if(target.parent === this && (target instanceof Xom || target instanceof Component)) {\n if(this.isDestroyed) {\n inject.warn('Remove parent is destroyed.');\n if(util.isFunction(cb)) {\n cb();\n }\n return;\n }\n target.remove(cb);\n }\n else {\n throw new Error('Invalid parameter in removeChild.');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Xom && item.currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseLine;\n }\n\n get firstBaseLine() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseLine;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n}\n\nexport default Dom;\n","import Dom from './Dom';\nimport mode from './mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport enums from '../util/enums';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BOX_SHADOW,\n MIX_BLEND_MODE,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_FOCUS,\n UPDATE_CONFIG,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, RGBA } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n let config = this.__config;\n if(config[NODE_IS_MASK]) {\n let { style, currentStyle } = this;\n style[BACKGROUND_IMAGE] = currentStyle[BACKGROUND_IMAGE] = [null];\n style[BACKGROUND_COLOR] = currentStyle[BACKGROUND_COLOR] = [[0, 0, 0, 0], RGBA];\n style[BORDER_TOP_WIDTH] = currentStyle[BORDER_TOP_WIDTH] = [0, PX];\n style[BORDER_RIGHT_WIDTH] = currentStyle[BORDER_RIGHT_WIDTH] = [0, PX];\n style[BORDER_LEFT_WIDTH] = currentStyle[BORDER_LEFT_WIDTH] = [0, PX];\n style[BORDER_BOTTOM_WIDTH] = currentStyle[BORDER_BOTTOM_WIDTH] = [0, PX];\n style[BOX_SHADOW] = currentStyle[BOX_SHADOW] = null;\n style[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE] = 'normal';\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n * @param data\n * @returns {{fixedWidth: boolean, w: *, x: *, h: *, y: *, fixedHeight: boolean}}\n * @private\n */\n __preLayout(data) {\n let res = super.__preLayout(data);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n if(!loadImg.error) {\n let src = loadImg.src;\n let cache = inject.IMG[src];\n if(cache && cache.state === inject.LOADED) {\n loadImg.source = cache.source;\n loadImg.width = cache.width;\n loadImg.height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n __destroy() {\n this.root.delRefreshTask(this.__task);\n super.__destroy();\n this.__task = null;\n }\n\n // img根据加载情况更新__hasContent\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n let res = super.__calContent(renderMode, lv, currentStyle, computedStyle);\n if(!res) {\n let {\n __loadImg: loadImg,\n } = this;\n if(computedStyle[VISIBILITY] !== 'hidden' && (computedStyle[WIDTH] || computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n return res;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n let {\n offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow,\n } = res;\n let {\n width, height, isDestroyed,\n props: {\n placeholder,\n },\n computedStyle,\n computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __config,\n __loadImg: loadImg,\n root,\n } = this;\n if(offscreenBlend) {\n ctx = offscreenBlend.target.ctx;\n }\n if(offscreenMask) {\n ctx = offscreenMask.target.ctx;\n }\n if(offscreenFilter) {\n ctx = offscreenFilter.target.ctx;\n }\n if(offscreenOverflow) {\n ctx = offscreenOverflow.target.ctx;\n }\n // 没source且不error时加载图片\n if(!loadImg.source && !loadImg.error && !loadImg.loading) {\n this.__loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height);\n }\n if(isDestroyed || display === 'none' || visibility === 'hidden') {\n return res;\n }\n let __cache = __config[NODE_CACHE];\n if(cache && __cache && __cache.enabled) {\n ctx = __cache.ctx;\n }\n let originX, originY;\n originX = res.x3;\n originY = res.y3;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, 2 * Math.PI);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n __config[NODE_DEFS_CACHE].push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n // img没加载时,清空,这样Xom就认为没内容不生成cache,防止img先绘制cache再绘制主屏,重复\n __releaseWhenEmpty(__cache) {\n if(!this.__loadImg.error && !this.__loadImg.source) {\n return super.__releaseWhenEmpty(__cache);\n }\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height[1] === PX) {\n w -= loadImg.width * height[0] / loadImg.height;\n }\n else if(height[1] === PERCENT) {\n w -= loadImg.width * height[0] * total * 0.01 / loadImg.height;\n }\n else if(height[1] === REM) {\n w -= loadImg.width * height[0] * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height[1] === VW) {\n w -= loadImg.width * height[0] * this.root.width * 0.01 / loadImg.height;\n }\n else if(height[1] === VH) {\n w -= loadImg.width * height[0] * this.root.height * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n if(cross[1] !== AUTO) {\n if(cross[1] === PX) {\n cross = cross[0];\n }\n else if(cross[1] === PERCENT) {\n cross = cross[0] * 0.01 * (isDirectionRow ? h : w);\n }\n else if(cross[1] === REM) {\n cross = cross[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(cross[1] === VW) {\n cross = cross[0] * this.root.width * 0.01;\n }\n else if(cross[1] === VH) {\n cross = cross[0] * this.root.height * 0.01;\n }\n let ratio = __loadImg.width / __loadImg.height;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? __loadImg.width : __loadImg.height;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __loadAndRefresh(loadImg, root, ctx, placeholder, computedStyle, width, height, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null; // 清除在before,防止after的回调增加新的task误删\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n });\n loadImg.source = null;\n }\n loadImg.loading = true;\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src && !self.isDestroyed) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n root.delRefreshTask(self.__task);\n if(width[1] !== AUTO && height[1] !== AUTO) {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REPAINT;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n else {\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n // 刷新前统一赋值,由刷新逻辑计算最终值避免优先级覆盖问题\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW; // 没有样式变化但内容尺寸发生了变化强制执行\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, root.__config, res);\n },\n __after() {\n if(isFunction(cb)) {\n cb.call(self);\n }\n },\n });\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.error = true;\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n reload();\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none') {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n }\n\n updateSrc(v, cb) {\n let self = this;\n let loadImg = self.__loadImg;\n let root = this.root;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || !v && loadImg.error) {\n if(isFunction(cb)) {\n cb(-1);\n }\n }\n else if(v) {\n loadImg.src = v;\n self.__loadAndRefresh(loadImg, root, root.ctx, self.props.placeholder, self.computedStyle, self.width, self.height, cb);\n }\n else {\n loadImg.src = v;\n loadImg.source = null;\n loadImg.error = true;\n root.delRefreshTask(self.__task);\n root.addRefreshTask(self.__task = {\n __before() {\n self.__task = null;\n if(self.isDestroyed) {\n return;\n }\n let res = {};\n res[UPDATE_NODE] = self;\n res[UPDATE_FOCUS] = level.REFLOW;\n res[UPDATE_CONFIG] = self.__config;\n root.__addUpdate(self, self.__config, root, self.__config, res);\n },\n __after(diff) {\n if(isFunction(cb)) {\n cb(diff);\n }\n },\n });\n }\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n static showError = true;\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n VISIBILITY,\n FONT_SIZE,\n FLEX_BASIS,\n },\n NODE_KEY: {\n NODE_CACHE_PROPS,\n NODE_CURRENT_PROPS,\n NODE_CURRENT_STYLE,\n NODE_IS_MASK,\n NODE_STYLE,\n NODE_DEFS_CACHE,\n }\n} = enums;\nconst { PX, PERCENT, REM, VW, VH } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend({}, this.__style);\n this.__currentProps = util.clone(this.props);\n let config = this.__config;\n config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n config[NODE_CURRENT_PROPS] = this.__currentProps;\n config[NODE_CURRENT_STYLE] = this.__currentStyle;\n config[NODE_STYLE] = this.__style;\n }\n\n __tryLayInline(w, total) {\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] === PX) {\n w -= width[0];\n }\n else if(width[1] === PERCENT) {\n w -= total * width[0] * 0.01;\n }\n else if(width[1] === REM) {\n w -= width[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(width[1] === VW) {\n w -= width[0] * this.root.width * 0.01;\n }\n else if(width[1] === VH) {\n w -= width[0] * this.root.height * 0.01;\n }\n // 减去水平mbp\n if(marginLeft[1] === PX) {\n w -= marginLeft[0];\n }\n else if(marginLeft[1] === PERCENT) {\n w -= marginLeft[0] * total * 0.01;\n }\n else if(marginLeft[1] === REM) {\n w -= marginLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginLeft[1] === VW) {\n w -= marginLeft[0] * this.root.width * 0.01;\n }\n else if(marginLeft[1] === VH) {\n w -= marginLeft[0] * this.root.height * 0.01;\n }\n if(paddingLeft[1] === PX) {\n w -= paddingLeft[0];\n }\n else if(paddingLeft[1] === PERCENT) {\n w -= paddingLeft[0] * total * 0.01;\n }\n else if(paddingLeft[1] === REM) {\n w -= paddingLeft[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingLeft[1] === VW) {\n w -= paddingLeft[0] * this.root.width * 0.01;\n }\n else if(paddingLeft[1] === VH) {\n w -= paddingLeft[0] * this.root.height * 0.01;\n }\n if(borderLeftWidth[1] === PX) {\n w -= borderLeftWidth[0];\n }\n else if(borderLeftWidth[1] === REM) {\n w -= borderLeftWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderLeftWidth[1] === VW) {\n w -= borderLeftWidth[0] * this.root.width * 0.01;\n }\n else if(borderLeftWidth[1] === VH) {\n w -= borderLeftWidth[0] * this.root.height * 0.01;\n }\n if(marginRight[1] === PX) {\n w -= marginRight[0];\n }\n else if(marginRight[1] === PERCENT) {\n w -= marginRight[0] * total * 0.01;\n }\n else if(marginRight[1] === REM) {\n w -= marginRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(marginRight[1] === VW) {\n w -= marginRight[0] * this.root.width * 0.01;\n }\n else if(marginRight[1] === VH) {\n w -= marginRight[0] * this.root.height * 0.01;\n }\n if(paddingRight[1] === PX) {\n w -= paddingRight[0];\n }\n else if(paddingRight[1] === PERCENT) {\n w -= paddingRight[0] * total * 0.01;\n }\n else if(paddingRight[1] === REM) {\n w -= paddingRight[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(paddingRight[1] === VW) {\n w -= paddingRight[0] * this.root.width * 0.01;\n }\n else if(paddingRight[1] === VH) {\n w -= paddingRight[0] * this.root.height * 0.01;\n }\n if(borderRightWidth[1] === PX) {\n w -= borderRightWidth[0];\n }\n else if(borderRightWidth[1] === REM) {\n w -= borderRightWidth[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(borderRightWidth[1] === VW) {\n w -= borderRightWidth[0] * this.root.width * 0.01;\n }\n else if(borderRightWidth[1] === VH) {\n w -= borderRightWidth[0] * this.root.height * 0.01;\n }\n return w;\n }\n\n __calMinMax(isDirectionRow, data) {\n css.computeReflow(this, this.isShadowRoot);\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n // 计算需考虑style的属性\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n [DISPLAY]: display,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // 只绝对值生效,%不生效,依旧要判断\n if(main[1] === PX) {\n min = max = main[0];\n }\n else if(main[1] === REM) {\n min = max = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n min = max = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n min = max = main[0] * this.root.height * 0.01;\n }\n return [display, this.__addMp(isDirectionRow, data.w, currentStyle, [min, max])];\n }\n\n __calBasis(isDirectionRow, data) {\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH].indexOf(flexBasis[1]) > -1;\n if(isFixed) {\n if(flexBasis[1] === PX) {\n b = max = min = flexBasis[0];\n }\n else if(flexBasis[1] === PERCENT) {\n b = max = min = flexBasis[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(flexBasis[1] === REM) {\n b = max = min = flexBasis[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(flexBasis[1] === VW) {\n b = max = min = flexBasis[0] * this.root.width * 0.01;\n }\n else if(flexBasis[1] === VH) {\n b = max = min = flexBasis[0] * this.root.height * 0.01;\n }\n }\n else if(([PX, PERCENT, REM, VW, VH].indexOf(main[1]) > -1)) {\n if(main[1] === PX) {\n b = max = min = main[0];\n }\n else if(main[1] === PERCENT) {\n b = max = min = main[0] * 0.01 * (isDirectionRow ? w : h);\n }\n else if(main[1] === REM) {\n b = max = min = main[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(main[1] === VW) {\n b = max = min = main[0] * this.root.width * 0.01;\n }\n else if(main[1] === VH) {\n b = max = min = main[0] * this.root.height * 0.01;\n }\n }\n // border也得计算在内\n if(isDirectionRow) {\n let mp = this.__calMp(marginLeft, w)\n + this.__calMp(marginRight, w)\n + this.__calMp(paddingLeft, w)\n + this.__calMp(paddingRight, w);\n let w2 = borderLeftWidth[0] + borderRightWidth[0] + mp;\n b += w2;\n max += w2;\n min += w2;\n }\n else {\n let mp = this.__calMp(marginTop, w)\n + this.__calMp(marginBottom, w)\n + this.__calMp(paddingTop, w)\n + this.__calMp(paddingBottom, w);\n let h2 = borderTopWidth[0] + borderBottomWidth[0] + mp;\n b += h2;\n max += h2;\n min += h2;\n }\n return [b, min, max];\n }\n\n __layoutBlock(data, isVirtual) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data);\n this.__height = fixedHeight ? h : 0;\n if(isVirtual) {\n this.__width = fixedWidth ? w : 0;\n return;\n }\n this.__width = w;\n this.__ioSize(w, this.height);\n this.__marginAuto(this.currentStyle, data);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __layoutFlex(data) {\n // 无children所以等同于block\n this.__layoutBlock(data);\n }\n\n __layoutInline(data) {\n let { fixedWidth, fixedHeight, x, y, w, h } = this.__preLayout(data);\n // 元素的width不能超过父元素w\n let tw = this.__width = fixedWidth ? w : x - data.x;\n let th = this.__height = fixedHeight ? h : y - data.y;\n this.__ioSize(tw, th);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6) {\n let res = super.__calCache(renderMode, ctx, parent, __cacheStyle, currentStyle, computedStyle,\n clientWidth, clientHeight, offsetWidth, offsetHeight,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n x1, x2, x3, x4, x5, x6, y1, y2, y3, y4, y5, y6);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n if(item[1] === PX) {\n return item[0];\n }\n else if(item[1] === PERCENT) {\n return item[0] * w * 0.01;\n }\n else if(item[1] === REM) {\n return item[0] * this.root.computedStyle[FONT_SIZE];\n }\n else if(item[1] === VW) {\n return item[0] * this.root.width * 0.01;\n }\n else if(item[1] === VH) {\n return item[0] * this.root.height * 0.01;\n }\n else {\n return 0;\n }\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n computedStyle[STROKE_DASHARRAY] = currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [STROKE, FILL].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = currentStyle[k];\n computedStyle[k] = v;\n let res = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && (item.k === 'linear' || item.k === 'radial' || item.k === 'conic')) {\n res.push(this.__gradient(renderMode, ctx, x3, y3, x4, y4, item));\n }\n else if(item[3] > 0) {\n res.push(int2rgba(item));\n }\n else {\n res.push('none');\n }\n });\n }\n __cacheStyle[k] = res;\n }\n });\n return res;\n }\n\n __calContent(renderMode, lv, currentStyle, computedStyle) {\n // Geom强制有内容\n return computedStyle[VISIBILITY] !== 'hidden';\n }\n\n __preSet(res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.sx3 + width * 0.5;\n let cy = res.sy3 + height * 0.5;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') {\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint([item[i], item[i + 1]], t);\n arr.push(p[0]);\n arr.push(p[1]);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n let tfo = [cx, cy];\n matrix = transform.calMatrixByOrigin(matrix, tfo);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = this.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getCacheCanvas(w, h, '__$$CONIC_GRADIENT$$__');\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__config[NODE_DEFS_CACHE].push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // geom的cache无内容也不清除\n __releaseWhenEmpty() {}\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n this.__config[NODE_CACHE_PROPS] = this.__cacheProps = {};\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import Xom from '../node/Xom';\nimport Dom from '../node/Dom';\nimport Component from '../node/Component';\nimport util from './util';\nimport inject from './inject';\nimport flatten from './flatten';\nimport $$type from './$$type';\nimport enums from './enums';\n\nconst {\n NODE_KEY: {\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_DOM_PARENT,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_STRUCT,\n },\n} = enums;\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet updateList = [];\nlet removeList = [];\n\nconst KEY_FLAG = {};\n\n/**\n * setState后刷新前先根遍历检查组件开始进行shouldComponentUpdate判断\n */\nfunction check(vd) {\n if(vd instanceof Dom) {\n vd.children.forEach(child => {\n if(child instanceof Dom) {\n check(child);\n }\n // 当组件有setState更新时,从叶子到根链路会标识__hasUpdate,以便节约遍历成本忽略那些没变化的链路\n else if(child instanceof Component && child.__hasUpdate) {\n child.__hasUpdate = false;\n checkCp(child, child.props);\n }\n });\n }\n // 高阶组件会进入此分支,被父组件调用\n else if(vd instanceof Component && vd.__hasUpdate) {\n vd.__hasUpdate = false;\n checkCp(vd, vd.props);\n }\n}\n\n/**\n * 检查cp是否有state变更,注意递归检查时需要看shadow不能看shadowRoot,\n * 否则高阶组件会被跳过,其更新无法触发update生命周期\n * @param cp\n * @param nextProps\n * @param forceCheckUpdate,被render()后的json的二级组件,发现props有变更强制检查更新,否则可以跳过\n */\nfunction checkCp(cp, nextProps, forceCheckUpdate) {\n if(cp.__nextState || forceCheckUpdate) {\n let shouldUpdate;\n if(util.isFunction(cp.shouldComponentUpdate)) {\n shouldUpdate = cp.shouldComponentUpdate(nextProps, cp.__nextState || cp.state);\n }\n else {\n // 没有默认更新\n shouldUpdate = true;\n }\n if(shouldUpdate) {\n updateCp(cp, nextProps, cp.__nextState || cp.state);\n }\n // 不更新则递归检查子tree的cp\n else {\n cp.props = nextProps;\n cp.state = cp.__nextState || cp.state;\n check(cp.shadow);\n }\n }\n else {\n check(cp.shadow);\n }\n}\n\n/**\n * 更新组件的props和state,清空__nextState\n * @param cp\n * @param props\n * @param state\n */\nfunction updateCp(cp, props, state) {\n cp.props = props;\n cp.state = state;\n cp.__nextState = null; // 同步在refresh前清除component的新state标识,这样frame动画在after回调中可以新设\n let oldS = cp.shadow;\n let oldSr = cp.shadowRoot;\n let oldJson = cp.__cd;\n let json = flatten(cp.render());\n // 对比新老render()返回的内容,更新后重新生成sr\n diffSr(oldS, oldJson, json);\n cp.__init(json);\n // 为了局部dom布局需要知道老的css信息\n let sr = cp.shadowRoot;\n if(sr instanceof Xom) {\n [\n '__outerWidth',\n '__outerHeight',\n '__sx',\n '__sy',\n '__sx2',\n '__sx3',\n '__sx4',\n '__sx5',\n '__sx6',\n '__sy2',\n '__sy3',\n '__sy4',\n '__sy5',\n '__sy6',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__computedStyle = sr.__config[NODE_COMPUTED_STYLE] = oldSr.computedStyle;\n }\n else {\n let domParent = cp.domParent;\n [\n NODE_STYLE,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n ].forEach(k => {\n sr.__config[k] = domParent.__config[k];\n });\n }\n [\n '__x',\n '__y',\n '__width',\n '__height',\n '__sx1', // text和xom\n '__sy1',\n '__layoutData',\n '__parent',\n '__domParent',\n ].forEach(k => {\n sr[k] = oldSr[k];\n });\n sr.__config[NODE_DOM_PARENT] = oldSr.domParent;\n sr.__config[NODE_STRUCT] = oldSr.__config[NODE_STRUCT];\n updateList.push(cp);\n // 老的需回收,diff会生成新的dom,唯一列外是cp直接返回一个没变化的cp\n if(!util.isObject(json) || !json.__placeholder) {\n removeList.push(oldS);\n }\n // 子组件使用老的json时标识,更新后删除,render()返回空会没json对象\n if(json && json.__placeholder) {\n delete json.__placeholder;\n }\n if(json && json.__inheritAnimate) {\n delete json.__inheritAnimate;\n }\n if(json && json.__animateRecords) {\n delete json.__animateRecords;\n }\n // 高阶组件时需判断,子组件更新后生成新的sr,父组件的sr/host需要同时更新引用\n let host = cp.host;\n while(host) {\n if(host.shadow === cp) {\n host.__shadowRoot = sr;\n sr.__hostRoot = host;\n cp = host;\n host = host.host;\n }\n else {\n break;\n }\n }\n}\n\n/**\n * 非一级组件sr进行对比,key相同的无需重新生成且继承动画\n * @param vd\n * @param oj oldJson\n * @param nj\n */\nfunction diffSr(vd, oj, nj) {\n // 先遍历检查key相同的,将没有变化的key暂存下来,深度优先,这样叶子节点出现在前面,当key的叶子也有key时,确保叶子先对比\n let ojk = getKeyHash(oj, {}, vd);\n let njk = getKeyHash(nj, {});\n let keyList = [];\n let cpList = [];\n // 先对比key对应的节点,如果新老有一方对不上则落空\n Object.keys(ojk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n if(!n) {\n o.json.key = KEY_FLAG;\n }\n });\n Object.keys(njk).forEach(k => {\n let o = ojk[k];\n let n = njk[k];\n // 有可能老的没有这个key,新key落空\n if(!o) {\n n.json.key = KEY_FLAG;\n return;\n }\n let oj = o.json;\n let nj = n.json;\n let vd = o.vd;\n // 相同class的组件进行对比替换\n if(oj.$$type === TYPE_CP && nj.$$type === TYPE_CP) {\n if(oj.klass === nj.klass) {\n // 对比props和children看是否全等,是则直接替换新json类型为占位符,引用老vd,否则强制更新\n diffCp(oj, nj, vd);\n // 标识对比过了\n oj.key = nj.key = KEY_FLAG;\n // 老的sr里需删除这个vd,因为老sr会回收\n cpList.push(vd);\n }\n }\n // 相同类型的vd进行对比继承动画\n else if(oj.$$type === nj.$$type && oj.tagName === nj.tagName) {\n // 需判断矢量标签mutil是否相等\n if(nj.$$type !== TYPE_GM || oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n oj.key = nj.key = KEY_FLAG;\n // key相同的dom暂存下来\n if(nj.$$type === TYPE_VD) {\n keyList.push({\n vd,\n oj,\n nj,\n });\n }\n }\n });\n // key相同的dom对比children,下面非key逻辑就不做了\n keyList.forEach(item => {\n diffChildren(item.vd, item.oj, item.nj);\n });\n // 整体tree进行对比\n diffChild(vd, oj, nj);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收,这里处理key的\n cpList.forEach(vd => {\n removeCpFromOldTree(vd);\n });\n}\n\n/**\n * 递归检查dom的children,相同的无需重新生成,用PL类型占位符代替直接返回老vd\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChild(vd, oj, nj) {\n if(util.isObject(nj)) {\n if(nj.$$type === TYPE_CP) {\n // key对比过了忽略\n if(nj.key === KEY_FLAG) {\n return;\n }\n // 相同class的组件处理\n if(oj && oj.$$type === nj.$$type && oj.klass === nj.klass) {\n diffCp(oj, nj, vd);\n // 已更新的cp需被老sr删除,因为老sr会回收,而此cp继续存在于新sr中不能回收\n removeCpFromOldTree(vd);\n }\n }\n else if(nj.$$type === TYPE_GM && oj && oj.$$type === TYPE_GM) {\n // $geom的multi必须一致\n if(oj.tagName === nj.tagName && oj.props.multi === nj.props.multi) {\n nj.__inheritAnimate = vd;\n }\n }\n // dom类型递归children\n else if(nj.$$type === TYPE_VD && oj && oj.$$type === TYPE_VD) {\n if(oj.tagName === nj.tagName) {\n nj.__inheritAnimate = vd;\n }\n diffChildren(vd, oj, nj);\n }\n }\n}\n\n/**\n * dom类型的vd对比children\n * @param vd\n * @param oj\n * @param nj\n */\nfunction diffChildren(vd, oj, nj) {\n let oc = oj.children;\n let nc = nj.children;\n let ol = oc.length;\n let nl = nc.length;\n let children = vd.children;\n for(let i = 0, of = 0, nf = 0, len = Math.min(ol, nl); i < len; i++) {\n let o = oc[i + of];\n let n = nc[i + nf];\n // 新老都是key直接跳过\n if(o.key === KEY_FLAG && n.key === KEY_FLAG) {\n }\n // 其中一个是key对比过了调整索引和长度\n else if(o.key === KEY_FLAG) {\n of++;\n i--;\n ol--;\n len = Math.min(ol, nl);\n }\n else if(n.key === KEY_FLAG) {\n nf++;\n i--;\n nl--;\n len = Math.min(ol, nl);\n }\n else {\n diffChild(children[i + of], o, n);\n }\n }\n // 长度不同增减的无需关注,新json创建cp有didMount,老vd会调用cp的destroy\n}\n\n/**\n * 根据json对比看cp如何更新,被render()后的json的二级组件对比才会出现\n * @param oj\n * @param nj\n * @param vd\n */\nfunction diffCp(oj, nj, vd) {\n // props全等,直接替换新json类型为占位符,引用老vd内容,无需重新创建,暂时存在json的placeholder上\n // 否则需要强制触发组件更新,包含setState内容\n nj.__placeholder = vd;\n let sr = vd.shadowRoot;\n // 对比需忽略on开头的事件,直接改老的引用到新的上,这样只变了on的话无需更新\n let exist = {};\n Object.keys(oj.props).forEach(k => {\n let v = oj.props[k];\n exist[k] = v;\n });\n Object.keys(nj.props).forEach(k => {\n let v = nj.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n oj.props[k] = v;\n let ex = exist[k];\n if(ex) {\n delete exist[k];\n if(ex !== v) {\n k = k.slice(2).toLowerCase();\n vd.off(k, exist[k]);\n vd.on(k, v);\n }\n delete exist[k];\n }\n else {\n k = k.slice(2).toLowerCase();\n vd.on(k, v);\n }\n }\n });\n // 新的少的事件取消\n Object.keys(exist).forEach(k => {\n let v = exist[k];\n if(/^on[a-zA-Z]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n delete sr.listener[k];\n }\n else if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n nj.props[k] = v;\n k = k.slice(2).toLowerCase();\n vd.off(k, v);\n }\n });\n checkCp(vd, nj.props, !util.equal(oj.props, nj.props));\n}\n\n/**\n * 深度优先遍历json,将有key的记录在hash中,如果传入根vd,同步递归保存对应位置的vd\n * @param json\n * @param hash\n * @param vd\n * @returns {*}\n */\nfunction getKeyHash(json, hash, vd) {\n if(Array.isArray(json)) {\n json.forEach((item, i) => getKeyHash(item, hash, vd && vd[i]));\n }\n else if(util.isObject(json)) {\n if(json.$$type === TYPE_VD || json.$$type === TYPE_GM || json.$$type === TYPE_CP) {\n // 深度优先\n if(json.$$type === TYPE_VD) {\n getKeyHash(json.children, hash, vd && vd.children);\n }\n let key = json.props.key;\n if(!util.isNil(key) && key !== '') {\n // 重复key错误警告\n if(hash.hasOwnProperty(key)) {\n inject.warn('Component ' + vd.tagName + ' has duplicate key: ' + key);\n }\n hash[key] = {\n json,\n vd,\n };\n }\n }\n }\n return hash;\n}\n\n/**\n * 非一级组件diff发生更新时,其需要从sr的tree中移除,因为sr会销毁\n */\nfunction removeCpFromOldTree(vd) {\n // root下的一级组件不会发生回收情况,忽略\n if(!vd.host) {\n return;\n }\n let parent = vd.parent;\n if(parent) {\n let i = parent.children.indexOf(vd);\n if(i > -1) {\n parent.children[i] = null;\n }\n else {\n throw new Error('Can not find child: ' + vd.tagName);\n }\n }\n}\n\n/**\n * 执行componentDidUpdate/destroy\n */\nfunction did() {\n updateList.forEach(item => {\n if(util.isFunction(item.componentDidUpdate)) {\n item.componentDidUpdate();\n }\n });\n updateList.splice(0);\n removeList.forEach(item => {\n item.__destroy();\n });\n removeList = [];\n}\n\nexport default {\n updateList,\n check,\n did,\n};\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { contain, NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n // if(ovd.filter !== filter) {\n // if(filter) {\n // elem.setAttribute('filter', filter);\n // }\n // else {\n // elem.removeAttribute('filter');\n // }\n // }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv === NONE) {\n return;\n }\n if(contain(lv, TRANSFORM_ALL)) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(contain(lv, OPACITY)) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(contain(lv, FILTER) || contain(lv, MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import util from '../util/util';\n\nconst { isFunction } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.list.indexOf(v);\n if(i > -1) {\n this.list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate } = item;\n if(target.isDestroyed) {\n return;\n }\n if(Array.isArray(animate)) {\n animate.forEach(animate => {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n }\n else {\n let { value, options } = animate;\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n }\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n item.off(arr[0], arr[1]);\n item.on(arr[0], arr[1]);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import Page from '../refresh/Page';\nimport inject from '../util/inject';\n\nclass MockPage {\n constructor(texture, width, height) {\n this.uuid = Page.genUuid();\n this.time = inject.now();\n this.texture = texture;\n this.width = width;\n this.height = height;\n }\n}\n\nexport default MockPage;\n","import MockPage from './MockPage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass MockCache {\n constructor(gl, texture, sx1, sy1, width, height, bbox) {\n this.gl = gl;\n this.x = 0;\n this.y = 0;\n this.sx1 = sx1;\n this.sy1 = sy1;\n this.width = width;\n this.height = height;\n this.bbox = bbox;\n this.available = true;\n this.__page = new MockPage(texture, width, height);\n this.dx = -bbox[0];\n this.dy = -bbox[1];\n this.dbx = sx1 - bbox[0];\n this.dby = sy1 - bbox[1];\n }\n\n release() {\n this.available = false;\n this.gl.deleteTexture(this.page.texture);\n }\n\n get page() {\n return this.__page;\n }\n}\n\nexport default MockCache;\n","import Geom from '../node/geom/Geom';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Cache from './Cache';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport MockCache from '../gl/MockCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport mode from '../node/mode';\n\nconst { canvasPolygon } = painter;\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n },\n NODE_KEY: {\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_CACHE_FILTER,\n NODE_MATRIX,\n NODE_MATRIX_EVENT,\n NODE_OPACITY,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_STYLE,\n NODE_LIMIT_CACHE,\n NODE_REFRESH_LV,\n NODE_CACHE_STYLE,\n NODE_DEFS_CACHE,\n NODE_IS_MASK,\n NODE_DOM_PARENT,\n NODE_PERSPECTIVE_MATRIX,\n NODE_VIRTUAL_DOM,\n },\n STRUCT_KEY: {\n STRUCT_NODE,\n STRUCT_TOTAL,\n STRUCT_HAS_MASK,\n STRUCT_LV,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n contain,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n} = level;\nconst { isE, inverse, multiply } = mx;\nconst { mbmName, isValidMbm } = mbm;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\n// 依次从list获取首个available可用的cache\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * @param node\n * @param __structs\n * @param index\n * @param total\n * @param parentIndexHash\n * @param opacityHash\n * @param MAX\n * @param includeLimitCache webgl时即便超限也要强制生成total,所以标识不能跳出\n * @returns {*}\n */\nfunction genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, MAX, includeLimitCache) {\n let { __sx1: sx1, __sy1: sy1, __config } = node;\n let {\n [NODE_CACHE]: cache,\n [NODE_COMPUTED_STYLE]: {\n [FILTER]: filter,\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n },\n } = __config;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(cache && cache.available) {\n bboxTotal = cache.bbox.slice(0);\n }\n else {\n bboxTotal = node.bbox;\n }\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n let pm;\n if(perspective) {\n pm = tf.calPerspectiveMatrix(perspective, perspectiveOrigin);\n }\n // 广度遍历,不断一层层循环下去,用2个hash暂存每层的父matrix和opacity,blur只需记住顶层,因为子的如果有一定是cacheFilter\n let list = [index];\n let d = 0;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur') {\n d = blur.outerSize(v);\n }\n });\n opacityHash[index] = 1;\n // opacity可以保存下来层级相乘结果供外部使用,但matrix不可以,因为这里按画布原点为坐标系计算,外部合并局部根节点以bbox左上角为原点\n let matrixHash = {};\n while(list.length) {\n let arr = list.splice(0);\n for(let i = 0, len = arr.length; i < len; i++) {\n let parentIndex = arr[i];\n let total = __structs[parentIndex][STRUCT_TOTAL] || 0;\n for(let i = parentIndex + 1, len = parentIndex + total + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node2,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n // mask也不占bbox位置\n if(node2.isMask) {\n continue;\n }\n let {\n __sx1,\n __sy1,\n __config: {\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [OPACITY]: opacity,\n },\n },\n } = node2;\n // webgl不能跳过超限\n if(limitCache && !includeLimitCache) {\n return;\n }\n // display:none跳过整个节点树,visibility只跳过自身\n if(display === 'none') {\n i += total || 0;\n continue;\n }\n if(visibility === 'hidden') {\n continue;\n }\n parentIndexHash[i] = parentIndex;\n opacityHash[i] = opacityHash[parentIndex] * opacity;\n // 防止text的情况,其一定属于某个node,其bbox被计算过,text不应该计算\n if(node2 instanceof Text) {\n continue;\n }\n let bbox, dx = 0, dy = 0, hasTotal;\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n if(target) {\n bbox = target.bbox.slice(0);\n dx = target.dbx;\n dy = target.dby;\n i += total || 0;\n hasTotal = true;\n }\n else if(__cache && __cache.available) {\n bbox = __cache.bbox.slice(0);\n dx = __cache.dbx;\n dy = __cache.dby;\n }\n else {\n bbox = node2.bbox;\n }\n // 可能Xom没有内容\n if(bbox) {\n bbox[0] -= sx1;\n bbox[1] -= sy1;\n bbox[2] -= sx1;\n bbox[3] -= sy1;\n let matrix = matrixHash[parentIndex];\n // 父级matrix初始化E为null,自身不为E时才运算,可以加速\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n tfo[0] += __sx1 - sx1 + dx;\n tfo[1] += __sy1 - sy1 + dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(pm) {\n matrix = multiply(pm, matrix);\n }\n bbox = util.transformBbox(bbox, matrix, d, d);\n // 有孩子才继续存入下层级广度运算\n if(total && !hasTotal) {\n list.push(i);\n }\n mergeBbox(bboxTotal, bbox, sx1, sy1);\n }\n }\n }\n }\n return [bboxTotal, pm];\n}\n\nfunction mergeBbox(bbox, t, sx1, sy1) {\n bbox[0] = Math.min(bbox[0], sx1 + t[0]);\n bbox[1] = Math.min(bbox[1], sy1 + t[1]);\n bbox[2] = Math.max(bbox[2], sx1 + t[2]);\n bbox[3] = Math.max(bbox[3], sy1 + t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,当超限时返回空\n * @param renderMode\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cacheTop\n * @param cache\n * @returns {{enabled}|Cache|*}\n */\nfunction genTotal(renderMode, node, __config, index, total, __structs, cacheTop, cache) {\n if(total === 0) {\n return cache;\n }\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash, Cache.MAX);\n if(!bboxTotal) {\n return;\n }\n let { __sx1: sx1, __sy1: sy1 } = node;\n if(cacheTop) {\n cacheTop.reset(bboxTotal, sx1, sy1);\n }\n else {\n cacheTop = Cache.getInstance(bboxTotal, sx1, sy1);\n }\n // 创建失败,再次降级\n if(!cacheTop || !cacheTop.enabled) {\n return;\n }\n cacheTop.__available = true;\n let { x: tx, y: ty, ctx, dbx, dby } = cacheTop;\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n Cache.drawCache(cache, cacheTop);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n ctx.globalAlpha = opacity;\n let m = matrix || mx.identity();\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, 0, ctx, true, tx - sx1 + dbx, ty - sy1 + dby);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx + tx;\n let dy = -sy1 + dby + ty;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n ctx.globalAlpha = opacity;\n if(matrix) {\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n else {\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n }\n Cache.drawCache(target, cacheTop);\n if(target !== __cache) {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n }\n }\n return cacheTop;\n}\n\nfunction genFilter(node, cache, v) {\n return Cache.genFilter(cache, v);\n}\n\nfunction genMask(node, cache) {\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: transformOrigin } = node.computedStyle;\n let isClip = node.next.isClip;\n return Cache.genMask(cache, node.next, isClip, transform, transformOrigin);\n}\n\nfunction genOverflow(node, cache) {\n let sbox = node.bbox;\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n return Cache.genOverflow(cache, node);\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texCache, width, height) {\n let n = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, null, n, width, height);\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n if(check !== gl.FRAMEBUFFER_COMPLETE) {\n inject.error('Framebuffer object is incomplete: ' + check.toString());\n }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n gl.clearColor(0, 0, 0, 0);\n gl.clear(gl.COLOR_BUFFER_BIT);\n return [n, frameBuffer, texture];\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * @param gl\n * @param texCache\n * @param node\n * @param __config\n * @param index\n * @param total\n * @param __structs\n * @param cache\n * @param limitCache\n * @param W\n * @param H\n * @returns {*}\n */\nfunction genTotalWebgl(gl, texCache, node, __config, index, total, __structs, cache, limitCache, W, H) {\n // 存每层父亲的matrix和opacity和index,bbox计算过程中生成,缓存给下面渲染过程用\n let parentIndexHash = {};\n let opacityHash = {};\n let [bboxTotal, parentPm] = genBboxTotal(node, __structs, index, total, parentIndexHash, opacityHash,\n gl.getParameter(gl.MAX_TEXTURE_SIZE), limitCache);\n // 可能局部根节点合成过程中发现整体超限\n let totalLimitCache;\n if(!bboxTotal) {\n totalLimitCache = true;\n }\n // 超限情况生成画布大小的特殊纹理\n if(limitCache || totalLimitCache) {\n bboxTotal = [0, 0, W, H];\n }\n let width = bboxTotal[2] - bboxTotal[0];\n let height = bboxTotal[3] - bboxTotal[1];\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 以bboxTotal的左上角为原点生成离屏texture\n let { __sx1: sx1, __sy1: sy1 } = node;\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bboxTotal[0], dy = -bboxTotal[1];\n let dbx = sx1 - bboxTotal[0], dby = sy1 - bboxTotal[1];\n // 先绘制自己的cache,起点所以matrix视作E为空,opacity固定1\n if(cache && cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, cache, 1, null, cx, cy, dx, dy);\n }\n // limitCache无cache需先绘制到统一的离屏画布上\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(mode.WEBGL, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, 1, null, cx, cy, 0, 0);\n texCache.refresh(gl, cx, cy);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n // 因为cacheTotal不总是以左上角原点为开始,所以必须每个节点重算matrix,合并box时计算的无法用到\n let matrixHash = {};\n // 先序遍历汇总到total\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n let parentIndex = parentIndexHash[i];\n let matrix = matrixHash[parentIndex]; // 父节点的在每个节点计算后保存,第一个为top的默认为E(空)\n let opacity = opacityHash[i]; // opacity在合并box时已经计算可以直接用\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n texCache.addTexAndDrawWhenLimit(gl, __config[NODE_CACHE], opacity, matrix, cx, cy, dx, dy);\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_IS_MASK]: isMask,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n continue;\n }\n // mask和不可见不能被汇总到top上\n if(visibility === 'hidden' || isMask) {\n continue;\n }\n if(transform && !isE(transform)) {\n let tfo = transformOrigin.slice(0);\n // total下的节点tfo的计算,以total为原点,差值坐标即相对坐标\n if(__cache && __cache.available) {\n tfo[0] += __cache.sx1;\n tfo[1] += __cache.sy1;\n }\n else {\n tfo[0] += node.__sx1;\n tfo[1] += node.__sy1;\n }\n let dx = -sx1 + dbx;\n let dy = -sy1 + dby;\n tfo[0] += dx;\n tfo[1] += dy;\n let m = tf.calMatrixByOrigin(transform, tfo);\n if(matrix) {\n matrix = multiply(matrix, m);\n }\n else {\n matrix = m;\n }\n }\n if(matrix) {\n matrixHash[i] = matrix;\n }\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n if(target) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n texCache.refresh(gl, cx, cy);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前fbo作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrix, cx, cy, dx, dy);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n texCache.refresh(gl, cx, cy);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 生成的纹理对象本身已绑定一个纹理单元了,释放lock的同时可以给texCache的channel缓存,避免重复上传\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bboxTotal);\n texCache.releaseLockChannel(n, mockCache.page);\n return [limitCache || totalLimitCache, mockCache];\n}\n\nfunction genFilterWebgl(gl, texCache, node, cache, filter, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n let mockCache = cache;\n filter.forEach(item => {\n let [k, v] = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(gl, texCache, mockCache, v, width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'hue-rotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount;\n let res = genColorMatrixWebgl(gl, texCache, mockCache, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, sx1, sy1, bbox);\n if(res) {\n [mockCache, width, height, bbox] = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return mockCache;\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(gl, texCache, cache, sigma, width, height, sx1, sy1, bbox) {\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n width += spread * 2;\n height += spread * 2;\n // 防止超限,webgl最大纹理尺寸限制\n let limit = gl.getParameter(gl.MAX_TEXTURE_SIZE);\n if(width > limit || height > limit) {\n return;\n }\n bbox = bbox.slice(0);\n bbox[0] -= spread;\n bbox[1] -= spread;\n bbox[2] += spread;\n bbox[3] += spread;\n let cx = width * 0.5, cy = height * 0.5;\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `\\nv_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `\\nv_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `\\nv_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `\\ngl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n let program = webgl.initShaders(gl, vert, frag);\n gl.useProgram(program);\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n texture = webgl.drawBlur(gl, program, frameBuffer, texCache, texture, cache.page.texture, i, j,\n width, height, cx, cy, spread, d, sigma);\n // 销毁这个临时program\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n texCache.releaseLockChannel(j);\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genColorMatrixWebgl(gl, texCache, cache, m, width, height, sx1, sy1, bbox) {\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n gl.useProgram(gl.programCm);\n webgl.drawCm(gl, gl.programCm, j, m);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let mockCache = new MockCache(gl, texture, sx1, sy1, width, height, bbox.slice(0));\n texCache.releaseLockChannel(i, mockCache.page);\n return [mockCache, width, height, bbox];\n}\n\nfunction genOverflowWebgl(gl, texCache, node, cache, W, H) {\n let sbox = node.bbox.slice(0);\n let bbox = cache.bbox;\n // 没超过无需生成\n if(bbox[0] >= sbox[0] && bbox[1] >= sbox[1] && bbox[2] <= sbox[2] && bbox[3] <= sbox[3]) {\n return;\n }\n let width = sbox[2] - sbox[0], height = sbox[3] - sbox[1];\n // 生成最终纹理,尺寸为被遮罩节点大小\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 绘制,根据坐标裁剪使用原本纹理的一部分\n gl.useProgram(gl.programOverflow);\n webgl.drawOverflow(gl, j, sbox[0] - bbox[0], sbox[1] - bbox[1], width, height, cache.width, cache.height);\n texCache.releaseLockChannel(j);\n // 切回\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer);\n // 同total一样生成一个mockCache\n let overflowCache = new MockCache(gl, texture, cache.sx1, cache.sy1, width, height, sbox);\n texCache.releaseLockChannel(i, overflowCache.page);\n return overflowCache;\n}\n\nfunction genMaskWebgl(gl, texCache, node, __config, cache, W, H) {\n let { sx1, sy1, width, height, bbox } = cache;\n // cache一定是mockCache,可能是total/filter/overflow一种\n let cx = width * 0.5, cy = height * 0.5;\n let dx = -bbox[0], dy = -bbox[1];\n // 先求得被遮罩的matrix,用作inverse给mask计算\n let {\n [NODE_COMPUTED_STYLE]: {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += sx1 + dx;\n tfo[1] += sy1 + dx;\n inverse = tf.calMatrixByOrigin(transform, tfo);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩total相同,才能做到顶点坐标一致\n let [i, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n let next = node.next;\n while(next && next.isMask) {\n let __config = next.__config;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OPACITY]: opacity,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: transformOrigin,\n },\n } = __config;\n if(display === 'none' || visibility === 'hidden') {\n continue;\n }\n // total无用,都是单节点\n let target = getCache([__cacheFilter, __cacheOverflow, __cache]);\n if(target) {\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n let tfo = transformOrigin.slice(0);\n tfo[0] += target.bbox[0] + dx;\n tfo[1] += target.bbox[1] + dy;\n m = tf.calMatrixByOrigin(transform, tfo);\n }\n m = mx.multiply(inverse, m);\n // m = mx.m2Mat4(m, cx, cy);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, m, cx, cy, dx, dy);\n }\n // 异常情况超限\n else if(__config[NODE_LIMIT_CACHE]) {\n return;\n }\n next = next.next;\n }\n texCache.refresh(gl, cx, cy);\n gl.deleteFramebuffer(frameBuffer);\n // 将本身total的page纹理放入一个单元,一般刚生成已经在了,少部分情况mask变更引发的可能不在\n let j = texCache.findExistTexChannel(cache.page);\n if(j === -1) {\n // 直接绑定,因为一定是个mockCache\n j = texCache.lockOneChannel();\n webgl.bindTexture(gl, cache.page.texture, j);\n }\n else {\n texCache.lockChannel(j);\n }\n // 生成最终纹理,汇总total和maskCache\n let [n, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n let isClip = node.next.isClip;\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n gl.useProgram(program);\n webgl.drawMask(gl, i, j, program);\n gl.deleteTexture(texture);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.viewport(0, 0, W, H);\n gl.deleteFramebuffer(frameBuffer2);\n // 同total一样生成一个mockCache\n let maskCache = new MockCache(gl, texture2, sx1, sy1, width, height, bbox);\n texCache.releaseLockChannel(n, maskCache.page);\n return maskCache;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,将A和待混合节点进行对应的mbm模式混合,结果绘制到B中,然后返回B来替换A,包括纹理单元\n * @param gl\n * @param texCache\n * @param i 之前已有的fbo和纹理单元\n * @param j 当前节点绘制的fbo和纹理单元\n * @param mbm\n * @param fbo 之前舞台绑定的fbo和纹理\n * @param tex\n * @param W\n * @param H\n * @returns {number|*}\n */\nfunction genMbmWebgl(gl, texCache, i, j, fbo, tex, mbm, W, H) {\n let frag;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n frag = fragmentMultiply;\n }\n else if(mbm === 'screen') {\n frag = fragmentScreen;\n }\n else if(mbm === 'overlay') {\n frag = fragmentOverlay;\n }\n else if(mbm === 'darken') {\n frag = fragmentDarken;\n }\n else if(mbm === 'lighten') {\n frag = fragmentLighten;\n }\n else if(mbm === 'color-dodge') {\n frag = fragmentColorDodge;\n }\n else if(mbm === 'color-burn') {\n frag = fragmentColorBurn;\n }\n else if(mbm === 'hard-light') {\n frag = fragmentHardLight;\n }\n else if(mbm === 'soft-light') {\n frag = fragmentSoftLight;\n }\n else if(mbm === 'difference') {\n frag = fragmentDifference;\n }\n else if(mbm === 'exclusion') {\n frag = fragmentExclusion;\n }\n else if(mbm === 'hue') {\n frag = fragmentHue;\n }\n else if(mbm === 'saturation') {\n frag = fragmentSaturation;\n }\n else if(mbm === 'color') {\n frag = fragmentColor;\n }\n else if(mbm === 'luminosity') {\n frag = fragmentLuminosity;\n }\n let program = webgl.initShaders(gl, vertexMbm, frag);\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, W, H);\n webgl.drawMbm(gl, program, i, j, W, H);\n // 切换回主程序并销毁这个临时program\n gl.useProgram(gl.program);\n gl.deleteShader(program.vertexShader);\n gl.deleteShader(program.fragmentShader);\n gl.deleteProgram(program);\n gl.deleteFramebuffer(fbo);\n gl.deleteTexture(tex);\n texCache.releaseLockChannel(i);\n texCache.releaseLockChannel(j);\n return [n, frameBuffer, texture];\n}\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a[1] === b[1]) {\n if(a[0] === b[0]) {\n return a[2] - b[2];\n }\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n list.forEach(item => {\n let [, , type, offscreen] = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getCacheCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n apply.ctx.filter = 'none';\n apply.draw();\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n target.draw();\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.draw();\n inject.releaseCacheCanvas(apply.canvas);\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip } = offscreen;\n if(isClip) {\n offscreen.target.draw();\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(offscreen.target.canvas, 0, 0, width, height, 0, 0, width, height);\n mask.draw();\n ctx.globalCompositeOperation = 'source-over';\n offscreen.target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n offscreen.target.ctx.clearRect(0, 0, width, height);\n offscreen.target.draw();\n inject.releaseCacheCanvas(offscreen.target.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n }\n else {\n mask.draw();\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n target.draw();\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.draw();\n inject.releaseCacheCanvas(mask.canvas);\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.draw && ctx.draw(true);\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n target.draw();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n ctx.globalCompositeOperation = 'source-over';\n ctx.draw && ctx.draw(true);\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.draw();\n inject.releaseCacheCanvas(target.canvas);\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nfunction renderCacheCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在 lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // 父不为E时要点乘继承父的\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制limitCache\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n node.render(renderMode, refreshLevel, ctx, true);\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n } = computedStyle;\n if(!limitCache && (hasMask || position === 'absolute'\n || filter.length || (overflow === 'hidden' && total) || isValidMbm(mixBlendMode))) {\n if(hasRecordAsMask) {\n hasRecordAsMask[6] = filter;\n hasRecordAsMask[7] = overflow;\n }\n else {\n mergeList.push([i, lv, total, node, __config, hasMask, filter, overflow]);\n }\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n __cacheTotal = genTotal(renderMode, node, __config, i, total || 0, __structs, __cacheTotal, __cache);\n if(__cacheTotal && __cacheTotal !== __cache) {\n __config[NODE_CACHE_TOTAL] = __cacheTotal;\n }\n needGen = true;\n }\n // 防止失败超限,必须有total结果\n if(__cacheTotal && __cacheTotal.available) {\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n __config[NODE_CACHE_OVERFLOW] = genOverflow(node, target);\n needGen = true;\n }\n target = __config[NODE_CACHE_OVERFLOW] || target;\n }\n if(filter && filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n __config[NODE_CACHE_FILTER] = genFilter(node, target, filter);\n needGen = true;\n }\n target = __config[NODE_CACHE_FILTER] || target;\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n __config[NODE_CACHE_MASK] = genMask(node, target);\n }\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 超尺寸的依旧要走无cache逻辑render,这部分和无cache渲染很像\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config[NODE_DOM_PARENT].__config;\n ctx.globalAlpha = opacity;\n ctx.setTransform(matrixEvent[0], matrixEvent[1], matrixEvent[4], matrixEvent[5], matrixEvent[12], matrixEvent[13]);\n node.render(renderMode, 0, ctx);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n // 有total的可以直接绘制并跳过子节点索引\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal]);\n // total的尝试\n if(target) {\n i += (total || 0) + (hasMask || 0);\n // total的none直接跳过\n if(display === 'none') {\n continue;\n }\n if(isValidMbm(mixBlendMode)) {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n Cache.draw(ctx, opacity, matrixEvent, target);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n // 自身cache尝试\n else {\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n // 这里比较特殊,可能会有__cache但超限没被汇聚到total上,需mock出离屏对象数据,还有可能本身就超限\n if(__cache && __cache.available || limitCache) {\n if(__cache && __cache.available) {\n // 有cache但没生成total的都在这\n if(isValidMbm(mixBlendMode)) {\n let c = inject.getCacheCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode: mbmName(mixBlendMode),\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(hasMask) {\n let c = inject.getCacheCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getCacheCanvas(width, height, null, 'filter1');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n matrix: matrixEvent,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getCacheCanvas(width, height, null, 'overflow');\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: matrixEvent,\n x: __cache.sx1,\n y: __cache.sy1,\n offsetWidth: node.offsetWidth,\n offsetHeight: node.offsetHeight,\n };\n ctx = c.ctx;\n }\n if(visibility !== 'hidden') {\n Cache.draw(ctx, opacity, matrixEvent, __cache);\n }\n }\n else {\n // 连cache都没生成的超限\n let res = node.render(renderMode, refreshLevel, ctx) || {};\n offscreenBlend = res.offscreenBlend;\n offscreenMask = res.offscreenMask;\n offscreenFilter = res.offscreenFilter;\n offscreenOverflow = res.offscreenOverflow;\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n if(limitCache && node instanceof Geom) {\n node.render(renderMode, refreshLevel, ctx);\n }\n }\n // 没内容的遮罩跳过,比如未加载的img,否则会将遮罩绘制出来\n else if(hasMask) {\n i += (total || 0) + hasMask;\n }\n // 同无cache一样的离屏应用\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n }\n }\n}\n\n/**\n * 无缓存模式canvas渲染,O(n)一次循环完成\n * @param renderMode\n * @param ctx\n * @param root\n */\nfunction renderCanvas(renderMode, ctx, root) {\n let { __structs, width, height } = root;\n /**\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性,\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n */\n let maskStartHash = {};\n let offscreenHash = {};\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_LV]: lv,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_REFRESH_LV]: refreshLevel,\n } = node.__config;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n if(maskStartHash.hasOwnProperty(i)) {\n let [idx, n, offscreenMask] = maskStartHash[i];\n let target = inject.getCacheCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.isClip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--n) {\n let { [STRUCT_TOTAL]: total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([idx, lv, OFFSCREEN_MASK, offscreenMask]);\n list.push([j, lv, OFFSCREEN_MASK2, {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }]);\n ctx = target.ctx;\n }\n let res = node.render(renderMode, refreshLevel, ctx);\n let { offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow } = res || {};\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_BLEND, offscreenBlend]);\n ctx = offscreenBlend.target.ctx;\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = [i, hasMask, offscreenMask];\n ctx = offscreenMask.target.ctx;\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_FILTER, offscreenFilter]);\n ctx = offscreenFilter.target.ctx;\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0) + (hasMask || 0);\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push([i, lv, OFFSCREEN_OVERFLOW, offscreenOverflow]);\n ctx = offscreenOverflow.target.ctx;\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n // render后判断可见状态,此时computedStyle才有值,以及svg的virtualDom也要生成\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0) + (hasMask || 0);\n }\n }\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = {};\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let {\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n } = node.__config;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n if(maskEffectHash.hasOwnProperty(i)) {\n let v = maskEffectHash[i];\n if(!contain(refreshLevel, TRANSFORM_ALL) && v < REPAINT && !contain(v, TRANSFORM_ALL)) {\n defsCache.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = {};\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastConfig;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n [STRUCT_LV]: lv,\n } = __structs[i];\n let __config = node.__config;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_DEFS_CACHE]: defsCache,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start][STRUCT_NODE].isClip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(lastConfig[NODE_MATRIX]);\n let vd = lastConfig[NODE_VIRTUAL_DOM];\n vdList.push(vd);\n parentVd = vd;\n }\n lastConfig = __config;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(refreshLevel < REPAINT && !(node instanceof Text)) {\n __config[NODE_REFRESH_LV] = NONE;\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = __config[NODE_VIRTUAL_DOM] = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n } = __config;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n let matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n m = __config[NODE_MATRIX_EVENT];\n util.assignMatrix(m, matrix);\n }\n if(contain(refreshLevel, OP)) {\n let opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(contain(refreshLevel, FT)) {\n let filter = node.__calFilter(currentStyle, computedStyle);\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(contain(refreshLevel, MBM)) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n if(isValidMbm(mixBlendMode)) {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n __config[NODE_DEFS_CACHE] && __config[NODE_DEFS_CACHE].splice(0);\n node.render(renderMode, refreshLevel, ctx);\n virtualDom = __config[NODE_VIRTUAL_DOM];\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n if(maskHash.hasOwnProperty(i) && (maskEffectHash.hasOwnProperty(i) || refreshLevel >= REPAINT || contain(refreshLevel, TRANSFORM_ALL | OP))) {\n let { index, start, end, isClip } = maskHash[i];\n let target = __structs[index];\n let dom = target[STRUCT_NODE];\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j][STRUCT_NODE];\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = defsCache.length - 1; i >= 0; i--) {\n let item = defsCache[i];\n if(item.tagName === 'mask') {\n defsCache.splice(i, 1);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n defsCache.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.isMask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = __config[NODE_MATRIX];\n parentVd = virtualDom;\n }\n lastLv = lv;\n }\n}\n\nfunction renderWebgl(renderMode, gl, root) {\n let { __structs, width, height, texCache } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let pmList = [];\n let parentPm;\n let lastRefreshLevel;\n let lastConfig;\n let lastLv = 0;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT) {\n node.render(renderMode, 0, gl, true);\n }\n continue;\n }\n let __config = node.__config;\n let refreshLevel = __config[NODE_REFRESH_LV];\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点是第一个特殊处理\n if(i === 0) {}\n else if(lv > lastLv) {\n parentMatrix = lastConfig[NODE_MATRIX_EVENT];\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastConfig[NODE_OPACITY];\n opacityList.push(parentOpacity);\n parentPm = lastConfig[NODE_PERSPECTIVE_MATRIX];\n if(isE(parentPm)) {\n parentPm = null;\n }\n pmList.push(parentPm);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n pmList.splice(-diff);\n parentPm = pmList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理\n else {}\n lastRefreshLevel = refreshLevel;\n lastConfig = __config;\n lastLv = lv;\n let {\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_COMPUTED_STYLE]: computedStyle,\n } = __config;\n // 跳过display:none元素和它的所有子节点\n if(computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n // 只跳过自身不能跳过后面的mask,mask要渲染自身并进行缓存cache,以备对象切换display用\n continue;\n }\n let hasRecordAsMask;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(refreshLevel < REPAINT) {\n __config[NODE_REFRESH_LV] = NONE;\n if(hasMask) {\n let cacheMask = __config[NODE_CACHE_MASK];\n if(!cacheMask || !cacheMask.available) {\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask];\n mergeList.push(hasRecordAsMask);\n }\n }\n let {\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_MATRIX_EVENT]: matrixEvent,\n } = __config;\n if(contain(refreshLevel, PPT)) {\n node.__calPerspective(__cacheStyle, currentStyle, computedStyle, __config);\n }\n // transform变化,父元素的perspective变化也会在Root特殊处理重新计算\n let matrix;\n if(contain(refreshLevel, TRANSFORM_ALL)) {\n matrix = node.__calMatrix(refreshLevel, __cacheStyle, currentStyle, computedStyle, __config);\n // 恶心的v8性能优化\n let m = __config[NODE_MATRIX];\n util.assignMatrix(m, matrix);\n }\n else {\n matrix = __config[NODE_MATRIX];\n }\n // node本身有或者父有perspective都认为需要生成3d渲染上下文\n if(tf.isPerspectiveMatrix(matrix) || parentPm) {\n if(hasRecordAsMask) {\n hasRecordAsMask[9] = true;\n }\n else {\n hasRecordAsMask = [i, lv, total, node, __config, null, null, null, null, true];\n }\n }\n // 先左乘perspective的矩阵,再左乘父级的总矩阵\n if(parentPm) {\n matrix = multiply(parentPm, matrix);\n }\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n // 恶心的v8性能优化\n util.assignMatrix(matrixEvent, matrix);\n let opacity;\n if(contain(refreshLevel, OP)) {\n opacity = computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n else {\n opacity = computedStyle[OPACITY];\n }\n __config[NODE_OPACITY] = parentOpacity * opacity;\n // filter会改变bbox范围\n if(contain(refreshLevel, FT)) {\n node.__bbox = null;\n let filter = node.__calFilter(currentStyle, computedStyle);\n let __cacheFilter = __config[NODE_CACHE_FILTER];\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n // 防重\n if(hasRecordAsMask) {\n hasRecordAsMask[7] = filter;\n }\n else {\n // 强制存hasMask,因为filter改变影响mask\n hasRecordAsMask = [i, lv, total, node, __config, null, hasMask, filter];\n mergeList.push(hasRecordAsMask);\n }\n }\n if(contain(refreshLevel, MBM)) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n continue;\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let res = node.render(renderMode, refreshLevel, gl, true);\n // geom可返回texture纹理,替代原有xom的__cache纹理\n if(res && inject.isWebGLTexture(res.texture)) {\n let { __sx1: sx1, __sy1: sy1, offsetWidth: w, offsetHeight: h, bbox } = node;\n __config[NODE_CACHE] = new MockCache(gl, res.texture, sx1, sy1, w, h, bbox);\n gl.viewport(0, 0, width, height);\n gl.useProgram(gl.program);\n }\n }\n // 每个元素检查cacheTotal生成,已有的上面会continue跳过\n let {\n [NODE_LIMIT_CACHE]: limitCache,\n } = __config;\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [TRANSFORM]: transform,\n } = computedStyle;\n let validMbm = isValidMbm(mixBlendMode);\n // 3d渲染上下文\n let isPerspective = tf.isPerspectiveMatrix(transform) || parentPm;\n if(hasMask || filter.length || (overflow === 'hidden' && total) || validMbm || isPerspective) {\n if(validMbm) {\n hasMbm = true;\n }\n if(hasRecordAsMask) {\n hasRecordAsMask[5] = limitCache;\n hasRecordAsMask[7] = filter;\n hasRecordAsMask[8] = overflow;\n hasRecordAsMask[9] = isPerspective;\n }\n else {\n mergeList.push([i, lv, total, node, __config, limitCache, hasMask, filter, overflow, isPerspective]);\n }\n }\n }\n let limitHash = {};\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a[1] === b[1]) {\n return b[0] - a[0];\n }\n return b[1] - a[1];\n });\n mergeList.forEach(item => {\n let [i, , total, node, __config, limitCache, hasMask, filter, overflow] = item;\n let {\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n } = __config;\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let [limit, res] = genTotalWebgl(gl, texCache, node, __config, i, total || 0, __structs, __cache, limitCache, width, height);\n __cacheTotal = res;\n needGen = true;\n limitCache = limit;\n // 返回的limit包含各种情况超限,一旦超限,只能生成临时cacheTotal不能保存\n if(!limitCache) {\n __config[NODE_CACHE_TOTAL] = res;\n }\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(overflow === 'hidden') {\n if(!__cacheOverflow || !__cacheOverflow.available || needGen) {\n target = genOverflowWebgl(gl, texCache, node, target, width, height);\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let old = target;\n target = genFilterWebgl(gl, texCache, node, target, filter, width, height);\n if(target !== old) {\n needGen = true;\n if(!limitCache) {\n __config[NODE_CACHE_FILTER] = target;\n }\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = genMaskWebgl(gl, texCache, node, __config, target, width, height);\n if(!limitCache) {\n __config[NODE_CACHE_MASK] = target;\n }\n }\n // 保存临时的局部根节点\n if(limitCache) {\n limitHash[i] = target;\n }\n });\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的要走无cache逻辑render,和canvas很像,除了离屏canvas超限,汇总total也会纹理超限\n */\n let n, frameBuffer, texture;\n if(hasMbm) {\n [n, frameBuffer, texture] = genFrameBufferWithTexture(gl, texCache, width, height);\n }\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n [STRUCT_HAS_MASK]: hasMask,\n } = __structs[i];\n let __config = node.__config;\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let {\n [NODE_CACHE]: __cache,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_DOM_PARENT]: {\n __config: {\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_OPACITY]: opacity,\n },\n },\n } = __config;\n if(__cache && __cache.available) {\n texCache.addTexAndDrawWhenLimit(gl, __cache, opacity, matrixEvent, cx, cy, 0, 0,true);\n }\n // 超限特殊处理,先生成画布尺寸大小的纹理然后原始位置绘制\n else if(limitCache) {\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, 0, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n else {\n let {\n [NODE_OPACITY]: opacity,\n [NODE_MATRIX_EVENT]: matrixEvent,\n [NODE_LIMIT_CACHE]: limitCache,\n [NODE_CACHE]: __cache,\n [NODE_CACHE_TOTAL]: __cacheTotal,\n [NODE_CACHE_FILTER]: __cacheFilter,\n [NODE_CACHE_MASK]: __cacheMask,\n [NODE_CACHE_OVERFLOW]: __cacheOverflow,\n [NODE_REFRESH_LV]: refreshLevel,\n [NODE_COMPUTED_STYLE]: {\n [DISPLAY]: display,\n [VISIBILITY]: visibility,\n [MIX_BLEND_MODE]: mixBlendMode,\n },\n } = __config;\n if(display === 'none') {\n i += (total || 0) + (hasMask || 0);\n continue;\n }\n // 有total的可以直接绘制并跳过子节点索引,忽略total本身,其独占用纹理单元,注意特殊不取cacheTotal,\n // 这种情况发生在只有overflow:hidden声明但无效没有生成__cacheOverflow的情况,\n // 因为webgl纹理单元缓存原因,所以不用cacheTotal防止切换性能损耗\n // 已取消,因为perspective需要进行独立上下文渲染\n let target = getCache([__cacheMask, __cacheFilter, __cacheOverflow, __cacheTotal, __cache]);\n // total和自身cache的尝试\n if(target) {\n // 有mbm先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n if(target !== __cache) {\n i += (total || 0) + (hasMask || 0);\n }\n }\n else if(limitHash.hasOwnProperty(i)) {\n let target = limitHash[i];\n if(hasMbm && isValidMbm(mixBlendMode)) {\n texCache.refresh(gl, cx, cy, true);\n let [n2, frameBuffer2, texture2] = genFrameBufferWithTexture(gl, texCache, width, height);\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n // 合成结果作为当前frameBuffer,以及纹理和单元,等于替代了当前画布作为绘制对象\n [n, frameBuffer, texture] = genMbmWebgl(gl, texCache, n, n2, frameBuffer, texture, mbmName(mixBlendMode), width, height);\n gl.deleteFramebuffer(frameBuffer2);\n gl.deleteTexture(texture2);\n }\n else {\n texCache.addTexAndDrawWhenLimit(gl, target, opacity, matrixEvent, cx, cy, 0, 0, true);\n }\n i += (total || 0) + (hasMask || 0);\n }\n // 超限的情况,这里是普通单节点超限,没有合成total后再合成特殊cache如filter/mask/mbm之类的,\n // 直接按原始位置绘制到离屏canvas,再作为纹理绘制即可,特殊的在total那做过降级了\n else if(limitCache && display !== 'none' && visibility !== 'hidden') {\n // let m = mx.m2Mat4(matrixEvent, cx, cy);\n let c = inject.getCacheCanvas(width, height, '__$$OVERSIZE$$__');\n node.render(renderMode, refreshLevel, gl);\n let j = texCache.lockOneChannel();\n let texture = webgl.createTexture(gl, c.canvas, j);\n let mockCache = new MockCache(gl, texture, 0, 0, width, height, [0, 0, width, height]);\n texCache.addTexAndDrawWhenLimit(gl, mockCache, opacity, matrixEvent, cx, cy, 0, 0, true);\n texCache.refresh(gl, cx, cy, true);\n c.ctx.setTransform(1, 0, 0, 1, 0, 0);\n c.ctx.globalAlpha = 1;\n c.ctx.clearRect(0, 0, width, height);\n mockCache.release();\n texCache.releaseLockChannel(j);\n }\n }\n }\n texCache.refresh(gl, cx, cy, true);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n texCache.releaseLockChannel(n);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, n);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nexport default {\n renderCacheCanvas,\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","import webgl from './webgl';\nimport MockPage from './MockPage';\nimport inject from '../util/inject';\n\nclass TexCache {\n constructor(units) {\n this.__units = units; // 通道数量限制,8~16\n this.__pages = []; // 存当前page列表,通道数量8~16,缓存收留尽可能多的page\n this.__list = []; // 本次渲染暂存的数据,[cache, opacity, matrix, dx, dy]\n this.__channels = []; // 每个纹理通道记录还是个数组,下标即纹理单元,内容为Page\n this.__locks = []; // 锁定纹理单元列表,下标即纹理单元,内容true为锁定\n this.__lockUnits = 0;\n }\n\n /**\n * webgl每次绘制为添加纹理并绘制,此处尝试尽可能收集所有纹理贴图,以达到尽可能多的共享纹理,再一次性绘制\n * 收集的是Page对象(从cache中取得),里面包含了若干个节点的贴图,canvas本身是2的幂次方大小\n * webgl最少有8个纹理单元最多16个,因此存了一个列表来放这些Page的canvas,刷新后清空,但纹理通道映射记录保留\n * 当8个纹理单元全部满了,进行绘制并清空这个队列,外部主循环结束时也会检查队列是否还有余留并绘制\n * 初始调用队列为空,存入Page对象,后续调用先查看是否存在以便复用,再决定是否存入Page,直到8个满了\n * Page上存有update表示是否更新,每次cache绘制时会变true,以此表示是否有贴图更新,删除可以忽视\n * 还需要一个记录上次纹理通道使用哪个Page的canvas的地方,即映射,清空后队列再次添加时,如果Page之前被添加过,\n * 此次又被添加且没有变更update,可以直接复用上次的纹理单元号且无需再次上传纹理,节省性能\n * 后续接入局部纹理更新也是复用单元号,如果update变更可以选择局部上传纹理而非整个重新上传\n * 判断上传的逻辑在收集满8个后绘制前进行,因为添加队列过程中可能会变更Page及其update\n * @param gl\n * @param cache\n * @param opacity\n * @param matrix\n * @param cx\n * @param cy\n * @param dx\n * @param dy\n * @param revertY\n */\n addTexAndDrawWhenLimit(gl, cache, opacity, matrix, cx, cy, dx = 0, dy = 0, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n let page = cache.page;\n let i = pages.indexOf(page);\n // 找到说明已有page在此索引的通道中,记录下来info\n if(i > -1) {\n list.push([cache, opacity, matrix, dx, dy]);\n }\n // 找不到说明是新的纹理贴图,此时看是否超过纹理单元限制,超过则刷新绘制并清空,然后/否则 存入纹理列表\n else {\n i = pages.length;\n if(i >= this.__units - this.__lockUnits) {\n // 绘制且清空,队列索引重新为0\n this.refresh(gl, cx, cy, revertY);\n }\n pages.push(page);\n list.push([cache, opacity, matrix, dx, dy]);\n }\n }\n\n /**\n * 刷新\n * @param gl\n * @param cx\n * @param cy\n * @param revertY\n */\n refresh(gl, cx, cy, revertY) {\n let pages = this.__pages;\n let list = this.__list;\n // 防止空调用刷新,struct循环结尾会强制调用一次防止有未渲染的\n if(pages.length) {\n let channels = this.channels;\n let locks = this.locks;\n // 先将上次渲染的纹理单元使用的Page形成一个hash,键为page的uuid,值为纹理单元\n let lastHash = {};\n channels.forEach((item, i) => {\n if(item) {\n let uuid = item.uuid;\n lastHash[uuid] = i;\n }\n });\n let units = this.__units;\n // 再遍历,查找相同的Page并保持其使用的纹理单元不变,存入相同索引下标oldList,不同的按顺序收集放newList\n let oldList = new Array(units), newList = [];\n pages.forEach(page => {\n let uuid = page.uuid;\n if(lastHash.hasOwnProperty(uuid)) {\n let index = lastHash[uuid];\n oldList[index] = page;\n }\n else {\n newList.push(page);\n }\n });\n /**\n * 以oldList为基准,将newList依次存入oldList中\n * 优先使用未用过的纹理单元,以便用过的可能下次用到无需重新上传\n * 找不到未用过的后,尝试NRU算法,优先淘汰最近未使用的Page,相等则尺寸小的\n */\n if(newList.length) {\n // 先循环找空的,oldList空且channels空且locks空\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !channels[i] &&!locks[i]) {\n oldList[i] = newList.shift();\n if(!newList.length) {\n break;\n }\n }\n }\n let len = newList.length;\n if(len) {\n // 按时间排序已使用channel且未被当前占用的,以便淘汰最久未使用的\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!oldList[i] && !locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n // cl靠前是时间小尺寸小的,优先使用替换\n for(let i = 0; i < len; i++) {\n oldList[cl[i][0]] = newList[i];\n }\n }\n }\n /**\n * 对比上帧渲染的和这次纹理单元情况,Page相同且!update可以省略更新,其它均重新赋值纹理\n * 后续局部更新Page相同但有update,会出现没有上帧的情况如初始渲染,此时先创建纹理单元再更新\n * 将新的数据赋给老的,可能新的一帧使用的少于上一帧,老的没用到的需继续保留\n */\n let hash = {};\n for(let i = 0, len = oldList.length; i < len; i++) {\n let page = oldList[i];\n // 可能为空,不满的情况下前面单元保留老tex先用的后面的单元\n if(!page) {\n continue;\n }\n let last = channels[i];\n if(!last || last[0] !== page || page.update) {\n // page可能为一个已有纹理,或者贴图\n if(page instanceof MockPage) {\n webgl.bindTexture(gl, page.texture, i);\n channels[i] = page;\n }\n else {\n // 可能老的先删除\n if(last) {\n gl.deleteTexture(last.texture);\n }\n page.texture = webgl.createTexture(gl, page.canvas, i);\n channels[i] = page;\n }\n hash[page.uuid] = i;\n }\n else {\n hash[page.uuid] = i;\n }\n // 标识没有更新,以及最后使用时间\n page.update = false;\n page.time = inject.now();\n }\n // 再次遍历开始本次渲染并清空\n webgl.drawTextureCache(gl, list, hash, cx, cy, revertY);\n pages.splice(0);\n list.splice(0);\n }\n }\n\n findExistTexChannel(page) {\n return this.channels.indexOf(page);\n }\n\n /**\n * 获取并锁定一个纹理单元优先使用空的,其次最久未使用的\n * @returns {number|*}\n */\n lockOneChannel() {\n // 优先返回空单元\n let channels = this.channels;\n let locks = this.locks;\n for(let i = 0; i < this.__units; i++) {\n if(!channels[i] && !locks[i]) {\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n }\n // 根据NRU返回最久未使用的\n let units = this.__units;\n let cl = [];\n for(let i = 0; i < units; i++) {\n if(!locks[i]) {\n cl.push([i, channels[i]]);\n }\n }\n if(cl.length) {\n cl.sort(function(a, b) {\n if(a[1].time !== b[1].time) {\n return (a[1].time || 0) - (b[1].time || 0);\n }\n if(a[1].fullSize !== b[1].fullSize) {\n return a[1].fullSize - b[1].fullSize;\n }\n return a[0] - b[0];\n });\n let i = cl[0][0];\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n return i;\n }\n throw new Error('No free texture unit');\n }\n\n /**\n * 释放掉i单元,并且设置内容到缓存channel中\n * @param i\n * @param setToChannel\n */\n releaseLockChannel(i, setToChannel) {\n if(this.locks[i]) {\n this.locks[i] = false;\n this.__lockUnits--;\n if(setToChannel) {\n this.channels[i] = setToChannel;\n }\n }\n }\n\n // 指定锁定一个单元\n lockChannel(i) {\n let channels = this.channels;\n let locks = this.locks;\n if(!locks[i]) {\n channels[i] = null;\n locks[i] = true;\n this.__lockUnits++;\n }\n }\n\n /**\n * 释放纹理单元\n * @param gl\n */\n release(gl) {\n this.channels.forEach(item => {\n if(item) {\n gl.deleteTexture(item.texture);\n }\n });\n }\n\n get channels() {\n return this.__channels;\n }\n\n get locks() {\n return this.__locks;\n }\n}\n\nexport default TexCache;\n","import Dom from './Dom';\nimport Text from './Text';\nimport Xom from './Xom';\nimport Component from './Component';\nimport Defs from './Defs';\nimport mode from './mode';\nimport Geom from './geom/Geom';\nimport builder from '../util/builder';\nimport updater from '../util/updater';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport TexCache from '../gl/TexCache';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n POINTER_EVENTS,\n },\n UPDATE_KEY: {\n UPDATE_NODE,\n UPDATE_STYLE,\n UPDATE_KEYS,\n UPDATE_COMPONENT,\n UPDATE_FOCUS,\n UPDATE_MEASURE,\n UPDATE_OVERWRITE,\n UPDATE_LIST,\n UPDATE_CONFIG,\n UPDATE_ADD_DOM,\n UPDATE_REMOVE_DOM,\n },\n NODE_KEY: {\n NODE_TAG_NAME,\n NODE_CACHE_STYLE,\n NODE_CACHE_PROPS,\n NODE_CURRENT_STYLE,\n NODE_COMPUTED_STYLE,\n NODE_CURRENT_PROPS,\n NODE_DOM_PARENT,\n NODE_IS_MASK,\n NODE_REFRESH_LV,\n NODE_IS_DESTROYED,\n NODE_STYLE,\n NODE_UPDATE_HASH,\n NODE_UNIQUE_UPDATE_ID,\n NODE_CACHE,\n NODE_CACHE_TOTAL,\n NODE_CACHE_FILTER,\n NODE_CACHE_OVERFLOW,\n NODE_CACHE_MASK,\n NODE_STRUCT,\n },\n STRUCT_KEY: {\n STRUCT_INDEX,\n STRUCT_TOTAL,\n STRUCT_NODE,\n }\n} = enums;\nconst DIRECTION_HASH = {\n [TOP]: true,\n [RIGHT]: true,\n [BOTTOM]: true,\n [LEFT]: true,\n};\nconst { isNil, isObject, isFunction } = util;\nconst { AUTO, PX, PERCENT, INHERIT } = unit;\nconst { isRelativeOrAbsolute, equalStyle } = css;\nconst { contain, getLevel, isRepaint, NONE, FILTER, PERSPECTIVE, REPAINT, REFLOW, REBUILD } = level;\nconst { isIgnore, isGeom, isMeasure } = change;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, true);\n target = target.domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push([type, cb]);\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item[0], item[1]);\n });\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c[1] !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex或变化flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.domParent;\n if(parent) {\n if(parent.currentStyle[DISPLAY] === 'flex' || parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction isLAYOUT(node) {\n return node.hasOwnProperty('__uniqueReflowId');\n}\n\nlet __uniqueReflowId = 0;\nfunction setLAYOUT(node, hash, component, addDom) {\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n hash[__uniqueReflowId++] = {\n node,\n component,\n addDom,\n };\n }\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * 过程即__checkReflow中所提及的,各种情况\n * 将影响升至最近的父级节点,并添加布局标识,这样后面的深度遍历会以父级为准忽略本身\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * ====\n * addDom情况下的特殊影响检测,类似checkInfluence\n * 添加的是absolute则只影响自己,大部分交互游戏情况属于此类型优化\n * 添加的是inline/inlineBlock的话,影响最近非inline父节点\n * 父为flex则直接影响父节点,不管添加情况如何\n * 添加block/flex的话,上下都block/flex则只影响自己,否则还是影响父节点\n * 如果最终是root,则返回true标识,直接整个重新开始布局\n * @returns {boolean}\n */\nfunction checkInfluence(root, reflowHash, node, component, addDom) {\n // add情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return;\n }\n let target = node;\n // inline新老都影响,节点变为最近的父非inline\n if(['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.domParent;\n // 父到root提前跳出\n if(target === root) {\n return true;\n }\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(target)) {\n return;\n }\n // 遇到absolute跳出,设置其布局;如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(target.currentStyle[POSITION] === 'absolute' || target.computedStyle[POSITION] === 'absolute') {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n while(target && (['inline', 'inlineBlock', 'inline-block'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock', 'inline-block'].indexOf(target.computedStyle[DISPLAY]) > -1));\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n if(isFixedSize(target, true)) {\n setLAYOUT(target, reflowHash, component, addDom);\n return;\n }\n }\n // 此时target指向node,如果原本是inline则是其flow的非inline父\n let parent = target.domParent;\n // parent有LAYOUT跳出,已被包含\n if(isLAYOUT(parent)) {\n return;\n }\n // 向上检查flex,如果父级中有flex,以最上层的flex视作其更改,node本身flex不进入\n let topFlex;\n do {\n // 父已有LAYOUT跳出防重\n if(isLAYOUT(parent)) {\n return;\n }\n // flex相关,包含变化或不变化\n if(parent.computedStyle[DISPLAY] === 'flex' || parent.currentStyle[DISPLAY] === 'flex') {\n topFlex = parent;\n }\n // 遇到absolute跳出,如果absolute不变化普通处理,如果absolute发生变化,一定会存在于列表中,不用考虑\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n break;\n }\n // 父固定宽高跳出\n if(isFixedSize(parent, true)) {\n break;\n }\n parent = parent.domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(topFlex) {\n target = topFlex;\n }\n if(target === root) {\n return true;\n }\n parent = target;\n // 向上检查非固定尺寸的absolute,找到则视为其变更,上面过程中一定没有出现absolute\n while(parent) {\n // 无论新老absolute,不变化则设置,变化一定会出现在列表中\n if(parent.currentStyle[POSITION] === 'absolute' || parent.computedStyle[POSITION] === 'absolute') {\n if(parent === root) {\n break;\n }\n // 固定尺寸的不用设置,需要跳出循环\n if(isFixedSize(parent)) {\n break;\n }\n else {\n setLAYOUT(parent, reflowHash, component, addDom);\n return;\n }\n }\n parent = parent.domParent;\n }\n // 向上查找了并且没提前跳出的target如果不等于自身则重新布局,自身外面设置过了\n if(target !== node) {\n setLAYOUT(target, reflowHash, component, addDom);\n }\n else if(addDom) {\n // 前后必须都是block,否则还是视为父布局\n let isSiblingBlock = true;\n let { prev, next } = node;\n if(prev && ['inline', 'inline-block', 'inlineBlock'].indexOf(prev.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n else if(next && ['inline', 'inline-block', 'inlineBlock'].indexOf(next.currentStyle[DISPLAY]) > -1) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.domParent;\n if(target === root) {\n return true;\n }\n setLAYOUT(target, reflowHash, false, true);\n }\n }\n}\n\nlet uniqueUpdateId = 0;\nfunction parseUpdate(renderMode, root, target, reflowList, measureList, cacheHash, cacheList, zHash, zList) {\n let {\n [UPDATE_NODE]: node,\n [UPDATE_STYLE]: style,\n [UPDATE_OVERWRITE]: overwrite,\n [UPDATE_FOCUS]: focus,\n [UPDATE_COMPONENT]: component,\n [UPDATE_MEASURE]: measure,\n [UPDATE_LIST]: list,\n [UPDATE_KEYS]: keys,\n [UPDATE_CONFIG]: __config,\n [UPDATE_ADD_DOM]: addDom,\n [UPDATE_REMOVE_DOM]: removeDom,\n } = target;\n if(__config[NODE_IS_DESTROYED]) {\n return;\n }\n // updateStyle()这样的调用需要覆盖原有样式,因为是按顺序遍历,后面的优先级自动更高不怕重复\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n // 多次调用更新才会有list,一般没有,优化;component无需,因为多次都是它自己\n if(list && !component) {\n keys = (keys || []).slice(0); // 防止原始值被更改\n let hash = {};\n keys.forEach(k => {\n hash[k] = true;\n });\n list.forEach(item => {\n let { [UPDATE_STYLE]: style2, [UPDATE_OVERWRITE]: overwrite, [UPDATE_KEYS]: keys2 } = item;\n (keys2 || []).forEach(k2 => {\n if(!hash.hasOwnProperty(k2)) {\n hash[k2] = true;\n keys.push(k2);\n }\n });\n if(overwrite) {\n Object.assign(__config[NODE_STYLE], overwrite);\n }\n if(style2) {\n if(style) {\n Object.assign(style, style2);\n }\n else {\n style = style2;\n }\n }\n });\n }\n // 按节点合并完style后判断改变等级\n let {\n [NODE_TAG_NAME]: tagName,\n [NODE_CACHE_STYLE]: __cacheStyle,\n [NODE_CACHE_PROPS]: __cacheProps,\n [NODE_CURRENT_STYLE]: currentStyle,\n [NODE_COMPUTED_STYLE]: computedStyle,\n [NODE_CURRENT_PROPS]: currentProps,\n [NODE_DOM_PARENT]: domParent,\n [NODE_IS_MASK]: isMask,\n } = __config;\n let lv = focus || NONE;\n let hasMeasure = measure;\n let hasZ, hasVisibility, hasColor, hasDisplay;\n // component无需遍历直接赋值,img重新加载等情况没有样式更新\n if(!component && style && keys) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n // 只有geom的props和style2种可能\n if(node instanceof Geom && isGeom(tagName, k)) {\n if(!equalStyle(k, v, currentProps[k], node)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n currentProps[k] = v;\n }\n }\n else {\n // 需和现在不等,且不是pointerEvents这种无关的\n if(!equalStyle(k, v, currentStyle[k], node)) {\n // pointerEvents这种无关的只需更新\n if(isIgnore(k)) {\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n }\n else {\n // TRBL变化只对relative/absolute起作用,其它忽视\n if(DIRECTION_HASH.hasOwnProperty(k)) {\n let position = currentStyle[POSITION];\n if(position !== 'relative' && position !== 'absolute') {\n delete style[k];\n continue;\n }\n }\n else if(k === DISPLAY) {\n hasDisplay = true;\n }\n // repaint细化等级,reflow在checkReflow()\n lv |= getLevel(k);\n if(isMeasure(k)) {\n hasMeasure = true;\n }\n // repaint置空,如果reflow会重新生成空的\n __cacheStyle[k] = undefined;\n currentStyle[k] = v;\n if(k === Z_INDEX && node !== root) {\n hasZ = true;\n }\n if(k === VISIBILITY) {\n hasVisibility = true;\n }\n if(k === COLOR) {\n hasColor = true;\n }\n }\n }\n }\n }\n }\n // 无任何改变处理的去除记录,如pointerEvents、无效的left\n // 但是perspective需考虑进来,虽然不影响自己但影响别人,要返回true表明有变更\n if(lv === NONE && !component) {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n return;\n }\n // 由于父节点中有display:none,或本身节点也为none,执行普通动画是无效的,此时没有display变化\n if(computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n return;\n }\n // 记录下来清除parent的zIndexChildren缓存\n if(hasZ && domParent) {\n delete domParent.__zIndexChildren;\n }\n // visibility/color变化,影响子继承\n if(hasVisibility || hasColor) {\n for(let __structs = root.__structs, __struct = node.__config[NODE_STRUCT], i = __struct[STRUCT_INDEX] + 1, len = i + __struct[STRUCT_TOTAL]; i < len; i++) {\n let {\n [STRUCT_NODE]: node,\n [STRUCT_TOTAL]: total,\n } = __structs[i];\n let __config = node.__config;\n let currentStyle = __config[NODE_CURRENT_STYLE];\n let need;\n // text的style指向parent,因此text一定变更\n if(hasVisibility && (node instanceof Text || currentStyle[VISIBILITY][1] === INHERIT)) {\n need = true;\n }\n if(hasColor && (node instanceof Text || currentStyle[COLOR][1] === INHERIT)) {\n need = true;\n }\n if(need) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n if(node instanceof Xom) {\n node.clearCache();\n }\n }\n else {\n i += total || 0;\n }\n }\n }\n // mask需清除遮罩对象的缓存\n if(isMask) {\n let prev = node.prev;\n while(prev && (prev.isMask)) {\n prev = prev.prev;\n }\n if(prev && prev.__config[NODE_CACHE_MASK]) {\n prev.__config[NODE_CACHE_MASK].release();\n }\n }\n // 特殊情况,父节点display:none,子节点进行任意变更,应视为无效\n // 如果父节点由none变block,这里也return false,因为父节点会重新layout+render\n // 如果父节点由block变none,同上,所以只要current/computed里有none就return false\n let parent = domParent;\n if(hasDisplay && parent) {\n let __config = parent.__config;\n if(__config[NODE_CURRENT_STYLE][DISPLAY] === 'none' || __config[NODE_COMPUTED_STYLE][DISPLAY] === 'none') {\n computedStyle[DISPLAY] = 'none';\n return;\n }\n }\n // reflow/repaint/measure相关的记录下来\n let isRp = !component && isRepaint(lv);\n if(isRp) {\n // zIndex变化需清空svg缓存\n if(hasZ && renderMode === mode.SVG) {\n lv |= REPAINT;\n domParent && cleanSvgCache(domParent);\n }\n // z改变影响struct局部重排,它的数量不会变因此不影响外围,此处先收集,最后统一对局部根节点进行更新\n if(hasZ && !component && zHash) {\n if(domParent && !domParent.hasOwnProperty('__uniqueZId')) {\n zHash[uniqueUpdateId] = true;\n domParent.__uniqueZId = uniqueUpdateId++;\n zList.push(domParent);\n }\n }\n }\n // reflow在root的refresh中做\n else {\n reflowList.push({\n node,\n style,\n component,\n addDom,\n removeDom,\n });\n // measure需要提前先处理\n if(hasMeasure) {\n measureList.push(node);\n }\n }\n // 这里也需|运算,每次刷新会置0,但是如果父元素进行继承变更,会在此元素分析前更改,比如visibility,此时不能直接赋值\n __config[NODE_REFRESH_LV] |= lv;\n if(component || addDom || removeDom) {\n root.__rlv = REBUILD;\n }\n else {\n root.__rlv = Math.max(root.__rlv, lv);\n }\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT || renderMode === mode.SVG && node instanceof Geom;\n if(need) {\n if(__config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || contain(lv, PERSPECTIVE)) {\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n }\n // 特殊的filter清除cache\n if((need || contain(lv, FILTER)) && __config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n // 向上清除等级>=REPAINT的汇总缓存信息,过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n while(parent) {\n let __config = parent.__config;\n // 向上查找,出现重复跳出\n if(__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let id = __config[NODE_UNIQUE_UPDATE_ID];\n if(cacheHash.hasOwnProperty(id)) {\n break;\n }\n cacheHash[id] = true;\n }\n // 没有的需要设置一个标识\n else {\n cacheHash[uniqueUpdateId] = true;\n __config[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId++;\n cacheList.push(__config);\n }\n let lv = __config[NODE_REFRESH_LV];\n let need = lv >= REPAINT;\n if(need && __config[NODE_CACHE]) {\n __config[NODE_CACHE].release();\n }\n // 前面已经过滤了无改变NONE的,只要孩子有任何改变父亲就要清除\n if(__config[NODE_CACHE_TOTAL]) {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(__config[NODE_CACHE_FILTER]) {\n __config[NODE_CACHE_FILTER].release();\n }\n if(__config[NODE_CACHE_MASK]) {\n __config[NODE_CACHE_MASK].release();\n }\n if(__config[NODE_CACHE_OVERFLOW]) {\n __config[NODE_CACHE_OVERFLOW].release();\n }\n parent = __config[NODE_DOM_PARENT];\n }\n return true;\n}\n\nfunction cleanSvgCache(node, child) {\n let __config = node.__config;\n if(child) {\n __config[NODE_REFRESH_LV] |= REPAINT;\n }\n else {\n __config[NODE_CACHE_TOTAL].release();\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n if(!(child instanceof Text)) {\n cleanSvgCache(child, true);\n }\n });\n }\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props);\n this.__cd = children || []; // 原始children,再初始化过程中生成真正的dom\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__taskUp = [];\n this.__taskCp = [];\n this.__ref = {};\n this.__reflowList = [{ node: this }]; // 初始化填自己,第一次布局时复用逻辑完全重新布局\n this.__animateController = new Controller();\n Event.mix(this);\n this.__config[NODE_UPDATE_HASH] = this.__updateHash = {};\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__children = builder.initRoot(this.__cd, this);\n this.__initProps();\n this.__root = this;\n this.cache = !!this.props.cache;\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.width) {\n dom.setAttribute('width', this.width);\n }\n if(this.height) {\n dom.setAttribute('height', this.height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n }\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n // 没有设置width/height则采用css计算形式\n if(!this.width || !this.height) {\n let css = window.getComputedStyle(dom, null);\n if(!this.width) {\n this.__width = parseFloat(css.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.height) {\n this.__height = parseFloat(css.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 只有canvas有ctx,svg用真实dom\n if(this.tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d');\n this.__renderMode = mode.CANVAS;\n }\n else if(this.tagName === 'svg') {\n this.__renderMode = mode.SVG;\n }\n else if(this.tagName === 'webgl') {\n let gl = this.__ctx = this.__dom.getContext('webgl', ca);\n this.__renderMode = mode.WEBGL;\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexMask, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.useProgram(gl.program);\n // 第一次渲染生成纹理缓存管理对象,收集渲染过程中生成的纹理并在gl纹理单元满了时进行绘制和清空,减少texImage2d耗时问题\n const MAX_TEXTURE_IMAGE_UNITS = Math.min(16, gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS));\n this.__texCache = new TexCache(MAX_TEXTURE_IMAGE_UNITS);\n }\n this.refresh(null, true);\n // 第一次节点没有__root,渲染一次就有了才能diff\n if(this.dom.__root && this.dom.__root instanceof Root) {\n this.dom.__root.destroy();\n }\n this.__eventCbList = initEvent(this.dom, Root);\n this.dom.__root = this;\n }\n\n refresh(cb, isFirst) {\n this.__hookTask = null;\n let { isDestroyed, renderMode, ctx, defs, width, height } = this;\n if(isDestroyed) {\n return;\n }\n defs.clear();\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__checkRoot(renderMode, width, height);\n this.__computeMeasure(renderMode, ctx);\n }\n // 非首次刷新如果没有更新则无需继续\n else if(!this.__checkUpdate(renderMode, ctx, width, height)) {\n return;\n }\n // 获取所有字体和大小测量,仅svg需要,canvas直接做\n inject.measureText();\n this.__checkReflow(width, height);\n if(renderMode === mode.CANVAS && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n // 利用list循环代替tree递归快速渲染\n if(this.cache) {\n struct.renderCacheCanvas(renderMode, ctx, this);\n }\n else {\n struct.renderCanvas(renderMode, ctx, this);\n }\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG && !this.props.noRender) {\n struct.renderSvg(renderMode, defs, this, isFirst);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n if(this.dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(this.dom, this.dom.__vd, nvd);\n }\n else {\n this.dom.innerHTML = util.joinVirtualDom(nvd);\n }\n this.dom.__vd = nvd;\n this.dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL && !this.props.noRender) {\n this.__clear(ctx, renderMode);\n struct.renderWebgl(renderMode, ctx, this);\n }\n // 特殊cb,供小程序绘制完回调使用\n if(isFunction(cb)) {\n cb();\n }\n this.emit(Event.REFRESH, this.__rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.__texCache && gl) {\n this.__texCache.release(gl);\n if(gl.program) {\n gl.deleteShader(gl.program.vertexShader);\n gl.deleteShader(gl.program.fragmentShader);\n gl.deleteProgram(gl.program);\n }\n if(gl.programMask) {\n gl.deleteShader(gl.programMask.vertexShader);\n gl.deleteShader(gl.programMask.fragmentShader);\n gl.deleteProgram(gl.programMask);\n }\n if(gl.programOverflow) {\n gl.deleteShader(gl.programOverflow.vertexShader);\n gl.deleteShader(gl.programOverflow.fragmentShader);\n gl.deleteProgram(gl.programOverflow);\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n addRefreshTask(cb) {\n let { taskUp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 第一个添加延迟侦听,后续放队列等待一并执行\n if(!taskUp.length) {\n let clone;\n frame.nextFrame({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskUp.splice(0);\n // 前置一般是动画计算此帧样式应用,然后刷新后出发frame事件,图片加载等同\n if(clone.length) {\n clone.forEach((item, i) => {\n if(isObject(item) && isFunction(item.__before)) {\n item.__before(diff);\n }\n });\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n if(isObject(item) && isFunction(item.__after)) {\n item.__after(diff);\n }\n else if(isFunction(item)) {\n item(diff);\n }\n });\n }\n });\n this.__frameHook();\n }\n if(taskUp.indexOf(cb) === -1) {\n taskUp.push(cb);\n }\n }\n\n delRefreshTask(cb) {\n if(!cb) {\n return;\n }\n let { taskUp } = this;\n for(let i = 0, len = taskUp.length; i < len; i++) {\n if(taskUp[i] === cb) {\n taskUp.splice(i, 1);\n break;\n }\n }\n }\n\n /**\n * 为component的setState更新专门开辟个独立的流水线,root/frame中以taskCp存储更新列表\n * 普通的动画、img加载等都走普通的refresh的task,component走这里,frame中的结构同样\n * 在frame的每帧调用中,先执行普通的动画task,再执行component的task\n * 这样动画执行完后,某个cp的sr及子节点依旧先进行了动画变更,进入__addUpdate()环节\n * 然后此cp再更新sr及子节点,这样会被__addUpdate()添加到尾部,依赖目前浏览器默认实现\n * 上一行cp更新过程中是updater.check()进行的,如果有新老交换且有动画,动画的assigning是true,进行继承\n * root刷新parseUpdate()时,老的sr及子节点先进行,随后新的sr后进行且有component标识,sr子节点不会有更新\n * @param cb\n */\n addRefreshCp(cb) {\n let { taskCp, isDestroyed } = this;\n if(isDestroyed) {\n return;\n }\n // 每次只执行1次\n if(!taskCp.length) {\n let clone;\n frame.__nextFrameCp({\n __before: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone = taskCp.splice(0);\n if(clone.length) {\n clone.forEach(item => {\n item.__before(diff);\n });\n updater.check(this);\n let len = updater.updateList.length;\n if(len) {\n updater.updateList.forEach(cp => {\n let sr = cp.shadowRoot;\n // 可能返回text,需视为其parentNode\n if(sr instanceof Text) {\n sr = sr.domParent;\n }\n let res = {};\n res[UPDATE_NODE] = sr;\n res[UPDATE_STYLE] = sr.currentStyle;\n res[UPDATE_FOCUS] = REFLOW;\n res[UPDATE_MEASURE] = true;\n res[UPDATE_COMPONENT] = cp;\n res[UPDATE_CONFIG] = sr.__config;\n this.__addUpdate(sr, sr.__config, this, this.__config, res);\n });\n }\n }\n },\n __after: diff => {\n if(this.isDestroyed) {\n return;\n }\n clone.forEach(item => {\n item.__after(diff);\n });\n // 触发didUpdate\n updater.did();\n },\n });\n this.__frameHook();\n }\n if(taskCp.indexOf(cb) === -1) {\n taskCp.push(cb);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __sx1, __sy1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __sx1, __sy1,\n __sx1 + offsetWidth, __sy1,\n __sx1 + offsetWidth, __sy1 + offsetHeight,\n __sx1, __sy1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = [width, PX];\n currentStyle[HEIGHT] = [height, PX];\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新入口,按节点汇总更新信息\n * @private\n */\n __addUpdate(node, nodeConfig, root, rootConfig, o) {\n let updateHash = rootConfig[NODE_UPDATE_HASH];\n // root特殊处理,检查变更时优先看继承信息\n if(node === root) {\n updateHash = root.__updateRoot;\n if(updateHash) {\n if(o[UPDATE_FOCUS]) {\n updateHash[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n updateHash[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = updateHash[UPDATE_LIST] = updateHash[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n root.__updateRoot = o;\n }\n }\n else if(!nodeConfig.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n nodeConfig[NODE_UNIQUE_UPDATE_ID] = uniqueUpdateId;\n // 大多数情况节点都只有一次更新,所以优化首次直接存在style上,后续存在list\n updateHash[uniqueUpdateId++] = o;\n }\n else if(updateHash.hasOwnProperty(nodeConfig[NODE_UNIQUE_UPDATE_ID])) {\n let target = updateHash[nodeConfig[NODE_UNIQUE_UPDATE_ID]];\n if(o[UPDATE_FOCUS]) {\n target[UPDATE_FOCUS] |= o[UPDATE_FOCUS];\n }\n if(o[UPDATE_MEASURE]) {\n target[UPDATE_MEASURE] = true;\n }\n // 后续存在新建list上,需增加遍历逻辑\n if(o[UPDATE_STYLE]) {\n let list = target[UPDATE_LIST] = target[UPDATE_LIST] || [];\n list.push({\n [UPDATE_STYLE]: o[UPDATE_STYLE],\n [UPDATE_OVERWRITE]: o[UPDATE_OVERWRITE],\n [UPDATE_KEYS]: o[UPDATE_KEYS],\n });\n }\n }\n else {\n inject.error('Update process miss uniqueUpdateId');\n }\n }\n\n /**\n * 除首次外每次刷新前检查更新列表,计算样式变化,以及测量信息\n * @private\n */\n __checkUpdate(renderMode, ctx, width, height) {\n let root = this;\n let measureList = [];\n let reflowList = [];\n let cacheHash = {};\n let cacheList = [];\n let zHash = {};\n let zList = [];\n let updateRoot = root.__updateRoot;\n let updateHash = root.__updateHash;\n let hasUpdate;\n // root更新特殊提前,因为有继承因素\n if(updateRoot) {\n root.__updateRoot = null;\n hasUpdate = parseUpdate(renderMode, root, updateRoot,\n reflowList, measureList, cacheHash, cacheList);\n // 此时做root检查,防止root出现继承等无效样式,或者发生resize()\n if(hasUpdate) {\n root.__checkRoot(renderMode, width, height);\n }\n }\n // 汇总处理每个节点,k是递增数字直接循环遍历\n let keys = Object.keys(updateHash);\n for(let i = 0, len = keys.length; i < len; i++) {\n let t = parseUpdate(renderMode, root, updateHash[keys[i]],\n reflowList, measureList, cacheHash, cacheList, zHash, zList);\n hasUpdate = hasUpdate || t;\n }\n // 先做一部分reset避免下面measureList干扰,cacheList的是专门收集新增的额外节点\n root.__reflowList = reflowList;\n uniqueUpdateId = 0;\n root.__updateHash = root.__config[NODE_UPDATE_HASH] = {};\n cacheList.forEach(__config => {\n delete __config[NODE_UNIQUE_UPDATE_ID];\n });\n // zIndex改变的汇总修改,防止重复操作\n zList.forEach(item => {\n if(item.hasOwnProperty('__uniqueZId')) {\n delete item.__uniqueZId;\n item.__updateStruct(root.__structs);\n }\n });\n /**\n * 遍历每项节点,计算测量信息,节点向上向下查找继承信息,如果parent也是继承,先计算parent的\n * 过程中可能会出现重复,因此节点上记录一个临时标防止重复递归\n */\n let measureHash = {};\n measureList.forEach(node => {\n let { __config:{ [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId, [NODE_DOM_PARENT]: parent } } = node;\n // 在root下的component变更时root会进入,但其没有__uniqueUpdateId\n if(node !== root) {\n if(measureHash.hasOwnProperty(__uniqueUpdateId)) {\n return;\n }\n measureHash[__uniqueUpdateId] = true;\n }\n let last = node;\n // 检查measure的属性是否是inherit,在root下的component变更时root会进入,但其没有__uniqueUpdateId\n // 另外dom标识表明有dom变更强制进入\n let isInherit = node !== root\n && (updateHash[__uniqueUpdateId][UPDATE_ADD_DOM]\n || change.isMeasureInherit(updateHash[__uniqueUpdateId][UPDATE_STYLE]));\n // 是inherit,需要向上查找,从顶部向下递归计算继承信息\n if(isInherit) {\n while(parent && parent !== root) {\n let { __config: {\n [NODE_UNIQUE_UPDATE_ID]: __uniqueUpdateId,\n }, currentStyle } = parent;\n let isInherit;\n if(parent.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n let style = updateHash[__uniqueUpdateId][UPDATE_STYLE];\n measureHash[__uniqueUpdateId] = true;\n let temp = change.measureInheritList(style);\n isInherit = !!temp.length;\n }\n else {\n isInherit = change.isMeasureInherit(currentStyle);\n }\n // 如果parent有inherit存入列表且继续向上,否则跳出循环\n if(isInherit) {\n last = parent;\n }\n else {\n break;\n }\n // 考虑component下的继续往上继承\n parent = parent.domParent;\n }\n }\n // 自顶向下查找inherit的,利用已有的方法+回调,当递归包含重复时标记防止重复\n last.__computeMeasure(renderMode, ctx, function(target) {\n if(target.__config.hasOwnProperty(NODE_UNIQUE_UPDATE_ID)) {\n measureHash[target.__config[NODE_UNIQUE_UPDATE_ID]] = true;\n }\n });\n });\n // 做完清空留待下次刷新重来\n for(let i = 0, len = keys.length; i < len; i++) {\n delete updateHash[keys[i]][UPDATE_CONFIG][NODE_UNIQUE_UPDATE_ID];\n }\n return hasUpdate;\n }\n\n /**\n * 除首次外每次刷新前检查reflow列表,计算需要reflow的节点局部重新布局\n * 当一个元素absolute不变时,其变化不会影响父元素和兄弟元素,直接自己重新局部LAYOUT包含子节点\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block变化时,往上查找最上层flex视为其变化,如不是则影响后面兄弟offset和父resize\n * 当flex变化时,往上查找最上层flex视为其变化,如不是则影响所有递归子节点layout和父resize\n * 以上3种情况向上查找时遇到absolute父均提前跳出,并标记absolute父LAYOUT\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * 检测节点时记录影响的所有节点,最终形成一棵或n棵局部树\n * 需要重新布局的记作LAYOUT,被兄弟影响只需偏移的记作OFFSET,OFFSET可能会重复变为LAYOUT\n * 上述情况倘若发生包含重复,去掉子树,因子树视为被包含的重新布局\n * 如果有从root开始的,直接重新布局像首次那样即可\n * 如果非root,所有树根按先根顺序记录下来,依次执行局部布局\n * =========================\n * addDom比较特殊,是向已有节点中添加新的节点,检查影响与普通domDiff变化不同\n * @private\n */\n __checkReflow(width, height) {\n let { __reflowList: reflowList } = this;\n if(!reflowList.length) {\n return;\n }\n let root = this;\n let uniqueList = [];\n let hasRoot;\n __uniqueReflowId = 0;\n let reflowHash = {};\n // 遍历检查发生布局改变的节点列表,此时computedStyle还是老的,currentStyle是新的\n for(let i = 0, len = reflowList.length; i < len; i++) {\n let item = reflowList[i];\n let { node, component, addDom, removeDom } = item;\n // root提前跳出,完全重新布局\n if(node === this) {\n hasRoot = true;\n break;\n }\n // 添加时如果是cp则node取sr来布局\n if(addDom && node instanceof Component) {\n node = node.shadowRoot;\n }\n // 每个节点生成唯一的布局识别id存入hash防止重复\n if(!node.hasOwnProperty('__uniqueReflowId')) {\n node.__uniqueReflowId = __uniqueReflowId;\n reflowHash[__uniqueReflowId++] = item;\n }\n // 每个节点都向上检查影响,以及是否从root开始完全重新,remove特殊对待,影响父节点视为普通父节点relay\n if(checkInfluence(root, reflowHash, node, component, addDom)) {\n hasRoot = true;\n if(addDom) {\n this.__zIndexChildren = null;\n }\n break;\n }\n // remove的要特殊对待,因为提前删除了父子兄弟关系,下面deepScan不会出现\n else if(removeDom) {\n uniqueList.push(item);\n }\n }\n __uniqueReflowId = 0;\n this.__reflowList = [];\n // 有root提前跳出\n if(hasRoot) {\n reflow.clearUniqueReflowId(reflowHash);\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n });\n this.__structs = this.__structure(0, 0);\n return true;\n }\n /**\n * 修剪树,自顶向下深度遍历\n * LAYOUT节点作为局部根,其递归子节点无需重复任何操作,直接去重\n * OFFSET节点作为局部根,其递归子节点先执行任何操作,后续根节点再偏移一次\n */\n else {\n this.__deepScan(function(node, options) {\n if(node.hasOwnProperty('__uniqueReflowId')) {\n let o = reflowHash[node.__uniqueReflowId];\n options.uniqueList.push(o);\n // 返回true即可提前结束深度遍历,在reflowHash有记录时提前跳出,子节点交由上面逻辑执行\n return true;\n }\n // reflowHash没有记录则无返回继续递归执行\n }, { uniqueList });\n /**\n * 按顺序执行列表即可,上层LAYOUT先执行且停止递归子节点,上层OFFSET后执行等子节点先LAYOUT/OFFSET\n * 同级按先后顺序排列,过程中记录diff在结束后进行structs更新\n * 这里要注意margin合并的逻辑,因为最终都是block(flex等同),需要进行合并\n * 在处理一个block时,先判断是否是空block,同时看后面紧邻的有没有在uniqueList的下一个\n * 单独空block处理、2个相邻的非block处理直接可以进行判断\n * 中间的空block(即非空block的下一个是空block,且下一个不是最后一个),先记录下来list,合并后一并offset\n * 合并margin和Dom的逻辑一样,抽离共有方法\n **/\n let diffList = [];\n let diffI = 0;\n let mergeOffsetList = [];\n let __uniqueMergeOffsetId = 0;\n uniqueList.forEach(item => {\n let { node, component, addDom, removeDom } = item;\n // 重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n let cps = node.computedStyle, cts = node.currentStyle;\n let zIndex = cps[Z_INDEX], position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = cts[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = cts[DISPLAY] === 'none';\n // none不可见布局无效可以无视\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = node.domParent;\n let { __layoutData: { x, y, h }, width, computedStyle } = parent;\n let current = node;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.prev;\n let hasFlowPrev;\n while(ref) {\n if(ref instanceof Text\n || (ref.computedStyle[POSITION] !== 'absolute' && ref.computedStyle[DISPLAY] !== 'none')) {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.prev;\n }\n // 找不到prev以parent为基准,找到则增加自身,排除remove\n if(!removeDom) {\n if(!hasFlowPrev) {\n y += computedStyle[MARGIN_TOP] + computedStyle[BORDER_TOP_WIDTH] + computedStyle[PADDING_TOP];\n }\n x += computedStyle[MARGIN_LEFT] + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n }\n // 找到最上层容器,如果是组件的子节点,以sr为container,sr本身往上找\n let container = node;\n // remove的节点本身无需再次布局\n if(!removeDom) {\n if(isNowAbs) {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n if(!container) {\n container = root;\n }\n // 由setState引发的要检查是cp自身还是更上层,如果cp被abs包含,那么node是cp的父亲,否则node是cp的sr\n // 而这种情况下传cp或node都一样,所以最终统一传node\n parent.__layoutAbs(container, null, node);\n // 优先判断dom变更\n if(addDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n return;\n }\n // 前后都是abs无需偏移后面兄弟和parent调整,component变化节点需更新struct\n else if(isLastAbs) {\n if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n }\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n return;\n }\n // 标识flow变abs,可能引发zIndex变更,重设struct和svg\n parent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // 现在是普通流,不管之前是啥直接布局,排除remove删除的\n else {\n node.__layout({\n x,\n y,\n w: width,\n h,\n });\n y += node.outerHeight;\n if(component) {\n container = node;\n }\n else {\n container = container.domParent;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n // 不能用domParent,必须在组件环境内\n if(container.parent) {\n container = container.parent;\n }\n else if(container.host) {\n break;\n }\n }\n }\n if(!container) {\n container = root;\n }\n // 防止geom\n if(node instanceof Dom) {\n node.__layoutAbs(container, {\n x,\n y,\n w: width,\n h,\n });\n }\n }\n }\n\n // 向上查找最近的parent是relative,需再次累加ox/oy,无需继续向上递归,因为parent已经递归包含了\n // 这样node重新布局后再次设置其使用parent的偏移\n let p = node;\n while(p && p !== root) {\n p = p.domParent;\n computedStyle = p.computedStyle;\n if(computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && node.__offsetX(ox);\n oy && node.__offsetY(oy);\n break;\n }\n }\n\n // 向下调整next的flow位置,遇到重复LAYOUT的跳出等待其调用并处理其next,忽视掉abs,margin和abs在merge中做\n if(node.isShadowRoot) {\n node = node.hostRoot;\n }\n let next = node.next;\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n if(next.computedStyle[POSITION] === 'absolute') {\n next = next.next;\n continue;\n }\n let { y: oy } = next;\n let diff = y - oy;\n if(diff) {\n while(next && !next.hasOwnProperty('__uniqueReflowId')) {\n let target = next;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let cs = target.computedStyle;\n if(cs[POSITION] !== 'absolute' && cs[DISPLAY] !== 'none') {\n target.__offsetY(diff, true, REPAINT);\n }\n next = next.next;\n }\n }\n break;\n }\n\n // 去重防止abs并记录parent,整个结束后按先序顺序进行margin合并以及偏移,注意忽略有display:none变block同时为absolute的\n if(!parent.hasOwnProperty('__uniqueMergeOffsetId') && !(isNowAbs && isLastNone)) {\n parent.__uniqueMergeOffsetId = __uniqueMergeOffsetId++;\n mergeOffsetList.push(parent);\n }\n\n // add和remove都需父节点重新生成struct,zIndexChildren已在对应api操作的before()侦听做了\n if(addDom || removeDom) {\n let arr = parent.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(parent);\n }\n }\n // component未知dom变化,所以强制重新struct,text则为其父节点,同时防止zIndex变更影响父节点\n else if(component) {\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n if((position !== cts[POSITION] && (position === 'static' || cts[POSITION] === 'static'))\n || zIndex !== cts[Z_INDEX]) {\n node.domParent.__updateStruct(root.__structs);\n if(this.renderMode === mode.SVG) {\n cleanSvgCache(node.domParent);\n }\n }\n }\n // display有none变化,重置struct和zIndexChildren\n else if(isLastNone || isNowNone) {\n node.__zIndexChildren = null;\n let arr = node.__modifyStruct(root, diffI);\n diffI += arr[1];\n diffList.push(arr);\n }\n });\n /**\n * mergeMargin后续调整,记录的是变更节点的父节点,因此每个节点内部直接遍历孩子进行\n * 由于保持先根遍历的顺序,因此会从最上最里的节点开始,先进行margin合并\n * 由于之前忽略掉abs节点,因此再检查直接abs是否要调整\n * 完成后对此父节点的后续兄弟节点进行调整,多次不会干扰影响\n * 然后继续往上循环,直到root结束\n */\n let inDirectAbsList = [];\n mergeOffsetList.forEach(parent => {\n delete parent.__uniqueMergeOffsetId;\n let flowChildren = parent.flowChildren, absChildren = parent.absChildren;\n let mergeMarginBottomList = [], mergeMarginTopList = [];\n let length = flowChildren.length, lastChild;\n let isStart, startIndex, startNode;\n // 遍历flow孩子,从开始变化的节点开始,看变化造成的影响,对其后面节点进行偏移,并统计总偏移量\n for(let i = 0; i < length; i++) {\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n let isXom = item instanceof Xom;\n // 忽略掉前面没有变更的节点,不能合并\n if(!isStart && isXom) {\n if(item.hasOwnProperty('__uniqueReflowId')) {\n isStart = true;\n startIndex = i;\n startNode = item;\n }\n }\n // 开始变更的节点,至少不是第0个\n let cs = isXom && item.currentStyle;\n let isInline = isXom && cs[DISPLAY] === 'inline';\n let isInlineBlock = isXom && ['inlineBlock', 'inline-block'].indexOf(cs[DISPLAY]) > -1;\n lastChild = item;\n // 每次循环开始前,这次不是block的话,看之前遗留的,可能是以空block结束,需要特殊处理,单独一个空block也包含\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginBottomList.length && mergeMarginTopList.length && isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n mergeMarginTopList = [];\n mergeMarginBottomList = [];\n }\n // 和普通布局类似,只是不用重新布局只需处理合并margin再根据差值偏移\n if(isXom && !isInline) {\n let isNone = isXom && cs[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginBottomList.push(marginBottom);\n mergeMarginTopList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n // 空block要留下轮循环看,除非是最后一个,非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let { [MARGIN_TOP]: marginTop, [MARGIN_BOTTOM]: marginBottom } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginBottomList.length) {\n mergeMarginTopList.push(marginTop);\n if(isStart) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n // 需要合并的情况,根据记录数和索引向上向下遍历节点设置偏移,同时设置总偏移量供父级使用\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginTopList = [];\n mergeMarginBottomList = [marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0,最后一个一定有不必判断isStart\n else if(i === length - 1) {\n let diff = reflow.getMergeMarginTB(mergeMarginTopList, mergeMarginBottomList);\n if(diff) {\n for(let j = Math.max(startIndex, i - mergeMarginBottomList.length + 1); j < length; j++) {\n flowChildren[j].__offsetY(diff, true, REPAINT);\n }\n }\n }\n }\n }\n // 先检查parent的尺寸是否发生了变化,从而决定是否调整next以及向上递归调整\n let cs = parent.currentStyle;\n let height = cs[HEIGHT];\n let isContainer = parent === root || parent.isShadowRoot || cs[POSITION] === 'absolute' || cs[POSITION] === 'relative';\n if(height[1] === AUTO && lastChild) {\n let oldH = parent.height + parent.computedStyle[PADDING_TOP];\n let nowH = lastChild.y + lastChild.outerHeight - parent.y;\n let diff = nowH - oldH;\n // 调整next以及非固定PX的abs,再递归向上\n if(diff) {\n parent.__resizeY(diff, REPAINT);\n let container;\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom, [HEIGHT]: height } = item.currentStyle;\n // 是容器,所有的都调整,不是容器,其偏移是上级parent的某一个,根据情况具体不同\n if(top[1] === AUTO) {\n if(bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n else if(bottom[1] === PX) {\n item.__offsetY(diff, true, REPAINT);\n }\n else if(bottom[1] === PERCENT) {\n let v = (1 - bottom[0] * 0.01) * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n else if(top[1] === PERCENT) {\n if(isContainer) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n // 非容器的特殊处理\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n if(container.currentStyle[HEIGHT][1] !== PX) {\n let v = top[0] * 0.01 * diff;\n item.__offsetY(v, true, REPAINT);\n }\n }\n }\n // 高度百分比需发生变化的重新布局,需要在容器内\n if(height[1] === PERCENT) {\n if(isContainer) {\n parent.__layoutAbs(parent, null, item);\n }\n // 不在容器内说明在上级,存入等结束后统一重新布局\n else {\n if(!container) {\n container = parent.domParent;\n while(container) {\n if(container === root || container.isShadowRoot) {\n break;\n }\n let cs = container.currentStyle;\n if(cs[POSITION] === 'absolute' || cs[POSITION] === 'relative') {\n break;\n }\n container = container.domParent;\n }\n }\n inDirectAbsList.push([parent, container, item]);\n }\n }\n }\n reflow.offsetAndResizeByNodeOnY(parent, root, reflowHash, diff, inDirectAbsList);\n return;\n }\n }\n // 没有diff变化或者固定尺寸,可能内部发生变化,调整AUTO的abs,不递归向上\n for(let i = 0, len = absChildren.length; i < len; i++) {\n let item = absChildren[i];\n let { [TOP]: top, [BOTTOM]: bottom } = item.currentStyle;\n if(top[1] === AUTO && bottom[1] === AUTO) {\n let prev = item.prev;\n while(prev) {\n let target = prev;\n if(target instanceof Component) {\n target = target.shadowRoot;\n }\n let isXom = target instanceof Xom;\n let cs = isXom && target.currentStyle;\n let isAbs = isXom && cs[POSITION] === 'absolute';\n if(!isAbs) {\n let y = target.y + target.outerHeight;\n let d = y - item.y;\n if(d) {\n item.__offsetY(d, true, REPAINT);\n }\n break;\n }\n prev = prev.prev;\n }\n }\n }\n });\n // merge过程中需要重新布局的abs\n inDirectAbsList.forEach(arr => {\n arr[0].__layoutAbs(arr[1], null, arr[2]);\n });\n\n // 调整因reflow造成的原struct数据索引数量偏差,纯zIndex的已经在repaint里面重新生成过了\n // 这里因为和update保持一致的顺序,因此一定是先根顺序且互不包含\n let diff = 0, lastIndex = 0, isFirst = true, structs = root.__structs;\n diffList.forEach(item => {\n let [ns, d] = item;\n // 第一个有变化的,及后面无论有无变化都需更新\n // 第1个变化区域无需更改前面一段\n if(isFirst) {\n isFirst = false;\n lastIndex = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1;\n diff += d;\n }\n // 第2+个变化区域看是否和前面一个相连,有不变的段则先偏移它,然后再偏移自己\n else {\n let j = ns[STRUCT_INDEX] + (ns[STRUCT_TOTAL] || 0) + 1 + diff;\n for(let i = lastIndex; i < j; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n lastIndex = j;\n diff += d;\n }\n });\n // 后面的要根据偏移量校正索引\n if(diff) {\n for(let i = lastIndex, len = structs.length; i < len; i++) {\n structs[i][STRUCT_INDEX] += diff;\n }\n }\n // 清除id\n reflow.clearUniqueReflowId(reflowHash);\n }\n }\n\n // 特殊覆盖方法,不需要super()计算自己,因为放在每次checkRoot()做过了\n __computeMeasure(renderMode, ctx) {\n css.computeMeasure(this, true);\n this.children.forEach(item => {\n item.__computeMeasure(renderMode, ctx);\n });\n }\n\n // 每个root拥有一个刷新hook,多个root塞到frame的__hookTask里\n // frame在所有的帧刷新逻辑执行后检查hook列表,进行root刷新操作\n __frameHook() {\n if(!this.__hookTask) {\n let r = this.__hookTask = (() => {\n this.refresh();\n });\n frame.__hookTask.push(r);\n }\n }\n\n __clear(ctx, renderMode) {\n if(renderMode === mode.CANVAS) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n else if(renderMode === mode.WEBGL) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get taskUp() {\n return this.__taskUp;\n }\n\n get taskCp() {\n return this.__taskCp;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n\n get texCache() {\n return this.__texCache;\n }\n}\n\nexport default Root;\n","import Geom from './Geom';\nimport mode from '../mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA.length >= 2) {\n num++;\n }\n if(controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getNewPoint(x1, y1, x2, y2, controlA, controlB, num, start = 0, end = 1) {\n if(start > 0 || end < 1) {\n if(num === 3) {\n [[x1, y1], controlA, controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, controlB, [x2, y2]], start, end);\n }\n else if(num === 2) {\n [[x1, y1], controlB, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlB, [x2, y2]], start, end);\n }\n else if(num === 1) {\n [[x1, y1], controlA, [x2, y2]] = geom.sliceBezier2Both([[x1, y1], controlA, [x2, y2]], start, end);\n }\n else {\n let a = Math.abs(x1 - x2);\n let b = Math.abs(y1 - y2);\n x1 += a * start;\n y1 += b * start;\n x2 -= a * (1 - end);\n y2 -= b * (1 - end);\n }\n }\n return [x1, y1, x2, y2, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // x1,y1和x2,y2表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__x1 = [0];\n this.__y1 = [0];\n this.__x2 = [1];\n this.__y2 = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.x1)) {\n this.__x1 = props.x1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x1)) {\n this.__x1 = [parseFloat(props.x1) || 0];\n }\n if(Array.isArray(props.y1)) {\n this.__y1 = props.y1.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y1)) {\n this.__y1 = [parseFloat(props.y1) || 0];\n }\n if(Array.isArray(props.x2)) {\n this.__x2 = props.x2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.x2)) {\n this.__x2 = [parseFloat(props.x2) || 0];\n }\n if(Array.isArray(props.y2)) {\n this.__y2 = props.y2.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.y2)) {\n this.__y2 = [parseFloat(props.y2) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__x1.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__x1.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__x1.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__x1.map(() => v);\n }\n }\n else {\n this.__x1 = this.__y1 = this.__start = 0;\n this.__x2 = this.__y2 = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.x1)) {\n this.__x1 = parseFloat(props.x1) || 0;\n }\n if(!isNil(props.y1)) {\n this.__y1 = parseFloat(props.y1) || 0;\n }\n if(!isNil(props.x2)) {\n this.__x2 = parseFloat(props.x2) || 0;\n }\n if(!isNil(props.y2)) {\n this.__y2 = parseFloat(props.y2) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['x1', 'x2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['y1', 'y2'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n ctx = res.ctx;\n let {\n sx3,\n sy3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.buildCache(sx3, sy3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(x1, y1, x2, y2, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.x1.forEach((xa, i) => {\n let xb = __cacheProps.x2[i];\n let ya = __cacheProps.y1[i];\n let yb = __cacheProps.y2[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { x1, y1, x2, y2, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [x1, y1, x2, y2, controlA, controlB] = getNewPoint(x1, y1, x2, y2, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get x1() {\n return this.getProps('x1');\n }\n\n get y1() {\n return this.getProps('y1');\n }\n\n get x2() {\n return this.getProps('x2');\n }\n\n get y2() {\n return this.getProps('y2');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let { x1, y1, x2, y2, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n if(!isMulti) {\n x1 = [x1];\n x2 = [x2];\n y1 = [y1];\n y2 = [y2];\n controlA = [controlA];\n controlB = [controlB];\n }\n x1.forEach((xa, i) => {\n let ya = y1[i];\n let xb = x2[i];\n let yb = y2[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[0] = Math.min(bbox[0], xb - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[1] = Math.min(bbox[1], yb - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[2] = Math.max(bbox[2], xb + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n bbox[3] = Math.max(bbox[3], yb + oy);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n let bezierBox = geom.bboxBezier(xa, ya, ca[0], ca[1], cb[0], cb[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + ox);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + oy);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n}\n\nfunction limitStartEnd(v) {\n if(v < 0) {\n v = 0;\n }\n else if(v > 1) {\n v = 1;\n }\n return v;\n}\n\nfunction getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]], 2);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = geom.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]], 3);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n}\n\nfunction getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return getIndex(list, t, Math.min(middle + 1, j), j);\n }\n}\n\nfunction getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start >= end) {\n return [];\n }\n let i = 0, j = list.length - 1;\n if(start > 0) {\n i = getIndex(len.increase, start * len.total, i, j);\n }\n if(end < 1) {\n j = getIndex(len.increase, end * len.total, i, j);\n }\n list = util.clone(list);\n end *= len.total;\n let prePercent = 1;\n if(end > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[j + 1] = [current[1] - (1 - t) * a, current[1] - (1 - t) * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n list[j + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], res[3][0], res[3][1]];\n }\n }\n start *= len.total;\n if(start > len.increase[i]) {\n let prev = list[i].slice(list[i].length - 2);\n let current = list[i + 1];\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度\n if(i === j && prePercent !== 1) {\n l *= prePercent;\n }\n let diff = start - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = Math.abs(current[0] - prev[0]);\n let b = Math.abs(current[1] - prev[1]);\n if(current[0] < prev[0]) {\n a = -a;\n }\n if(current[1] < prev[1]) {\n b = -b;\n }\n list[i] = [prev[0] + t * a, prev[1] + t * b];\n }\n else if(current.length === 4) {\n let res = geom.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1]];\n }\n else if(current.length === 6) {\n let res = geom.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n list[i] = res[0];\n list[i + 1] = [res[1][0], res[1][1], res[2][0], res[2][1], current[4], current[5]];\n }\n }\n if(j < list.length - 2) {\n list = list.slice(0, j + 2);\n }\n if(i > 0) {\n list = list.slice(i);\n }\n return list;\n}\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => limitStartEnd(parseFloat(i) || 0));\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = limitStartEnd(parseFloat(props.start) || 0);\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return limitStartEnd(v);\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n v = limitStartEnd(v);\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = limitStartEnd(parseFloat(props.start) || 0);\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = limitStartEnd(v);\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map((item, i) => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.filter(item => Array.isArray(item)).map((point, i) => {\n if(i) {\n return concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n }\n return rebuild || rebuildSE;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n },\n isMulti, __cacheProps,\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else if(c && c.length === 2) {\n let bezierBox = geom.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - ox);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - oy);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + ox);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + oy);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - ox);\n bbox[1] = Math.min(bbox[1], ya - oy);\n bbox[2] = Math.max(bbox[2], xa + ox);\n bbox[3] = Math.max(bbox[3], ya + oy);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from \"../../util/util\";\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.sx3, res.sy3);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n this.buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n bbox[0] = Math.min(bbox[0], originX - ox);\n bbox[1] = Math.min(bbox[1], originY - oy);\n bbox[2] = Math.max(bbox[2], originX + width + ox);\n bbox[3] = Math.max(bbox[3], originY + height + oy);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - r - ox;\n let xb = cx + r + ox;\n let ya = cy - r - oy;\n let yb = cy + r + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n BOX_SHADOW,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, lv, ctx, cache) {\n let res = super.render(renderMode, lv, ctx, cache);\n if(res.break) {\n return res;\n }\n this.buildCache(res.cx, res.cy);\n ctx = res.ctx;\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __sx3: originX, __sy3: originY, width, height,\n currentStyle: {\n [STROKE_WIDTH]: strokeWidth,\n [BOX_SHADOW]: boxShadow,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(item[0], half);\n });\n let [ox, oy] = this.__spreadBbox(boxShadow);\n ox += half;\n oy += half;\n let xa = cx - rx - ox;\n let xb = cx + rx + ox;\n let ya = cy - ry - oy;\n let yb = cy + ry + oy;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\nimport $$type from '../util/$$type';\nimport util from '../util/util';\nimport inject from '../util/inject';\n\nconst { TYPE_VD, TYPE_GM, TYPE_CP } = $$type;\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json && vars) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\nfunction replaceLibraryVars(json, hash, vars) {\n if(vars) {\n // 新版同级vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度\n if(Array.isArray(member) && member.length > 1 && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target(k));\n }\n let old = target[k];\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n }\n // 兼容老版var-\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n // 直接移除library插槽,防止下面调用replaceVars(json, vars)时报错\n delete json[k];\n if(!v) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // 替换图层的值必须是一个有tagName的对象\n if(!value || !value.tagName) {\n return;\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction linkLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n/**\n * 链接child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkChild(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props);\n child.children = libraryItem.children;\n child.library = libraryItem.library;\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n child.libraryId = null;\n // 规定图层实例化的属性和样式在init上,优先使用init,然后才取原型链的props\n let { init } = child;\n if(init) {\n let props = child.props = child.props || {};\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n child.init = null;\n }\n}\n\nfunction parse(karas, json, animateRecords, opt, hash = {}) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, opt, hash);\n });\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkChild(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n json.libraryId = null;\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => {\n linkLibrary(item, hash);\n });\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n json.library = null;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n let style = props.style;\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n // 再替换静态属性,style也作为属性的一种,目前尚未被设计为被替换\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n if(item && [TYPE_VD, TYPE_GM, TYPE_CP].indexOf(item.$$type) > -1) {\n return item;\n }\n return parse(karas, item, animateRecords, opt, hash);\n }));\n }\n let animationRecord;\n if(animate) {\n if(Array.isArray(animate)) {\n let has;\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n });\n if(has) {\n animationRecord = {\n animate,\n target: vd,\n };\n }\n }\n else {\n (opt.abbr !== false) && abbr2full(animate, abbrAnimate);\n let { value, options } = animate;\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n animationRecord = {\n animate,\n target: vd,\n };\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n }\n }\n }\n // 产生实际动画运行才存入列表供root调用执行\n if(animationRecord) {\n animateRecords.push(animationRecord);\n }\n return vd;\n}\n\nexport default parse;\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\n\nlet o = {\n parse(karas, json, dom, options = {}) {\n json = util.clone(json);\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, data } = item;\n if(fontFamily && data) {\n font.register(fontFamily, data);\n }\n });\n }\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = dom || {};\n dom = null;\n }\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, options);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 由于vd首先生成的都是json,根parse要特殊处理将target指向真正的vd引用,json的vd在builder中赋值\n animateRecords.forEach(item => {\n item.target = item.target.vd;\n });\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(url);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n if(a || b || c) {\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n return res;\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './node/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport $$type from './util/$$type';\nimport builder from './util/builder';\nimport updater from './util/updater';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n return {\n tagName,\n props,\n children,\n $$type: $$type.TYPE_VD,\n };\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n return {\n tagName,\n props,\n $$type: $$type.TYPE_GM,\n };\n },\n createCp(klass, props, children = []) {\n props.children = children;\n return {\n klass,\n props,\n $$type: $$type.TYPE_CP,\n };\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n builder,\n updater,\n refresh,\n enums,\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nbuilder.ref({\n Xom,\n Dom,\n Img,\n Geom,\n Component,\n});\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","s","toLowerCase","replace","$0","$1","toUpperCase","STYLE2UPPER_MAP","style2Upper","$2","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","Object","keys","forEach","k","k2","l","UPDATE_KEY","UPDATE_NODE","UPDATE_STYLE","UPDATE_FOCUS","UPDATE_MEASURE","UPDATE_COMPONENT","UPDATE_OVERWRITE","UPDATE_KEYS","UPDATE_LIST","UPDATE_CONFIG","UPDATE_ADD_DOM","UPDATE_REMOVE_DOM","KEY_FRAME_KEY","FRAME_STYLE","FRAME_TIME","FRAME_EASING","FRAME_TRANSITION","NODE_KEY","NODE_DOM_PARENT","NODE_OPACITY","NODE_MATRIX","NODE_MATRIX_EVENT","NODE_CACHE","NODE_CACHE_TOTAL","NODE_CACHE_FILTER","NODE_CACHE_MASK","NODE_CACHE_OVERFLOW","NODE_STRUCT","NODE_TAG_NAME","NODE_CURRENT_STYLE","NODE_CURRENT_PROPS","NODE_COMPUTED_STYLE","NODE_CACHE_STYLE","NODE_CACHE_PROPS","NODE_LIMIT_CACHE","NODE_IS_MASK","NODE_IS_INLINE","NODE_HAS_CONTENT","NODE_REFRESH_LV","NODE_IS_DESTROYED","NODE_STYLE","NODE_UPDATE_HASH","NODE_UNIQUE_UPDATE_ID","NODE_DEFS_CACHE","NODE_PERSPECTIVE_MATRIX","NODE_VIRTUAL_DOM","STRUCT_KEY","STRUCT_NODE","STRUCT_INDEX","STRUCT_CHILD_INDEX","STRUCT_LV","STRUCT_NUM","STRUCT_TOTAL","STRUCT_HAS_MASK","enums","Node","__x","__y","__ox","__oy","__width","__height","__baseLine","__config","i","lv","j","root","struct","diff","isLayout","__sx","__sy","x","ox","y","oy","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","CANVAS","SVG","WEBGL","o","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","calUnit","v","n","parseFloat","test","info","arial","lhr","blr","lgr","padding","f","verdana","tahoma","S","T","Z","c","t","georgia","simsun","support","fontFamily","hasOwnProperty","register","name","emSquare","ascent","descent","lineGap","addPadding","assign","position","gradient","img","identity","multiply","a","b","isE","a0","a1","a2","a3","calPoint","point","m","z","w","undefined","length","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","d","e","inverse","inverse4","divisor","inv","det","m2m6","point2d","slice","dotProduct","x1","y1","x2","y2","crossProduct","H","Math","sqrt","vector","mx","h","deg","cos","sin","pointInPolygon","vertexes","xmax","ymax","xmin","ymin","len","max","min","pointInQuadrilateral","x4","y4","x3","y3","matrix","w1","w2","w3","w4","angleBySide","theta","pow","acos","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","sectorPoints","r","begin","end","list","floor","h2","d2r","abs","atan","rx","ry","p1","p2","p4","p3","push","concat","temp","res","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","isRectsInside","calCoordsInNode","px","py","node","computedStyle","width","height","calPercentInNode","ds","Infinity","PI","dt","r2d","bboxBezier2","x0","y0","minX","minY","maxX","maxY","tx","ty","sx","sy","qx","qy","bboxBezier3","cx","cy","bx","by","ax","ay","hx","hy","q","bboxBezier","arguments","norm","order","sum","reduce","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","st","sl","sr","ans","bezierLength","points","startT","endT","at","at3","p0","at2","bezierOrder","derivativeOrder","pointAtBezier","percent","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","start","reverse","pointOnCircle","getConicGradientImage","originX","originY","stop","data","Error","getAngle","dx","dy","increasingList","map","item","color","angle","factor","idx","canvasPolygon","ctx","Array","isArray","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","num","svgLine","canvasFilter","filter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","style","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","indexOf","isLast","main1","main2","cross1","cross2","tan","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","ya","yb","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","xa","xb","ca","calBezierTopLeft","cb","controls1","controls2","limit","pop","endLength","oyr","calBezierTopRight","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","noRadius","target","prev","next","half","calBorderRadiusInline","contentBoxList","first","last","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","fillStyle","fill","closePath","virtualDom","bb","type","tagName","props","TYPE_VD","_","TYPE_GM","TYPE_CP","toString","isType","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","fnToString","ObjectFunctionString","isNil","joinSourceArray","arr","stringify","encodeHtml","prop","joinVirtualDom","vd","defs","joinDef","joinVd","conClip","children","isMask","content","opacity","transform","visibility","mask","overflow","mixBlendMode","def","uuid","joinItem","rgba2int","charAt","parseInt","match","int2rgba","joinArr","int2invert","arr2hash","hash","hash2arr","clone","$$type","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","source","split","extendAnimate","ovd","nvd","__animationList","animationList","splice","__setTarget","assigning","finished","__stayEnd","assignCurrentStyle","__frameAnimateList","transformBbox","bbox","proto","getPrototypeOf","Ctor","constructor","assignMatrix","isPrimitive","isAuto","flag","charWidth","ELLIPSIS","antialias","premultipliedAlpha","preserveDrawingBuffer","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","error","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","revertY","createTexture","tex","texture","bindTexture","pixelStorei","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","drawTextureCache","vtPoint","vtTex","vtOpacity","lastChannel","record","stack","cache","channel","page","tx1","ty1","tx2","ty2","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","Float32Array","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","count","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","frameBuffer","texCache","tex1","tex2","spread","sigma","u_direction","uniform2f","ratio","recycle","tex3","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","tex4","deleteTexture","drawCm","u_m","uniform1fv","drawOverflow","programOverflow","drawMask","u_texture1","u_texture2","drawMbm","W","SPF","CANVAS_LIST","WEBGL_LIST","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","defaultFontFamilyData","key","message","debug","document","createElement","setAttribute","body","appendChild","canvas","draw","enabled","available","release","cacheCanvas","cacheWebgl","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","inject","measureText","textCache","html","lengths","chars","ff","fs","fw","inline","char","div","left","top","innerHTML","cns","childNodes","index","css","window","getComputedStyle","text","__measureCb","removeChild","measureTextSync","measureImg","url","state","success","task","Image","onload","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasCacheCanvas","getCacheCanvas","releaseCacheCanvas","delCacheCanvas","hasCacheWebgl","getCacheWebgl","releaseCacheWebgl","delCacheWebgl","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","checkSupportFontFamily","font","checked","context","textAlign","textBaseline","clearRect","fillText","getImageData","loadFont","FontFace","load","then","loadComponent","script","async","head","getLinearDeg","getRadialPosition","center","right","bottom","getColorStop","firstColor","p","dr","dg","db","da","unshift","calLinearCoords","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","asin","parseGradient","reg","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","add","DOM","display","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","fontStyle","fontWeight","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","boxShadow","pointerEvents","whiteSpace","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","GEOM","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","isValid","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","KEY_COLOR","KEY_LENGTH","KEY_GRADIENT","KEY_RADIUS","COLOR_HASH","LENGTH_HASH","RADIUS_HASH","GRADIENT_HASH","GRADIENT_TYPE","linear","radial","conic","KEY_EXPAND","EXPAND_HASH","RESET_DOM","reset","RESET_GEOM","IGNORE","REPAINT","MEASURE","addGeom","ks","isIgnore","isGeom","isRepaint","isMeasure","MEASURE_KEY_SET","isMeasureInherit","measureInheritList","change","TRANSFORM_HASH","compatibleTransform","normalize","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","computeMeasure","isRoot","domParent","parentComputedStyle","getFontFamily","computeReflow","isHost","parent","rem","calNormalLineHeight","ph","setFontStyle","str","getBaseLine","normal","calRelativePercent","calRelative","isWidth","calAbsolute","equalStyle","oa","ob","aa","av","bv","isMulti","isRelativeOrAbsolute","VALUE","ARRAY_0","ARRAY_0_1","cloneStyle","TextBox","wList","__index","__content","__wList","cacheStyle","__endX","__endY","overFill","strokeText","baseLine","__parentLineBox","SIZE","MAX","HASH_CANVAS","Page","number","__size","__number","__free","__total","__canvas","__offscreen","__grid","__uuid","__update","time","grid","pos","calDeg","pointIndex","cross","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","isOverflow","ls","lt","ls2","lt2","ax2","ay2","ax3","ay3","ab","ac","bc","AB","AC","BC","A","tar","math","calSingle","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calMatrixByOrigin","calMatrixWithOrigin","normalizeSingle","calOrigin","tfo","calMatrixByPerspective","pm","calPerspectiveMatrix","ppt","po","isPerspectiveMatrix","kernelSize","outerSize","outerSizeByD","gaussianWeight","E","_enums$NODE_KEY","genSingle","dbx","dby","Cache","__init","__bbox","__page","__pos","getCoords","__appendData","__enabled","setTransform","globalAlpha","update","__available","clear","del","ceil","getInstance","blur","isClip","cacheMask","tf","cacheOverflow","cacheFilter","drawCache","globalCompositeOperation","xe","ye","rect","old","newCache","nx","ny","dbx2","dby2","ENUM","NONE","TRANSFORM_ALL","REFLOW","REBUILD","TRANSFORMS","contain","value","getLevel","isReflow","isRebuild","Text","__textBoxes","__charWidthList","__charWidth","__textWidth","charWidthList","ffs","__ff","__key","wait","needMeasure","bp","__bp","pff","pffs","pfs","pfw","pKey","__pKey","parentCache","mw","__cache","lx","lineBoxManager","endSpace","lineClampCount","__sx1","__sy1","isDestroyed","textBoxes","beginSpace","maxW","needReduce","lastChar","ew","lineCount","isTextOverflow","__lineBack","textBox","addItem","cw","hasCache","needBack","setNewLine","__ellipsis","lineBox","tb","__offsetX","__offsetY","textWidth","__layout","lineWidth","strokeColor","strokeStyle","render","endX","endY","__cacheStyle","delRefreshTask","__task","addRefreshTask","__before","level","__addUpdate","__after","__style","matrixEvent","__renderByMask","flattenJson","traverseJson","lastText","options","Xom","Dom","Img","Geom","Component","initRoot","cd","flatten","__json","build","relation","initDom","json","initCp","initCp2","klass","__tagName","hasP","__inheritAnimate","__animateRecords","__placeholder","__children","getRegister","ref","shadowRoot","Event","__eHash","handle","on","apply","off","__karasEventCb","once","emit","event","fns","fn","REGISTER","setUpdateFlag","cp","__hasUpdate","__ref","__isMounted","__taskList","__nextState","addRefreshCp","builder","__cd","listener","__shadow","shadow","__shadowRoot","componentDidMount","REFRESH","__isDestroyed","componentWillUnmount","__destroy","force","__emitEvent","__state","hasRegister","defineProperty","get","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","me","calBackgroundSize","calBackgroundPosition","container","renderImage","loadBgi","bx2","by2","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","image","needResize","copy","traversal","after","isPause","Frame","__hookTask","__taskCp","__now","taskCp","cloneCp","lengthCp","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","BezierEasing","easing","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","NUM_CAL_HASH","unify","frames","getProps","inherit","genBeforeRefresh","I_NODE_CONFIG","I_ROOT_CONFIG","I_STYLE","I_ASSIGNING","__frameHook","framing","duration","es","offset","translatePath","calByUnit","calDiff","nm","pHash","nHash","keyHash","hasChange","nv","pv","pi","ni","has","pp","nn","clientWidth","eq","isArrP","isArrN","pz","nz","np","len2","pv2","nv2","len3","pv3","nv3","u","calFrame","ts","binarySearch","frame","middle","ea","steps","stepsD","calIntermediateStyle","transition","st2","calIncrease","o2","n2","gotoOverload","I_IN_FPS","I_IS_DELAY","I_BEGIN","I_END","I_FINISHED","I_NEXT_END","I_FIRST_PLAY","I_FRAME_CB","I_PLAY_CB","I_TARGET","I_ROOT","I_FRAMES","I_FRAMES_R","I_CURRENT_TIME","I_NEXT_TIME","I_DURATION","I_ITERATIONS","I_FILL","I_PLAYBACK_RATE","I_PLAY_COUNT","I_PLAY_STATE","I_DESTROYED","I_START_TIME","I_FPS_TIME","I_EASING","I_ENTER_FRAME","I_DELAY","I_END_DELAY","I_KEYS","I_ORIGIN_STYLE","I_CURRENT_FRAMES","I_CURRENT_FRAME","I_SPF_LIMIT","I_FPS","I_DIRECTION","I_CAL_DIFF_TIME","I_FIRST_ENTER","I_STAY_BEGIN","I_STAY_END","I_IS2","I_END_TIME","I_OUT_BEGIN_DELAY","I_TIME_STAMP","Animation","__id","nl","__options","op","config","__frameCb","__calDiffTime","iterations","framesR","originStyle","fps","spfLimit","delay","endDelay","playbackRate","current","isFinish","__cancelTask","__currentProps","__currentStyle","isDelay","FRAME","PLAY","playState","__hasFin","__hasCancel","playCount","currentFrames","stayBegin","stayEnd","is2","endTime","currentTime","currentFrame","round","isAlternate","alternate","isEven","isLastCount","frameTime","isLastFrame","inEndDelay","needClean","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","currentProps","spf","animateController","remove","backwards","both","forwards","__target","sync","removeControl","nextFrame","__checkModify","renderBoxShadow","inset","box","spreadBox","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","MBM_HASH","screen","overlay","darken","lighten","difference","exclusion","hue","saturation","luminosity","mbmName","isValidMbm","getInlineBox","diffL","eyt","eyb","pbt","pbb","dom","getInlineWidth","contentBox","mbm","TF","TX","TY","TZ","getFirstEmptyInlineWidth","flowChildren","child","getLastEmptyInlineWidth","__computedStyle","__listener","__loadBgi","__cacheDefs","__isClip","__isMask","__contentBoxList","__hasMask","__mpWidth","mp","__clientWidth","__clientHeight","__offsetWidth","__offsetHeight","__outerWidth","__outerHeight","onlyFixedValue","isDirectionRow","isDirectItem","__calMp","isVirtual","fromAbs","isShadowRoot","clearCache","__layoutData","__layoutNone","__mp","__isRealInline","__layoutFlex","__layoutInline","__layoutBlock","__sx2","__sx3","__sx4","__sx5","__sx6","__sy2","__sy3","__sy4","__sy5","__sy6","__execAr","ar","controller","autoPlay","__records2","init","list2","__records","__playAuto","h3","nowrap","fixedWidth","fixedHeight","selfEndSpace","offsetWidth","offsetHeight","matrixCache","isScale","clientHeight","x5","x6","y5","y6","__calFilter","bg","bgI","item2","kw","rebuild","__hasContent","isRealInline","sx4","sx5","sx6","sy4","sy5","sy6","hasContent","__calContent","__calPerspective","__calMatrix","__releaseWhenEmpty","limitCache","__calCache","perspectiveMatrix","offscreenBlend","offscreenMask","hasFilter","offscreenFilter","offscreenOverflow","borderList","hasBgi","some","svgBgSymbol","__gradient","isFirst","lastContentBox","lastLineBox","parentLineBox","countW","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","ec","dc","pc","cur","onlyTotal","__cacheTotal","__cacheFilter","__cacheMask","__cacheOverflow","formatStyle","animation","cancel","enter","hostRoot","pJson","zChildren","zIndexChildren","__spreadBbox","LineBox","__list","__lineHeight","LineBoxManager","__lastX","__lastY","__maxX","__domList","__domStack","__isNewLine","__isEnd","__setLB","nextNewLine","genLineBox","verticalAlign","isNewLine","TAG_NAME","INLINE","BOLD","offsetAndResizeByNodeOnY","reflowHash","inDirectAbsList","isContainer","cs","__layoutAbs","isAbs","__resizeY","clearUniqueReflowId","__uniqueReflowId","getMergeMarginTB","topList","bottomList","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","block","inlineBlock","none","tag","__flexLine","__zIndexChildren","__structure","nss","__structs","structs","needSort","__tryLayInline","firstCharWidth","main","isRow","__calMinMax","min2","max2","countMin","countMax","setNotEnd","__addMp","isFixed","isContent","fixedSize","__lineBoxManager","__preLayout","__ioSize","mergeMarginBottomList","mergeMarginTopList","isXom","isInlineBlock","isImg","reflow","__isIbFull","lastX","lastY","isNone","isEmptyBlock","tw","th","horizonAlign","__inlineSize","domList","__marginAuto","growList","shrinkList","basisList","maxList","minList","orderChildren","__calBasis","containerSize","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","__layoutFlexLine","maxCross","crossSum","crossSumList","between","around","__crossAlign","flexLine","hypotheticalSum","targetMainList","factorSum","factorList","needReset","factorSum2","lbmList","firstBaseLine","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isInline2","isInlineBlock2","focusNoWrap","fw2","addX","popContentBoxList","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","needCalWidth","wl","hl","__computeMeasure","__deepScan","loadImg","__loadImg","placeholder","loading","__loadAndRefresh","showError","pts","arc","__addGeom","reload","Defs","cacheHash","__isMulti","multi","__cacheProps","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","updateList","removeList","KEY_FLAG","check","checkCp","nextProps","forceCheckUpdate","shouldUpdate","shouldComponentUpdate","updateCp","oldS","oldSr","oldJson","diffSr","oj","nj","ojk","getKeyHash","njk","keyList","cpList","diffCp","diffChildren","diffChild","removeCpFromOldTree","oc","ol","of","nf","exist","ex","did","componentDidUpdate","elem","diffDefs","diffBb","diffD2D","od","nd","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","isText","svg","where","insertBefore","Controller","__list2","__onList","__lastTime","args","records","animate","onList","__action","__mergeAuto","__on","timestamp","__set","MockPage","genUuid","MockCache","OP","FT","MBM","PPT","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","getCache","genBboxTotal","parentIndexHash","opacityHash","includeLimitCache","bboxTotal","matrixHash","parentIndex","node2","hasTotal","mergeBbox","genTotal","cacheTop","hasMask","genFilter","genMask","genOverflow","sbox","genFrameBufferWithTexture","lockOneChannel","webgl","createFramebuffer","bindFramebuffer","checkFramebufferStatus","FRAMEBUFFER_COMPLETE","viewport","clearColor","COLOR_BUFFER_BIT","genTotalWebgl","getParameter","MAX_TEXTURE_SIZE","parentPm","totalLimitCache","addTexAndDrawWhenLimit","mockCache","refresh","releaseLockChannel","frameBuffer2","texture2","genMbmWebgl","deleteFramebuffer","genFilterWebgl","genBlurWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","useProgram","MAX_VARYING_VECTORS","weights","vert","frag","vertexBlur","fragmentBlur","findExistTexChannel","lockChannel","programCm","genOverflowWebgl","overflowCache","genMaskWebgl","programClip","programMask","maskCache","fbo","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexMbm","applyOffscreen","origin","renderCacheCanvas","matrixList","parentMatrix","opacityList","parentOpacity","lastConfig","lastLv","mergeList","refreshLevel","hasRecordAsMask","needGen","maskStartHash","offscreenHash","renderCanvas","renderSvg","maskEffectHash","defsCache","hasEffectMask","addCache","maskHash","vdList","parentVd","mChildren","ivs","hasTransform","renderWebgl","pmList","lastRefreshLevel","hasMbm","validMbm","isPerspective","limitHash","TexCache","units","__units","__pages","__channels","__locks","__lockUnits","pages","channels","locks","lastHash","oldList","newList","shift","cl","fullSize","setToChannel","DIRECTION_HASH","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","addEventListener","removeEvent","removeEventListener","isFixedWidthOrHeight","isFixedSize","includeParentFlex","isLAYOUT","setLAYOUT","component","addDom","checkInfluence","topFlex","isSiblingBlock","uniqueUpdateId","parseUpdate","reflowList","measureList","cacheList","zHash","zList","overwrite","focus","measure","removeDom","style2","keys2","hasMeasure","hasZ","hasVisibility","hasColor","hasDisplay","__struct","isRp","cleanSvgCache","__uniqueZId","__rlv","__dom","__mw","__mh","__taskUp","__reflowList","__animateController","mix","__updateHash","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","__defs","getPropertyValue","__ctx","__renderMode","vertex","fragment","vertexMask","fragmentMask","fragmentClip","fragmentOverflow","vertexCm","fragmentCm","MAX_TEXTURE_IMAGE_UNITS","__texCache","destroy","__eventCbList","__checkRoot","__checkUpdate","__checkReflow","noRender","__clear","__vd","domDiff","updateStyle","taskUp","__nextFrameCp","updater","includeIgnore","scan","path","zPath","__index__","karas","path2","zPath2","nodeConfig","rootConfig","updateHash","__updateRoot","updateRoot","hasUpdate","__updateStruct","measureHash","__uniqueUpdateId","isInherit","uniqueList","hasRoot","diffList","diffI","mergeOffsetList","__uniqueMergeOffsetId","cps","cts","isLastAbs","isNowAbs","isLastNone","isNowNone","hasFlowPrev","__modifyStruct","startIndex","oldH","nowH","lastIndex","ns","reBuild","base","reBuildC","curveNum","limitStartEnd","getNewPoint","Line","__x1","__y1","__x2","__y2","__controlA","__controlB","__start","__end","buildCache","curve","bezierBox","concatPointAndControl","control","getLength","increase","getIndex","getNewList","prePercent","Polyline","__points","__controls","controls","isControl","rebuildSE","__getPoints","__renderPolygon","pointList","controlList","Polygon","getR","dft","Sector","__begin","__r","edge","__edge","closure","__closure","sList","r2","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","replaceVars","vars","slot","member","replaceLibraryVars","linkLibrary","JSON","linkChild","libraryItem","library","libraryId","parse","animateRecords","opt","createGm","createCp","createVd","animationRecord","fonts","loadAndParse","components","imgs","list1","list3","callback","version","appendTo","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA,IAAMA,WAAS,GAAG;EAChBC,EAAAA,QAAQ,EAAE,CADM;EAEhBC,EAAAA,OAAO,EAAE,CAFO;E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D,EAAAA,MAAM,EAANA,CA7EU;EA8EVvX,EAAAA,OAAO,EAAPA,OA9EU;EA+EVl5B,EAAAA,IAAI,EAAJA,IA/EU;EAgFVmM,EAAAA,OAAO,EAAPA,OAhFU;EAiFVq8B,EAAAA,OAAO,EAAPA,OAjFU;EAkFVhM,EAAAA,OAAO,EAAPA,OAlFU;EAmFV/gE,EAAAA,KAAK,EAALA,KAnFU;;IAoFV,IAAI0rB,KAAJ,CAAU1oB,CAAV,EAAa;EACX0oB,IAAAA,KAAK,CAACrI,IAAN,GAAa,CAAC,CAACrgB,CAAf,CAAA;EACD,GAAA;;EAtFS,EAAZ;EAyFA0tC,OAAO,CAACvB,GAAR,CAAY;EACVvB,EAAAA,GAAG,EAAHA,GADU;EAEVC,EAAAA,GAAG,EAAHA,GAFU;EAGVC,EAAAA,GAAG,EAAHA,GAHU;EAIVC,EAAAA,IAAI,EAAJA,IAJU;EAKVC,EAAAA,SAAS,EAATA,SAAAA;EALU,CAAZ,CAAA,CAAA;;EAQA,IAAG,OAAOhgB,MAAP,KAAkB,WAArB,EAAkC;IAChCA,MAAM,CAACq/C,KAAP,GAAeA,OAAf,CAAA;EACD,CAFD,MAGK,IAAG,OAAO58C,IAAP,KAAgB,WAAnB,EAAgC;IACnCA,IAAI,CAAC48C,KAAL,GAAaA,OAAb,CAAA;EACD;;;;;;;;"} \ No newline at end of file diff --git a/src/node/Text.js b/src/node/Text.js index 3ff86c0b..b87f318c 100644 --- a/src/node/Text.js +++ b/src/node/Text.js @@ -784,11 +784,11 @@ class Text extends Node { } get root() { - return this.domParent.root; + return (this.domParent || {}).root; } get currentStyle() { - return this.domParent.currentStyle; + return (this.domParent || {}).currentStyle; } get style() { @@ -796,11 +796,11 @@ class Text extends Node { } get computedStyle() { - return this.domParent.computedStyle; + return (this.domParent || {}).computedStyle; } get cacheStyle() { - return this.domParent.__cacheStyle; + return (this.domParent || {}).__cacheStyle; } get bbox() {