(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[182,3,5,6,7,8,9,10,16,18],{ /***/ "+NIl": /*!***************************************************!*\ !*** ./node_modules/codemirror/mode/stex/stex.js ***! \***************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE /* * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) * Licence: MIT */ (function(mod) { if (true) // CommonJS mod(__webpack_require__(/*! ../../lib/codemirror */ "VrN/")); else {} })(function(CodeMirror) { "use strict"; CodeMirror.defineMode("stex", function(_config, parserConfig) { "use strict"; function pushCommand(state, command) { state.cmdState.push(command); } function peekCommand(state) { if (state.cmdState.length > 0) { return state.cmdState[state.cmdState.length - 1]; } else { return null; } } function popCommand(state) { var plug = state.cmdState.pop(); if (plug) { plug.closeBracket(); } } // returns the non-default plugin closest to the end of the list function getMostPowerful(state) { var context = state.cmdState; for (var i = context.length - 1; i >= 0; i--) { var plug = context[i]; if (plug.name == "DEFAULT") { continue; } return plug; } return { styleIdentifier: function() { return null; } }; } function addPluginPattern(pluginName, cmdStyle, styles) { return function () { this.name = pluginName; this.bracketNo = 0; this.style = cmdStyle; this.styles = styles; this.argument = null; // \begin and \end have arguments that follow. These are stored in the plugin this.styleIdentifier = function() { return this.styles[this.bracketNo - 1] || null; }; this.openBracket = function() { this.bracketNo++; return "bracket"; }; this.closeBracket = function() {}; }; } var plugins = {}; plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]); plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]); plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]); plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]); plugins["end"] = addPluginPattern("end", "tag", ["atom"]); plugins["label" ] = addPluginPattern("label" , "tag", ["atom"]); plugins["ref" ] = addPluginPattern("ref" , "tag", ["atom"]); plugins["eqref" ] = addPluginPattern("eqref" , "tag", ["atom"]); plugins["cite" ] = addPluginPattern("cite" , "tag", ["atom"]); plugins["bibitem" ] = addPluginPattern("bibitem" , "tag", ["atom"]); plugins["Bibitem" ] = addPluginPattern("Bibitem" , "tag", ["atom"]); plugins["RBibitem" ] = addPluginPattern("RBibitem" , "tag", ["atom"]); plugins["DEFAULT"] = function () { this.name = "DEFAULT"; this.style = "tag"; this.styleIdentifier = this.openBracket = this.closeBracket = function() {}; }; function setState(state, f) { state.f = f; } // called when in a normal (no environment) context function normal(source, state) { var plug; // Do we look like '\command' ? If so, attempt to apply the plugin 'command' if (source.match(/^\\[a-zA-Z@]+/)) { var cmdName = source.current().slice(1); plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"]; plug = new plug(); pushCommand(state, plug); setState(state, beginParams); return plug.style; } // escape characters if (source.match(/^\\[$&%#{}_]/)) { return "tag"; } // white space control characters if (source.match(/^\\[,;!\/\\]/)) { return "tag"; } // find if we're starting various math modes if (source.match("\\[")) { setState(state, function(source, state){ return inMathMode(source, state, "\\]"); }); return "keyword"; } if (source.match("\\(")) { setState(state, function(source, state){ return inMathMode(source, state, "\\)"); }); return "keyword"; } if (source.match("$$")) { setState(state, function(source, state){ return inMathMode(source, state, "$$"); }); return "keyword"; } if (source.match("$")) { setState(state, function(source, state){ return inMathMode(source, state, "$"); }); return "keyword"; } var ch = source.next(); if (ch == "%") { source.skipToEnd(); return "comment"; } else if (ch == '}' || ch == ']') { plug = peekCommand(state); if (plug) { plug.closeBracket(ch); setState(state, beginParams); } else { return "error"; } return "bracket"; } else if (ch == '{' || ch == '[') { plug = plugins["DEFAULT"]; plug = new plug(); pushCommand(state, plug); return "bracket"; } else if (/\d/.test(ch)) { source.eatWhile(/[\w.%]/); return "atom"; } else { source.eatWhile(/[\w\-_]/); plug = getMostPowerful(state); if (plug.name == 'begin') { plug.argument = source.current(); } return plug.styleIdentifier(); } } function inMathMode(source, state, endModeSeq) { if (source.eatSpace()) { return null; } if (endModeSeq && source.match(endModeSeq)) { setState(state, normal); return "keyword"; } if (source.match(/^\\[a-zA-Z@]+/)) { return "tag"; } if (source.match(/^[a-zA-Z]+/)) { return "variable-2"; } // escape characters if (source.match(/^\\[$&%#{}_]/)) { return "tag"; } // white space control characters if (source.match(/^\\[,;!\/]/)) { return "tag"; } // special math-mode characters if (source.match(/^[\^_&]/)) { return "tag"; } // non-special characters if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) { return null; } if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) { return "number"; } var ch = source.next(); if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") { return "bracket"; } if (ch == "%") { source.skipToEnd(); return "comment"; } return "error"; } function beginParams(source, state) { var ch = source.peek(), lastPlug; if (ch == '{' || ch == '[') { lastPlug = peekCommand(state); lastPlug.openBracket(ch); source.eat(ch); setState(state, normal); return "bracket"; } if (/[ \t\r]/.test(ch)) { source.eat(ch); return null; } setState(state, normal); popCommand(state); return normal(source, state); } return { startState: function() { var f = parserConfig.inMathMode ? function(source, state){ return inMathMode(source, state); } : normal; return { cmdState: [], f: f }; }, copyState: function(s) { return { cmdState: s.cmdState.slice(), f: s.f }; }, token: function(stream, state) { return state.f(stream, state); }, blankLine: function(state) { state.f = normal; state.cmdState.length = 0; }, lineComment: "%" }; }); CodeMirror.defineMIME("text/x-stex", "stex"); CodeMirror.defineMIME("text/x-latex", "stex"); }); /***/ }), /***/ "/GNS": /*!*********************************************!*\ !*** ./src/assets/images/icons/search1.png ***! \*********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/search1.c4136dd4.png"; /***/ }), /***/ "06Qe": /*!**********************************************!*\ !*** ./node_modules/zrender/lib/vml/core.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var env = __webpack_require__(/*! ../core/env */ "ItGF"); var urn = 'urn:schemas-microsoft-com:vml'; var win = typeof window === 'undefined' ? null : window; var vmlInited = false; var doc = win && win.document; function createNode(tagName) { return doCreateNode(tagName); } // Avoid assign to an exported variable, for transforming to cjs. var doCreateNode; if (doc && !env.canvasSupported) { try { !doc.namespaces.zrvml && doc.namespaces.add('zrvml', urn); doCreateNode = function (tagName) { return doc.createElement(''); }; } catch (e) { doCreateNode = function (tagName) { return doc.createElement('<' + tagName + ' xmlns="' + urn + '" class="zrvml">'); }; } } // From raphael function initVML() { if (vmlInited || !doc) { return; } vmlInited = true; var styleSheets = doc.styleSheets; if (styleSheets.length < 31) { doc.createStyleSheet().addRule('.zrvml', 'behavior:url(#default#VML)'); } else { // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx styleSheets[0].addRule('.zrvml', 'behavior:url(#default#VML)'); } } exports.doc = doc; exports.createNode = createNode; exports.initVML = initVML; /***/ }), /***/ "07cG": /*!***************************************************!*\ !*** ./src/components/Spinner/index.less?modules ***! \***************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin module.exports = {"ldsRing":"ldsRing___2F8W7","idsRingWrapper":"idsRingWrapper___fC2cF","ldsring":"ldsring___3A88y"}; /***/ }), /***/ "0s+r": /*!*********************************************!*\ !*** ./node_modules/zrender/lib/Handler.js ***! \*********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var util = __webpack_require__(/*! ./core/util */ "bYtY"); var vec2 = __webpack_require__(/*! ./core/vector */ "QBsz"); var Draggable = __webpack_require__(/*! ./mixin/Draggable */ "y23F"); var Eventful = __webpack_require__(/*! ./mixin/Eventful */ "H6uX"); var eventTool = __webpack_require__(/*! ./core/event */ "YH21"); var GestureMgr = __webpack_require__(/*! ./core/GestureMgr */ "C0SR"); /** * [The interface between `Handler` and `HandlerProxy`]: * * The default `HandlerProxy` only support the common standard web environment * (e.g., standalone browser, headless browser, embed browser in mobild APP, ...). * But `HandlerProxy` can be replaced to support more non-standard environment * (e.g., mini app), or to support more feature that the default `HandlerProxy` * not provided (like echarts-gl did). * So the interface between `Handler` and `HandlerProxy` should be stable. Do not * make break changes util inevitable. The interface include the public methods * of `Handler` and the events listed in `handlerNames` below, by which `HandlerProxy` * drives `Handler`. */ /** * [Drag outside]: * * That is, triggering `mousemove` and `mouseup` event when the pointer is out of the * zrender area when dragging. That is important for the improvement of the user experience * when dragging something near the boundary without being terminated unexpectedly. * * We originally consider to introduce new events like `pagemovemove` and `pagemouseup` * to resolve this issue. But some drawbacks of it is described in * https://github.com/ecomfe/zrender/pull/536#issuecomment-560286899 * * Instead, we referenced the specifications: * https://www.w3.org/TR/touch-events/#the-touchmove-event * https://www.w3.org/TR/2014/WD-DOM-Level-3-Events-20140925/#event-type-mousemove * where the the mousemove/touchmove can be continue to fire if the user began a drag * operation and the pointer has left the boundary. (for the mouse event, browsers * only do it on `document` and when the pointer has left the boundary of the browser.) * * So the default `HandlerProxy` supports this feature similarly: if it is in the dragging * state (see `pointerCapture` in `HandlerProxy`), the `mousemove` and `mouseup` continue * to fire until release the pointer. That is implemented by listen to those event on * `document`. * If we implement some other `HandlerProxy` only for touch device, that would be easier. * The touch event support this feature by default. * * Note: * There might be some cases that the mouse event can not be * received on `document`. For example, * (A) `useCapture` is not supported and some user defined event listeners on the ancestor * of zr dom throw Error . * (B) `useCapture` is not supported Some user defined event listeners on the ancestor of * zr dom call `stopPropagation`. * In these cases, the `mousemove` event might be keep triggered event * if the mouse is released. We try to reduce the side-effect in those cases. * That is, do nothing (especially, `findHover`) in those cases. See `isOutsideBoundary`. * * Note: * If `HandlerProxy` listens to `document` with `useCapture`, `HandlerProxy` needs to * make sure `stopPropagation` and `preventDefault` doing nothing if and only if the event * target is not zrender dom. Becuase it is dangerous to enable users to call them in * `document` capture phase to prevent the propagation to any listener of the webpage. * But they are needed to work when the pointer inside the zrender dom. */ var SILENT = 'silent'; function makeEventPacket(eveType, targetInfo, event) { return { type: eveType, event: event, // target can only be an element that is not silent. target: targetInfo.target, // topTarget can be a silent element. topTarget: targetInfo.topTarget, cancelBubble: false, offsetX: event.zrX, offsetY: event.zrY, gestureEvent: event.gestureEvent, pinchX: event.pinchX, pinchY: event.pinchY, pinchScale: event.pinchScale, wheelDelta: event.zrDelta, zrByTouch: event.zrByTouch, which: event.which, stop: stopEvent }; } function stopEvent() { eventTool.stop(this.event); } function EmptyProxy() {} EmptyProxy.prototype.dispose = function () {}; var handlerNames = ['click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu']; /** * @alias module:zrender/Handler * @constructor * @extends module:zrender/mixin/Eventful * @param {module:zrender/Storage} storage Storage instance. * @param {module:zrender/Painter} painter Painter instance. * @param {module:zrender/dom/HandlerProxy} proxy HandlerProxy instance. * @param {HTMLElement} painterRoot painter.root (not painter.getViewportRoot()). */ var Handler = function (storage, painter, proxy, painterRoot) { Eventful.call(this); this.storage = storage; this.painter = painter; this.painterRoot = painterRoot; proxy = proxy || new EmptyProxy(); /** * Proxy of event. can be Dom, WebGLSurface, etc. */ this.proxy = null; /** * {target, topTarget, x, y} * @private * @type {Object} */ this._hovered = {}; /** * @private * @type {Date} */ this._lastTouchMoment; /** * @private * @type {number} */ this._lastX; /** * @private * @type {number} */ this._lastY; /** * @private * @type {module:zrender/core/GestureMgr} */ this._gestureMgr; Draggable.call(this); this.setHandlerProxy(proxy); }; Handler.prototype = { constructor: Handler, setHandlerProxy: function (proxy) { if (this.proxy) { this.proxy.dispose(); } if (proxy) { util.each(handlerNames, function (name) { proxy.on && proxy.on(name, this[name], this); }, this); // Attach handler proxy.handler = this; } this.proxy = proxy; }, mousemove: function (event) { var x = event.zrX; var y = event.zrY; var isOutside = isOutsideBoundary(this, x, y); var lastHovered = this._hovered; var lastHoveredTarget = lastHovered.target; // If lastHoveredTarget is removed from zr (detected by '__zr') by some API call // (like 'setOption' or 'dispatchAction') in event handlers, we should find // lastHovered again here. Otherwise 'mouseout' can not be triggered normally. // See #6198. if (lastHoveredTarget && !lastHoveredTarget.__zr) { lastHovered = this.findHover(lastHovered.x, lastHovered.y); lastHoveredTarget = lastHovered.target; } var hovered = this._hovered = isOutside ? { x: x, y: y } : this.findHover(x, y); var hoveredTarget = hovered.target; var proxy = this.proxy; proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default'); // Mouse out on previous hovered element if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(lastHovered, 'mouseout', event); } // Mouse moving on one element this.dispatchToElement(hovered, 'mousemove', event); // Mouse over on a new element if (hoveredTarget && hoveredTarget !== lastHoveredTarget) { this.dispatchToElement(hovered, 'mouseover', event); } }, mouseout: function (event) { var eventControl = event.zrEventControl; var zrIsToLocalDOM = event.zrIsToLocalDOM; if (eventControl !== 'only_globalout') { this.dispatchToElement(this._hovered, 'mouseout', event); } if (eventControl !== 'no_globalout') { // FIXME: if the pointer moving from the extra doms to realy "outside", // the `globalout` should have been triggered. But currently not. !zrIsToLocalDOM && this.trigger('globalout', { type: 'globalout', event: event }); } }, /** * Resize */ resize: function (event) { this._hovered = {}; }, /** * Dispatch event * @param {string} eventName * @param {event=} eventArgs */ dispatch: function (eventName, eventArgs) { var handler = this[eventName]; handler && handler.call(this, eventArgs); }, /** * Dispose */ dispose: function () { this.proxy.dispose(); this.storage = this.proxy = this.painter = null; }, /** * 设置默认的cursor style * @param {string} [cursorStyle='default'] 例如 crosshair */ setCursorStyle: function (cursorStyle) { var proxy = this.proxy; proxy.setCursor && proxy.setCursor(cursorStyle); }, /** * 事件分发代理 * * @private * @param {Object} targetInfo {target, topTarget} 目标图形元素 * @param {string} eventName 事件名称 * @param {Object} event 事件对象 */ dispatchToElement: function (targetInfo, eventName, event) { targetInfo = targetInfo || {}; var el = targetInfo.target; if (el && el.silent) { return; } var eventHandler = 'on' + eventName; var eventPacket = makeEventPacket(eventName, targetInfo, event); while (el) { el[eventHandler] && (eventPacket.cancelBubble = el[eventHandler].call(el, eventPacket)); el.trigger(eventName, eventPacket); el = el.parent; if (eventPacket.cancelBubble) { break; } } if (!eventPacket.cancelBubble) { // 冒泡到顶级 zrender 对象 this.trigger(eventName, eventPacket); // 分发事件到用户自定义层 // 用户有可能在全局 click 事件中 dispose,所以需要判断下 painter 是否存在 this.painter && this.painter.eachOtherLayer(function (layer) { if (typeof layer[eventHandler] === 'function') { layer[eventHandler].call(layer, eventPacket); } if (layer.trigger) { layer.trigger(eventName, eventPacket); } }); } }, /** * @private * @param {number} x * @param {number} y * @param {module:zrender/graphic/Displayable} exclude * @return {model:zrender/Element} * @method */ findHover: function (x, y, exclude) { var list = this.storage.getDisplayList(); var out = { x: x, y: y }; for (var i = list.length - 1; i >= 0; i--) { var hoverCheckResult; if (list[i] !== exclude // getDisplayList may include ignored item in VML mode && !list[i].ignore && (hoverCheckResult = isHover(list[i], x, y))) { !out.topTarget && (out.topTarget = list[i]); if (hoverCheckResult !== SILENT) { out.target = list[i]; break; } } } return out; }, processGesture: function (event, stage) { if (!this._gestureMgr) { this._gestureMgr = new GestureMgr(); } var gestureMgr = this._gestureMgr; stage === 'start' && gestureMgr.clear(); var gestureInfo = gestureMgr.recognize(event, this.findHover(event.zrX, event.zrY, null).target, this.proxy.dom); stage === 'end' && gestureMgr.clear(); // Do not do any preventDefault here. Upper application do that if necessary. if (gestureInfo) { var type = gestureInfo.type; event.gestureEvent = type; this.dispatchToElement({ target: gestureInfo.target }, type, gestureInfo.event); } } }; // Common handlers util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) { Handler.prototype[name] = function (event) { var x = event.zrX; var y = event.zrY; var isOutside = isOutsideBoundary(this, x, y); var hovered; var hoveredTarget; if (name !== 'mouseup' || !isOutside) { // Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover hovered = this.findHover(x, y); hoveredTarget = hovered.target; } if (name === 'mousedown') { this._downEl = hoveredTarget; this._downPoint = [event.zrX, event.zrY]; // In case click triggered before mouseup this._upEl = hoveredTarget; } else if (name === 'mouseup') { this._upEl = hoveredTarget; } else if (name === 'click') { if (this._downEl !== this._upEl // Original click event is triggered on the whole canvas element, // including the case that `mousedown` - `mousemove` - `mouseup`, // which should be filtered, otherwise it will bring trouble to // pan and zoom. || !this._downPoint // Arbitrary value || vec2.dist(this._downPoint, [event.zrX, event.zrY]) > 4) { return; } this._downPoint = null; } this.dispatchToElement(hovered, name, event); }; }); function isHover(displayable, x, y) { if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) { var el = displayable; var isSilent; while (el) { // If clipped by ancestor. // FIXME: If clipPath has neither stroke nor fill, // el.clipPath.contain(x, y) will always return false. if (el.clipPath && !el.clipPath.contain(x, y)) { return false; } if (el.silent) { isSilent = true; } el = el.parent; } return isSilent ? SILENT : true; } return false; } /** * See [Drag outside]. */ function isOutsideBoundary(handlerInstance, x, y) { var painter = handlerInstance.painter; return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight(); } util.mixin(Handler, Eventful); util.mixin(Handler, Draggable); var _default = Handler; module.exports = _default; /***/ }), /***/ "19Vz": /*!**************************************************************!*\ !*** ./node_modules/codemirror/addon/display/placeholder.js ***! \**************************************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (true) // CommonJS mod(__webpack_require__(/*! ../../lib/codemirror */ "VrN/")); else {} })(function(CodeMirror) { CodeMirror.defineOption("placeholder", "", function(cm, val, old) { var prev = old && old != CodeMirror.Init; if (val && !prev) { cm.on("blur", onBlur); cm.on("change", onChange); cm.on("swapDoc", onChange); CodeMirror.on(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose = function() { onComposition(cm) }) onChange(cm); } else if (!val && prev) { cm.off("blur", onBlur); cm.off("change", onChange); cm.off("swapDoc", onChange); CodeMirror.off(cm.getInputField(), "compositionupdate", cm.state.placeholderCompose) clearPlaceholder(cm); var wrapper = cm.getWrapperElement(); wrapper.className = wrapper.className.replace(" CodeMirror-empty", ""); } if (val && !cm.hasFocus()) onBlur(cm); }); function clearPlaceholder(cm) { if (cm.state.placeholder) { cm.state.placeholder.parentNode.removeChild(cm.state.placeholder); cm.state.placeholder = null; } } function setPlaceholder(cm) { clearPlaceholder(cm); var elt = cm.state.placeholder = document.createElement("pre"); elt.style.cssText = "height: 0; overflow: visible"; elt.style.direction = cm.getOption("direction"); elt.className = "CodeMirror-placeholder CodeMirror-line-like"; var placeHolder = cm.getOption("placeholder") if (typeof placeHolder == "string") placeHolder = document.createTextNode(placeHolder) elt.appendChild(placeHolder) cm.display.lineSpace.insertBefore(elt, cm.display.lineSpace.firstChild); } function onComposition(cm) { setTimeout(function() { var empty = false, input = cm.getInputField() if (input.nodeName == "TEXTAREA") empty = !input.value else if (cm.lineCount() == 1) empty = !/[^\u200b]/.test(input.querySelector(".CodeMirror-line").textContent) if (empty) setPlaceholder(cm) else clearPlaceholder(cm) }, 20) } function onBlur(cm) { if (isEmpty(cm)) setPlaceholder(cm); } function onChange(cm) { var wrapper = cm.getWrapperElement(), empty = isEmpty(cm); wrapper.className = wrapper.className.replace(" CodeMirror-empty", "") + (empty ? " CodeMirror-empty" : ""); if (empty) setPlaceholder(cm); else clearPlaceholder(cm); } function isEmpty(cm) { return (cm.lineCount() === 1) && (cm.getLine(0) === ""); } }); /***/ }), /***/ "1Jh7": /*!************************************************************!*\ !*** ./node_modules/zrender/lib/graphic/shape/Polyline.js ***! \************************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var Path = __webpack_require__(/*! ../Path */ "y+Vt"); var polyHelper = __webpack_require__(/*! ../helper/poly */ "T6xi"); /** * @module zrender/graphic/shape/Polyline */ var _default = Path.extend({ type: 'polyline', shape: { points: null, smooth: false, smoothConstraint: null }, style: { stroke: '#000', fill: null }, buildPath: function (ctx, shape) { polyHelper.buildPath(ctx, shape, false); } }); module.exports = _default; /***/ }), /***/ "1MYJ": /*!**********************************************************!*\ !*** ./node_modules/zrender/lib/graphic/CompoundPath.js ***! \**********************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var Path = __webpack_require__(/*! ./Path */ "y+Vt"); // CompoundPath to improve performance var _default = Path.extend({ type: 'compound', shape: { paths: null }, _updatePathDirty: function () { var dirtyPath = this.__dirtyPath; var paths = this.shape.paths; for (var i = 0; i < paths.length; i++) { // Mark as dirty if any subpath is dirty dirtyPath = dirtyPath || paths[i].__dirtyPath; } this.__dirtyPath = dirtyPath; this.__dirty = this.__dirty || dirtyPath; }, beforeBrush: function () { this._updatePathDirty(); var paths = this.shape.paths || []; var scale = this.getGlobalScale(); // Update path scale for (var i = 0; i < paths.length; i++) { if (!paths[i].path) { paths[i].createPathProxy(); } paths[i].path.setScale(scale[0], scale[1], paths[i].segmentIgnoreThreshold); } }, buildPath: function (ctx, shape) { var paths = shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].buildPath(ctx, paths[i].shape, true); } }, afterBrush: function () { var paths = this.shape.paths || []; for (var i = 0; i < paths.length; i++) { paths[i].__dirtyPath = false; } }, getBoundingRect: function () { this._updatePathDirty(); return Path.prototype.getBoundingRect.call(this); } }); module.exports = _default; /***/ }), /***/ "1RvN": /*!**********************************************!*\ !*** ./node_modules/zrender/lib/core/LRU.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { // Simple LRU cache use doubly linked list // @module zrender/core/LRU /** * Simple double linked list. Compared with array, it has O(1) remove operation. * @constructor */ var LinkedList = function () { /** * @type {module:zrender/core/LRU~Entry} */ this.head = null; /** * @type {module:zrender/core/LRU~Entry} */ this.tail = null; this._len = 0; }; var linkedListProto = LinkedList.prototype; /** * Insert a new value at the tail * @param {} val * @return {module:zrender/core/LRU~Entry} */ linkedListProto.insert = function (val) { var entry = new Entry(val); this.insertEntry(entry); return entry; }; /** * Insert an entry at the tail * @param {module:zrender/core/LRU~Entry} entry */ linkedListProto.insertEntry = function (entry) { if (!this.head) { this.head = this.tail = entry; } else { this.tail.next = entry; entry.prev = this.tail; entry.next = null; this.tail = entry; } this._len++; }; /** * Remove entry. * @param {module:zrender/core/LRU~Entry} entry */ linkedListProto.remove = function (entry) { var prev = entry.prev; var next = entry.next; if (prev) { prev.next = next; } else { // Is head this.head = next; } if (next) { next.prev = prev; } else { // Is tail this.tail = prev; } entry.next = entry.prev = null; this._len--; }; /** * @return {number} */ linkedListProto.len = function () { return this._len; }; /** * Clear list */ linkedListProto.clear = function () { this.head = this.tail = null; this._len = 0; }; /** * @constructor * @param {} val */ var Entry = function (val) { /** * @type {} */ this.value = val; /** * @type {module:zrender/core/LRU~Entry} */ this.next; /** * @type {module:zrender/core/LRU~Entry} */ this.prev; }; /** * LRU Cache * @constructor * @alias module:zrender/core/LRU */ var LRU = function (maxSize) { this._list = new LinkedList(); this._map = {}; this._maxSize = maxSize || 10; this._lastRemovedEntry = null; }; var LRUProto = LRU.prototype; /** * @param {string} key * @param {} value * @return {} Removed value */ LRUProto.put = function (key, value) { var list = this._list; var map = this._map; var removed = null; if (map[key] == null) { var len = list.len(); // Reuse last removed entry var entry = this._lastRemovedEntry; if (len >= this._maxSize && len > 0) { // Remove the least recently used var leastUsedEntry = list.head; list.remove(leastUsedEntry); delete map[leastUsedEntry.key]; removed = leastUsedEntry.value; this._lastRemovedEntry = leastUsedEntry; } if (entry) { entry.value = value; } else { entry = new Entry(value); } entry.key = key; list.insertEntry(entry); map[key] = entry; } return removed; }; /** * @param {string} key * @return {} */ LRUProto.get = function (key) { var entry = this._map[key]; var list = this._list; if (entry != null) { // Put the latest used entry in the tail if (entry !== list.tail) { list.remove(entry); list.insertEntry(entry); } return entry.value; } }; /** * Clear the cache */ LRUProto.clear = function () { this._list.clear(); this._map = {}; }; var _default = LRU; module.exports = _default; /***/ }), /***/ "1ZF9": /*!*****************************************!*\ !*** ./src/assets/images/Authorize.png ***! \*****************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/Authorize.cc9c212f.png"; /***/ }), /***/ "1bdT": /*!*********************************************!*\ !*** ./node_modules/zrender/lib/Element.js ***! \*********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var guid = __webpack_require__(/*! ./core/guid */ "3gBT"); var Eventful = __webpack_require__(/*! ./mixin/Eventful */ "H6uX"); var Transformable = __webpack_require__(/*! ./mixin/Transformable */ "DN4a"); var Animatable = __webpack_require__(/*! ./mixin/Animatable */ "vWvF"); var zrUtil = __webpack_require__(/*! ./core/util */ "bYtY"); /** * @alias module:zrender/Element * @constructor * @extends {module:zrender/mixin/Animatable} * @extends {module:zrender/mixin/Transformable} * @extends {module:zrender/mixin/Eventful} */ var Element = function (opts) { // jshint ignore:line Transformable.call(this, opts); Eventful.call(this, opts); Animatable.call(this, opts); /** * 画布元素ID * @type {string} */ this.id = opts.id || guid(); }; Element.prototype = { /** * 元素类型 * Element type * @type {string} */ type: 'element', /** * 元素名字 * Element name * @type {string} */ name: '', /** * ZRender 实例对象,会在 element 添加到 zrender 实例中后自动赋值 * ZRender instance will be assigned when element is associated with zrender * @name module:/zrender/Element#__zr * @type {module:zrender/ZRender} */ __zr: null, /** * 图形是否忽略,为true时忽略图形的绘制以及事件触发 * If ignore drawing and events of the element object * @name module:/zrender/Element#ignore * @type {boolean} * @default false */ ignore: false, /** * 用于裁剪的路径(shape),所有 Group 内的路径在绘制时都会被这个路径裁剪 * 该路径会继承被裁减对象的变换 * @type {module:zrender/graphic/Path} * @see http://www.w3.org/TR/2dcontext/#clipping-region * @readOnly */ clipPath: null, /** * 是否是 Group * @type {boolean} */ isGroup: false, /** * Drift element * @param {number} dx dx on the global space * @param {number} dy dy on the global space */ drift: function (dx, dy) { switch (this.draggable) { case 'horizontal': dy = 0; break; case 'vertical': dx = 0; break; } var m = this.transform; if (!m) { m = this.transform = [1, 0, 0, 1, 0, 0]; } m[4] += dx; m[5] += dy; this.decomposeTransform(); this.dirty(false); }, /** * Hook before update */ beforeUpdate: function () {}, /** * Hook after update */ afterUpdate: function () {}, /** * Update each frame */ update: function () { this.updateTransform(); }, /** * @param {Function} cb * @param {} context */ traverse: function (cb, context) {}, /** * @protected */ attrKV: function (key, value) { if (key === 'position' || key === 'scale' || key === 'origin') { // Copy the array if (value) { var target = this[key]; if (!target) { target = this[key] = []; } target[0] = value[0]; target[1] = value[1]; } } else { this[key] = value; } }, /** * Hide the element */ hide: function () { this.ignore = true; this.__zr && this.__zr.refresh(); }, /** * Show the element */ show: function () { this.ignore = false; this.__zr && this.__zr.refresh(); }, /** * @param {string|Object} key * @param {*} value */ attr: function (key, value) { if (typeof key === 'string') { this.attrKV(key, value); } else if (zrUtil.isObject(key)) { for (var name in key) { if (key.hasOwnProperty(name)) { this.attrKV(name, key[name]); } } } this.dirty(false); return this; }, /** * @param {module:zrender/graphic/Path} clipPath */ setClipPath: function (clipPath) { var zr = this.__zr; if (zr) { clipPath.addSelfToZr(zr); } // Remove previous clip path if (this.clipPath && this.clipPath !== clipPath) { this.removeClipPath(); } this.clipPath = clipPath; clipPath.__zr = zr; clipPath.__clipTarget = this; this.dirty(false); }, /** */ removeClipPath: function () { var clipPath = this.clipPath; if (clipPath) { if (clipPath.__zr) { clipPath.removeSelfFromZr(clipPath.__zr); } clipPath.__zr = null; clipPath.__clipTarget = null; this.clipPath = null; this.dirty(false); } }, /** * Add self from zrender instance. * Not recursively because it will be invoked when element added to storage. * @param {module:zrender/ZRender} zr */ addSelfToZr: function (zr) { this.__zr = zr; // 添加动画 var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.addAnimator(animators[i]); } } if (this.clipPath) { this.clipPath.addSelfToZr(zr); } }, /** * Remove self from zrender instance. * Not recursively because it will be invoked when element added to storage. * @param {module:zrender/ZRender} zr */ removeSelfFromZr: function (zr) { this.__zr = null; // 移除动画 var animators = this.animators; if (animators) { for (var i = 0; i < animators.length; i++) { zr.animation.removeAnimator(animators[i]); } } if (this.clipPath) { this.clipPath.removeSelfFromZr(zr); } } }; zrUtil.mixin(Element, Animatable); zrUtil.mixin(Element, Transformable); zrUtil.mixin(Element, Eventful); var _default = Element; module.exports = _default; /***/ }), /***/ "1eCo": /*!*************************************************!*\ !*** ./node_modules/codemirror/mode/xml/xml.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (true) // CommonJS mod(__webpack_require__(/*! ../../lib/codemirror */ "VrN/")); else {} })(function(CodeMirror) { "use strict"; var htmlConfig = { autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true, 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true, 'track': true, 'wbr': true, 'menuitem': true}, implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true, 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true, 'th': true, 'tr': true}, contextGrabbers: { 'dd': {'dd': true, 'dt': true}, 'dt': {'dd': true, 'dt': true}, 'li': {'li': true}, 'option': {'option': true, 'optgroup': true}, 'optgroup': {'optgroup': true}, 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true, 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true, 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true, 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true, 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true}, 'rp': {'rp': true, 'rt': true}, 'rt': {'rp': true, 'rt': true}, 'tbody': {'tbody': true, 'tfoot': true}, 'td': {'td': true, 'th': true}, 'tfoot': {'tbody': true}, 'th': {'td': true, 'th': true}, 'thead': {'tbody': true, 'tfoot': true}, 'tr': {'tr': true} }, doNotIndent: {"pre": true}, allowUnquoted: true, allowMissing: true, caseFold: true } var xmlConfig = { autoSelfClosers: {}, implicitlyClosed: {}, contextGrabbers: {}, doNotIndent: {}, allowUnquoted: false, allowMissing: false, allowMissingTagName: false, caseFold: false } CodeMirror.defineMode("xml", function(editorConf, config_) { var indentUnit = editorConf.indentUnit var config = {} var defaults = config_.htmlMode ? htmlConfig : xmlConfig for (var prop in defaults) config[prop] = defaults[prop] for (var prop in config_) config[prop] = config_[prop] // Return variables for tokenizers var type, setStyle; function inText(stream, state) { function chain(parser) { state.tokenize = parser; return parser(stream, state); } var ch = stream.next(); if (ch == "<") { if (stream.eat("!")) { if (stream.eat("[")) { if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); else return null; } else if (stream.match("--")) { return chain(inBlock("comment", "-->")); } else if (stream.match("DOCTYPE", true, true)) { stream.eatWhile(/[\w\._\-]/); return chain(doctype(1)); } else { return null; } } else if (stream.eat("?")) { stream.eatWhile(/[\w\._\-]/); state.tokenize = inBlock("meta", "?>"); return "meta"; } else { type = stream.eat("/") ? "closeTag" : "openTag"; state.tokenize = inTag; return "tag bracket"; } } else if (ch == "&") { var ok; if (stream.eat("#")) { if (stream.eat("x")) { ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); } else { ok = stream.eatWhile(/[\d]/) && stream.eat(";"); } } else { ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); } return ok ? "atom" : "error"; } else { stream.eatWhile(/[^&<]/); return null; } } inText.isInText = true; function inTag(stream, state) { var ch = stream.next(); if (ch == ">" || (ch == "/" && stream.eat(">"))) { state.tokenize = inText; type = ch == ">" ? "endTag" : "selfcloseTag"; return "tag bracket"; } else if (ch == "=") { type = "equals"; return null; } else if (ch == "<") { state.tokenize = inText; state.state = baseState; state.tagName = state.tagStart = null; var next = state.tokenize(stream, state); return next ? next + " tag error" : "tag error"; } else if (/[\'\"]/.test(ch)) { state.tokenize = inAttribute(ch); state.stringStartCol = stream.column(); return state.tokenize(stream, state); } else { stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/); return "word"; } } function inAttribute(quote) { var closure = function(stream, state) { while (!stream.eol()) { if (stream.next() == quote) { state.tokenize = inTag; break; } } return "string"; }; closure.isInAttribute = true; return closure; } function inBlock(style, terminator) { return function(stream, state) { while (!stream.eol()) { if (stream.match(terminator)) { state.tokenize = inText; break; } stream.next(); } return style; } } function doctype(depth) { return function(stream, state) { var ch; while ((ch = stream.next()) != null) { if (ch == "<") { state.tokenize = doctype(depth + 1); return state.tokenize(stream, state); } else if (ch == ">") { if (depth == 1) { state.tokenize = inText; break; } else { state.tokenize = doctype(depth - 1); return state.tokenize(stream, state); } } } return "meta"; }; } function Context(state, tagName, startOfLine) { this.prev = state.context; this.tagName = tagName; this.indent = state.indented; this.startOfLine = startOfLine; if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent)) this.noIndent = true; } function popContext(state) { if (state.context) state.context = state.context.prev; } function maybePopContext(state, nextTagName) { var parentTagName; while (true) { if (!state.context) { return; } parentTagName = state.context.tagName; if (!config.contextGrabbers.hasOwnProperty(parentTagName) || !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) { return; } popContext(state); } } function baseState(type, stream, state) { if (type == "openTag") { state.tagStart = stream.column(); return tagNameState; } else if (type == "closeTag") { return closeTagNameState; } else { return baseState; } } function tagNameState(type, stream, state) { if (type == "word") { state.tagName = stream.current(); setStyle = "tag"; return attrState; } else if (config.allowMissingTagName && type == "endTag") { setStyle = "tag bracket"; return attrState(type, stream, state); } else { setStyle = "error"; return tagNameState; } } function closeTagNameState(type, stream, state) { if (type == "word") { var tagName = stream.current(); if (state.context && state.context.tagName != tagName && config.implicitlyClosed.hasOwnProperty(state.context.tagName)) popContext(state); if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) { setStyle = "tag"; return closeState; } else { setStyle = "tag error"; return closeStateErr; } } else if (config.allowMissingTagName && type == "endTag") { setStyle = "tag bracket"; return closeState(type, stream, state); } else { setStyle = "error"; return closeStateErr; } } function closeState(type, _stream, state) { if (type != "endTag") { setStyle = "error"; return closeState; } popContext(state); return baseState; } function closeStateErr(type, stream, state) { setStyle = "error"; return closeState(type, stream, state); } function attrState(type, _stream, state) { if (type == "word") { setStyle = "attribute"; return attrEqState; } else if (type == "endTag" || type == "selfcloseTag") { var tagName = state.tagName, tagStart = state.tagStart; state.tagName = state.tagStart = null; if (type == "selfcloseTag" || config.autoSelfClosers.hasOwnProperty(tagName)) { maybePopContext(state, tagName); } else { maybePopContext(state, tagName); state.context = new Context(state, tagName, tagStart == state.indented); } return baseState; } setStyle = "error"; return attrState; } function attrEqState(type, stream, state) { if (type == "equals") return attrValueState; if (!config.allowMissing) setStyle = "error"; return attrState(type, stream, state); } function attrValueState(type, stream, state) { if (type == "string") return attrContinuedState; if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;} setStyle = "error"; return attrState(type, stream, state); } function attrContinuedState(type, stream, state) { if (type == "string") return attrContinuedState; return attrState(type, stream, state); } return { startState: function(baseIndent) { var state = {tokenize: inText, state: baseState, indented: baseIndent || 0, tagName: null, tagStart: null, context: null} if (baseIndent != null) state.baseIndent = baseIndent return state }, token: function(stream, state) { if (!state.tagName && stream.sol()) state.indented = stream.indentation(); if (stream.eatSpace()) return null; type = null; var style = state.tokenize(stream, state); if ((style || type) && style != "comment") { setStyle = null; state.state = state.state(type || style, stream, state); if (setStyle) style = setStyle == "error" ? style + " error" : setStyle; } return style; }, indent: function(state, textAfter, fullLine) { var context = state.context; // Indent multi-line strings (e.g. css). if (state.tokenize.isInAttribute) { if (state.tagStart == state.indented) return state.stringStartCol + 1; else return state.indented + indentUnit; } if (context && context.noIndent) return CodeMirror.Pass; if (state.tokenize != inTag && state.tokenize != inText) return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; // Indent the starts of attribute names. if (state.tagName) { if (config.multilineTagIndentPastTag !== false) return state.tagStart + state.tagName.length + 2; else return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1); } if (config.alignCDATA && /$/, blockCommentStart: "", configuration: config.htmlMode ? "html" : "xml", helperType: config.htmlMode ? "html" : "xml", skipAttribute: function(state) { if (state.state == attrValueState) state.state = attrState }, xmlCurrentTag: function(state) { return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null }, xmlCurrentContext: function(state) { var context = [] for (var cx = state.context; cx; cx = cx.prev) if (cx.tagName) context.push(cx.tagName) return context.reverse() } }; }); CodeMirror.defineMIME("text/xml", "xml"); CodeMirror.defineMIME("application/xml", "xml"); if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); }); /***/ }), /***/ "1j5w": /*!*******************************************************!*\ !*** ./node_modules/rc-menu/es/index.js + 11 modules ***! \*******************************************************/ /*! exports provided: SubMenu, Item, MenuItem, MenuItemGroup, ItemGroup, Divider, default */ /*! exports used: Divider, Item, ItemGroup, SubMenu, default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/mini-store/esm/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/button.js (referenced with cjs require), ./node_modules/antd/lib/input/Input.js (referenced with cjs require), ./node_modules/antd/lib/input/Password.js (referenced with cjs require), ./node_modules/antd/lib/input/TextArea.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-motion/es/index.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/antd/lib/button/LoadingIcon.js (referenced with cjs require)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-trigger/es/index.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallowequal/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.ReactDOM" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ es_SubMenu; }); __webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ es_MenuItem; }); __webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ es_MenuItemGroup; }); __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Divider; }); // UNUSED EXPORTS: MenuItem, MenuItemGroup // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js var assertThisInitialized = __webpack_require__("JX7q"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); // EXTERNAL MODULE: ./node_modules/mini-store/esm/index.js + 3 modules var esm = __webpack_require__("I8Z2"); // EXTERNAL MODULE: ./node_modules/omit.js/es/index.js var es = __webpack_require__("BGR+"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("4IlW"); // EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js var createChainedFunction = __webpack_require__("2GS6"); // EXTERNAL MODULE: ./node_modules/shallowequal/index.js var shallowequal = __webpack_require__("Gytx"); var shallowequal_default = /*#__PURE__*/__webpack_require__.n(shallowequal); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js var esm_typeof = __webpack_require__("U8pU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("ODXe"); // CONCATENATED MODULE: ./node_modules/rc-menu/es/utils/isMobile.js // MIT License from https://github.com/kaimallea/isMobile var applePhone = /iPhone/i; var appleIpod = /iPod/i; var appleTablet = /iPad/i; var androidPhone = /\bAndroid(?:.+)Mobile\b/i; // Match 'Android' AND 'Mobile' var androidTablet = /Android/i; var amazonPhone = /\bAndroid(?:.+)SD4930UR\b/i; var amazonTablet = /\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i; var windowsPhone = /Windows Phone/i; var windowsTablet = /\bWindows(?:.+)ARM\b/i; // Match 'Windows' AND 'ARM' var otherBlackberry = /BlackBerry/i; var otherBlackberry10 = /BB10/i; var otherOpera = /Opera Mini/i; var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i; var otherFirefox = /Mobile(?:.+)Firefox\b/i; // Match 'Mobile' AND 'Firefox' function match(regex, userAgent) { return regex.test(userAgent); } function isMobile(userAgent) { var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that // match everything. Strip it out if it exists. var tmp = ua.split('[FBAN'); if (typeof tmp[1] !== 'undefined') { var _tmp = tmp; var _tmp2 = Object(slicedToArray["a" /* default */])(_tmp, 1); ua = _tmp2[0]; } // Twitter mobile app's integrated browser on iPad adds a "Twitter for // iPhone" string. Same probably happens on other tablet platforms. // This will confuse detection so strip it out if it exists. tmp = ua.split('Twitter'); if (typeof tmp[1] !== 'undefined') { var _tmp3 = tmp; var _tmp4 = Object(slicedToArray["a" /* default */])(_tmp3, 1); ua = _tmp4[0]; } var result = { apple: { phone: match(applePhone, ua) && !match(windowsPhone, ua), ipod: match(appleIpod, ua), tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua), device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua) }, amazon: { phone: match(amazonPhone, ua), tablet: !match(amazonPhone, ua) && match(amazonTablet, ua), device: match(amazonPhone, ua) || match(amazonTablet, ua) }, android: { phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua), tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)), device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\bokhttp\b/i, ua) }, windows: { phone: match(windowsPhone, ua), tablet: match(windowsTablet, ua), device: match(windowsPhone, ua) || match(windowsTablet, ua) }, other: { blackberry: match(otherBlackberry, ua), blackberry10: match(otherBlackberry10, ua), opera: match(otherOpera, ua), firefox: match(otherFirefox, ua), chrome: match(otherChrome, ua), device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua) }, // Additional any: null, phone: null, tablet: null }; result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones result.phone = result.apple.phone || result.android.phone || result.windows.phone; result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet; return result; } var defaultResult = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, isMobile()), {}, { isMobile: isMobile }); /* harmony default export */ var utils_isMobile = (defaultResult); // CONCATENATED MODULE: ./node_modules/rc-menu/es/util.js function noop() {} function getKeyFromChildrenIndex(child, menuEventKey, index) { var prefix = menuEventKey || ''; return child.key || "".concat(prefix, "item_").concat(index); } function getMenuIdFromSubMenuEventKey(eventKey) { return "".concat(eventKey, "-menu-"); } function loopMenuItem(children, cb) { var index = -1; external_window_React_["Children"].forEach(children, function (c) { index += 1; if (c && c.type && c.type.isMenuItemGroup) { external_window_React_["Children"].forEach(c.props.children, function (c2) { index += 1; cb(c2, index); }); } else { cb(c, index); } }); } function loopMenuItemRecursively(children, keys, ret) { /* istanbul ignore if */ if (!children || ret.find) { return; } external_window_React_["Children"].forEach(children, function (c) { if (c) { var construct = c.type; if (!construct || !(construct.isSubMenu || construct.isMenuItem || construct.isMenuItemGroup)) { return; } if (keys.indexOf(c.key) !== -1) { ret.find = true; } else if (c.props.children) { loopMenuItemRecursively(c.props.children, keys, ret); } } }); } var menuAllProps = ['defaultSelectedKeys', 'selectedKeys', 'defaultOpenKeys', 'openKeys', 'mode', 'getPopupContainer', 'onSelect', 'onDeselect', 'onDestroy', 'openTransitionName', 'openAnimation', 'subMenuOpenDelay', 'subMenuCloseDelay', 'forceSubMenuRender', 'triggerSubMenuAction', 'level', 'selectable', 'multiple', 'onOpenChange', 'visible', 'focusable', 'defaultActiveFirst', 'prefixCls', 'inlineIndent', 'parentMenu', 'title', 'rootPrefixCls', 'eventKey', 'active', 'onItemHover', 'onTitleMouseEnter', 'onTitleMouseLeave', 'onTitleClick', 'popupAlign', 'popupOffset', 'isOpen', 'renderMenuItem', 'manualRef', 'subMenuKey', 'disabled', 'index', 'isSelected', 'store', 'activeKey', 'builtinPlacements', 'overflowedIndicator', 'motion', // the following keys found need to be removed from test regression 'attribute', 'value', 'popupClassName', 'inlineCollapsed', 'menu', 'theme', 'itemIcon', 'expandIcon']; // ref: https://github.com/ant-design/ant-design/issues/14007 // ref: https://bugs.chromium.org/p/chromium/issues/detail?id=360889 // getBoundingClientRect return the full precision value, which is // not the same behavior as on chrome. Set the precision to 6 to // unify their behavior var getWidth = function getWidth(elem) { var includeMargin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; var width = elem && typeof elem.getBoundingClientRect === 'function' && elem.getBoundingClientRect().width; if (width) { if (includeMargin) { var _getComputedStyle = getComputedStyle(elem), marginLeft = _getComputedStyle.marginLeft, marginRight = _getComputedStyle.marginRight; width += +marginLeft.replace('px', '') + +marginRight.replace('px', ''); } width = +width.toFixed(6); } return width || 0; }; var util_setStyle = function setStyle(elem, styleProperty, value) { if (elem && Object(esm_typeof["a" /* default */])(elem.style) === 'object') { elem.style[styleProperty] = value; } }; var util_isMobileDevice = function isMobileDevice() { return utils_isMobile.any; }; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules var toConsumableArray = __webpack_require__("KQm4"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js var objectWithoutProperties = __webpack_require__("Ff2n"); // EXTERNAL MODULE: external "window.ReactDOM" var external_window_ReactDOM_ = __webpack_require__("faye"); // EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js var ResizeObserver_es = __webpack_require__("bdgK"); // EXTERNAL MODULE: ./node_modules/rc-trigger/es/index.js + 5 modules var rc_trigger_es = __webpack_require__("uciX"); // EXTERNAL MODULE: ./node_modules/rc-motion/es/index.js + 5 modules var rc_motion_es = __webpack_require__("8XRh"); // CONCATENATED MODULE: ./node_modules/rc-menu/es/placements.js var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var placements = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; var placementsRtl = { topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -7] }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 7] }, rightTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0] }, leftTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0] } }; /* harmony default export */ var es_placements = (placements); // CONCATENATED MODULE: ./node_modules/rc-menu/es/SubMenu.js var guid = 0; var popupPlacementMap = { horizontal: 'bottomLeft', vertical: 'rightTop', 'vertical-left': 'rightTop', 'vertical-right': 'leftTop' }; var SubMenu_updateDefaultActiveFirst = function updateDefaultActiveFirst(store, eventKey, defaultActiveFirst) { var menuId = getMenuIdFromSubMenuEventKey(eventKey); var state = store.getState(); store.setState({ defaultActiveFirst: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.defaultActiveFirst), {}, Object(defineProperty["a" /* default */])({}, menuId, defaultActiveFirst)) }); }; var SubMenu_SubMenu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(SubMenu, _React$Component); var _super = Object(createSuper["a" /* default */])(SubMenu); function SubMenu(props) { var _this; Object(classCallCheck["a" /* default */])(this, SubMenu); _this = _super.call(this, props); _this.onDestroy = function (key) { _this.props.onDestroy(key); }; /** * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e) { var keyCode = e.keyCode; var menu = _this.menuInstance; var _this$props = _this.props, isOpen = _this$props.isOpen, store = _this$props.store; if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onTitleClick(e); SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); return true; } if (keyCode === KeyCode["a" /* default */].RIGHT) { if (isOpen) { menu.onKeyDown(e); } else { _this.triggerOpenChange(true); // need to update current menu's defaultActiveFirst value SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, true); } return true; } if (keyCode === KeyCode["a" /* default */].LEFT) { var handled; if (isOpen) { handled = menu.onKeyDown(e); } else { return undefined; } if (!handled) { _this.triggerOpenChange(false); handled = true; } return handled; } if (isOpen && (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN)) { return menu.onKeyDown(e); } return undefined; }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onPopupVisibleChange = function (visible) { _this.triggerOpenChange(visible, visible ? 'mouseenter' : 'mouseleave'); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, key = _this$props2.eventKey, onMouseEnter = _this$props2.onMouseEnter, store = _this$props2.store; SubMenu_updateDefaultActiveFirst(store, _this.props.eventKey, false); onMouseEnter({ key: key, domEvent: e }); }; _this.onMouseLeave = function (e) { var _this$props3 = _this.props, parentMenu = _this$props3.parentMenu, eventKey = _this$props3.eventKey, onMouseLeave = _this$props3.onMouseLeave; parentMenu.subMenuInstance = Object(assertThisInitialized["a" /* default */])(_this); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleMouseEnter = function (domEvent) { var _this$props4 = _this.props, key = _this$props4.eventKey, onItemHover = _this$props4.onItemHover, onTitleMouseEnter = _this$props4.onTitleMouseEnter; onItemHover({ key: key, hover: true }); onTitleMouseEnter({ key: key, domEvent: domEvent }); }; _this.onTitleMouseLeave = function (e) { var _this$props5 = _this.props, parentMenu = _this$props5.parentMenu, eventKey = _this$props5.eventKey, onItemHover = _this$props5.onItemHover, onTitleMouseLeave = _this$props5.onTitleMouseLeave; parentMenu.subMenuInstance = Object(assertThisInitialized["a" /* default */])(_this); onItemHover({ key: eventKey, hover: false }); onTitleMouseLeave({ key: eventKey, domEvent: e }); }; _this.onTitleClick = function (e) { var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; props.onTitleClick({ key: props.eventKey, domEvent: e }); if (props.triggerSubMenuAction === 'hover') { return; } _this.triggerOpenChange(!props.isOpen, 'click'); SubMenu_updateDefaultActiveFirst(props.store, _this.props.eventKey, false); }; _this.onSubMenuClick = function (info) { // in the case of overflowed submenu // onClick is not copied over if (typeof _this.props.onClick === 'function') { _this.props.onClick(_this.addKeyPath(info)); } }; _this.onSelect = function (info) { _this.props.onSelect(info); }; _this.onDeselect = function (info) { _this.props.onDeselect(info); }; _this.getPrefixCls = function () { return "".concat(_this.props.rootPrefixCls, "-submenu"); }; _this.getActiveClassName = function () { return "".concat(_this.getPrefixCls(), "-active"); }; _this.getDisabledClassName = function () { return "".concat(_this.getPrefixCls(), "-disabled"); }; _this.getSelectedClassName = function () { return "".concat(_this.getPrefixCls(), "-selected"); }; _this.getOpenClassName = function () { return "".concat(_this.props.rootPrefixCls, "-submenu-open"); }; _this.saveMenuInstance = function (c) { // children menu instance _this.menuInstance = c; }; _this.addKeyPath = function (info) { return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, info), {}, { keyPath: (info.keyPath || []).concat(_this.props.eventKey) }); }; _this.triggerOpenChange = function (open, type) { var key = _this.props.eventKey; var openChange = function openChange() { _this.onOpenChange({ key: key, item: Object(assertThisInitialized["a" /* default */])(_this), trigger: type, open: open }); }; if (type === 'mouseenter') { // make sure mouseenter happen after other menu item's mouseleave _this.mouseenterTimeout = setTimeout(function () { openChange(); }, 0); } else { openChange(); } }; _this.isChildrenSelected = function () { var ret = { find: false }; loopMenuItemRecursively(_this.props.children, _this.props.selectedKeys, ret); return ret.find; }; _this.isOpen = function () { return _this.props.openKeys.indexOf(_this.props.eventKey) !== -1; }; _this.adjustWidth = function () { /* istanbul ignore if */ if (!_this.subMenuTitle || !_this.menuInstance) { return; } var popupMenu = external_window_ReactDOM_["findDOMNode"](_this.menuInstance); if (popupMenu.offsetWidth >= _this.subMenuTitle.offsetWidth) { return; } /* istanbul ignore next */ popupMenu.style.minWidth = "".concat(_this.subMenuTitle.offsetWidth, "px"); }; _this.saveSubMenuTitle = function (subMenuTitle) { _this.subMenuTitle = subMenuTitle; }; _this.getBaseProps = function () { var _assertThisInitialize2 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize2.props; return { mode: props.mode === 'horizontal' ? 'vertical' : props.mode, visible: _this.props.isOpen, level: props.level + 1, inlineIndent: props.inlineIndent, focusable: false, onClick: _this.onSubMenuClick, onSelect: _this.onSelect, onDeselect: _this.onDeselect, onDestroy: _this.onDestroy, selectedKeys: props.selectedKeys, eventKey: "".concat(props.eventKey, "-menu-"), openKeys: props.openKeys, motion: props.motion, onOpenChange: _this.onOpenChange, subMenuOpenDelay: props.subMenuOpenDelay, parentMenu: Object(assertThisInitialized["a" /* default */])(_this), subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, triggerSubMenuAction: props.triggerSubMenuAction, builtinPlacements: props.builtinPlacements, defaultActiveFirst: props.store.getState().defaultActiveFirst[getMenuIdFromSubMenuEventKey(props.eventKey)], multiple: props.multiple, prefixCls: props.rootPrefixCls, id: _this.internalMenuId, manualRef: _this.saveMenuInstance, itemIcon: props.itemIcon, expandIcon: props.expandIcon, direction: props.direction }; }; _this.getMotion = function (mode, visible) { var _assertThisInitialize3 = Object(assertThisInitialized["a" /* default */])(_this), haveRendered = _assertThisInitialize3.haveRendered; var _this$props6 = _this.props, motion = _this$props6.motion, rootPrefixCls = _this$props6.rootPrefixCls; // don't show transition on first rendering (no animation for opened menu) // show appear transition if it's not visible (not sure why) // show appear transition if it's not inline mode var mergedMotion = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, motion), {}, { leavedClassName: "".concat(rootPrefixCls, "-hidden"), removeOnLeave: false, motionAppear: haveRendered || !visible || mode !== 'inline' }); return mergedMotion; }; var store = props.store, eventKey = props.eventKey; var _store$getState = store.getState(), defaultActiveFirst = _store$getState.defaultActiveFirst; _this.isRootMenu = false; var value = false; if (defaultActiveFirst) { value = defaultActiveFirst[eventKey]; } SubMenu_updateDefaultActiveFirst(store, eventKey, value); return _this; } Object(createClass["a" /* default */])(SubMenu, [{ key: "componentDidMount", value: function componentDidMount() { this.componentDidUpdate(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { var _this2 = this; var _this$props7 = this.props, mode = _this$props7.mode, parentMenu = _this$props7.parentMenu, manualRef = _this$props7.manualRef; // invoke customized ref to expose component to mixin if (manualRef) { manualRef(this); } if (mode !== 'horizontal' || !parentMenu.isRootMenu || !this.props.isOpen) { return; } this.minWidthTimeout = setTimeout(function () { return _this2.adjustWidth(); }, 0); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var _this$props8 = this.props, onDestroy = _this$props8.onDestroy, eventKey = _this$props8.eventKey; if (onDestroy) { onDestroy(eventKey); } /* istanbul ignore if */ if (this.minWidthTimeout) { clearTimeout(this.minWidthTimeout); } /* istanbul ignore if */ if (this.mouseenterTimeout) { clearTimeout(this.mouseenterTimeout); } } }, { key: "renderChildren", value: function renderChildren(children) { var _this3 = this; var baseProps = this.getBaseProps(); // [Legacy] getMotion must be called before `haveRendered` var mergedMotion = this.getMotion(baseProps.mode, baseProps.visible); this.haveRendered = true; this.haveOpened = this.haveOpened || baseProps.visible || baseProps.forceSubMenuRender; // never rendered not planning to, don't render if (!this.haveOpened) { return external_window_React_["createElement"]("div", null); } var direction = baseProps.direction; return external_window_React_["createElement"](rc_motion_es["default"], Object.assign({ visible: baseProps.visible }, mergedMotion), function (_ref) { var className = _ref.className, style = _ref.style; var mergedClassName = classnames_default()("".concat(baseProps.prefixCls, "-sub"), className, Object(defineProperty["a" /* default */])({}, "".concat(baseProps.prefixCls, "-rtl"), direction === 'rtl')); return external_window_React_["createElement"](es_SubPopupMenu, Object.assign({}, baseProps, { id: _this3.internalMenuId, className: mergedClassName, style: style }), children); }); } }, { key: "render", value: function render() { var _classNames2; var props = Object(objectSpread2["a" /* default */])({}, this.props); var isOpen = props.isOpen; var prefixCls = this.getPrefixCls(); var isInlineMode = props.mode === 'inline'; var className = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(props.mode), (_classNames2 = {}, Object(defineProperty["a" /* default */])(_classNames2, props.className, !!props.className), Object(defineProperty["a" /* default */])(_classNames2, this.getOpenClassName(), isOpen), Object(defineProperty["a" /* default */])(_classNames2, this.getActiveClassName(), props.active || isOpen && !isInlineMode), Object(defineProperty["a" /* default */])(_classNames2, this.getDisabledClassName(), props.disabled), Object(defineProperty["a" /* default */])(_classNames2, this.getSelectedClassName(), this.isChildrenSelected()), _classNames2)); if (!this.internalMenuId) { if (props.eventKey) { this.internalMenuId = "".concat(props.eventKey, "$Menu"); } else { guid += 1; this.internalMenuId = "$__$".concat(guid, "$Menu"); } } var mouseEvents = {}; var titleClickEvents = {}; var titleMouseEvents = {}; if (!props.disabled) { mouseEvents = { onMouseLeave: this.onMouseLeave, onMouseEnter: this.onMouseEnter }; // only works in title, not outer li titleClickEvents = { onClick: this.onTitleClick }; titleMouseEvents = { onMouseEnter: this.onTitleMouseEnter, onMouseLeave: this.onTitleMouseLeave }; } var style = {}; var direction = props.direction; if (isInlineMode) { if (direction === 'rtl') { style.paddingRight = props.inlineIndent * props.level; } else { style.paddingLeft = props.inlineIndent * props.level; } } var ariaOwns = {}; // only set aria-owns when menu is open // otherwise it would be an invalid aria-owns value // since corresponding node cannot be found if (this.props.isOpen) { ariaOwns = { 'aria-owns': this.internalMenuId }; } // expand custom icon should NOT be displayed in menu with horizontal mode. var icon = null; if (props.mode !== 'horizontal') { icon = this.props.expandIcon; // ReactNode if (typeof this.props.expandIcon === 'function') { icon = external_window_React_["createElement"](this.props.expandIcon, Object(objectSpread2["a" /* default */])({}, this.props)); } } var title = external_window_React_["createElement"]("div", Object.assign({ ref: this.saveSubMenuTitle, style: style, className: "".concat(prefixCls, "-title"), role: "button" }, titleMouseEvents, titleClickEvents, { "aria-expanded": isOpen }, ariaOwns, { "aria-haspopup": "true", title: typeof props.title === 'string' ? props.title : undefined }), props.title, icon || external_window_React_["createElement"]("i", { className: "".concat(prefixCls, "-arrow") })); var children = this.renderChildren(props.children); var getPopupContainer = props.parentMenu.isRootMenu ? props.parentMenu.props.getPopupContainer : function (triggerNode) { return triggerNode.parentNode; }; var popupPlacement = popupPlacementMap[props.mode]; var popupAlign = props.popupOffset ? { offset: props.popupOffset } : {}; var popupClassName = props.mode === 'inline' ? '' : props.popupClassName; popupClassName += direction === 'rtl' ? " ".concat(prefixCls, "-rtl") : ''; var disabled = props.disabled, triggerSubMenuAction = props.triggerSubMenuAction, subMenuOpenDelay = props.subMenuOpenDelay, forceSubMenuRender = props.forceSubMenuRender, subMenuCloseDelay = props.subMenuCloseDelay, builtinPlacements = props.builtinPlacements; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; var placement = direction === 'rtl' ? Object.assign({}, placementsRtl, builtinPlacements) : Object.assign({}, placements, builtinPlacements); delete props.direction; return external_window_React_["createElement"]("li", Object.assign({}, props, mouseEvents, { className: className, role: "menuitem" }), isInlineMode && title, isInlineMode && children, !isInlineMode && external_window_React_["createElement"](rc_trigger_es["a" /* default */], { prefixCls: prefixCls, popupClassName: classnames_default()("".concat(prefixCls, "-popup"), popupClassName), getPopupContainer: getPopupContainer, builtinPlacements: placement, popupPlacement: popupPlacement, popupVisible: isOpen, popupAlign: popupAlign, popup: children, action: disabled ? [] : [triggerSubMenuAction], mouseEnterDelay: subMenuOpenDelay, mouseLeaveDelay: subMenuCloseDelay, onPopupVisibleChange: this.onPopupVisibleChange, forceRender: forceSubMenuRender }, title)); } }]); return SubMenu; }(external_window_React_["Component"]); SubMenu_SubMenu.defaultProps = { onMouseEnter: noop, onMouseLeave: noop, onTitleMouseEnter: noop, onTitleMouseLeave: noop, onTitleClick: noop, manualRef: noop, mode: 'vertical', title: '' }; var connected = Object(esm["b" /* connect */])(function (_ref2, _ref3) { var openKeys = _ref2.openKeys, activeKey = _ref2.activeKey, selectedKeys = _ref2.selectedKeys; var eventKey = _ref3.eventKey, subMenuKey = _ref3.subMenuKey; return { isOpen: openKeys.indexOf(eventKey) > -1, active: activeKey[subMenuKey] === eventKey, selectedKeys: selectedKeys }; })(SubMenu_SubMenu); connected.isSubMenu = true; /* harmony default export */ var es_SubMenu = (connected); // CONCATENATED MODULE: ./node_modules/rc-menu/es/DOMWrap.js var MENUITEM_OVERFLOWED_CLASSNAME = 'menuitem-overflowed'; var FLOAT_PRECISION_ADJUST = 0.5; var DOMWrap_DOMWrap = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(DOMWrap, _React$Component); var _super = Object(createSuper["a" /* default */])(DOMWrap); function DOMWrap() { var _this; Object(classCallCheck["a" /* default */])(this, DOMWrap); _this = _super.apply(this, arguments); _this.resizeObserver = null; _this.mutationObserver = null; // original scroll size of the list _this.originalTotalWidth = 0; // copy of overflowed items _this.overflowedItems = []; // cache item of the original items (so we can track the size and order) _this.menuItemSizes = []; _this.cancelFrameId = null; _this.state = { lastVisibleIndex: undefined }; // get all valid menuItem nodes _this.getMenuItemNodes = function () { var prefixCls = _this.props.prefixCls; var ul = external_window_ReactDOM_["findDOMNode"](Object(assertThisInitialized["a" /* default */])(_this)); if (!ul) { return []; } // filter out all overflowed indicator placeholder return [].slice.call(ul.children).filter(function (node) { return node.className.split(' ').indexOf("".concat(prefixCls, "-overflowed-submenu")) < 0; }); }; _this.getOverflowedSubMenuItem = function (keyPrefix, overflowedItems, renderPlaceholder) { var _this$props = _this.props, overflowedIndicator = _this$props.overflowedIndicator, level = _this$props.level, mode = _this$props.mode, prefixCls = _this$props.prefixCls, theme = _this$props.theme; if (level !== 1 || mode !== 'horizontal') { return null; } // put all the overflowed item inside a submenu // with a title of overflow indicator ('...') var copy = _this.props.children[0]; var _copy$props = copy.props, throwAway = _copy$props.children, title = _copy$props.title, propStyle = _copy$props.style, rest = Object(objectWithoutProperties["a" /* default */])(_copy$props, ["children", "title", "style"]); var style = Object(objectSpread2["a" /* default */])({}, propStyle); var key = "".concat(keyPrefix, "-overflowed-indicator"); var eventKey = "".concat(keyPrefix, "-overflowed-indicator"); if (overflowedItems.length === 0 && renderPlaceholder !== true) { style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), {}, { display: 'none' }); } else if (renderPlaceholder) { style = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, style), {}, { visibility: 'hidden', // prevent from taking normal dom space position: 'absolute' }); key = "".concat(key, "-placeholder"); eventKey = "".concat(eventKey, "-placeholder"); } var popupClassName = theme ? "".concat(prefixCls, "-").concat(theme) : ''; var props = {}; menuAllProps.forEach(function (k) { if (rest[k] !== undefined) { props[k] = rest[k]; } }); return external_window_React_["createElement"](es_SubMenu, Object.assign({ title: overflowedIndicator, className: "".concat(prefixCls, "-overflowed-submenu"), popupClassName: popupClassName }, props, { key: key, eventKey: eventKey, disabled: false, style: style }), overflowedItems); }; // memorize rendered menuSize _this.setChildrenWidthAndResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = external_window_ReactDOM_["findDOMNode"](Object(assertThisInitialized["a" /* default */])(_this)); if (!ul) { return; } var ulChildrenNodes = ul.children; if (!ulChildrenNodes || ulChildrenNodes.length === 0) { return; } var lastOverflowedIndicatorPlaceholder = ul.children[ulChildrenNodes.length - 1]; // need last overflowed indicator for calculating length; util_setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'inline-block'); var menuItemNodes = _this.getMenuItemNodes(); // reset display attribute for all hidden elements caused by overflow to calculate updated width // and then reset to original state after width calculation var overflowedItems = menuItemNodes.filter(function (c) { return c.className.split(' ').indexOf(MENUITEM_OVERFLOWED_CLASSNAME) >= 0; }); overflowedItems.forEach(function (c) { util_setStyle(c, 'display', 'inline-block'); }); _this.menuItemSizes = menuItemNodes.map(function (c) { return getWidth(c, true); }); overflowedItems.forEach(function (c) { util_setStyle(c, 'display', 'none'); }); _this.overflowedIndicatorWidth = getWidth(ul.children[ul.children.length - 1], true); _this.originalTotalWidth = _this.menuItemSizes.reduce(function (acc, cur) { return acc + cur; }, 0); _this.handleResize(); // prevent the overflowed indicator from taking space; util_setStyle(lastOverflowedIndicatorPlaceholder, 'display', 'none'); }; _this.handleResize = function () { if (_this.props.mode !== 'horizontal') { return; } var ul = external_window_ReactDOM_["findDOMNode"](Object(assertThisInitialized["a" /* default */])(_this)); if (!ul) { return; } var width = getWidth(ul); _this.overflowedItems = []; var currentSumWidth = 0; // index for last visible child in horizontal mode var lastVisibleIndex; // float number comparison could be problematic // e.g. 0.1 + 0.2 > 0.3 =====> true // thus using FLOAT_PRECISION_ADJUST as buffer to help the situation if (_this.originalTotalWidth > width + FLOAT_PRECISION_ADJUST) { lastVisibleIndex = -1; _this.menuItemSizes.forEach(function (liWidth) { currentSumWidth += liWidth; if (currentSumWidth + _this.overflowedIndicatorWidth <= width) { lastVisibleIndex += 1; } }); } _this.setState({ lastVisibleIndex: lastVisibleIndex }); }; return _this; } Object(createClass["a" /* default */])(DOMWrap, [{ key: "componentDidMount", value: function componentDidMount() { var _this2 = this; this.setChildrenWidthAndResize(); if (this.props.level === 1 && this.props.mode === 'horizontal') { var menuUl = external_window_ReactDOM_["findDOMNode"](this); if (!menuUl) { return; } this.resizeObserver = new ResizeObserver_es["default"](function (entries) { entries.forEach(function () { var cancelFrameId = _this2.cancelFrameId; cancelAnimationFrame(cancelFrameId); _this2.cancelFrameId = requestAnimationFrame(_this2.setChildrenWidthAndResize); }); }); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); if (typeof MutationObserver !== 'undefined') { this.mutationObserver = new MutationObserver(function () { _this2.resizeObserver.disconnect(); [].slice.call(menuUl.children).concat(menuUl).forEach(function (el) { _this2.resizeObserver.observe(el); }); _this2.setChildrenWidthAndResize(); }); this.mutationObserver.observe(menuUl, { attributes: false, childList: true, subTree: false }); } } } }, { key: "componentWillUnmount", value: function componentWillUnmount() { if (this.resizeObserver) { this.resizeObserver.disconnect(); } if (this.mutationObserver) { this.mutationObserver.disconnect(); } cancelAnimationFrame(this.cancelFrameId); } }, { key: "renderChildren", value: function renderChildren(children) { var _this3 = this; // need to take care of overflowed items in horizontal mode var lastVisibleIndex = this.state.lastVisibleIndex; return (children || []).reduce(function (acc, childNode, index) { var item = childNode; if (_this3.props.mode === 'horizontal') { var overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, []); if (lastVisibleIndex !== undefined && _this3.props.className.indexOf("".concat(_this3.props.prefixCls, "-root")) !== -1) { if (index > lastVisibleIndex) { item = external_window_React_["cloneElement"](childNode, // 这里修改 eventKey 是为了防止隐藏状态下还会触发 openkeys 事件 { style: { display: 'none' }, eventKey: "".concat(childNode.props.eventKey, "-hidden"), /** * Legacy code. Here `className` never used: * https://github.com/react-component/menu/commit/4cd6b49fce9d116726f4ea00dda85325d6f26500#diff-e2fa48f75c2dd2318295cde428556a76R240 */ className: "".concat(MENUITEM_OVERFLOWED_CLASSNAME) }); } if (index === lastVisibleIndex + 1) { _this3.overflowedItems = children.slice(lastVisibleIndex + 1).map(function (c) { return external_window_React_["cloneElement"](c, // children[index].key will become '.$key' in clone by default, // we have to overwrite with the correct key explicitly { key: c.props.eventKey, mode: 'vertical-left' }); }); overflowed = _this3.getOverflowedSubMenuItem(childNode.props.eventKey, _this3.overflowedItems); } } var ret = [].concat(Object(toConsumableArray["a" /* default */])(acc), [overflowed, item]); if (index === children.length - 1) { // need a placeholder for calculating overflowed indicator width ret.push(_this3.getOverflowedSubMenuItem(childNode.props.eventKey, [], true)); } return ret; } return [].concat(Object(toConsumableArray["a" /* default */])(acc), [item]); }, []); } }, { key: "render", value: function render() { var _this$props2 = this.props, visible = _this$props2.visible, prefixCls = _this$props2.prefixCls, overflowedIndicator = _this$props2.overflowedIndicator, mode = _this$props2.mode, level = _this$props2.level, tag = _this$props2.tag, children = _this$props2.children, theme = _this$props2.theme, rest = Object(objectWithoutProperties["a" /* default */])(_this$props2, ["visible", "prefixCls", "overflowedIndicator", "mode", "level", "tag", "children", "theme"]); var Tag = tag; return external_window_React_["createElement"](Tag, Object.assign({}, rest), this.renderChildren(children)); } }]); return DOMWrap; }(external_window_React_["Component"]); DOMWrap_DOMWrap.defaultProps = { tag: 'div', className: '' }; /* harmony default export */ var es_DOMWrap = (DOMWrap_DOMWrap); // CONCATENATED MODULE: ./node_modules/rc-menu/es/SubPopupMenu.js function allDisabled(arr) { if (!arr.length) { return true; } return arr.every(function (c) { return !!c.props.disabled; }); } function updateActiveKey(store, menuId, activeKey) { var state = store.getState(); store.setState({ activeKey: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.activeKey), {}, Object(defineProperty["a" /* default */])({}, menuId, activeKey)) }); } function getEventKey(props) { // when eventKey not available ,it's menu and return menu id '0-menu-' return props.eventKey || '0-menu-'; } function getActiveKey(props, originalActiveKey) { var activeKey = originalActiveKey; var children = props.children, eventKey = props.eventKey; if (activeKey) { var found; loopMenuItem(children, function (c, i) { if (c && c.props && !c.props.disabled && activeKey === getKeyFromChildrenIndex(c, eventKey, i)) { found = true; } }); if (found) { return activeKey; } } activeKey = null; if (props.defaultActiveFirst) { loopMenuItem(children, function (c, i) { if (!activeKey && c && !c.props.disabled) { activeKey = getKeyFromChildrenIndex(c, eventKey, i); } }); return activeKey; } return activeKey; } function saveRef(c) { if (c) { var index = this.instanceArray.indexOf(c); if (index !== -1) { // update component if it's already inside instanceArray this.instanceArray[index] = c; } else { // add component if it's not in instanceArray yet; this.instanceArray.push(c); } } } var SubPopupMenu_SubPopupMenu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(SubPopupMenu, _React$Component); var _super = Object(createSuper["a" /* default */])(SubPopupMenu); function SubPopupMenu(props) { var _this; Object(classCallCheck["a" /* default */])(this, SubPopupMenu); _this = _super.call(this, props); /** * all keyboard events callbacks run from here at first * * note: * This legacy code that `onKeyDown` is called by parent instead of dom self. * which need return code to check if this event is handled */ _this.onKeyDown = function (e, callback) { var keyCode = e.keyCode; var handled; _this.getFlatInstanceArray().forEach(function (obj) { if (obj && obj.props.active && obj.onKeyDown) { handled = obj.onKeyDown(e); } }); if (handled) { return 1; } var activeItem = null; if (keyCode === KeyCode["a" /* default */].UP || keyCode === KeyCode["a" /* default */].DOWN) { activeItem = _this.step(keyCode === KeyCode["a" /* default */].UP ? -1 : 1); } if (activeItem) { e.preventDefault(); updateActiveKey(_this.props.store, getEventKey(_this.props), activeItem.props.eventKey); if (typeof callback === 'function') { callback(activeItem); } return 1; } return undefined; }; _this.onItemHover = function (e) { var key = e.key, hover = e.hover; updateActiveKey(_this.props.store, getEventKey(_this.props), hover ? key : null); }; _this.onDeselect = function (selectInfo) { _this.props.onDeselect(selectInfo); }; _this.onSelect = function (selectInfo) { _this.props.onSelect(selectInfo); }; _this.onClick = function (e) { _this.props.onClick(e); }; _this.onOpenChange = function (e) { _this.props.onOpenChange(e); }; _this.onDestroy = function (key) { /* istanbul ignore next */ _this.props.onDestroy(key); }; _this.getFlatInstanceArray = function () { return _this.instanceArray; }; _this.step = function (direction) { var children = _this.getFlatInstanceArray(); var activeKey = _this.props.store.getState().activeKey[getEventKey(_this.props)]; var len = children.length; if (!len) { return null; } if (direction < 0) { children = children.concat().reverse(); } // find current activeIndex var activeIndex = -1; children.every(function (c, ci) { if (c && c.props.eventKey === activeKey) { activeIndex = ci; return false; } return true; }); if (!_this.props.defaultActiveFirst && activeIndex !== -1 && allDisabled(children.slice(activeIndex, len - 1))) { return undefined; } var start = (activeIndex + 1) % len; var i = start; do { var child = children[i]; if (!child || child.props.disabled) { i = (i + 1) % len; } else { return child; } } while (i !== start); return null; }; _this.renderCommonMenuItem = function (child, i, extraProps) { var state = _this.props.store.getState(); var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; var key = getKeyFromChildrenIndex(child, props.eventKey, i); var childProps = child.props; // https://github.com/ant-design/ant-design/issues/11517#issuecomment-477403055 if (!childProps || typeof child.type === 'string') { return child; } var isActive = key === state.activeKey; var newChildProps = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({ mode: childProps.mode || props.mode, level: props.level, inlineIndent: props.inlineIndent, renderMenuItem: _this.renderMenuItem, rootPrefixCls: props.prefixCls, index: i, parentMenu: props.parentMenu, // customized ref function, need to be invoked manually in child's componentDidMount manualRef: childProps.disabled ? undefined : Object(createChainedFunction["a" /* default */])(child.ref, saveRef.bind(Object(assertThisInitialized["a" /* default */])(_this))), eventKey: key, active: !childProps.disabled && isActive, multiple: props.multiple, onClick: function onClick(e) { (childProps.onClick || noop)(e); _this.onClick(e); }, onItemHover: _this.onItemHover, motion: props.motion, subMenuOpenDelay: props.subMenuOpenDelay, subMenuCloseDelay: props.subMenuCloseDelay, forceSubMenuRender: props.forceSubMenuRender, onOpenChange: _this.onOpenChange, onDeselect: _this.onDeselect, onSelect: _this.onSelect, builtinPlacements: props.builtinPlacements, itemIcon: childProps.itemIcon || _this.props.itemIcon, expandIcon: childProps.expandIcon || _this.props.expandIcon }, extraProps), {}, { direction: props.direction }); // ref: https://github.com/ant-design/ant-design/issues/13943 if (props.mode === 'inline' || util_isMobileDevice()) { newChildProps.triggerSubMenuAction = 'click'; } return external_window_React_["cloneElement"](child, newChildProps); }; _this.renderMenuItem = function (c, i, subMenuKey) { /* istanbul ignore if */ if (!c) { return null; } var state = _this.props.store.getState(); var extraProps = { openKeys: state.openKeys, selectedKeys: state.selectedKeys, triggerSubMenuAction: _this.props.triggerSubMenuAction, subMenuKey: subMenuKey }; return _this.renderCommonMenuItem(c, i, extraProps); }; props.store.setState({ activeKey: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props.store.getState().activeKey), {}, Object(defineProperty["a" /* default */])({}, props.eventKey, getActiveKey(props, props.activeKey))) }); _this.instanceArray = []; return _this; } Object(createClass["a" /* default */])(SubPopupMenu, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "shouldComponentUpdate", value: function shouldComponentUpdate(nextProps) { return this.props.visible || nextProps.visible || this.props.className !== nextProps.className || !shallowequal_default()(this.props.style, nextProps.style); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { var props = this.props; var originalActiveKey = 'activeKey' in props ? props.activeKey : props.store.getState().activeKey[getEventKey(props)]; var activeKey = getActiveKey(props, originalActiveKey); if (activeKey !== originalActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } else if ('activeKey' in prevProps) { // If prev activeKey is not same as current activeKey, // we should set it. var prevActiveKey = getActiveKey(prevProps, prevProps.activeKey); if (activeKey !== prevActiveKey) { updateActiveKey(props.store, getEventKey(props), activeKey); } } } }, { key: "render", value: function render() { var _this2 = this; var props = Object(esm_extends["a" /* default */])({}, this.props); this.instanceArray = []; var className = classnames_default()(props.prefixCls, props.className, "".concat(props.prefixCls, "-").concat(props.mode)); var domProps = { className: className, // role could be 'select' and by default set to menu role: props.role || 'menu' }; if (props.id) { domProps.id = props.id; } if (props.focusable) { domProps.tabIndex = 0; domProps.onKeyDown = this.onKeyDown; } var prefixCls = props.prefixCls, eventKey = props.eventKey, visible = props.visible, level = props.level, mode = props.mode, overflowedIndicator = props.overflowedIndicator, theme = props.theme; menuAllProps.forEach(function (key) { return delete props[key]; }); // Otherwise, the propagated click event will trigger another onClick delete props.onClick; return external_window_React_["createElement"](es_DOMWrap, Object.assign({}, props, { prefixCls: prefixCls, mode: mode, tag: "ul", level: level, theme: theme, visible: visible, overflowedIndicator: overflowedIndicator }, domProps), external_window_React_["Children"].map(props.children, function (c, i) { return _this2.renderMenuItem(c, i, eventKey || '0-menu-'); })); } }]); return SubPopupMenu; }(external_window_React_["Component"]); SubPopupMenu_SubPopupMenu.defaultProps = { prefixCls: 'rc-menu', className: '', mode: 'vertical', level: 1, inlineIndent: 24, visible: true, focusable: true, style: {}, manualRef: noop }; var SubPopupMenu_connected = Object(esm["b" /* connect */])()(SubPopupMenu_SubPopupMenu); /* harmony default export */ var es_SubPopupMenu = (SubPopupMenu_connected); // EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js var warning = __webpack_require__("Kwbf"); // CONCATENATED MODULE: ./node_modules/rc-menu/es/utils/legacyUtil.js function getMotion(_ref, _ref2, menuMode) { var prefixCls = _ref.prefixCls, motion = _ref.motion, _ref$defaultMotions = _ref.defaultMotions, defaultMotions = _ref$defaultMotions === void 0 ? {} : _ref$defaultMotions, openAnimation = _ref.openAnimation, openTransitionName = _ref.openTransitionName; var switchingModeFromInline = _ref2.switchingModeFromInline; if (motion) { return motion; } if (Object(esm_typeof["a" /* default */])(openAnimation) === 'object' && openAnimation) { Object(warning["a" /* default */])(false, 'Object type of `openAnimation` is removed. Please use `motion` instead.'); } else if (typeof openAnimation === 'string') { return { motionName: "".concat(prefixCls, "-open-").concat(openAnimation) }; } if (openTransitionName) { return { motionName: openTransitionName }; } // Default logic var defaultMotion = defaultMotions[menuMode]; if (defaultMotion) { return defaultMotion; } // When mode switch from inline // submenu should hide without animation return switchingModeFromInline ? null : defaultMotions.other; } // CONCATENATED MODULE: ./node_modules/rc-menu/es/Menu.js var Menu_Menu = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Menu, _React$Component); var _super = Object(createSuper["a" /* default */])(Menu); function Menu(props) { var _this; Object(classCallCheck["a" /* default */])(this, Menu); _this = _super.call(this, props); _this.inlineOpenKeys = []; _this.onSelect = function (selectInfo) { var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize.props; if (props.selectable) { // root menu var _this$store$getState = _this.store.getState(), _selectedKeys = _this$store$getState.selectedKeys; var selectedKey = selectInfo.key; if (props.multiple) { _selectedKeys = _selectedKeys.concat([selectedKey]); } else { _selectedKeys = [selectedKey]; } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys }); } props.onSelect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, selectInfo), {}, { selectedKeys: _selectedKeys })); } }; _this.onClick = function (e) { var mode = _this.getRealMenuMode(); var _assertThisInitialize2 = Object(assertThisInitialized["a" /* default */])(_this), store = _assertThisInitialize2.store, onOpenChange = _assertThisInitialize2.props.onOpenChange; if (mode !== 'inline' && !('openKeys' in _this.props)) { // closing vertical popup submenu after click it store.setState({ openKeys: [] }); onOpenChange([]); } _this.props.onClick(e); }; // onKeyDown needs to be exposed as a instance method // e.g., in rc-select, we need to navigate menu item while // current active item is rc-select input box rather than the menu itself _this.onKeyDown = function (e, callback) { _this.innerMenu.getWrappedInstance().onKeyDown(e, callback); }; _this.onOpenChange = function (event) { var _assertThisInitialize3 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize3.props; var openKeys = _this.store.getState().openKeys.concat(); var changed = false; var processSingle = function processSingle(e) { var oneChanged = false; if (e.open) { oneChanged = openKeys.indexOf(e.key) === -1; if (oneChanged) { openKeys.push(e.key); } } else { var index = openKeys.indexOf(e.key); oneChanged = index !== -1; if (oneChanged) { openKeys.splice(index, 1); } } changed = changed || oneChanged; }; if (Array.isArray(event)) { // batch change call event.forEach(processSingle); } else { processSingle(event); } if (changed) { if (!('openKeys' in _this.props)) { _this.store.setState({ openKeys: openKeys }); } props.onOpenChange(openKeys); } }; _this.onDeselect = function (selectInfo) { var _assertThisInitialize4 = Object(assertThisInitialized["a" /* default */])(_this), props = _assertThisInitialize4.props; if (props.selectable) { var _selectedKeys2 = _this.store.getState().selectedKeys.concat(); var selectedKey = selectInfo.key; var index = _selectedKeys2.indexOf(selectedKey); if (index !== -1) { _selectedKeys2.splice(index, 1); } if (!('selectedKeys' in props)) { _this.store.setState({ selectedKeys: _selectedKeys2 }); } props.onDeselect(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, selectInfo), {}, { selectedKeys: _selectedKeys2 })); } }; // Restore vertical mode when menu is collapsed responsively when mounted // https://github.com/ant-design/ant-design/issues/13104 // TODO: not a perfect solution, // looking a new way to avoid setting switchingModeFromInline in this situation _this.onMouseEnter = function (e) { _this.restoreModeVerticalFromInline(); var onMouseEnter = _this.props.onMouseEnter; if (onMouseEnter) { onMouseEnter(e); } }; _this.onTransitionEnd = function (e) { // when inlineCollapsed menu width animation finished // https://github.com/ant-design/ant-design/issues/12864 var widthCollapsed = e.propertyName === 'width' && e.target === e.currentTarget; // Fix SVGElement e.target.className.indexOf is not a function // https://github.com/ant-design/ant-design/issues/15699 var className = e.target.className; // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, // unless during an animation. var classNameValue = Object.prototype.toString.call(className) === '[object SVGAnimatedString]' ? className.animVal : className; // Fix for , // the width transition won't trigger when menu is collapsed // https://github.com/ant-design/ant-design-pro/issues/2783 var iconScaled = e.propertyName === 'font-size' && classNameValue.indexOf('anticon') >= 0; if (widthCollapsed || iconScaled) { _this.restoreModeVerticalFromInline(); } }; _this.setInnerMenu = function (node) { _this.innerMenu = node; }; _this.isRootMenu = true; var selectedKeys = props.defaultSelectedKeys; var openKeys = props.defaultOpenKeys; if ('selectedKeys' in props) { selectedKeys = props.selectedKeys || []; } if ('openKeys' in props) { openKeys = props.openKeys || []; } _this.store = Object(esm["c" /* create */])({ selectedKeys: selectedKeys, openKeys: openKeys, activeKey: { '0-menu-': getActiveKey(props, props.activeKey) } }); _this.state = { switchingModeFromInline: false }; return _this; } Object(createClass["a" /* default */])(Menu, [{ key: "componentDidMount", value: function componentDidMount() { this.updateMiniStore(); this.updateMenuDisplay(); } }, { key: "componentDidUpdate", value: function componentDidUpdate(prevProps) { this.updateOpentKeysWhenSwitchMode(prevProps); this.updateMiniStore(); var _this$props = this.props, siderCollapsed = _this$props.siderCollapsed, inlineCollapsed = _this$props.inlineCollapsed, onOpenChange = _this$props.onOpenChange; if (!prevProps.inlineCollapsed && inlineCollapsed || !prevProps.siderCollapsed && siderCollapsed) { onOpenChange([]); } this.updateMenuDisplay(); } }, { key: "updateOpentKeysWhenSwitchMode", value: function updateOpentKeysWhenSwitchMode(prevProps) { var nextProps = this.props, store = this.store, inlineOpenKeys = this.inlineOpenKeys; var prevState = store.getState(); var newState = {}; if (prevProps.mode === 'inline' && nextProps.mode !== 'inline') { this.setState({ switchingModeFromInline: true }); } if (!('openKeys' in nextProps)) { // [Legacy] Old code will return after `openKeys` changed. // Not sure the reason, we should keep this logic still. if (nextProps.inlineCollapsed && !prevProps.inlineCollapsed || nextProps.siderCollapsed && !prevProps.siderCollapsed) { this.setState({ switchingModeFromInline: true }); this.inlineOpenKeys = prevState.openKeys.concat(); newState.openKeys = []; } if (!nextProps.inlineCollapsed && prevProps.inlineCollapsed || !nextProps.siderCollapsed && prevProps.siderCollapsed) { newState.openKeys = inlineOpenKeys; this.inlineOpenKeys = []; } } if (Object.keys(newState).length) { store.setState(newState); } } }, { key: "updateMenuDisplay", value: function updateMenuDisplay() { var collapsedWidth = this.props.collapsedWidth, store = this.store, prevOpenKeys = this.prevOpenKeys; // https://github.com/ant-design/ant-design/issues/8587 var hideMenu = this.getInlineCollapsed() && (collapsedWidth === 0 || collapsedWidth === '0' || collapsedWidth === '0px'); if (hideMenu) { this.prevOpenKeys = store.getState().openKeys.concat(); this.store.setState({ openKeys: [] }); } else if (prevOpenKeys) { this.store.setState({ openKeys: prevOpenKeys }); this.prevOpenKeys = null; } } }, { key: "getRealMenuMode", value: function getRealMenuMode() { var mode = this.props.mode; var switchingModeFromInline = this.state.switchingModeFromInline; var inlineCollapsed = this.getInlineCollapsed(); if (switchingModeFromInline && inlineCollapsed) { return 'inline'; } return inlineCollapsed ? 'vertical' : mode; } }, { key: "getInlineCollapsed", value: function getInlineCollapsed() { var _this$props2 = this.props, inlineCollapsed = _this$props2.inlineCollapsed, siderCollapsed = _this$props2.siderCollapsed; if (siderCollapsed !== undefined) { return siderCollapsed; } return inlineCollapsed; } }, { key: "restoreModeVerticalFromInline", value: function restoreModeVerticalFromInline() { var switchingModeFromInline = this.state.switchingModeFromInline; if (switchingModeFromInline) { this.setState({ switchingModeFromInline: false }); } } }, { key: "updateMiniStore", value: function updateMiniStore() { if ('selectedKeys' in this.props) { this.store.setState({ selectedKeys: this.props.selectedKeys || [] }); } if ('openKeys' in this.props) { this.store.setState({ openKeys: this.props.openKeys || [] }); } } }, { key: "render", value: function render() { var props = Object(objectSpread2["a" /* default */])({}, Object(es["default"])(this.props, ['collapsedWidth', 'siderCollapsed', 'defaultMotions'])); var mode = this.getRealMenuMode(); props.className += " ".concat(props.prefixCls, "-root"); if (props.direction === 'rtl') { props.className += " ".concat(props.prefixCls, "-rtl"); } props = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props), {}, { mode: mode, onClick: this.onClick, onOpenChange: this.onOpenChange, onDeselect: this.onDeselect, onSelect: this.onSelect, onMouseEnter: this.onMouseEnter, onTransitionEnd: this.onTransitionEnd, parentMenu: this, motion: getMotion(this.props, this.state, mode) }); delete props.openAnimation; delete props.openTransitionName; return external_window_React_["createElement"](esm["a" /* Provider */], { store: this.store }, external_window_React_["createElement"](es_SubPopupMenu, Object.assign({}, props, { ref: this.setInnerMenu }), this.props.children)); } }]); return Menu; }(external_window_React_["Component"]); Menu_Menu.defaultProps = { selectable: true, onClick: noop, onSelect: noop, onOpenChange: noop, onDeselect: noop, defaultSelectedKeys: [], defaultOpenKeys: [], subMenuOpenDelay: 0.1, subMenuCloseDelay: 0.1, triggerSubMenuAction: 'hover', prefixCls: 'rc-menu', className: '', mode: 'vertical', style: {}, builtinPlacements: {}, overflowedIndicator: external_window_React_["createElement"]("span", null, "\xB7\xB7\xB7") }; /* harmony default export */ var es_Menu = (Menu_Menu); // CONCATENATED MODULE: ./node_modules/rc-menu/es/MenuItem.js var MenuItem_MenuItem = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(MenuItem, _React$Component); var _super = Object(createSuper["a" /* default */])(MenuItem); function MenuItem() { var _this; Object(classCallCheck["a" /* default */])(this, MenuItem); _this = _super.apply(this, arguments); _this.onKeyDown = function (e) { var keyCode = e.keyCode; if (keyCode === KeyCode["a" /* default */].ENTER) { _this.onClick(e); return true; } return undefined; }; _this.onMouseLeave = function (e) { var _this$props = _this.props, eventKey = _this$props.eventKey, onItemHover = _this$props.onItemHover, onMouseLeave = _this$props.onMouseLeave; onItemHover({ key: eventKey, hover: false }); onMouseLeave({ key: eventKey, domEvent: e }); }; _this.onMouseEnter = function (e) { var _this$props2 = _this.props, eventKey = _this$props2.eventKey, onItemHover = _this$props2.onItemHover, onMouseEnter = _this$props2.onMouseEnter; onItemHover({ key: eventKey, hover: true }); onMouseEnter({ key: eventKey, domEvent: e }); }; _this.onClick = function (e) { var _this$props3 = _this.props, eventKey = _this$props3.eventKey, multiple = _this$props3.multiple, onClick = _this$props3.onClick, onSelect = _this$props3.onSelect, onDeselect = _this$props3.onDeselect, isSelected = _this$props3.isSelected; var info = { key: eventKey, keyPath: [eventKey], item: Object(assertThisInitialized["a" /* default */])(_this), domEvent: e }; onClick(info); if (multiple) { if (isSelected) { onDeselect(info); } else { onSelect(info); } } else if (!isSelected) { onSelect(info); } }; _this.saveNode = function (node) { _this.node = node; }; return _this; } Object(createClass["a" /* default */])(MenuItem, [{ key: "componentDidMount", value: function componentDidMount() { // invoke customized ref to expose component to mixin this.callRef(); } }, { key: "componentDidUpdate", value: function componentDidUpdate() { this.callRef(); } }, { key: "componentWillUnmount", value: function componentWillUnmount() { var props = this.props; if (props.onDestroy) { props.onDestroy(props.eventKey); } } }, { key: "getPrefixCls", value: function getPrefixCls() { return "".concat(this.props.rootPrefixCls, "-item"); } }, { key: "getActiveClassName", value: function getActiveClassName() { return "".concat(this.getPrefixCls(), "-active"); } }, { key: "getSelectedClassName", value: function getSelectedClassName() { return "".concat(this.getPrefixCls(), "-selected"); } }, { key: "getDisabledClassName", value: function getDisabledClassName() { return "".concat(this.getPrefixCls(), "-disabled"); } }, { key: "callRef", value: function callRef() { if (this.props.manualRef) { this.props.manualRef(this); } } }, { key: "render", value: function render() { var _classNames; var props = Object(objectSpread2["a" /* default */])({}, this.props); var className = classnames_default()(this.getPrefixCls(), props.className, (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, this.getActiveClassName(), !props.disabled && props.active), Object(defineProperty["a" /* default */])(_classNames, this.getSelectedClassName(), props.isSelected), Object(defineProperty["a" /* default */])(_classNames, this.getDisabledClassName(), props.disabled), _classNames)); var attrs = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, props.attribute), {}, { title: typeof props.title === 'string' ? props.title : undefined, className: className, // set to menuitem by default role: props.role || 'menuitem', 'aria-disabled': props.disabled }); if (props.role === 'option') { // overwrite to option attrs = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, attrs), {}, { role: 'option', 'aria-selected': props.isSelected }); } else if (props.role === null || props.role === 'none') { // sometimes we want to specify role inside
  • element //
  • Link
  • would be a good example // in this case the role on
  • should be "none" to // remove the implied listitem role. // https://www.w3.org/TR/wai-aria-practices-1.1/examples/menubar/menubar-1/menubar-1.html attrs.role = 'none'; } // In case that onClick/onMouseLeave/onMouseEnter is passed down from owner var mouseEvent = { onClick: props.disabled ? null : this.onClick, onMouseLeave: props.disabled ? null : this.onMouseLeave, onMouseEnter: props.disabled ? null : this.onMouseEnter }; var style = Object(objectSpread2["a" /* default */])({}, props.style); if (props.mode === 'inline') { if (props.direction === 'rtl') { style.paddingRight = props.inlineIndent * props.level; } else { style.paddingLeft = props.inlineIndent * props.level; } } menuAllProps.forEach(function (key) { return delete props[key]; }); delete props.direction; var icon = this.props.itemIcon; if (typeof this.props.itemIcon === 'function') { // TODO: This is a bug which should fixed after TS refactor icon = external_window_React_["createElement"](this.props.itemIcon, this.props); } return external_window_React_["createElement"]("li", Object.assign({}, Object(es["default"])(props, ['onClick', 'onMouseEnter', 'onMouseLeave', 'onSelect']), attrs, mouseEvent, { style: style, ref: this.saveNode }), props.children, icon); } }]); return MenuItem; }(external_window_React_["Component"]); MenuItem_MenuItem.isMenuItem = true; MenuItem_MenuItem.defaultProps = { onSelect: noop, onMouseEnter: noop, onMouseLeave: noop, manualRef: noop }; var MenuItem_connected = Object(esm["b" /* connect */])(function (_ref, _ref2) { var activeKey = _ref.activeKey, selectedKeys = _ref.selectedKeys; var eventKey = _ref2.eventKey, subMenuKey = _ref2.subMenuKey; return { active: activeKey[subMenuKey] === eventKey, isSelected: selectedKeys.indexOf(eventKey) !== -1 }; })(MenuItem_MenuItem); /* harmony default export */ var es_MenuItem = (MenuItem_connected); // CONCATENATED MODULE: ./node_modules/rc-menu/es/MenuItemGroup.js var MenuItemGroup_MenuItemGroup = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(MenuItemGroup, _React$Component); var _super = Object(createSuper["a" /* default */])(MenuItemGroup); function MenuItemGroup() { var _this; Object(classCallCheck["a" /* default */])(this, MenuItemGroup); _this = _super.apply(this, arguments); _this.renderInnerMenuItem = function (item) { var _this$props = _this.props, renderMenuItem = _this$props.renderMenuItem, index = _this$props.index; return renderMenuItem(item, index, _this.props.subMenuKey); }; return _this; } Object(createClass["a" /* default */])(MenuItemGroup, [{ key: "render", value: function render() { var props = Object(esm_extends["a" /* default */])({}, this.props); var _props$className = props.className, className = _props$className === void 0 ? '' : _props$className, rootPrefixCls = props.rootPrefixCls; var titleClassName = "".concat(rootPrefixCls, "-item-group-title"); var listClassName = "".concat(rootPrefixCls, "-item-group-list"); var title = props.title, children = props.children; menuAllProps.forEach(function (key) { return delete props[key]; }); // Set onClick to null, to ignore propagated onClick event delete props.onClick; delete props.direction; return external_window_React_["createElement"]("li", Object.assign({}, props, { className: "".concat(className, " ").concat(rootPrefixCls, "-item-group") }), external_window_React_["createElement"]("div", { className: titleClassName, title: typeof title === 'string' ? title : undefined }, title), external_window_React_["createElement"]("ul", { className: listClassName }, external_window_React_["Children"].map(children, this.renderInnerMenuItem))); } }]); return MenuItemGroup; }(external_window_React_["Component"]); MenuItemGroup_MenuItemGroup.isMenuItemGroup = true; MenuItemGroup_MenuItemGroup.defaultProps = { disabled: true }; /* harmony default export */ var es_MenuItemGroup = (MenuItemGroup_MenuItemGroup); // CONCATENATED MODULE: ./node_modules/rc-menu/es/Divider.js var Divider_Divider = function Divider(_ref) { var className = _ref.className, rootPrefixCls = _ref.rootPrefixCls, style = _ref.style; return external_window_React_["createElement"]("li", { className: "".concat(className, " ").concat(rootPrefixCls, "-item-divider"), style: style }); }; Divider_Divider.defaultProps = { // To fix keyboard UX. disabled: true, className: '', style: {} }; /* harmony default export */ var es_Divider = (Divider_Divider); // CONCATENATED MODULE: ./node_modules/rc-menu/es/index.js /* harmony default export */ var rc_menu_es = __webpack_exports__["e"] = (es_Menu); /***/ }), /***/ "24YM": /*!**************************************************!*\ !*** ./node_modules/size-sensor/lib/constant.js ***! \**************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SensorTabIndex = exports.SensorClassName = exports.SizeSensorId = void 0; /** * Created by hustcc on 18/6/9. * Contract: i@hust.cc */ var SizeSensorId = 'size-sensor-id'; exports.SizeSensorId = SizeSensorId; var SensorClassName = 'size-sensor-object'; exports.SensorClassName = SensorClassName; var SensorTabIndex = '-1'; exports.SensorTabIndex = SensorTabIndex; /***/ }), /***/ "2DNl": /*!**************************************************!*\ !*** ./node_modules/zrender/lib/contain/path.js ***! \**************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var PathProxy = __webpack_require__(/*! ../core/PathProxy */ "IMiH"); var line = __webpack_require__(/*! ./line */ "loD1"); var cubic = __webpack_require__(/*! ./cubic */ "59Ip"); var quadratic = __webpack_require__(/*! ./quadratic */ "aKvl"); var arc = __webpack_require__(/*! ./arc */ "n1HI"); var _util = __webpack_require__(/*! ./util */ "hX1E"); var normalizeRadian = _util.normalizeRadian; var curve = __webpack_require__(/*! ../core/curve */ "Sj9i"); var windingLine = __webpack_require__(/*! ./windingLine */ "hyiK"); var CMD = PathProxy.CMD; var PI2 = Math.PI * 2; var EPSILON = 1e-4; function isAroundEqual(a, b) { return Math.abs(a - b) < EPSILON; } // 临时数组 var roots = [-1, -1, -1]; var extrema = [-1, -1]; function swapExtrema() { var tmp = extrema[0]; extrema[0] = extrema[1]; extrema[1] = tmp; } function windingCubic(x0, y0, x1, y1, x2, y2, x3, y3, x, y) { // Quick reject if (y > y0 && y > y1 && y > y2 && y > y3 || y < y0 && y < y1 && y < y2 && y < y3) { return 0; } var nRoots = curve.cubicRootAt(y0, y1, y2, y3, y, roots); if (nRoots === 0) { return 0; } else { var w = 0; var nExtrema = -1; var y0_; var y1_; for (var i = 0; i < nRoots; i++) { var t = roots[i]; // Avoid winding error when intersection point is the connect point of two line of polygon var unit = t === 0 || t === 1 ? 0.5 : 1; var x_ = curve.cubicAt(x0, x1, x2, x3, t); if (x_ < x) { // Quick reject continue; } if (nExtrema < 0) { nExtrema = curve.cubicExtrema(y0, y1, y2, y3, extrema); if (extrema[1] < extrema[0] && nExtrema > 1) { swapExtrema(); } y0_ = curve.cubicAt(y0, y1, y2, y3, extrema[0]); if (nExtrema > 1) { y1_ = curve.cubicAt(y0, y1, y2, y3, extrema[1]); } } if (nExtrema === 2) { // 分成三段单调函数 if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else if (t < extrema[1]) { w += y1_ < y0_ ? unit : -unit; } else { w += y3 < y1_ ? unit : -unit; } } else { // 分成两段单调函数 if (t < extrema[0]) { w += y0_ < y0 ? unit : -unit; } else { w += y3 < y0_ ? unit : -unit; } } } return w; } } function windingQuadratic(x0, y0, x1, y1, x2, y2, x, y) { // Quick reject if (y > y0 && y > y1 && y > y2 || y < y0 && y < y1 && y < y2) { return 0; } var nRoots = curve.quadraticRootAt(y0, y1, y2, y, roots); if (nRoots === 0) { return 0; } else { var t = curve.quadraticExtremum(y0, y1, y2); if (t >= 0 && t <= 1) { var w = 0; var y_ = curve.quadraticAt(y0, y1, y2, t); for (var i = 0; i < nRoots; i++) { // Remove one endpoint. var unit = roots[i] === 0 || roots[i] === 1 ? 0.5 : 1; var x_ = curve.quadraticAt(x0, x1, x2, roots[i]); if (x_ < x) { // Quick reject continue; } if (roots[i] < t) { w += y_ < y0 ? unit : -unit; } else { w += y2 < y_ ? unit : -unit; } } return w; } else { // Remove one endpoint. var unit = roots[0] === 0 || roots[0] === 1 ? 0.5 : 1; var x_ = curve.quadraticAt(x0, x1, x2, roots[0]); if (x_ < x) { // Quick reject return 0; } return y2 < y0 ? unit : -unit; } } } // TODO // Arc 旋转 function windingArc(cx, cy, r, startAngle, endAngle, anticlockwise, x, y) { y -= cy; if (y > r || y < -r) { return 0; } var tmp = Math.sqrt(r * r - y * y); roots[0] = -tmp; roots[1] = tmp; var diff = Math.abs(startAngle - endAngle); if (diff < 1e-4) { return 0; } if (diff % PI2 < 1e-4) { // Is a circle startAngle = 0; endAngle = PI2; var dir = anticlockwise ? 1 : -1; if (x >= roots[0] + cx && x <= roots[1] + cx) { return dir; } else { return 0; } } if (anticlockwise) { var tmp = startAngle; startAngle = normalizeRadian(endAngle); endAngle = normalizeRadian(tmp); } else { startAngle = normalizeRadian(startAngle); endAngle = normalizeRadian(endAngle); } if (startAngle > endAngle) { endAngle += PI2; } var w = 0; for (var i = 0; i < 2; i++) { var x_ = roots[i]; if (x_ + cx > x) { var angle = Math.atan2(y, x_); var dir = anticlockwise ? 1 : -1; if (angle < 0) { angle = PI2 + angle; } if (angle >= startAngle && angle <= endAngle || angle + PI2 >= startAngle && angle + PI2 <= endAngle) { if (angle > Math.PI / 2 && angle < Math.PI * 1.5) { dir = -dir; } w += dir; } } } return w; } function containPath(data, lineWidth, isStroke, x, y) { var w = 0; var xi = 0; var yi = 0; var x0 = 0; var y0 = 0; for (var i = 0; i < data.length;) { var cmd = data[i++]; // Begin a new subpath if (cmd === CMD.M && i > 1) { // Close previous subpath if (!isStroke) { w += windingLine(xi, yi, x0, y0, x, y); } // 如果被任何一个 subpath 包含 // if (w !== 0) { // return true; // } } if (i === 1) { // 如果第一个命令是 L, C, Q // 则 previous point 同绘制命令的第一个 point // // 第一个命令为 Arc 的情况下会在后面特殊处理 xi = data[i]; yi = data[i + 1]; x0 = xi; y0 = yi; } switch (cmd) { case CMD.M: // moveTo 命令重新创建一个新的 subpath, 并且更新新的起点 // 在 closePath 的时候使用 x0 = data[i++]; y0 = data[i++]; xi = x0; yi = y0; break; case CMD.L: if (isStroke) { if (line.containStroke(xi, yi, data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { // NOTE 在第一个命令为 L, C, Q 的时候会计算出 NaN w += windingLine(xi, yi, data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD.C: if (isStroke) { if (cubic.containStroke(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD.Q: if (isStroke) { if (quadratic.containStroke(xi, yi, data[i++], data[i++], data[i], data[i + 1], lineWidth, x, y)) { return true; } } else { w += windingQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], x, y) || 0; } xi = data[i++]; yi = data[i++]; break; case CMD.A: // TODO Arc 判断的开销比较大 var cx = data[i++]; var cy = data[i++]; var rx = data[i++]; var ry = data[i++]; var theta = data[i++]; var dTheta = data[i++]; // TODO Arc 旋转 i += 1; var anticlockwise = 1 - data[i++]; var x1 = Math.cos(theta) * rx + cx; var y1 = Math.sin(theta) * ry + cy; // 不是直接使用 arc 命令 if (i > 1) { w += windingLine(xi, yi, x1, y1, x, y); } else { // 第一个命令起点还未定义 x0 = x1; y0 = y1; } // zr 使用scale来模拟椭圆, 这里也对x做一定的缩放 var _x = (x - cx) * ry / rx + cx; if (isStroke) { if (arc.containStroke(cx, cy, ry, theta, theta + dTheta, anticlockwise, lineWidth, _x, y)) { return true; } } else { w += windingArc(cx, cy, ry, theta, theta + dTheta, anticlockwise, _x, y); } xi = Math.cos(theta + dTheta) * rx + cx; yi = Math.sin(theta + dTheta) * ry + cy; break; case CMD.R: x0 = xi = data[i++]; y0 = yi = data[i++]; var width = data[i++]; var height = data[i++]; var x1 = x0 + width; var y1 = y0 + height; if (isStroke) { if (line.containStroke(x0, y0, x1, y0, lineWidth, x, y) || line.containStroke(x1, y0, x1, y1, lineWidth, x, y) || line.containStroke(x1, y1, x0, y1, lineWidth, x, y) || line.containStroke(x0, y1, x0, y0, lineWidth, x, y)) { return true; } } else { // FIXME Clockwise ? w += windingLine(x1, y0, x1, y1, x, y); w += windingLine(x0, y1, x0, y0, x, y); } break; case CMD.Z: if (isStroke) { if (line.containStroke(xi, yi, x0, y0, lineWidth, x, y)) { return true; } } else { // Close a subpath w += windingLine(xi, yi, x0, y0, x, y); // 如果被任何一个 subpath 包含 // FIXME subpaths may overlap // if (w !== 0) { // return true; // } } xi = x0; yi = y0; break; } } if (!isStroke && !isAroundEqual(yi, y0)) { w += windingLine(xi, yi, x0, y0, x, y) || 0; } return w !== 0; } function contain(pathData, x, y) { return containPath(pathData, 0, false, x, y); } function containStroke(pathData, lineWidth, x, y) { return containPath(pathData, lineWidth, true, x, y); } exports.contain = contain; exports.containStroke = containStroke; /***/ }), /***/ "2fw6": /*!**********************************************************!*\ !*** ./node_modules/zrender/lib/graphic/shape/Circle.js ***! \**********************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var Path = __webpack_require__(/*! ../Path */ "y+Vt"); /** * 圆形 * @module zrender/shape/Circle */ var _default = Path.extend({ type: 'circle', shape: { cx: 0, cy: 0, r: 0 }, buildPath: function (ctx, shape, inBundle) { // Better stroking in ShapeBundle // Always do it may have performence issue ( fill may be 2x more cost) if (inBundle) { ctx.moveTo(shape.cx + shape.r, shape.cy); } // else { // if (ctx.allocate && !ctx.data.length) { // ctx.allocate(ctx.CMD_MEM_SIZE.A); // } // } // Better stroking in ShapeBundle // ctx.moveTo(shape.cx + shape.r, shape.cy); ctx.arc(shape.cx, shape.cy, shape.r, 0, Math.PI * 2, true); } }); module.exports = _default; /***/ }), /***/ "3C/r": /*!*****************************************************!*\ !*** ./node_modules/zrender/lib/graphic/Pattern.js ***! \*****************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { var Pattern = function (image, repeat) { // Should do nothing more in this constructor. Because gradient can be // declard by `color: {image: ...}`, where this constructor will not be called. this.image = image; this.repeat = repeat; // Can be cloned this.type = 'pattern'; }; Pattern.prototype.getCanvasPattern = function (ctx) { return ctx.createPattern(this.image, this.repeat || 'repeat'); }; var _default = Pattern; module.exports = _default; /***/ }), /***/ "3CBa": /*!*************************************************!*\ !*** ./node_modules/zrender/lib/svg/Painter.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var _core = __webpack_require__(/*! ./core */ "hydK"); var createElement = _core.createElement; var util = __webpack_require__(/*! ../core/util */ "bYtY"); var logError = __webpack_require__(/*! ../core/log */ "SUKs"); var Path = __webpack_require__(/*! ../graphic/Path */ "y+Vt"); var ZImage = __webpack_require__(/*! ../graphic/Image */ "Dagg"); var ZText = __webpack_require__(/*! ../graphic/Text */ "dqUG"); var arrayDiff = __webpack_require__(/*! ../core/arrayDiff2 */ "DBLp"); var GradientManager = __webpack_require__(/*! ./helper/GradientManager */ "sW+o"); var ClippathManager = __webpack_require__(/*! ./helper/ClippathManager */ "n6Mw"); var ShadowManager = __webpack_require__(/*! ./helper/ShadowManager */ "vKoX"); var _graphic = __webpack_require__(/*! ./graphic */ "P47w"); var svgPath = _graphic.path; var svgImage = _graphic.image; var svgText = _graphic.text; /** * SVG Painter * @module zrender/svg/Painter */ function parseInt10(val) { return parseInt(val, 10); } function getSvgProxy(el) { if (el instanceof Path) { return svgPath; } else if (el instanceof ZImage) { return svgImage; } else if (el instanceof ZText) { return svgText; } else { return svgPath; } } function checkParentAvailable(parent, child) { return child && parent && child.parentNode !== parent; } function insertAfter(parent, child, prevSibling) { if (checkParentAvailable(parent, child) && prevSibling) { var nextSibling = prevSibling.nextSibling; nextSibling ? parent.insertBefore(child, nextSibling) : parent.appendChild(child); } } function prepend(parent, child) { if (checkParentAvailable(parent, child)) { var firstChild = parent.firstChild; firstChild ? parent.insertBefore(child, firstChild) : parent.appendChild(child); } } // function append(parent, child) { // if (checkParentAvailable(parent, child)) { // parent.appendChild(child); // } // } function remove(parent, child) { if (child && parent && child.parentNode === parent) { parent.removeChild(child); } } function getTextSvgElement(displayable) { return displayable.__textSvgEl; } function getSvgElement(displayable) { return displayable.__svgEl; } /** * @alias module:zrender/svg/Painter * @constructor * @param {HTMLElement} root 绘图容器 * @param {module:zrender/Storage} storage * @param {Object} opts */ var SVGPainter = function (root, storage, opts, zrId) { this.root = root; this.storage = storage; this._opts = opts = util.extend({}, opts || {}); var svgDom = createElement('svg'); svgDom.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); svgDom.setAttribute('version', '1.1'); svgDom.setAttribute('baseProfile', 'full'); svgDom.style.cssText = 'user-select:none;position:absolute;left:0;top:0;'; var bgRoot = createElement('g'); svgDom.appendChild(bgRoot); var svgRoot = createElement('g'); svgDom.appendChild(svgRoot); this.gradientManager = new GradientManager(zrId, svgRoot); this.clipPathManager = new ClippathManager(zrId, svgRoot); this.shadowManager = new ShadowManager(zrId, svgRoot); var viewport = document.createElement('div'); viewport.style.cssText = 'overflow:hidden;position:relative'; this._svgDom = svgDom; this._svgRoot = svgRoot; this._backgroundRoot = bgRoot; this._viewport = viewport; root.appendChild(viewport); viewport.appendChild(svgDom); this.resize(opts.width, opts.height); this._visibleList = []; }; SVGPainter.prototype = { constructor: SVGPainter, getType: function () { return 'svg'; }, getViewportRoot: function () { return this._viewport; }, getSvgDom: function () { return this._svgDom; }, getSvgRoot: function () { return this._svgRoot; }, getViewportRootOffset: function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }, refresh: function () { var list = this.storage.getDisplayList(true); this._paintList(list); }, setBackgroundColor: function (backgroundColor) { // TODO gradient // Insert a bg rect instead of setting background to viewport. // Otherwise, the exported SVG don't have background. if (this._backgroundRoot && this._backgroundNode) { this._backgroundRoot.removeChild(this._backgroundNode); } var bgNode = createElement('rect'); bgNode.setAttribute('width', this.getWidth()); bgNode.setAttribute('height', this.getHeight()); bgNode.setAttribute('x', 0); bgNode.setAttribute('y', 0); bgNode.setAttribute('id', 0); bgNode.style.fill = backgroundColor; this._backgroundRoot.appendChild(bgNode); this._backgroundNode = bgNode; }, _paintList: function (list) { this.gradientManager.markAllUnused(); this.clipPathManager.markAllUnused(); this.shadowManager.markAllUnused(); var svgRoot = this._svgRoot; var visibleList = this._visibleList; var listLen = list.length; var newVisibleList = []; var i; for (i = 0; i < listLen; i++) { var displayable = list[i]; var svgProxy = getSvgProxy(displayable); var svgElement = getSvgElement(displayable) || getTextSvgElement(displayable); if (!displayable.invisible) { if (displayable.__dirty) { svgProxy && svgProxy.brush(displayable); // Update clipPath this.clipPathManager.update(displayable); // Update gradient and shadow if (displayable.style) { this.gradientManager.update(displayable.style.fill); this.gradientManager.update(displayable.style.stroke); this.shadowManager.update(svgElement, displayable); } displayable.__dirty = false; } newVisibleList.push(displayable); } } var diff = arrayDiff(visibleList, newVisibleList); var prevSvgElement; // First do remove, in case element moved to the head and do remove // after add for (i = 0; i < diff.length; i++) { var item = diff[i]; if (item.removed) { for (var k = 0; k < item.count; k++) { var displayable = visibleList[item.indices[k]]; var svgElement = getSvgElement(displayable); var textSvgElement = getTextSvgElement(displayable); remove(svgRoot, svgElement); remove(svgRoot, textSvgElement); } } } for (i = 0; i < diff.length; i++) { var item = diff[i]; if (item.added) { for (var k = 0; k < item.count; k++) { var displayable = newVisibleList[item.indices[k]]; var svgElement = getSvgElement(displayable); var textSvgElement = getTextSvgElement(displayable); prevSvgElement ? insertAfter(svgRoot, svgElement, prevSvgElement) : prepend(svgRoot, svgElement); if (svgElement) { insertAfter(svgRoot, textSvgElement, svgElement); } else if (prevSvgElement) { insertAfter(svgRoot, textSvgElement, prevSvgElement); } else { prepend(svgRoot, textSvgElement); } // Insert text insertAfter(svgRoot, textSvgElement, svgElement); prevSvgElement = textSvgElement || svgElement || prevSvgElement; // zrender.Text only create textSvgElement. this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable); this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable); this.clipPathManager.markUsed(displayable); } } else if (!item.removed) { for (var k = 0; k < item.count; k++) { var displayable = newVisibleList[item.indices[k]]; var svgElement = getSvgElement(displayable); var textSvgElement = getTextSvgElement(displayable); var svgElement = getSvgElement(displayable); var textSvgElement = getTextSvgElement(displayable); this.gradientManager.markUsed(displayable); this.gradientManager.addWithoutUpdate(svgElement || textSvgElement, displayable); this.shadowManager.markUsed(displayable); this.shadowManager.addWithoutUpdate(svgElement || textSvgElement, displayable); this.clipPathManager.markUsed(displayable); if (textSvgElement) { // Insert text. insertAfter(svgRoot, textSvgElement, svgElement); } prevSvgElement = svgElement || textSvgElement || prevSvgElement; } } } this.gradientManager.removeUnused(); this.clipPathManager.removeUnused(); this.shadowManager.removeUnused(); this._visibleList = newVisibleList; }, _getDefs: function (isForceCreating) { var svgRoot = this._svgDom; var defs = svgRoot.getElementsByTagName('defs'); if (defs.length === 0) { // Not exist if (isForceCreating) { var defs = svgRoot.insertBefore(createElement('defs'), // Create new tag svgRoot.firstChild // Insert in the front of svg ); if (!defs.contains) { // IE doesn't support contains method defs.contains = function (el) { var children = defs.children; if (!children) { return false; } for (var i = children.length - 1; i >= 0; --i) { if (children[i] === el) { return true; } } return false; }; } return defs; } else { return null; } } else { return defs[0]; } }, resize: function (width, height) { var viewport = this._viewport; // FIXME Why ? viewport.style.display = 'none'; // Save input w/h var opts = this._opts; width != null && (opts.width = width); height != null && (opts.height = height); width = this._getSize(0); height = this._getSize(1); viewport.style.display = ''; if (this._width !== width || this._height !== height) { this._width = width; this._height = height; var viewportStyle = viewport.style; viewportStyle.width = width + 'px'; viewportStyle.height = height + 'px'; var svgRoot = this._svgDom; // Set width by 'svgRoot.width = width' is invalid svgRoot.setAttribute('width', width); svgRoot.setAttribute('height', height); } if (this._backgroundNode) { this._backgroundNode.setAttribute('width', width); this._backgroundNode.setAttribute('height', height); } }, /** * 获取绘图区域宽度 */ getWidth: function () { return this._width; }, /** * 获取绘图区域高度 */ getHeight: function () { return this._height; }, _getSize: function (whIdx) { var opts = this._opts; var wh = ['width', 'height'][whIdx]; var cwh = ['clientWidth', 'clientHeight'][whIdx]; var plt = ['paddingLeft', 'paddingTop'][whIdx]; var prb = ['paddingRight', 'paddingBottom'][whIdx]; if (opts[wh] != null && opts[wh] !== 'auto') { return parseFloat(opts[wh]); } var root = this.root; // IE8 does not support getComputedStyle, but it use VML. var stl = document.defaultView.getComputedStyle(root); return (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0) | 0; }, dispose: function () { this.root.innerHTML = ''; this._svgRoot = this._backgroundRoot = this._svgDom = this._backgroundNode = this._viewport = this.storage = null; }, clear: function () { if (this._viewport) { this.root.removeChild(this._viewport); } }, toDataURL: function () { this.refresh(); var html = encodeURIComponent(this._svgDom.outerHTML.replace(/>\n\r<')); return 'data:image/svg+xml;charset=UTF-8,' + html; } }; // Not supported methods function createMethodNotSupport(method) { return function () { logError('In SVG mode painter not support method "' + method + '"'); }; } // Unsuppoted methods util.each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'pathToImage'], function (name) { SVGPainter.prototype[name] = createMethodNotSupport(name); }); var _default = SVGPainter; module.exports = _default; /***/ }), /***/ "3e3G": /*!************************************************************!*\ !*** ./node_modules/zrender/lib/graphic/RadialGradient.js ***! \************************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var zrUtil = __webpack_require__(/*! ../core/util */ "bYtY"); var Gradient = __webpack_require__(/*! ./Gradient */ "QuXc"); /** * x, y, r are all percent from 0 to 1 * @param {number} [x=0.5] * @param {number} [y=0.5] * @param {number} [r=0.5] * @param {Array.} [colorStops] * @param {boolean} [globalCoord=false] */ var RadialGradient = function (x, y, r, colorStops, globalCoord) { // Should do nothing more in this constructor. Because gradient can be // declard by `color: {type: 'radial', colorStops: ...}`, where // this constructor will not be called. this.x = x == null ? 0.5 : x; this.y = y == null ? 0.5 : y; this.r = r == null ? 0.5 : r; // Can be cloned this.type = 'radial'; // If use global coord this.global = globalCoord || false; Gradient.call(this, colorStops); }; RadialGradient.prototype = { constructor: RadialGradient }; zrUtil.inherits(RadialGradient, Gradient); var _default = RadialGradient; module.exports = _default; /***/ }), /***/ "3gBT": /*!***********************************************!*\ !*** ./node_modules/zrender/lib/core/guid.js ***! \***********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { /** * zrender: 生成唯一id * * @author errorrik (errorrik@gmail.com) */ var idStart = 0x0907; function _default() { return idStart++; } module.exports = _default; /***/ }), /***/ "4fz+": /*!*****************************************************!*\ !*** ./node_modules/zrender/lib/container/Group.js ***! \*****************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var zrUtil = __webpack_require__(/*! ../core/util */ "bYtY"); var Element = __webpack_require__(/*! ../Element */ "1bdT"); var BoundingRect = __webpack_require__(/*! ../core/BoundingRect */ "mFDi"); /** * Group是一个容器,可以插入子节点,Group的变换也会被应用到子节点上 * @module zrender/graphic/Group * @example * var Group = require('zrender/container/Group'); * var Circle = require('zrender/graphic/shape/Circle'); * var g = new Group(); * g.position[0] = 100; * g.position[1] = 100; * g.add(new Circle({ * style: { * x: 100, * y: 100, * r: 20, * } * })); * zr.add(g); */ /** * @alias module:zrender/graphic/Group * @constructor * @extends module:zrender/mixin/Transformable * @extends module:zrender/mixin/Eventful */ var Group = function (opts) { opts = opts || {}; Element.call(this, opts); for (var key in opts) { if (opts.hasOwnProperty(key)) { this[key] = opts[key]; } } this._children = []; this.__storage = null; this.__dirty = true; }; Group.prototype = { constructor: Group, isGroup: true, /** * @type {string} */ type: 'group', /** * 所有子孙元素是否响应鼠标事件 * @name module:/zrender/container/Group#silent * @type {boolean} * @default false */ silent: false, /** * @return {Array.} */ children: function () { return this._children.slice(); }, /** * 获取指定 index 的儿子节点 * @param {number} idx * @return {module:zrender/Element} */ childAt: function (idx) { return this._children[idx]; }, /** * 获取指定名字的儿子节点 * @param {string} name * @return {module:zrender/Element} */ childOfName: function (name) { var children = this._children; for (var i = 0; i < children.length; i++) { if (children[i].name === name) { return children[i]; } } }, /** * @return {number} */ childCount: function () { return this._children.length; }, /** * 添加子节点到最后 * @param {module:zrender/Element} child */ add: function (child) { if (child && child !== this && child.parent !== this) { this._children.push(child); this._doAdd(child); } return this; }, /** * 添加子节点在 nextSibling 之前 * @param {module:zrender/Element} child * @param {module:zrender/Element} nextSibling */ addBefore: function (child, nextSibling) { if (child && child !== this && child.parent !== this && nextSibling && nextSibling.parent === this) { var children = this._children; var idx = children.indexOf(nextSibling); if (idx >= 0) { children.splice(idx, 0, child); this._doAdd(child); } } return this; }, _doAdd: function (child) { if (child.parent) { child.parent.remove(child); } child.parent = this; var storage = this.__storage; var zr = this.__zr; if (storage && storage !== child.__storage) { storage.addToStorage(child); if (child instanceof Group) { child.addChildrenToStorage(storage); } } zr && zr.refresh(); }, /** * 移除子节点 * @param {module:zrender/Element} child */ remove: function (child) { var zr = this.__zr; var storage = this.__storage; var children = this._children; var idx = zrUtil.indexOf(children, child); if (idx < 0) { return this; } children.splice(idx, 1); child.parent = null; if (storage) { storage.delFromStorage(child); if (child instanceof Group) { child.delChildrenFromStorage(storage); } } zr && zr.refresh(); return this; }, /** * 移除所有子节点 */ removeAll: function () { var children = this._children; var storage = this.__storage; var child; var i; for (i = 0; i < children.length; i++) { child = children[i]; if (storage) { storage.delFromStorage(child); if (child instanceof Group) { child.delChildrenFromStorage(storage); } } child.parent = null; } children.length = 0; return this; }, /** * 遍历所有子节点 * @param {Function} cb * @param {} context */ eachChild: function (cb, context) { var children = this._children; for (var i = 0; i < children.length; i++) { var child = children[i]; cb.call(context, child, i); } return this; }, /** * 深度优先遍历所有子孙节点 * @param {Function} cb * @param {} context */ traverse: function (cb, context) { for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; cb.call(context, child); if (child.type === 'group') { child.traverse(cb, context); } } return this; }, addChildrenToStorage: function (storage) { for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; storage.addToStorage(child); if (child instanceof Group) { child.addChildrenToStorage(storage); } } }, delChildrenFromStorage: function (storage) { for (var i = 0; i < this._children.length; i++) { var child = this._children[i]; storage.delFromStorage(child); if (child instanceof Group) { child.delChildrenFromStorage(storage); } } }, dirty: function () { this.__dirty = true; this.__zr && this.__zr.refresh(); return this; }, /** * @return {module:zrender/core/BoundingRect} */ getBoundingRect: function (includeChildren) { // TODO Caching var rect = null; var tmpRect = new BoundingRect(0, 0, 0, 0); var children = includeChildren || this._children; var tmpMat = []; for (var i = 0; i < children.length; i++) { var child = children[i]; if (child.ignore || child.invisible) { continue; } var childRect = child.getBoundingRect(); var transform = child.getLocalTransform(tmpMat); // TODO // The boundingRect cacluated by transforming original // rect may be bigger than the actual bundingRect when rotation // is used. (Consider a circle rotated aginst its center, where // the actual boundingRect should be the same as that not be // rotated.) But we can not find better approach to calculate // actual boundingRect yet, considering performance. if (transform) { tmpRect.copy(childRect); tmpRect.applyTransform(transform); rect = rect || tmpRect.clone(); rect.union(tmpRect); } else { rect = rect || childRect.clone(); rect.union(childRect); } } return rect || tmpRect; } }; zrUtil.inherits(Group, Element); var _default = Group; module.exports = _default; /***/ }), /***/ "4mN7": /*!***********************************************!*\ !*** ./node_modules/zrender/lib/core/bbox.js ***! \***********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var vec2 = __webpack_require__(/*! ./vector */ "QBsz"); var curve = __webpack_require__(/*! ./curve */ "Sj9i"); /** * @author Yi Shen(https://github.com/pissang) */ var mathMin = Math.min; var mathMax = Math.max; var mathSin = Math.sin; var mathCos = Math.cos; var PI2 = Math.PI * 2; var start = vec2.create(); var end = vec2.create(); var extremity = vec2.create(); /** * 从顶点数组中计算出最小包围盒,写入`min`和`max`中 * @module zrender/core/bbox * @param {Array} points 顶点数组 * @param {number} min * @param {number} max */ function fromPoints(points, min, max) { if (points.length === 0) { return; } var p = points[0]; var left = p[0]; var right = p[0]; var top = p[1]; var bottom = p[1]; var i; for (i = 1; i < points.length; i++) { p = points[i]; left = mathMin(left, p[0]); right = mathMax(right, p[0]); top = mathMin(top, p[1]); bottom = mathMax(bottom, p[1]); } min[0] = left; min[1] = top; max[0] = right; max[1] = bottom; } /** * @memberOf module:zrender/core/bbox * @param {number} x0 * @param {number} y0 * @param {number} x1 * @param {number} y1 * @param {Array.} min * @param {Array.} max */ function fromLine(x0, y0, x1, y1, min, max) { min[0] = mathMin(x0, x1); min[1] = mathMin(y0, y1); max[0] = mathMax(x0, x1); max[1] = mathMax(y0, y1); } var xDim = []; var yDim = []; /** * 从三阶贝塞尔曲线(p0, p1, p2, p3)中计算出最小包围盒,写入`min`和`max`中 * @memberOf module:zrender/core/bbox * @param {number} x0 * @param {number} y0 * @param {number} x1 * @param {number} y1 * @param {number} x2 * @param {number} y2 * @param {number} x3 * @param {number} y3 * @param {Array.} min * @param {Array.} max */ function fromCubic(x0, y0, x1, y1, x2, y2, x3, y3, min, max) { var cubicExtrema = curve.cubicExtrema; var cubicAt = curve.cubicAt; var i; var n = cubicExtrema(x0, x1, x2, x3, xDim); min[0] = Infinity; min[1] = Infinity; max[0] = -Infinity; max[1] = -Infinity; for (i = 0; i < n; i++) { var x = cubicAt(x0, x1, x2, x3, xDim[i]); min[0] = mathMin(x, min[0]); max[0] = mathMax(x, max[0]); } n = cubicExtrema(y0, y1, y2, y3, yDim); for (i = 0; i < n; i++) { var y = cubicAt(y0, y1, y2, y3, yDim[i]); min[1] = mathMin(y, min[1]); max[1] = mathMax(y, max[1]); } min[0] = mathMin(x0, min[0]); max[0] = mathMax(x0, max[0]); min[0] = mathMin(x3, min[0]); max[0] = mathMax(x3, max[0]); min[1] = mathMin(y0, min[1]); max[1] = mathMax(y0, max[1]); min[1] = mathMin(y3, min[1]); max[1] = mathMax(y3, max[1]); } /** * 从二阶贝塞尔曲线(p0, p1, p2)中计算出最小包围盒,写入`min`和`max`中 * @memberOf module:zrender/core/bbox * @param {number} x0 * @param {number} y0 * @param {number} x1 * @param {number} y1 * @param {number} x2 * @param {number} y2 * @param {Array.} min * @param {Array.} max */ function fromQuadratic(x0, y0, x1, y1, x2, y2, min, max) { var quadraticExtremum = curve.quadraticExtremum; var quadraticAt = curve.quadraticAt; // Find extremities, where derivative in x dim or y dim is zero var tx = mathMax(mathMin(quadraticExtremum(x0, x1, x2), 1), 0); var ty = mathMax(mathMin(quadraticExtremum(y0, y1, y2), 1), 0); var x = quadraticAt(x0, x1, x2, tx); var y = quadraticAt(y0, y1, y2, ty); min[0] = mathMin(x0, x2, x); min[1] = mathMin(y0, y2, y); max[0] = mathMax(x0, x2, x); max[1] = mathMax(y0, y2, y); } /** * 从圆弧中计算出最小包围盒,写入`min`和`max`中 * @method * @memberOf module:zrender/core/bbox * @param {number} x * @param {number} y * @param {number} rx * @param {number} ry * @param {number} startAngle * @param {number} endAngle * @param {number} anticlockwise * @param {Array.} min * @param {Array.} max */ function fromArc(x, y, rx, ry, startAngle, endAngle, anticlockwise, min, max) { var vec2Min = vec2.min; var vec2Max = vec2.max; var diff = Math.abs(startAngle - endAngle); if (diff % PI2 < 1e-4 && diff > 1e-4) { // Is a circle min[0] = x - rx; min[1] = y - ry; max[0] = x + rx; max[1] = y + ry; return; } start[0] = mathCos(startAngle) * rx + x; start[1] = mathSin(startAngle) * ry + y; end[0] = mathCos(endAngle) * rx + x; end[1] = mathSin(endAngle) * ry + y; vec2Min(min, start, end); vec2Max(max, start, end); // Thresh to [0, Math.PI * 2] startAngle = startAngle % PI2; if (startAngle < 0) { startAngle = startAngle + PI2; } endAngle = endAngle % PI2; if (endAngle < 0) { endAngle = endAngle + PI2; } if (startAngle > endAngle && !anticlockwise) { endAngle += PI2; } else if (startAngle < endAngle && anticlockwise) { startAngle += PI2; } if (anticlockwise) { var tmp = endAngle; endAngle = startAngle; startAngle = tmp; } // var number = 0; // var step = (anticlockwise ? -Math.PI : Math.PI) / 2; for (var angle = 0; angle < endAngle; angle += Math.PI / 2) { if (angle > startAngle) { extremity[0] = mathCos(angle) * rx + x; extremity[1] = mathSin(angle) * ry + y; vec2Min(min, extremity, min); vec2Max(max, extremity, max); } } } exports.fromPoints = fromPoints; exports.fromLine = fromLine; exports.fromCubic = fromCubic; exports.fromQuadratic = fromQuadratic; exports.fromArc = fromArc; /***/ }), /***/ "4qgm": /*!*********************************************!*\ !*** ./src/assets/images/icons/tx-live.png ***! \*********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADgAAAAwCAYAAABE1blzAAAIeUlEQVRoQ72aa2wU1xXHf2dm1jYEBClJGgofIFJLU0W04AdQWgJSW0UprZRIpB/aJBTxStIShWchJvbytA2lBCKKeajhQ5s2tGpFK1G1UowqKNjYBkraJCqqiCDEDZSncezdmTnVnd2FxaztmfWaa632w9459/7v75xzz71j4R61ssM6TkrYqMon3qesPjFNLt6LoWWgB5n1ttr/GcMCLKrE5qFgPJf3gRXN5XJgoMcfUIFlR/QxiqgVhyfVA/MxTWKgPuZvL51UtUyTjwdK6IAI/NLbWlQylhctWC0xPuN35Zi+gFUMfpIzoqxsLpffDoTIggssb9KvqLBJYnxD3dvUepq8OIAPquxzfCobJ8v5QgotmMAxDVoyYjAvi81KcRiWk1qPKm/RPIvHqy2T5FeFElkQgeVNWq42m8TmcU0G8ZVXC2ia5vOW47Lq2BQ5m5ehrIf6JbC0WQdbsMSH5ZbNED/R3+mYDHSL5kcqVLZOZB8imq/lvAWWHdWpOGySIqYEwvKk1mtsmtl5/M72WNk4Wf6dj8jIAqce1qGJEparsgSHQVoIar3M3GRadWnDp+rb5eyJi0RaykgCy47q9DS1srDUvLRzme+YFXhg5CY2YD4uf/RdVrROkffCGgk13vQTOrzdZZUKi8SmOCy1pMLUYfCDkfD7T+Cvl1PTckKNereENM1L6rFmaAc/PzRD3L6E9jlUabN+Swj2tfFB6o8Q7h0e/GQMPDcy9djBS7DjPJzthOJ+0lSPvzguyxonyz96E9mjwIpGHeGZ+lFYiEXMpP+ozQhcPgZmj7z95MUE1H8Ef7gIhnCszyXOPWqa5lWUDVcvsu3Mk5KrXsodEhUtOtNT6qwYj0allj2dXAIzvx+5CtvOwT9vQpEFVtTVMzuK8QJT1yY55HssbZ0sLd3N3LF+k47pZ70YcZS5WNj5UAsr0PS74cG+C/DLNrjppYTm0wKaSW7gUxvz2HL0q/Jpxs4tgeVN+rRvUWPF+Hx/qEURmOl7uh1ePweN11Iua+XjtsYLUjSP+BZLW0vlmLEvk07paK+LNWoxWwQxBXKhWm8u2n2MpA+/+S/suQDXvfxc1ti0ioIC/ybK5o5BbJbSJj1pD+HLXnu0DBlmEaIIzNjbfi6VhErydNeAmgX2MPCu8ZxMaNJptlBjSi6zv+VbKOcSHFVgwxXY/CFc6AI7Hzc14kzBni7xPJtFgZnxp/S+WJLFAsvEYWiko04vKMMKbOtK7Y9/+h/4mmchkFWkWz6VxyvkzYBm9vzKjmsFFnX9PfZkbPYl0BSVBy7CzvNwvqsfm3/WMct1WXUy65h1lyNMb9CS9iEsUouVls3w/tDsTeCZDjDxduhqKqHk5ZJpaprgQ/VZleug3KOnl/1dJ6QvjL4Z5uohbAx2+fBWG/ziY7icTFHLp4W96ug1lM3l0eCxvIhQicWIqBu/IbhyLDz7cErCiRup6qX5ej/2u4iXVaFyVdlxfUyFN0UojbJPGlozH4B5o+DAJfh1GxjR+VYs2deNFrx2vELa+qIfSqAxUtqkW61iXvY7+zJ55+/mFGHcsN0FJ8+a89Y1RoL3xWVF85TwF8ahBZY16RtSzEtRBRq5RmTogbqtn6GGh+vDThHiLWVyadYstffvl/Q1cu8LHnrc/giMxjzdOxNrCU6rsry1Qv5sflkQ1x8qjN5VJWvD2C2cQGMpwmG4t8lJUUAtobDds1l3coJcnVulox2LdU4xzyc62berWmbfG4GSKo80SVKK0gfjfIWaGDXFcoJW32dZ6yR5x4hYuEafUaixbcYaX3cT7NlVLfMGXGAmq4nPHlz2YvMjbJ41k4iSbYOSylBz6VThZ+2dbPzga3Jj4Todhcd6FZ4XAd8DJwZucqAF3q4gPgCWZ78GK2/S76nFBonxSKhzZfoc5ydpxGNpy2Q5HFCr0mew2WjZPOJmXZcMuMDgFZiPi1Dv3SRuXmTOqdWhRV28ZHkc3hGXw+VN+rAK67GYjWD1VCAYd/Q9borHZrWpaymTjoWv6igtZh0E59OAWnYbMIGljbrDGc4L3g3eRQNqB83A89bo4zb81HYodV06VKkb+S4b4/slMbFRn7JsaiTGF7JpZu5S/ARH8FjSMkUaja35cZ1lCTUBNXPwzhHLRmAywd7dcZlb2Bhs1C3EGNTlsOr0eLkyZ7kOdYawyoJXRCj2PDArbjvguRxVl1d2rZXGCa36oO2zBmWexLCD+ExwHai91M6WszOkc06Vfi5msc4QNzmrO7VsIbEiSCTYubtaXiiowNJmfcBssumVniGw2XaY6Jl3gN1W2oj0fTrUY9PIf7HB0Cxv0ifUZhF+SlxzuZy4i1ofV5NOyu5ltXiqvlL+VlCBGWNzV+vX7RgHnRj3JXPeRKZ6ZtP0fBbviacugTItoOakY60PasalLTuIx3dIsrh+rZwKIy6YR9iOmX7z6zUmbTwhQq1l82gugtk20zRvqrKJDrZeKaX9/vd42oIay7kzQ+aaS/C8x3WEtZc9tu2PS6TXPZEFZibx4w36YMKl2lRPIti9xY2haQh4LmcQbqBMSBPpcX2zPKDB91m8Oy4no8LIi2D3QRZW6Uxs6sLQtMzhNkfq724zTf2aKutH+rwej0gt217eBLONLKzWh8z/wWgImr1RCKgZ0h4N4rJk59pUIupPK4jAzAQWxPU7QJ3t8MW+YjMXNfW55ivriy+xbfv23C9ToootqEAzeEDTplqV+X3FZibbWqlE0iCwZOdr/adWcBfNtarzqvS7tkWt1QtNE2uGGrAhNpzXty8qDLV7IjBDUy3ioszHwspk2lux5tOgHkt3xaU1quuF7V9wF+2Rpk0dwjhTXypcQ9lYdD9bB4LaPSPYPdOqsAcYh8336yulOSyF/vT7P83Gv9qVBJysAAAAAElFTkSuQmCC" /***/ }), /***/ "4u4S": /*!*********************************************!*\ !*** ./src/assets/images/icons/groups2.png ***! \*********************************************/ /*! no static exports found */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALoAAABSCAYAAADjGc4eAAASm0lEQVR4Xu2dd5QUVRbGfz3kJDkKCJJBAVFWRUUkGFBQEFRWFhUWmBlAoqCoMGKAVcC8CLKLBEEkKCZMgKjkqIIIKCKiMCAsUfLUntuvi+7pqeqq7q7pcbrrncMfTL10v/f1q/vuu/eWR0vmBaA/bnERiGMEPFoaSaTzLhrt4lhOV7QER8Aj8mtDKMJxlqJxeYLj4Yofpwh4ie4l+wAqcopVaFSJU1ldsRIYgfNE95K9L5dyjq/RuCCBMXFFj0MEMhHdS/ZUbkTjQzTyxqG8rkgJikAWonvJnkIvNCYmKCau2HGIgCHRfWQfg8awOJTZFSkBETAnuoaHFN4GOiUgLq7IcYaAKdG9u3oaBUlnCRpXxZncrjgJhkBIonvJ3o+ynGUlGhcnGDauuHGEgCXRfWbHupxjORol40h2V5QEQsAW0X1kb8FZPgHyJxA+rqhxgoBtovts7N3IYGqcyO6KkUAIhEV0H9nTyGBkAmHkihoHCIRNdJ+NfToaXeNAfleEBEEgMqKnkZ+9fAY0TxCcXDFzOQIREd27qw+kFCdZgUbtXI6BO/0EQCBiovts7DU4w0qgTAJg5YqYixGIiui+w2kzMlgEFMzFODg/9dLVISkPHN0PJw+b91+gGGSchTMnnJ9DcI9FSsNFTeHgL5C+DbRzmWt48mT9m5OzkvFLXAgHdsLJI072bNlX1ET3kf1uMpgFONKf5axzQ4Uxe6B4BXi7Pyx5yXzGveZBo9th21J4sVX0kpW6CA79DhlnsvZ1xT3QYxZoGgwsDqeO+utUuhRSFsCcgfDtgujnYdRDp/HQaqCa3/Cq2fujChrfMWJqyTwMjM4ehCx6HbgESla1P/TLN8P+7ap+gaLw6Df22r4zFDbMs1fXDtGrXw1Dl6v+5g2Bz8fZ69usVlI+GPsH5C8Mb3SDtbL3BJQOz8KND8HerfBE3czP+nwIl7RVP4J3H4FP/xXdXIJb5ysEo3+DIiXh49GwYLiz/Vv05hjRvTt7CpPR6BFTCWSwUT9B2TBccUZdAns2q2kWvACeD6FaBAoz9QFY+YY98ayIXrgUPLwaytZQ/f260Vp9WfwirJttPn6t62HQF+r5o9Xh4M7MdfsvgrotYfVMmHJv5mf5CkP3N6HxHervy6fAjH+ClmFPXqtaV90P901RtUbU9m80Vu0ceu4s0dPISzoL0Wjt0PzsdaMT/dNnYcN84zYeDwxdoZ6ZEX3BY/D7pqztH5gBBYuCEdFLVgHRbYNJFYroeQtCv4VQu4U9+fRaolYsluwkJuWOMXDTMNizBUbVz1pp7EG1o84dDIvGZ33uSQJRL1r6sp+smArTuztD9mGroNrfYPtXMD72VmlHiS7IacMozhGWodEgvFWMorZO9Jkp8NVrJkRPgn/7Dl9mRB/fArYvNSDIAShSKivRWw+BDv+CrYvhpTaZ25kR/YIKkPwuVL9S1V/4NOz+1lx4qdd6kHo+/gbY7tuxjVo8uhEqN4LPxsH8IZlryOH4qR2+fkzk1FvcOhJuS1P/+3oyvNlLVtZ4jqI21rjWevHy+CIzRTXKCDoEW7f21xhWEY7/EU4Lb13Hie4lex8uIsPr2lsh7BlF0iCniC67+Yjv1W7/SlvYvNA/eyOiN7gF7p0EJStDRgbMTIZlr5tLfEFFeGQtlKgEa96C/3Yxr1u8Eoz5TT1/oZX68QWWy+6EXnOVDj6ohLXVo/OL0PJB9XZ4rhmcOGQ89qAvodZ1kaxaZG2GlP3rEN1L9r5cwVlkeywcmURhtMopossUWw2CTuPg983wVCO/JSGQ6GtnQ9fJ0PA2JdSp4zC9B2z7Apo9oHbgYCtJ3gIgu+XFV8PJozCyDhzZYw5Ks+7wj/+ouoNLZ+2v/dNwy3BlVkyrYwNcD7R/Epa8DEfTzetXuQwKlTB/ftV9cPV96vmMXrD/Rxtjh6jy49fGFiWLXrNlR9fH1PpwOxnMRyMpOuksWutEF/1PP2QGNxEd/bre6q9OqS7Sl+jnw9dD5YZqIfUdOpDoSyfAgM+hVnPYtBBmpSj7+uPfqUO0EH5SJzh+QM2vfF11MKzaRL3mp3WHVdNCg9BzDjTpBAd/hdVvZq0rh8wKdWH/T7BuTmTL8et6WB9G28qN1bkoX0H48jUldw6VbCW6yKSlMACN57NVPqesLuHq6LpQjTpA8nw4vBdG1oJTxyBYdSlaFmrfAOslDNdXqjRR+nqpKrB/B0xoD2I5uXMs5C8EJ4/Bf+6BTR+Ghi8pLzy3HwqH2FmdWICV02Cqb3e26k+sWaJ2laulZHuqIZw+7m8lF2W9fabaN+4L/bayGsvG82wnuo/sr6DRx8Z8IquiE/3b92HnauM+ZEdvN8r5Hd3bo0ftzpUawIej4IORWYluJlmxctBzrtJzZfeW21Qp/9sNr94Gv9mw8ctBU9QnsyLPqzRW+vk370aGsbSSN0+oy6/Anv85Gy6/S51Fnm8BP36VeVwxr47zvcEerwF/+A7Kkc8uZMvYEP1t8rCEBWjcmi1y5KSOrgvU9O9K3fh5FTx3DYzebX0zWqE+NO2i/un29DOn4OtJyhoTSjcOB0iddDtWqINldpfmqdDlVTWKkQVI/h6PRPfu6qkUReNLNC5zHOe/AtFFVxdT4A7fTaeR1aVIGWU7r3MD1GmpdGa9CMGXTVa3hod91hMngCpcUr1d8hWAOYNgcfZqkV5fmsFfqfHEYvNMEzh7Mqsk8Up0L9n7UomzrAIqO7GG5/v4KxA9WCAjot/9MrTom7nmrvUgKpeQ/NBu/zOx5jRPgd0b4fXOkcMlfXT5t1JbxL8kcIzIezVuKT/e3u9AIV/qziPpcHSfcV05V1Ssp56JJejsqdCzmXA7HPg54hnHRHUJnJ3Wj0acQRS2YhHPOrihTvR3HoaVJiGtcuun25mdtLqYCWG4o5dWurxO7u8+MN+9dXOgqELPRpFWR7+RPH0CNn0UHuTiYSg3o3aKqG7dpkDe/OpHJWciJ8sT9WHvloh7dHg29uahpdKODN6zV9tGrZy2uhhN0exmVH5wdvxHnCB6xQYwwsClwQak3irH/oCHylrXbjMUOoxR5D5xGOYOUjZ9KVPvhxMGLrkFi8H9vk1pVqqyWAUXsTzJuUdKWj1I/8F6LiY1coboyYijxcCIZ222o9vtMLt3dCHzs+lQtIzfTff6vnBRGN9ZENOj2OaFbLLz60V2eDM3h2D5u89UB129rJ8LPy2zRkns8TWuUW+e0SHmLHLe9aJfHRNLkdwQy6XV0z41w+wm046OLp6lL/hciXMb0bUUuqIx3RrtMGroO/rbA2C5bycJ1fz0n/5dNdB7MVI7euBYYh8Wgum3oLo/eu/50LhDGEKZVJVbVrGtW5ULG4L4vsguK/7f4kYgRHzyUvPrfOmz+IWQ9oNya5jUGTbMNR9J9y+XGr99p0guZ4BS1RKb6FoKl6PxtePRSHYOo2bL5STRZYFT34cLL/GPphP9mp7Klm23VLtSvQGO7MtMtl3rYPl/rXtJeQ8atoPDe+CZy5Xfe+lqxi66gb31eAuuuFu5NMiPwsyZS9qIeVRcjeUtM7GjP5IqkYmuJVMOD2uz5dMxVkQXX4zrU+GTMVn1Y6eILh58smsXKwt/HgLxVREd0yzCyCpsLRodPTCgQwIwVk2Huq2hvyRuQLkUrPD5hgeS/NLb1A9VyuR7Qvu+6+1kLPnxnTvt7ylRia5NJB8bWYRG9ri5hSK66JEjNiubtRx6vpyQeTeMluhCWHGWajsCxBX1wC/wyi0wYLHxhVH+IuqGtt6NMO46czUiUqKL2e6hZcr3+6flMFZcaH0utve+DtdKMIWmfNIDbeoN2qorefFL2fwxvHqrvUOz0bslYYmewgQ0kq3ftxHWsNrRW/SDu19SO6147gXadqMhetmacP90uNhn/pPDmxDkyF5zFwAh+tCVSr3ZugReusnYGy9Sord7Eto+pq7exzQFccTSi4TadZ+hrualLHoB5g2Ghu1Bbk/FNLhjpXLzPfNnhItBYuroWio9yWBS5KjZaGlFdNl1H14DVS+DYMckK6JLiNm4g+qmT5yPAr0Iu0yA5r7fr4SnSYCC7rgUKsKoTA01H4n2kZA1I1t1JESveR0M/AKSkuCricrfPbjIG+7vE9XOLkU8PsUVWN5GopePaw5/HrQBeogqibaja6lIKowl2Z6B14rosiZNOkNPn+egLKbuZGREdLlN1O3d9W+GRu3VqqbVhfSt/hUuWwuGr4M5Yu0JOiBaxYzWvwn6fKRIKbbm4IuucIku55DHvoFSVeH4/5QXpe72a8TJwB+pPJc2cvh0wv3AKaIHBpP8Vc2L3uv+c6yLSZSRGdELFlc+2ld2Ve6v+m2dV3e9Ri2/EdEf/AzqBYW9eq0QAdYUnTzifWh0zW1FdGnfcSy0GawCMcQnZN82PyXDIbocfMXKUv9GpX9P6QprZhpvuXnyw/V9oO3j6o0SWHaugfdHwPcf58yOLq7Mkvfl7Gl1kJd5SmCKXEI9VC7zgTfMGWbLhZHWjwKc4Uvgb2HOJ7LqT+6AMtVBYkY3zlc6Z6M7lKVBVA697PkeRK8WXfSVW2HzR8ZEl2idayVO0hcN9N37IPbrUBE+wTO3Q3Qh6CPr4OAumPZAZm9Fu0QX4kpuGN1u/1Y/WPqKMY6NO6oY13I11XPxdxdLVKVLlEnx/EawTBE+OBzP7upEuqOL6jVYaBNUJEh72v12Rzeslz1ET0ZsV9HNzK5YNZurFA+ySGIzLlZeqQN6kZvFNbOUbr5rLeivbO+t3xUgV9F6uguzCyO7cwmsZ4foUt/sjdDxOWgzRNmozXxdxMIi6ph+ESX5WIS4gUXyqUjiInEmk4glvcgPVywvuqoidnvxaZcbUb3s2qAipuT8ESrbWDA+kRJdDstP71R5aaRIRjGJhhJT6OHfI1mF820cJ7qWzIPAi1HNKpzGElcZnDbi2AHY8qnahcWRKTAes0RlGPWjOnDJRYocHnOS6CKrvLJFffGmpdOU1eLBT6B8bZW+Y9KdxoiISbPdE+qZ+K+/95i/XpmLlfejvJ0kg4Fe5K02u5/5bi1B1Lc/o8bWiziESQideFgGB1AYzUwIq/vX79tunJHLjgtAODywqOso0bW+tOAcn8X0q9PNeqjI+l/WKPuv6JcSZRTKcUoCduUHcGy/seriBMB2d3QZS4I0RDcV/frMSaWf6iXUNXz5OvD4Jlj6qjoQ60VUoqd+huIV/X+ToOLPx6t0c5ZOZR5ocLPSkSVzgf6GFBVLgrSN/MvDxSy3Et2b4uIca2OeWVdezfKqC2VhCLUIVubFcBdQrx8O0SWUrknQrr3vRxX29t7joYklFz3eNBtBeVfE5UD80MWRS5IVyUYQSQl8M8gt7+oZkfSStU1uJLqWRmHSvUmLwnDmcAav6Hvx+Hc+0ecDr7Kj6bxcbRAdWi6PrOzS8mMTTz29SOxotGF0Yh4V85xTgRayocjbJpTvSzh4yd2G7vsj2dGsAi/C6dugriOqi5bCLDRsuNRFOVu3uYtAhAhETXQtlaFk4HDq1QilcZu5CJggEBXRtWRuwsNH2Z6gyF0+F4EoEYiY6FoqNdFY7X5NOsoVcJvHBIGIiO5LXSFJRGOXMTcmcLiDxCsCYRNd0/CQ6s2n6MsYH6/QuHLFEwLhEz3Z+9VoX/LseILClSWeEQiL6N7suOd4J7vyqscz0K5sOYuAbaJrqdQjw5tly7nEQzkruzt6AiFgi+jaAEpwEklTWyuBsHFFjSMELImupZFEOh+gcUscye2KkmAIWBM9ldFkeL8h6hYXgVyLQEiia324i3OE+LBlrpXbnXiCIWBKdF/WW0n2nf0f20ow0F1xY4+AIdG1PpT2+ZZXi/2U3BFdBJxHIAvRNfX150/QaOn8cG6PLgI5g0BWoicj3+D2fSM7Zybljuoi4DQCmYiupdKNDEw+GeH00G5/LgKxQ+A80bVUmpLhzcVSMHbDuyO5CMQGAS/Rtf6U55Q3sNnZj2jFRgZ3FBcBSwQ83pTOG7z5EQMy11i2cyu4COQqBDxaMq8BvXPVrN3JugiEiYClC0CY/bnVXQRii0DHWkEJbYKG95ABnmSX6LFdFnc0pxEISXTPWTxaN+Ztn+US3Wng3f5ii4A50U/hydOZeT94P8rkEj22y+KO5jQCRkT3eI6T5GnPHH/ea5foTgPv9hdbBLIS/RD58t7C7C0rAyfiEj22y+KO5jQCmYm+j3yeG5m97ZvgYVyiOw28219sEfATfTd5klozZ2vAR6b8U3GJHttlcUdzGgFF9J8gbyvmb/nFrHuX6E4D7/YXWwTurLWJQnnbMGPLnlADu0SP7bK4ozmNQLe6pZn2wwGrbv8PSygpSs9Cw9cAAAAASUVORK5CYII=" /***/ }), /***/ "500L": /*!**********************************************!*\ !*** ./src/components/MultiUpload/index.tsx ***! \**********************************************/ /*! exports provided: coverToFileList, default */ /*! exports used: coverToFileList, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return coverToFileList; }); /* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/button/style */ "+L6B"); /* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/button */ "2/Rp"); /* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc"); /* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/modal */ "kLXV"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); /* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/message/style */ "miYZ"); /* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/message */ "tsqr"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "oBTY"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); /* harmony import */ var antd_es_upload_style__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd/es/upload/style */ "DZo9"); /* harmony import */ var antd_es_upload__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd/es/upload */ "8z0m"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/regenerator */ "WmNS"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @/utils/env */ "m3rI"); /* harmony import */ var _pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @/pages/MoopCases/FormPanel/service */ "wzkS"); /* harmony import */ var _SingleUpload__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../SingleUpload */ "y5JW"); /* harmony import */ var _ant_design_icons__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @ant-design/icons */ "LtfV"); var Dragger = antd_es_upload__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"].Dragger; function coverToFileList(data) { var rs = []; if (data && data.length > 0) { rs = data.map(function (item) { return { uid: item.id, id: item.id, name: item.title + _SingleUpload__WEBPACK_IMPORTED_MODULE_16__[/* uploadNameSizeSeperator */ "c"] + item.filesize, url: item.url, filesize: item.filesize, status: 'done', response: { id: item.id } }; }); } return rs; } /* harmony default export */ __webpack_exports__["b"] = (function (_ref) { var value = _ref.value, _onChange = _ref.onChange, action = _ref.action, className = _ref.className, _ref$maxSize = _ref.maxSize, maxSize = _ref$maxSize === void 0 ? 150 : _ref$maxSize, _ref$title = _ref.title, title = _ref$title === void 0 ? '上传附件' : _ref$title, _ref$showRemoveModal = _ref.showRemoveModal, showRemoveModal = _ref$showRemoveModal === void 0 ? false : _ref$showRemoveModal, _ref$accept = _ref.accept, accept = _ref$accept === void 0 ? "" : _ref$accept, additionalText = _ref.additionalText, isDragger = _ref.isDragger, _ref$number = _ref.number, number = _ref$number === void 0 ? 1000 : _ref$number, _ref$aloneClear = _ref.aloneClear, aloneClear = _ref$aloneClear === void 0 ? false : _ref$aloneClear; var _useState = Object(react__WEBPACK_IMPORTED_MODULE_13__["useState"])(false), _useState2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_useState, 2), disabled = _useState2[0], setDisabled = _useState2[1]; var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_13__["useState"])(value || []), _useState4 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"])(_useState3, 2), fileList = _useState4[0], setFileList = _useState4[1]; Object(react__WEBPACK_IMPORTED_MODULE_13__["useEffect"])(function () { if (value) { setFileList(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(value)); if (number === (value === null || value === void 0 ? void 0 : value.length)) { setDisabled(true); } } }, [value]); var clearLastFile = function clearLastFile() { setTimeout(function () { fileList.pop(); setFileList(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(fileList)); }, 500); }; var uploadProps = { multiple: true, disabled: disabled, accept: accept, withCredentials: true, fileList: fileList, // fileList: fileList?.length ? fileList : value, beforeUpload: function beforeUpload(file, fileArr) { var fileSize = file.size / 1024 / 1024; if (fileList.concat(fileArr).length > number) { fileList.pop(); setFileList(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(fileList)); antd_es_message__WEBPACK_IMPORTED_MODULE_7__[/* default */ "b"].error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20".concat(number, "\u4E2A\u6587\u4EF6")); if (aloneClear) { return Promise.reject(); } clearLastFile(); return false; } if (!(fileSize < maxSize)) { antd_es_message__WEBPACK_IMPORTED_MODULE_7__[/* default */ "b"].error("\u8BE5\u6587\u4EF6\u65E0\u6CD5\u4E0A\u4F20\u3002\u8D85\u8FC7\u6587\u4EF6\u5927\u5C0F\u9650\u5236(".concat(maxSize, "MB).")); if (aloneClear) { return Promise.reject(); } clearLastFile(); return false; } return true; }, action: action || "".concat(_utils_env__WEBPACK_IMPORTED_MODULE_14__[/* default */ "a"].API_SERVER, "/api/attachments.json"), // ?debug=student&randomcode=undefined&client_key=6d57f8c3dd186c5ada392546ace9620a onChange: function onChange(info) { var fileList = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(info.fileList); if (fileList.length >= number) setDisabled(true);else setDisabled(false); setFileList(Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(fileList)); fileList = fileList.map(function (file) { var _file$response; if (file !== null && file !== void 0 && (_file$response = file.response) !== null && _file$response !== void 0 && _file$response.id) { var _file$response2; file.url = "/api/attachments/".concat(file === null || file === void 0 ? void 0 : (_file$response2 = file.response) === null || _file$response2 === void 0 ? void 0 : _file$response2.id); } if (file.name.indexOf(_SingleUpload__WEBPACK_IMPORTED_MODULE_16__[/* uploadNameSizeSeperator */ "c"]) === -1) { file.name = "".concat(file.name).concat(_SingleUpload__WEBPACK_IMPORTED_MODULE_16__[/* uploadNameSizeSeperator */ "c"]).concat(Object(_SingleUpload__WEBPACK_IMPORTED_MODULE_16__[/* bytesToSize */ "a"])(file.size)); } return Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, file); }); console.log("info:", info); _onChange(fileList); }, onRemove: function () { var _onRemove = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.mark(function _callee3(file) { var remove; return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: remove = /*#__PURE__*/function () { var _ref2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.mark(function _callee() { var id, rs; return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: id = file.response ? file.response.id : file.id; if (!id) { _context.next = 8; break; } _context.next = 4; return Object(_pages_MoopCases_FormPanel_service__WEBPACK_IMPORTED_MODULE_15__[/* removeAttachment */ "d"])(file.response ? file.response.id : file.uid); case 4: rs = _context.sent; return _context.abrupt("return", rs); case 8: return _context.abrupt("return", true); case 9: case "end": return _context.stop(); } } }, _callee); })); return function remove() { return _ref2.apply(this, arguments); }; }(); if (!showRemoveModal) { _context3.next = 5; break; } return _context3.abrupt("return", new Promise(function (resolve, reject) { antd_es_modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].confirm({ centered: true, width: 530, okText: '确定', cancelText: '取消', title: '提示', content: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("div", { className: "tc font16" }, "\u662F\u5426\u786E\u8BA4\u5220\u9664?"), onOk: function () { var _onOk = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])( /*#__PURE__*/_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.mark(function _callee2() { var res; return _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_12___default.a.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return remove(); case 2: res = _context2.sent; antd_es_message__WEBPACK_IMPORTED_MODULE_7__[/* default */ "b"].success('删除成功'); resolve(true); case 5: case "end": return _context2.stop(); } } }, _callee2); })); function onOk() { return _onOk.apply(this, arguments); } return onOk; }(), onCancel: function onCancel() { return resolve(false); } }); })); case 5: _context3.next = 7; return remove(); case 7: return _context3.abrupt("return", _context3.sent); case 8: case "end": return _context3.stop(); } } }, _callee3); })); function onRemove(_x) { return _onRemove.apply(this, arguments); } return onRemove; }() }; function onCancel(e) { e.preventDefault(); e.stopPropagation(); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("div", { className: "multi-upload ".concat(className ? className : '') }, isDragger && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement(Dragger, uploadProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("p", { className: "ant-upload-drag-icon" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement(_ant_design_icons__WEBPACK_IMPORTED_MODULE_17__[/* default */ "a"], null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("p", { className: "ant-upload-text" }, "\u70B9\u51FB\u4E0A\u4F20\u56FE\u6807\uFF0C\u9009\u62E9\u8981\u4E0A\u4F20\u7684\u6587\u4EF6\u6216\u5C06\u6587\u4EF6\u62D6\u62FD\u5230\u6B64", /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("br", null), "(\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u9650\u5236\u4E3A", maxSize, "MB) "), additionalText), !isDragger && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement(antd_es_upload__WEBPACK_IMPORTED_MODULE_11__[/* default */ "a"], uploadProps, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], { disabled: disabled }, title), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_13___default.a.createElement("span", { onClick: onCancel, style: { marginLeft: 10, color: '#FA6400' } }, "(\u5355\u4E2A\u6587\u4EF6\u6700\u5927", maxSize, "MB) "))); }); /***/ }), /***/ "55Ip": /*!***************************************************************!*\ !*** ./node_modules/react-router-dom/esm/react-router-dom.js ***! \***************************************************************/ /*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */ /*! exports used: Link, NavLink */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export BrowserRouter */ /* unused harmony export HashRouter */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Link; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavLink; }); /* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D"); /* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "YS25"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! prop-types */ "17x9"); /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn"); /* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tiny-invariant */ "9R94"); /** * The public API for a that uses HTML5 history. */ var BrowserRouter = /*#__PURE__*/ function (_React$Component) { Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(BrowserRouter, _React$Component); function BrowserRouter() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createBrowserHistory */ "a"])(_this.props); return _this; } var _proto = BrowserRouter.prototype; _proto.render = function render() { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], { history: this.history, children: this.props.children }); }; return BrowserRouter; }(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component); if (false) {} /** * The public API for a that uses window.location.hash. */ var HashRouter = /*#__PURE__*/ function (_React$Component) { Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HashRouter, _React$Component); function HashRouter() { var _this; for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this; _this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createHashHistory */ "b"])(_this.props); return _this; } var _proto = HashRouter.prototype; _proto.render = function render() { return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "c"], { history: this.history, children: this.props.children }); }; return HashRouter; }(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component); if (false) {} var resolveToLocation = function resolveToLocation(to, currentLocation) { return typeof to === "function" ? to(currentLocation) : to; }; var normalizeToLocation = function normalizeToLocation(to, currentLocation) { return typeof to === "string" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createLocation */ "c"])(to, null, null, currentLocation) : to; }; var forwardRefShim = function forwardRefShim(C) { return C; }; var forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef; if (typeof forwardRef === "undefined") { forwardRef = forwardRefShim; } function isModifiedEvent(event) { return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); } var LinkAnchor = forwardRef(function (_ref, forwardedRef) { var innerRef = _ref.innerRef, navigate = _ref.navigate, _onClick = _ref.onClick, rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]); var target = rest.target; var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, { onClick: function onClick(event) { try { if (_onClick) _onClick(event); } catch (ex) { event.preventDefault(); throw ex; } if (!event.defaultPrevented && // onClick prevented default event.button === 0 && ( // ignore everything but left clicks !target || target === "_self") && // let browser handle "target=_blank" etc. !isModifiedEvent(event) // ignore clicks with modifier keys ) { event.preventDefault(); navigate(); } } }); // React 15 compat if (forwardRefShim !== forwardRef) { props.ref = forwardedRef || innerRef; } else { props.ref = innerRef; } /* eslint-disable-next-line jsx-a11y/anchor-has-content */ return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", props); }); if (false) {} /** * The public API for rendering a history-aware . */ var Link = forwardRef(function (_ref2, forwardedRef) { var _ref2$component = _ref2.component, component = _ref2$component === void 0 ? LinkAnchor : _ref2$component, replace = _ref2.replace, to = _ref2.to, innerRef = _ref2.innerRef, rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) { !context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0; var history = context.history; var location = normalizeToLocation(resolveToLocation(to, context.location), context.location); var href = location ? history.createHref(location) : ""; var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, { href: href, navigate: function navigate() { var location = resolveToLocation(to, context.location); var method = replace ? history.replace : history.push; method(location); } }); // React 15 compat if (forwardRefShim !== forwardRef) { props.ref = forwardedRef || innerRef; } else { props.innerRef = innerRef; } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props); }); }); if (false) { var refType, toType; } var forwardRefShim$1 = function forwardRefShim(C) { return C; }; var forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef; if (typeof forwardRef$1 === "undefined") { forwardRef$1 = forwardRefShim$1; } function joinClassnames() { for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) { classnames[_key] = arguments[_key]; } return classnames.filter(function (i) { return i; }).join(" "); } /** * A wrapper that knows if it's "active" or not. */ var NavLink = forwardRef$1(function (_ref, forwardedRef) { var _ref$ariaCurrent = _ref["aria-current"], ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent, _ref$activeClassName = _ref.activeClassName, activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName, activeStyle = _ref.activeStyle, classNameProp = _ref.className, exact = _ref.exact, isActiveProp = _ref.isActive, locationProp = _ref.location, sensitive = _ref.sensitive, strict = _ref.strict, styleProp = _ref.style, to = _ref.to, innerRef = _ref.innerRef, rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]); return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "e"].Consumer, null, function (context) { !context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(false) : void 0; var currentLocation = locationProp || context.location; var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation); var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202 var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1"); var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "f"])(currentLocation.pathname, { path: escapedPath, exact: exact, sensitive: sensitive, strict: strict }) : null; var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match); var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp; var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp; var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({ "aria-current": isActive && ariaCurrent || null, className: className, style: style, to: toLocation }, rest); // React 15 compat if (forwardRefShim$1 !== forwardRef$1) { props.ref = forwardedRef || innerRef; } else { props.innerRef = innerRef; } return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props); }); }); if (false) { var ariaCurrentType; } //# sourceMappingURL=react-router-dom.js.map /***/ }), /***/ "59Ip": /*!***************************************************!*\ !*** ./node_modules/zrender/lib/contain/cubic.js ***! \***************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var curve = __webpack_require__(/*! ../core/curve */ "Sj9i"); /** * 三次贝塞尔曲线描边包含判断 * @param {number} x0 * @param {number} y0 * @param {number} x1 * @param {number} y1 * @param {number} x2 * @param {number} y2 * @param {number} x3 * @param {number} y3 * @param {number} lineWidth * @param {number} x * @param {number} y * @return {boolean} */ function containStroke(x0, y0, x1, y1, x2, y2, x3, y3, lineWidth, x, y) { if (lineWidth === 0) { return false; } var _l = lineWidth; // Quick reject if (y > y0 + _l && y > y1 + _l && y > y2 + _l && y > y3 + _l || y < y0 - _l && y < y1 - _l && y < y2 - _l && y < y3 - _l || x > x0 + _l && x > x1 + _l && x > x2 + _l && x > x3 + _l || x < x0 - _l && x < x1 - _l && x < x2 - _l && x < x3 - _l) { return false; } var d = curve.cubicProjectPoint(x0, y0, x1, y1, x2, y2, x3, y3, x, y, null); return d <= _l / 2; } exports.containStroke = containStroke; /***/ }), /***/ "5D2P": /*!*******************************************!*\ !*** ./src/assets/images/icons/done3.png ***! \*******************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports) { module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAFTklEQVRoQ91aS4xURRQ993UzUUZcqFEc4meh0cQFSlwgrvAHSgQWhOhCk4GZqmdw+ERUWDkrBMUBnIzzqqYjcTaaGBLFxA8MjIk/3PhZCCa6UAyKC11ARnDo6Wvu+HrS0/R7r96nWVBJpxfv3nPPrbp169aHUEAzxsxl5gcB3AdgAREtkH8AXSH87wBOMfMp+QfwFREd0Vr/k9c8ZQUwxixi5mWe5y1l5qUAyimxqkQ0XqvVxonoE631Nyn1p8VTO7B///75Fy5c2MzMWwB0ZDHaQmeSiPbMmTNnb3d39+k0mKkcMMZsBiC/W9IYSSH7K4C9Wuu9rjpODoyMjNxQq9VGADzuCpxT7gPP83p7e3v/TMJJdCAIgoVEdBDAzUlgBX8/ycwrfd//Pg431gFr7RPM/HbBxFLBEdGTSql3opQiHQiCoI+IXk9lrU3CzLzR9/3BVvAtHbDWPsrMH7aJTyZYInpMKfVRs/JFDlQqlduq1eoxIro2k6U2KTHzX+VyeXFPT8/PjSYucsBae4iZH24Tj1ywRHRYKfVIpANhnt+Ty0r7lbc0rhMzI2CMuRHAlwBubT+HXBZ+AbBEa/3HrFLCWruTmV/MBZ1N+TiAdyNUX2qZeYh2KaW2zThQqVTumZqaOlZgbePqynEiWquU+qFZwRjzBoBnIoAmS6WSTOhvp0PIGPMcgN2uVguSiyQfBIFPRMMJdrZqrV+bdsBa+x4zryqImAtMJHlr7RJmPgxgbhwQEb2vlFpNAwMDV3Z2dp7JUM+7EG0lE0l+dHS089y5c4dkkjqAVycmJq4ma+0yZv7YQaEIkUjyAh4EwTAR+a6GiGg5BUGwg4i2uyrlkEsi7xL3s8wz88syAm8x89M5iLmoxpIP4348bRYkolEyxowBkA25S1sLQJbyHhfhUCaWvMT9+fPnx5h5cQrMuugRceAEgDsdlKfTVph2rwMgC4mk37gWSz5L3DcZ+1EckAw0L44FM4/4vq+aZfr7+zu6urq2MbPMoSuavieSt9b6zJyU7+OonXVygIjWKKUOxCGFhaA4cj0AF/KS7z8D4DmMfpTIGdcQOgtgldZaJlpss9auA/B1q/Kgrhjm+08B3JuEF/ediE44T2IikiOP1Uqp7/IYDePeElFvXhwAY2nTqJCXkTiZ1XgBcT9jmplHxYEd4SR04kRER0ul0ur169dLWKVqYb7/IpVSjHB9IctSShzQWq9JQySMeyG/MI1ewhxYnqeYq2itnePYGPMmgO6iyAP4v5gTwBzl9Cta68RdnDHmWQAtz3WyOjRTTodZYSsRvZoRbLvWemeU7vDw8P2e532eETtSjZmf931/d31HtkguHdIWUw3oWmttm60NDQ1dVS6XZat6V8EOTMplitwpNJ5K7ALwQg5Da7XWszbnxphRAE/lwIxSnQnd5mMVGYWsZ///MvMK3/ePiFVjjFyADLSBvCyo0vuzj1VCo3J5kflgi5lPE9EKIprHzFIqtKO1PtiqWzLGyIb6oRyW5ZynBOCOHBhRqmNa61nHnhedjQZBcDsRycS7pg0E8kD+LZse3/d/agS5/I7XG0JpI4B9ebqsQN1NWuuWly2X7xVTvfestXfXarWDRHRTgT2aCMXMv3metzJp/5F4SymWhoaG5pfLZVlpL9k1a7VaVRs2bEi89HZyIOwu2b1tukQX3TL3OHGYsjw1GBwc7Oro6Kg7UthTA7mhn5yc3NfX1ycPQ5xbmhGYBSqPPYhINkMPAJDHHrJ4pWlTAOShx1FmvnSPPVoxbHxu43neAmauP7eRf2nTz2yI6FStViv0uc1/ndZCH8rgOooAAAAASUVORK5CYII=" /***/ }), /***/ "6+eU": /*!************************************************************!*\ !*** ./node_modules/rc-pagination/es/index.js + 4 modules ***! \************************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Pagination; }); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__("wx14"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("VTBJ"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules var createSuper = __webpack_require__("LK+K"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pager.js /* eslint react/prop-types: 0 */ var Pager_Pager = function Pager(props) { var _classNames; var prefixCls = "".concat(props.rootPrefixCls, "-item"); var cls = classnames_default()(prefixCls, "".concat(prefixCls, "-").concat(props.page), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-active"), props.active), Object(defineProperty["a" /* default */])(_classNames, props.className, !!props.className), Object(defineProperty["a" /* default */])(_classNames, "".concat(prefixCls, "-disabled"), !props.page), _classNames)); var handleClick = function handleClick() { props.onClick(props.page); }; var handleKeyPress = function handleKeyPress(e) { props.onKeyPress(e, props.onClick, props.page); }; return /*#__PURE__*/external_window_React_default.a.createElement("li", { title: props.showTitle ? props.page : null, className: cls, onClick: handleClick, onKeyPress: handleKeyPress, tabIndex: "0" }, props.itemRender(props.page, 'page', /*#__PURE__*/external_window_React_default.a.createElement("a", { rel: "nofollow" }, props.page))); }; /* harmony default export */ var es_Pager = (Pager_Pager); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/KeyCode.js /* harmony default export */ var KeyCode = ({ ZERO: 48, NINE: 57, NUMPAD_ZERO: 96, NUMPAD_NINE: 105, BACKSPACE: 8, DELETE: 46, ENTER: 13, ARROW_UP: 38, ARROW_DOWN: 40 }); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Options.js /* eslint react/prop-types: 0 */ var Options_Options = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Options, _React$Component); var _super = Object(createSuper["a" /* default */])(Options); function Options() { var _this; Object(classCallCheck["a" /* default */])(this, Options); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this = _super.call.apply(_super, [this].concat(args)); _this.state = { goInputText: '' }; _this.buildOptionText = function (value) { return "".concat(value, " ").concat(_this.props.locale.items_per_page); }; _this.changeSize = function (value) { _this.props.changeSize(Number(value)); }; _this.handleChange = function (e) { _this.setState({ goInputText: e.target.value }); }; _this.handleBlur = function (e) { var _this$props = _this.props, goButton = _this$props.goButton, quickGo = _this$props.quickGo, rootPrefixCls = _this$props.rootPrefixCls; var goInputText = _this.state.goInputText; if (goButton || goInputText === '') { return; } if (e.relatedTarget && (e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-prev")) >= 0 || e.relatedTarget.className.indexOf("".concat(rootPrefixCls, "-next")) >= 0)) { return; } _this.setState({ goInputText: '' }); quickGo(_this.getValidValue()); }; _this.go = function (e) { var goInputText = _this.state.goInputText; if (goInputText === '') { return; } if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this.setState({ goInputText: '' }); _this.props.quickGo(_this.getValidValue()); } }; return _this; } Object(createClass["a" /* default */])(Options, [{ key: "getValidValue", value: function getValidValue() { var _this$state = this.state, goInputText = _this$state.goInputText, current = _this$state.current; // eslint-disable-next-line no-restricted-globals return !goInputText || isNaN(goInputText) ? current : Number(goInputText); } }, { key: "getPageSizeOptions", value: function getPageSizeOptions() { var _this$props2 = this.props, pageSize = _this$props2.pageSize, pageSizeOptions = _this$props2.pageSizeOptions; if (pageSizeOptions.some(function (option) { return option.toString() === pageSize.toString(); })) { return pageSizeOptions; } return pageSizeOptions.concat([pageSize.toString()]).sort(function (a, b) { // eslint-disable-next-line no-restricted-globals var numberA = isNaN(Number(a)) ? 0 : Number(a); // eslint-disable-next-line no-restricted-globals var numberB = isNaN(Number(b)) ? 0 : Number(b); return numberA - numberB; }); } }, { key: "render", value: function render() { var _this2 = this; var _this$props3 = this.props, pageSize = _this$props3.pageSize, locale = _this$props3.locale, rootPrefixCls = _this$props3.rootPrefixCls, changeSize = _this$props3.changeSize, quickGo = _this$props3.quickGo, goButton = _this$props3.goButton, selectComponentClass = _this$props3.selectComponentClass, buildOptionText = _this$props3.buildOptionText, selectPrefixCls = _this$props3.selectPrefixCls, disabled = _this$props3.disabled; var goInputText = this.state.goInputText; var prefixCls = "".concat(rootPrefixCls, "-options"); var Select = selectComponentClass; var changeSelect = null; var goInput = null; var gotoButton = null; if (!changeSize && !quickGo) { return null; } var pageSizeOptions = this.getPageSizeOptions(); if (changeSize && Select) { var options = pageSizeOptions.map(function (opt, i) { return /*#__PURE__*/external_window_React_default.a.createElement(Select.Option, { key: i, value: opt.toString() }, (buildOptionText || _this2.buildOptionText)(opt)); }); changeSelect = /*#__PURE__*/external_window_React_default.a.createElement(Select, { disabled: disabled, prefixCls: selectPrefixCls, showSearch: false, className: "".concat(prefixCls, "-size-changer"), optionLabelProp: "children", dropdownMatchSelectWidth: false, value: (pageSize || pageSizeOptions[0]).toString(), onChange: this.changeSize, getPopupContainer: function getPopupContainer(triggerNode) { return triggerNode.parentNode; } }, options); } if (quickGo) { if (goButton) { gotoButton = typeof goButton === 'boolean' ? /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", onClick: this.go, onKeyUp: this.go, disabled: disabled, className: "".concat(prefixCls, "-quick-jumper-button") }, locale.jump_to_confirm) : /*#__PURE__*/external_window_React_default.a.createElement("span", { onClick: this.go, onKeyUp: this.go }, goButton); } goInput = /*#__PURE__*/external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-quick-jumper") }, locale.jump_to, /*#__PURE__*/external_window_React_default.a.createElement("input", { disabled: disabled, type: "text", value: goInputText, onChange: this.handleChange, onKeyUp: this.go, onBlur: this.handleBlur }), locale.page, gotoButton); } return /*#__PURE__*/external_window_React_default.a.createElement("li", { className: "".concat(prefixCls) }, changeSelect, goInput); } }]); return Options; }(external_window_React_default.a.Component); Options_Options.defaultProps = { pageSizeOptions: ['10', '20', '50', '100'] }; /* harmony default export */ var es_Options = (Options_Options); // EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js var zh_CN = __webpack_require__("N2Kk"); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/Pagination.js /* eslint react/prop-types: 0 */ function noop() {} function isInteger(value) { return (// eslint-disable-next-line no-restricted-globals typeof value === 'number' && isFinite(value) && Math.floor(value) === value ); } function defaultItemRender(page, type, element) { return element; } function calculatePage(p, state, props) { var pageSize = typeof p === 'undefined' ? state.pageSize : p; return Math.floor((props.total - 1) / pageSize) + 1; } var Pagination_Pagination = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Pagination, _React$Component); var _super = Object(createSuper["a" /* default */])(Pagination); function Pagination(props) { var _this; Object(classCallCheck["a" /* default */])(this, Pagination); _this = _super.call(this, props); _this.getJumpPrevPage = function () { return Math.max(1, _this.state.current - (_this.props.showLessItems ? 3 : 5)); }; _this.getJumpNextPage = function () { return Math.min(calculatePage(undefined, _this.state, _this.props), _this.state.current + (_this.props.showLessItems ? 3 : 5)); }; _this.getItemIcon = function (icon, label) { var prefixCls = _this.props.prefixCls; var iconNode = icon || /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", "aria-label": label, className: "".concat(prefixCls, "-item-link") }); if (typeof icon === 'function') { iconNode = external_window_React_default.a.createElement(icon, Object(objectSpread2["a" /* default */])({}, _this.props)); } return iconNode; }; _this.savePaginationNode = function (node) { _this.paginationNode = node; }; _this.isValid = function (page) { return isInteger(page) && page !== _this.state.current; }; _this.shouldDisplayQuickJumper = function () { var _this$props = _this.props, showQuickJumper = _this$props.showQuickJumper, pageSize = _this$props.pageSize, total = _this$props.total; if (total <= pageSize) { return false; } return showQuickJumper; }; _this.handleKeyDown = function (e) { if (e.keyCode === KeyCode.ARROW_UP || e.keyCode === KeyCode.ARROW_DOWN) { e.preventDefault(); } }; _this.handleKeyUp = function (e) { var value = _this.getValidValue(e); var currentInputValue = _this.state.currentInputValue; if (value !== currentInputValue) { _this.setState({ currentInputValue: value }); } if (e.keyCode === KeyCode.ENTER) { _this.handleChange(value); } else if (e.keyCode === KeyCode.ARROW_UP) { _this.handleChange(value - 1); } else if (e.keyCode === KeyCode.ARROW_DOWN) { _this.handleChange(value + 1); } }; _this.changePageSize = function (size) { var current = _this.state.current; var newCurrent = calculatePage(size, _this.state, _this.props); current = current > newCurrent ? newCurrent : current; // fix the issue: // Once 'total' is 0, 'current' in 'onShowSizeChange' is 0, which is not correct. if (newCurrent === 0) { // eslint-disable-next-line prefer-destructuring current = _this.state.current; } if (typeof size === 'number') { if (!('pageSize' in _this.props)) { _this.setState({ pageSize: size }); } if (!('current' in _this.props)) { _this.setState({ current: current, currentInputValue: current }); } } _this.props.onShowSizeChange(current, size); if ('onChange' in _this.props && _this.props.onChange) { _this.props.onChange(current, size); } }; _this.handleChange = function (p) { var disabled = _this.props.disabled; var page = p; if (_this.isValid(page) && !disabled) { var currentPage = calculatePage(undefined, _this.state, _this.props); if (page > currentPage) { page = currentPage; } else if (page < 1) { page = 1; } if (!('current' in _this.props)) { _this.setState({ current: page, currentInputValue: page }); } var pageSize = _this.state.pageSize; _this.props.onChange(page, pageSize); return page; } return _this.state.current; }; _this.prev = function () { if (_this.hasPrev()) { _this.handleChange(_this.state.current - 1); } }; _this.next = function () { if (_this.hasNext()) { _this.handleChange(_this.state.current + 1); } }; _this.jumpPrev = function () { _this.handleChange(_this.getJumpPrevPage()); }; _this.jumpNext = function () { _this.handleChange(_this.getJumpNextPage()); }; _this.hasPrev = function () { return _this.state.current > 1; }; _this.hasNext = function () { return _this.state.current < calculatePage(undefined, _this.state, _this.props); }; _this.runIfEnter = function (event, callback) { if (event.key === 'Enter' || event.charCode === 13) { for (var _len = arguments.length, restParams = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { restParams[_key - 2] = arguments[_key]; } callback.apply(void 0, restParams); } }; _this.runIfEnterPrev = function (e) { _this.runIfEnter(e, _this.prev); }; _this.runIfEnterNext = function (e) { _this.runIfEnter(e, _this.next); }; _this.runIfEnterJumpPrev = function (e) { _this.runIfEnter(e, _this.jumpPrev); }; _this.runIfEnterJumpNext = function (e) { _this.runIfEnter(e, _this.jumpNext); }; _this.handleGoTO = function (e) { if (e.keyCode === KeyCode.ENTER || e.type === 'click') { _this.handleChange(_this.state.currentInputValue); } }; var hasOnChange = props.onChange !== noop; var hasCurrent = ('current' in props); if (hasCurrent && !hasOnChange) { // eslint-disable-next-line no-console console.warn('Warning: You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.'); } var _current = props.defaultCurrent; if ('current' in props) { // eslint-disable-next-line prefer-destructuring _current = props.current; } var _pageSize = props.defaultPageSize; if ('pageSize' in props) { // eslint-disable-next-line prefer-destructuring _pageSize = props.pageSize; } _current = Math.min(_current, calculatePage(_pageSize, undefined, props)); _this.state = { current: _current, currentInputValue: _current, pageSize: _pageSize }; return _this; } Object(createClass["a" /* default */])(Pagination, [{ key: "componentDidUpdate", value: function componentDidUpdate(prevProps, prevState) { // When current page change, fix focused style of prev item // A hacky solution of https://github.com/ant-design/ant-design/issues/8948 var prefixCls = this.props.prefixCls; if (prevState.current !== this.state.current && this.paginationNode) { var lastCurrentNode = this.paginationNode.querySelector(".".concat(prefixCls, "-item-").concat(prevState.current)); if (lastCurrentNode && document.activeElement === lastCurrentNode) { lastCurrentNode.blur(); } } } }, { key: "getValidValue", value: function getValidValue(e) { var inputValue = e.target.value; var allPages = calculatePage(undefined, this.state, this.props); var currentInputValue = this.state.currentInputValue; var value; if (inputValue === '') { value = inputValue; // eslint-disable-next-line no-restricted-globals } else if (isNaN(Number(inputValue))) { value = currentInputValue; } else if (inputValue >= allPages) { value = allPages; } else { value = Number(inputValue); } return value; } }, { key: "getShowSizeChanger", value: function getShowSizeChanger() { var _this$props2 = this.props, showSizeChanger = _this$props2.showSizeChanger, total = _this$props2.total, totalBoundaryShowSizeChanger = _this$props2.totalBoundaryShowSizeChanger; if (typeof showSizeChanger !== 'undefined') { return showSizeChanger; } return total > totalBoundaryShowSizeChanger; } }, { key: "renderPrev", value: function renderPrev(prevPage) { var _this$props3 = this.props, prevIcon = _this$props3.prevIcon, itemRender = _this$props3.itemRender; var prevButton = itemRender(prevPage, 'prev', this.getItemIcon(prevIcon, 'prev page')); var disabled = !this.hasPrev(); return Object(external_window_React_["isValidElement"])(prevButton) ? Object(external_window_React_["cloneElement"])(prevButton, { disabled: disabled }) : prevButton; } }, { key: "renderNext", value: function renderNext(nextPage) { var _this$props4 = this.props, nextIcon = _this$props4.nextIcon, itemRender = _this$props4.itemRender; var nextButton = itemRender(nextPage, 'next', this.getItemIcon(nextIcon, 'next page')); var disabled = !this.hasNext(); return Object(external_window_React_["isValidElement"])(nextButton) ? Object(external_window_React_["cloneElement"])(nextButton, { disabled: disabled }) : nextButton; } }, { key: "render", value: function render() { var _this2 = this; var _this$props5 = this.props, prefixCls = _this$props5.prefixCls, className = _this$props5.className, style = _this$props5.style, disabled = _this$props5.disabled, hideOnSinglePage = _this$props5.hideOnSinglePage, total = _this$props5.total, locale = _this$props5.locale, showQuickJumper = _this$props5.showQuickJumper, showLessItems = _this$props5.showLessItems, showTitle = _this$props5.showTitle, showTotal = _this$props5.showTotal, simple = _this$props5.simple, itemRender = _this$props5.itemRender, showPrevNextJumpers = _this$props5.showPrevNextJumpers, jumpPrevIcon = _this$props5.jumpPrevIcon, jumpNextIcon = _this$props5.jumpNextIcon, selectComponentClass = _this$props5.selectComponentClass, selectPrefixCls = _this$props5.selectPrefixCls, pageSizeOptions = _this$props5.pageSizeOptions; var _this$state = this.state, current = _this$state.current, pageSize = _this$state.pageSize, currentInputValue = _this$state.currentInputValue; // When hideOnSinglePage is true and there is only 1 page, hide the pager if (hideOnSinglePage === true && total <= pageSize) { return null; } var allPages = calculatePage(undefined, this.state, this.props); var pagerList = []; var jumpPrev = null; var jumpNext = null; var firstPager = null; var lastPager = null; var gotoButton = null; var goButton = showQuickJumper && showQuickJumper.goButton; var pageBufferSize = showLessItems ? 1 : 2; var prevPage = current - 1 > 0 ? current - 1 : 0; var nextPage = current + 1 < allPages ? current + 1 : allPages; var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (prev, key) { if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') { // eslint-disable-next-line no-param-reassign prev[key] = _this2.props[key]; } return prev; }, {}); if (simple) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("button", { type: "button", onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, locale.jump_to_confirm); } else { gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("span", { onClick: this.handleGoTO, onKeyUp: this.handleGoTO }, goButton); } gotoButton = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? "".concat(locale.jump_to).concat(current, "/").concat(allPages) : null, className: "".concat(prefixCls, "-simple-pager") }, gotoButton); } return /*#__PURE__*/external_window_React_default.a.createElement("ul", Object(esm_extends["a" /* default */])({ className: classnames_default()(prefixCls, "".concat(prefixCls, "-simple"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled), className), style: style, ref: this.savePaginationNode }, dataOrAriaAttributeProps), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterPrev, className: classnames_default()("".concat(prefixCls, "-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), !this.hasPrev())), "aria-disabled": !this.hasPrev() }, this.renderPrev(prevPage)), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? "".concat(current, "/").concat(allPages) : null, className: "".concat(prefixCls, "-simple-pager") }, /*#__PURE__*/external_window_React_default.a.createElement("input", { type: "text", value: currentInputValue, disabled: disabled, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, onChange: this.handleKeyUp, size: "3" }), /*#__PURE__*/external_window_React_default.a.createElement("span", { className: "".concat(prefixCls, "-slash") }, "/"), allPages), /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.next_page : null, onClick: this.next, tabIndex: this.hasPrev() ? 0 : null, onKeyPress: this.runIfEnterNext, className: classnames_default()("".concat(prefixCls, "-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), !this.hasNext())), "aria-disabled": !this.hasNext() }, this.renderNext(nextPage)), gotoButton); } if (allPages <= 3 + pageBufferSize * 2) { var pagerProps = { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, showTitle: showTitle, itemRender: itemRender }; if (!allPages) { pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, Object(esm_extends["a" /* default */])({}, pagerProps, { key: "noPager", page: allPages, className: "".concat(prefixCls, "-disabled") }))); } for (var i = 1; i <= allPages; i += 1) { var active = current === i; pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, Object(esm_extends["a" /* default */])({}, pagerProps, { key: i, page: i, active: active }))); } } else { var prevItemTitle = showLessItems ? locale.prev_3 : locale.prev_5; var nextItemTitle = showLessItems ? locale.next_3 : locale.next_5; if (showPrevNextJumpers) { jumpPrev = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? prevItemTitle : null, key: "prev", onClick: this.jumpPrev, tabIndex: "0", onKeyPress: this.runIfEnterJumpPrev, className: classnames_default()("".concat(prefixCls, "-jump-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-jump-prev-custom-icon"), !!jumpPrevIcon)) }, itemRender(this.getJumpPrevPage(), 'jump-prev', this.getItemIcon(jumpPrevIcon, 'prev page'))); jumpNext = /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? nextItemTitle : null, key: "next", tabIndex: "0", onClick: this.jumpNext, onKeyPress: this.runIfEnterJumpNext, className: classnames_default()("".concat(prefixCls, "-jump-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-jump-next-custom-icon"), !!jumpNextIcon)) }, itemRender(this.getJumpNextPage(), 'jump-next', this.getItemIcon(jumpNextIcon, 'next page'))); } lastPager = /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, last: true, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: allPages, page: allPages, active: false, showTitle: showTitle, itemRender: itemRender }); firstPager = /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: 1, page: 1, active: false, showTitle: showTitle, itemRender: itemRender }); var left = Math.max(1, current - pageBufferSize); var right = Math.min(current + pageBufferSize, allPages); if (current - 1 <= pageBufferSize) { right = 1 + pageBufferSize * 2; } if (allPages - current <= pageBufferSize) { left = allPages - pageBufferSize * 2; } for (var _i = left; _i <= right; _i += 1) { var _active = current === _i; pagerList.push( /*#__PURE__*/external_window_React_default.a.createElement(es_Pager, { locale: locale, rootPrefixCls: prefixCls, onClick: this.handleChange, onKeyPress: this.runIfEnter, key: _i, page: _i, active: _active, showTitle: showTitle, itemRender: itemRender })); } if (current - 1 >= pageBufferSize * 2 && current !== 1 + 2) { pagerList[0] = Object(external_window_React_["cloneElement"])(pagerList[0], { className: "".concat(prefixCls, "-item-after-jump-prev") }); pagerList.unshift(jumpPrev); } if (allPages - current >= pageBufferSize * 2 && current !== allPages - 2) { pagerList[pagerList.length - 1] = Object(external_window_React_["cloneElement"])(pagerList[pagerList.length - 1], { className: "".concat(prefixCls, "-item-before-jump-next") }); pagerList.push(jumpNext); } if (left !== 1) { pagerList.unshift(firstPager); } if (right !== allPages) { pagerList.push(lastPager); } } var totalText = null; if (showTotal) { totalText = /*#__PURE__*/external_window_React_default.a.createElement("li", { className: "".concat(prefixCls, "-total-text") }, showTotal(total, [total === 0 ? 0 : (current - 1) * pageSize + 1, current * pageSize > total ? total : current * pageSize])); } var prevDisabled = !this.hasPrev() || !allPages; var nextDisabled = !this.hasNext() || !allPages; return /*#__PURE__*/external_window_React_default.a.createElement("ul", Object(esm_extends["a" /* default */])({ className: classnames_default()(prefixCls, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), disabled)), style: style, unselectable: "unselectable", ref: this.savePaginationNode }, dataOrAriaAttributeProps), totalText, /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.prev_page : null, onClick: this.prev, tabIndex: prevDisabled ? null : 0, onKeyPress: this.runIfEnterPrev, className: classnames_default()("".concat(prefixCls, "-prev"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), prevDisabled)), "aria-disabled": prevDisabled }, this.renderPrev(prevPage)), pagerList, /*#__PURE__*/external_window_React_default.a.createElement("li", { title: showTitle ? locale.next_page : null, onClick: this.next, tabIndex: nextDisabled ? null : 0, onKeyPress: this.runIfEnterNext, className: classnames_default()("".concat(prefixCls, "-next"), Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-disabled"), nextDisabled)), "aria-disabled": nextDisabled }, this.renderNext(nextPage)), /*#__PURE__*/external_window_React_default.a.createElement(es_Options, { disabled: disabled, locale: locale, rootPrefixCls: prefixCls, selectComponentClass: selectComponentClass, selectPrefixCls: selectPrefixCls, changeSize: this.getShowSizeChanger() ? this.changePageSize : null, current: current, pageSize: pageSize, pageSizeOptions: pageSizeOptions, quickGo: this.shouldDisplayQuickJumper() ? this.handleChange : null, goButton: goButton })); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(props, prevState) { var newState = {}; if ('current' in props) { newState.current = props.current; if (props.current !== prevState.current) { newState.currentInputValue = newState.current; } } if ('pageSize' in props && props.pageSize !== prevState.pageSize) { var current = prevState.current; var newCurrent = calculatePage(props.pageSize, prevState, props); current = current > newCurrent ? newCurrent : current; if (!('current' in props)) { newState.current = current; newState.currentInputValue = current; } newState.pageSize = props.pageSize; } return newState; } }]); return Pagination; }(external_window_React_default.a.Component); Pagination_Pagination.defaultProps = { defaultCurrent: 1, total: 0, defaultPageSize: 10, onChange: noop, className: '', selectPrefixCls: 'rc-select', prefixCls: 'rc-pagination', selectComponentClass: null, hideOnSinglePage: false, showPrevNextJumpers: true, showQuickJumper: false, showLessItems: false, showTitle: true, onShowSizeChange: noop, locale: zh_CN["a" /* default */], style: {}, itemRender: defaultItemRender, totalBoundaryShowSizeChanger: 50 }; /* harmony default export */ var es_Pagination = (Pagination_Pagination); // CONCATENATED MODULE: ./node_modules/rc-pagination/es/index.js /***/ }), /***/ "6GrX": /*!**************************************************!*\ !*** ./node_modules/zrender/lib/contain/text.js ***! \**************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var BoundingRect = __webpack_require__(/*! ../core/BoundingRect */ "mFDi"); var imageHelper = __webpack_require__(/*! ../graphic/helper/image */ "Xnb7"); var _util = __webpack_require__(/*! ../core/util */ "bYtY"); var getContext = _util.getContext; var extend = _util.extend; var retrieve2 = _util.retrieve2; var retrieve3 = _util.retrieve3; var trim = _util.trim; var textWidthCache = {}; var textWidthCacheCounter = 0; var TEXT_CACHE_MAX = 5000; var STYLE_REG = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g; var DEFAULT_FONT = '12px sans-serif'; // Avoid assign to an exported variable, for transforming to cjs. var methods = {}; function $override(name, fn) { methods[name] = fn; } /** * @public * @param {string} text * @param {string} font * @return {number} width */ function getWidth(text, font) { font = font || DEFAULT_FONT; var key = text + ':' + font; if (textWidthCache[key]) { return textWidthCache[key]; } var textLines = (text + '').split('\n'); var width = 0; for (var i = 0, l = textLines.length; i < l; i++) { // textContain.measureText may be overrided in SVG or VML width = Math.max(measureText(textLines[i], font).width, width); } if (textWidthCacheCounter > TEXT_CACHE_MAX) { textWidthCacheCounter = 0; textWidthCache = {}; } textWidthCacheCounter++; textWidthCache[key] = width; return width; } /** * @public * @param {string} text * @param {string} font * @param {string} [textAlign='left'] * @param {string} [textVerticalAlign='top'] * @param {Array.} [textPadding] * @param {Object} [rich] * @param {Object} [truncate] * @return {Object} {x, y, width, height, lineHeight} */ function getBoundingRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) { return rich ? getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) : getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate); } function getPlainTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, truncate) { var contentBlock = parsePlainText(text, font, textPadding, textLineHeight, truncate); var outerWidth = getWidth(text, font); if (textPadding) { outerWidth += textPadding[1] + textPadding[3]; } var outerHeight = contentBlock.outerHeight; var x = adjustTextX(0, outerWidth, textAlign); var y = adjustTextY(0, outerHeight, textVerticalAlign); var rect = new BoundingRect(x, y, outerWidth, outerHeight); rect.lineHeight = contentBlock.lineHeight; return rect; } function getRichTextRect(text, font, textAlign, textVerticalAlign, textPadding, textLineHeight, rich, truncate) { var contentBlock = parseRichText(text, { rich: rich, truncate: truncate, font: font, textAlign: textAlign, textPadding: textPadding, textLineHeight: textLineHeight }); var outerWidth = contentBlock.outerWidth; var outerHeight = contentBlock.outerHeight; var x = adjustTextX(0, outerWidth, textAlign); var y = adjustTextY(0, outerHeight, textVerticalAlign); return new BoundingRect(x, y, outerWidth, outerHeight); } /** * @public * @param {number} x * @param {number} width * @param {string} [textAlign='left'] * @return {number} Adjusted x. */ function adjustTextX(x, width, textAlign) { // FIXME Right to left language if (textAlign === 'right') { x -= width; } else if (textAlign === 'center') { x -= width / 2; } return x; } /** * @public * @param {number} y * @param {number} height * @param {string} [textVerticalAlign='top'] * @return {number} Adjusted y. */ function adjustTextY(y, height, textVerticalAlign) { if (textVerticalAlign === 'middle') { y -= height / 2; } else if (textVerticalAlign === 'bottom') { y -= height; } return y; } /** * Follow same interface to `Displayable.prototype.calculateTextPosition`. * @public * @param {Obejct} [out] Prepared out object. If not input, auto created in the method. * @param {module:zrender/graphic/Style} style where `textPosition` and `textDistance` are visited. * @param {Object} rect {x, y, width, height} Rect of the host elment, according to which the text positioned. * @return {Object} The input `out`. Set: {x, y, textAlign, textVerticalAlign} */ function calculateTextPosition(out, style, rect) { var textPosition = style.textPosition; var distance = style.textDistance; var x = rect.x; var y = rect.y; distance = distance || 0; var height = rect.height; var width = rect.width; var halfHeight = height / 2; var textAlign = 'left'; var textVerticalAlign = 'top'; switch (textPosition) { case 'left': x -= distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'right': x += distance + width; y += halfHeight; textVerticalAlign = 'middle'; break; case 'top': x += width / 2; y -= distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'bottom': x += width / 2; y += height + distance; textAlign = 'center'; break; case 'inside': x += width / 2; y += halfHeight; textAlign = 'center'; textVerticalAlign = 'middle'; break; case 'insideLeft': x += distance; y += halfHeight; textVerticalAlign = 'middle'; break; case 'insideRight': x += width - distance; y += halfHeight; textAlign = 'right'; textVerticalAlign = 'middle'; break; case 'insideTop': x += width / 2; y += distance; textAlign = 'center'; break; case 'insideBottom': x += width / 2; y += height - distance; textAlign = 'center'; textVerticalAlign = 'bottom'; break; case 'insideTopLeft': x += distance; y += distance; break; case 'insideTopRight': x += width - distance; y += distance; textAlign = 'right'; break; case 'insideBottomLeft': x += distance; y += height - distance; textVerticalAlign = 'bottom'; break; case 'insideBottomRight': x += width - distance; y += height - distance; textAlign = 'right'; textVerticalAlign = 'bottom'; break; } out = out || {}; out.x = x; out.y = y; out.textAlign = textAlign; out.textVerticalAlign = textVerticalAlign; return out; } /** * To be removed. But still do not remove in case that some one has imported it. * @deprecated * @public * @param {stirng} textPosition * @param {Object} rect {x, y, width, height} * @param {number} distance * @return {Object} {x, y, textAlign, textVerticalAlign} */ function adjustTextPositionOnRect(textPosition, rect, distance) { var dummyStyle = { textPosition: textPosition, textDistance: distance }; return calculateTextPosition({}, dummyStyle, rect); } /** * Show ellipsis if overflow. * * @public * @param {string} text * @param {string} containerWidth * @param {string} font * @param {number} [ellipsis='...'] * @param {Object} [options] * @param {number} [options.maxIterations=3] * @param {number} [options.minChar=0] If truncate result are less * then minChar, ellipsis will not show, which is * better for user hint in some cases. * @param {number} [options.placeholder=''] When all truncated, use the placeholder. * @return {string} */ function truncateText(text, containerWidth, font, ellipsis, options) { if (!containerWidth) { return ''; } var textLines = (text + '').split('\n'); options = prepareTruncateOptions(containerWidth, font, ellipsis, options); // FIXME // It is not appropriate that every line has '...' when truncate multiple lines. for (var i = 0, len = textLines.length; i < len; i++) { textLines[i] = truncateSingleLine(textLines[i], options); } return textLines.join('\n'); } function prepareTruncateOptions(containerWidth, font, ellipsis, options) { options = extend({}, options); options.font = font; var ellipsis = retrieve2(ellipsis, '...'); options.maxIterations = retrieve2(options.maxIterations, 2); var minChar = options.minChar = retrieve2(options.minChar, 0); // FIXME // Other languages? options.cnCharWidth = getWidth('国', font); // FIXME // Consider proportional font? var ascCharWidth = options.ascCharWidth = getWidth('a', font); options.placeholder = retrieve2(options.placeholder, ''); // Example 1: minChar: 3, text: 'asdfzxcv', truncate result: 'asdf', but not: 'a...'. // Example 2: minChar: 3, text: '维度', truncate result: '维', but not: '...'. var contentWidth = containerWidth = Math.max(0, containerWidth - 1); // Reserve some gap. for (var i = 0; i < minChar && contentWidth >= ascCharWidth; i++) { contentWidth -= ascCharWidth; } var ellipsisWidth = getWidth(ellipsis, font); if (ellipsisWidth > contentWidth) { ellipsis = ''; ellipsisWidth = 0; } contentWidth = containerWidth - ellipsisWidth; options.ellipsis = ellipsis; options.ellipsisWidth = ellipsisWidth; options.contentWidth = contentWidth; options.containerWidth = containerWidth; return options; } function truncateSingleLine(textLine, options) { var containerWidth = options.containerWidth; var font = options.font; var contentWidth = options.contentWidth; if (!containerWidth) { return ''; } var lineWidth = getWidth(textLine, font); if (lineWidth <= containerWidth) { return textLine; } for (var j = 0;; j++) { if (lineWidth <= contentWidth || j >= options.maxIterations) { textLine += options.ellipsis; break; } var subLength = j === 0 ? estimateLength(textLine, contentWidth, options.ascCharWidth, options.cnCharWidth) : lineWidth > 0 ? Math.floor(textLine.length * contentWidth / lineWidth) : 0; textLine = textLine.substr(0, subLength); lineWidth = getWidth(textLine, font); } if (textLine === '') { textLine = options.placeholder; } return textLine; } function estimateLength(text, contentWidth, ascCharWidth, cnCharWidth) { var width = 0; var i = 0; for (var len = text.length; i < len && width < contentWidth; i++) { var charCode = text.charCodeAt(i); width += 0 <= charCode && charCode <= 127 ? ascCharWidth : cnCharWidth; } return i; } /** * @public * @param {string} font * @return {number} line height */ function getLineHeight(font) { // FIXME A rough approach. return getWidth('国', font); } /** * @public * @param {string} text * @param {string} font * @return {Object} width */ function measureText(text, font) { return methods.measureText(text, font); } // Avoid assign to an exported variable, for transforming to cjs. methods.measureText = function (text, font) { var ctx = getContext(); ctx.font = font || DEFAULT_FONT; return ctx.measureText(text); }; /** * @public * @param {string} text * @param {string} font * @param {Object} [truncate] * @return {Object} block: {lineHeight, lines, height, outerHeight, canCacheByTextString} * Notice: for performance, do not calculate outerWidth util needed. * `canCacheByTextString` means the result `lines` is only determined by the input `text`. * Thus we can simply comparing the `input` text to determin whether the result changed, * without travel the result `lines`. */ function parsePlainText(text, font, padding, textLineHeight, truncate) { text != null && (text += ''); var lineHeight = retrieve2(textLineHeight, getLineHeight(font)); var lines = text ? text.split('\n') : []; var height = lines.length * lineHeight; var outerHeight = height; var canCacheByTextString = true; if (padding) { outerHeight += padding[0] + padding[2]; } if (text && truncate) { canCacheByTextString = false; var truncOuterHeight = truncate.outerHeight; var truncOuterWidth = truncate.outerWidth; if (truncOuterHeight != null && outerHeight > truncOuterHeight) { text = ''; lines = []; } else if (truncOuterWidth != null) { var options = prepareTruncateOptions(truncOuterWidth - (padding ? padding[1] + padding[3] : 0), font, truncate.ellipsis, { minChar: truncate.minChar, placeholder: truncate.placeholder }); // FIXME // It is not appropriate that every line has '...' when truncate multiple lines. for (var i = 0, len = lines.length; i < len; i++) { lines[i] = truncateSingleLine(lines[i], options); } } } return { lines: lines, height: height, outerHeight: outerHeight, lineHeight: lineHeight, canCacheByTextString: canCacheByTextString }; } /** * For example: 'some text {a|some text}other text{b|some text}xxx{c|}xxx' * Also consider 'bbbb{a|xxx\nzzz}xxxx\naaaa'. * * @public * @param {string} text * @param {Object} style * @return {Object} block * { * width, * height, * lines: [{ * lineHeight, * width, * tokens: [[{ * styleName, * text, * width, // include textPadding * height, // include textPadding * textWidth, // pure text width * textHeight, // pure text height * lineHeihgt, * font, * textAlign, * textVerticalAlign * }], [...], ...] * }, ...] * } * If styleName is undefined, it is plain text. */ function parseRichText(text, style) { var contentBlock = { lines: [], width: 0, height: 0 }; text != null && (text += ''); if (!text) { return contentBlock; } var lastIndex = STYLE_REG.lastIndex = 0; var result; while ((result = STYLE_REG.exec(text)) != null) { var matchedIndex = result.index; if (matchedIndex > lastIndex) { pushTokens(contentBlock, text.substring(lastIndex, matchedIndex)); } pushTokens(contentBlock, result[2], result[1]); lastIndex = STYLE_REG.lastIndex; } if (lastIndex < text.length) { pushTokens(contentBlock, text.substring(lastIndex, text.length)); } var lines = contentBlock.lines; var contentHeight = 0; var contentWidth = 0; // For `textWidth: 100%` var pendingList = []; var stlPadding = style.textPadding; var truncate = style.truncate; var truncateWidth = truncate && truncate.outerWidth; var truncateHeight = truncate && truncate.outerHeight; if (stlPadding) { truncateWidth != null && (truncateWidth -= stlPadding[1] + stlPadding[3]); truncateHeight != null && (truncateHeight -= stlPadding[0] + stlPadding[2]); } // Calculate layout info of tokens. for (var i = 0; i < lines.length; i++) { var line = lines[i]; var lineHeight = 0; var lineWidth = 0; for (var j = 0; j < line.tokens.length; j++) { var token = line.tokens[j]; var tokenStyle = token.styleName && style.rich[token.styleName] || {}; // textPadding should not inherit from style. var textPadding = token.textPadding = tokenStyle.textPadding; // textFont has been asigned to font by `normalizeStyle`. var font = token.font = tokenStyle.font || style.font; // textHeight can be used when textVerticalAlign is specified in token. var tokenHeight = token.textHeight = retrieve2( // textHeight should not be inherited, consider it can be specified // as box height of the block. tokenStyle.textHeight, getLineHeight(font)); textPadding && (tokenHeight += textPadding[0] + textPadding[2]); token.height = tokenHeight; token.lineHeight = retrieve3(tokenStyle.textLineHeight, style.textLineHeight, tokenHeight); token.textAlign = tokenStyle && tokenStyle.textAlign || style.textAlign; token.textVerticalAlign = tokenStyle && tokenStyle.textVerticalAlign || 'middle'; if (truncateHeight != null && contentHeight + token.lineHeight > truncateHeight) { return { lines: [], width: 0, height: 0 }; } token.textWidth = getWidth(token.text, font); var tokenWidth = tokenStyle.textWidth; var tokenWidthNotSpecified = tokenWidth == null || tokenWidth === 'auto'; // Percent width, can be `100%`, can be used in drawing separate // line when box width is needed to be auto. if (typeof tokenWidth === 'string' && tokenWidth.charAt(tokenWidth.length - 1) === '%') { token.percentWidth = tokenWidth; pendingList.push(token); tokenWidth = 0; // Do not truncate in this case, because there is no user case // and it is too complicated. } else { if (tokenWidthNotSpecified) { tokenWidth = token.textWidth; // FIXME: If image is not loaded and textWidth is not specified, calling // `getBoundingRect()` will not get correct result. var textBackgroundColor = tokenStyle.textBackgroundColor; var bgImg = textBackgroundColor && textBackgroundColor.image; // Use cases: // (1) If image is not loaded, it will be loaded at render phase and call // `dirty()` and `textBackgroundColor.image` will be replaced with the loaded // image, and then the right size will be calculated here at the next tick. // See `graphic/helper/text.js`. // (2) If image loaded, and `textBackgroundColor.image` is image src string, // use `imageHelper.findExistImage` to find cached image. // `imageHelper.findExistImage` will always be called here before // `imageHelper.createOrUpdateImage` in `graphic/helper/text.js#renderRichText` // which ensures that image will not be rendered before correct size calcualted. if (bgImg) { bgImg = imageHelper.findExistImage(bgImg); if (imageHelper.isImageReady(bgImg)) { tokenWidth = Math.max(tokenWidth, bgImg.width * tokenHeight / bgImg.height); } } } var paddingW = textPadding ? textPadding[1] + textPadding[3] : 0; tokenWidth += paddingW; var remianTruncWidth = truncateWidth != null ? truncateWidth - lineWidth : null; if (remianTruncWidth != null && remianTruncWidth < tokenWidth) { if (!tokenWidthNotSpecified || remianTruncWidth < paddingW) { token.text = ''; token.textWidth = tokenWidth = 0; } else { token.text = truncateText(token.text, remianTruncWidth - paddingW, font, truncate.ellipsis, { minChar: truncate.minChar }); token.textWidth = getWidth(token.text, font); tokenWidth = token.textWidth + paddingW; } } } lineWidth += token.width = tokenWidth; tokenStyle && (lineHeight = Math.max(lineHeight, token.lineHeight)); } line.width = lineWidth; line.lineHeight = lineHeight; contentHeight += lineHeight; contentWidth = Math.max(contentWidth, lineWidth); } contentBlock.outerWidth = contentBlock.width = retrieve2(style.textWidth, contentWidth); contentBlock.outerHeight = contentBlock.height = retrieve2(style.textHeight, contentHeight); if (stlPadding) { contentBlock.outerWidth += stlPadding[1] + stlPadding[3]; contentBlock.outerHeight += stlPadding[0] + stlPadding[2]; } for (var i = 0; i < pendingList.length; i++) { var token = pendingList[i]; var percentWidth = token.percentWidth; // Should not base on outerWidth, because token can not be placed out of padding. token.width = parseInt(percentWidth, 10) / 100 * contentWidth; } return contentBlock; } function pushTokens(block, str, styleName) { var isEmptyStr = str === ''; var strs = str.split('\n'); var lines = block.lines; for (var i = 0; i < strs.length; i++) { var text = strs[i]; var token = { styleName: styleName, text: text, isLineHolder: !text && !isEmptyStr }; // The first token should be appended to the last line. if (!i) { var tokens = (lines[lines.length - 1] || (lines[0] = { tokens: [] })).tokens; // Consider cases: // (1) ''.split('\n') => ['', '\n', ''], the '' at the first item // (which is a placeholder) should be replaced by new token. // (2) A image backage, where token likes {a|}. // (3) A redundant '' will affect textAlign in line. // (4) tokens with the same tplName should not be merged, because // they should be displayed in different box (with border and padding). var tokensLen = tokens.length; tokensLen === 1 && tokens[0].isLineHolder ? tokens[0] = token : // Consider text is '', only insert when it is the "lineHolder" or // "emptyStr". Otherwise a redundant '' will affect textAlign in line. (text || !tokensLen || isEmptyStr) && tokens.push(token); } // Other tokens always start a new line. else { // If there is '', insert it as a placeholder. lines.push({ tokens: [token] }); } } } function makeFont(style) { // FIXME in node-canvas fontWeight is before fontStyle // Use `fontSize` `fontFamily` to check whether font properties are defined. var font = (style.fontSize || style.fontFamily) && [style.fontStyle, style.fontWeight, (style.fontSize || 12) + 'px', // If font properties are defined, `fontFamily` should not be ignored. style.fontFamily || 'sans-serif'].join(' '); return font && trim(font) || style.textFont || style.font; } exports.DEFAULT_FONT = DEFAULT_FONT; exports.$override = $override; exports.getWidth = getWidth; exports.getBoundingRect = getBoundingRect; exports.adjustTextX = adjustTextX; exports.adjustTextY = adjustTextY; exports.calculateTextPosition = calculateTextPosition; exports.adjustTextPositionOnRect = adjustTextPositionOnRect; exports.truncateText = truncateText; exports.getLineHeight = getLineHeight; exports.measureText = measureText; exports.parsePlainText = parsePlainText; exports.parseRichText = parseRichText; exports.makeFont = makeFont; /***/ }), /***/ "6RRn": /*!*******************************************!*\ !*** ./node_modules/rc-table/es/index.js ***! \*******************************************/ /*! exports provided: Summary, Column, ColumnGroup, INTERNAL_COL_DEFINE, default */ /*! exports used: INTERNAL_COL_DEFINE, Summary, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var _Table__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Table */ "wCXF"); /* harmony import */ var _Footer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Footer */ "n6Qo"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _Footer__WEBPACK_IMPORTED_MODULE_1__["a"]; }); /* harmony import */ var _sugar_Column__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sugar/Column */ "IBYe"); /* harmony import */ var _sugar_ColumnGroup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./sugar/ColumnGroup */ "6eGT"); /* harmony import */ var _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/legacyUtil */ "hW8S"); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _utils_legacyUtil__WEBPACK_IMPORTED_MODULE_4__["a"]; }); /* harmony default export */ __webpack_exports__["c"] = (_Table__WEBPACK_IMPORTED_MODULE_0__[/* default */ "b"]); /***/ }), /***/ "6eGT": /*!*******************************************************!*\ !*** ./node_modules/rc-table/es/sugar/ColumnGroup.js ***! \*******************************************************/ /*! exports provided: default */ /*! exports used: default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* istanbul ignore next */ /** * This is a syntactic sugar for `columns` prop. * So HOC will not work on this. */ // eslint-disable-next-line @typescript-eslint/no-unused-vars function ColumnGroup(_) { return null; } /* harmony default export */ __webpack_exports__["a"] = (ColumnGroup); /***/ }), /***/ "6fms": /*!*************************************************!*\ !*** ./node_modules/zrender/lib/vml/Painter.js ***! \*************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var logError = __webpack_require__(/*! ../core/log */ "SUKs"); var vmlCore = __webpack_require__(/*! ./core */ "06Qe"); var _util = __webpack_require__(/*! ../core/util */ "bYtY"); var each = _util.each; /** * VML Painter. * * @module zrender/vml/Painter */ function parseInt10(val) { return parseInt(val, 10); } /** * @alias module:zrender/vml/Painter */ function VMLPainter(root, storage) { vmlCore.initVML(); this.root = root; this.storage = storage; var vmlViewport = document.createElement('div'); var vmlRoot = document.createElement('div'); vmlViewport.style.cssText = 'display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;'; vmlRoot.style.cssText = 'position:absolute;left:0;top:0;'; root.appendChild(vmlViewport); this._vmlRoot = vmlRoot; this._vmlViewport = vmlViewport; this.resize(); // Modify storage var oldDelFromStorage = storage.delFromStorage; var oldAddToStorage = storage.addToStorage; storage.delFromStorage = function (el) { oldDelFromStorage.call(storage, el); if (el) { el.onRemove && el.onRemove(vmlRoot); } }; storage.addToStorage = function (el) { // Displayable already has a vml node el.onAdd && el.onAdd(vmlRoot); oldAddToStorage.call(storage, el); }; this._firstPaint = true; } VMLPainter.prototype = { constructor: VMLPainter, getType: function () { return 'vml'; }, /** * @return {HTMLDivElement} */ getViewportRoot: function () { return this._vmlViewport; }, getViewportRootOffset: function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }, /** * 刷新 */ refresh: function () { var list = this.storage.getDisplayList(true, true); this._paintList(list); }, _paintList: function (list) { var vmlRoot = this._vmlRoot; for (var i = 0; i < list.length; i++) { var el = list[i]; if (el.invisible || el.ignore) { if (!el.__alreadyNotVisible) { el.onRemove(vmlRoot); } // Set as already invisible el.__alreadyNotVisible = true; } else { if (el.__alreadyNotVisible) { el.onAdd(vmlRoot); } el.__alreadyNotVisible = false; if (el.__dirty) { el.beforeBrush && el.beforeBrush(); (el.brushVML || el.brush).call(el, vmlRoot); el.afterBrush && el.afterBrush(); } } el.__dirty = false; } if (this._firstPaint) { // Detached from document at first time // to avoid page refreshing too many times // FIXME 如果每次都先 removeChild 可能会导致一些填充和描边的效果改变 this._vmlViewport.appendChild(vmlRoot); this._firstPaint = false; } }, resize: function (width, height) { var width = width == null ? this._getWidth() : width; var height = height == null ? this._getHeight() : height; if (this._width !== width || this._height !== height) { this._width = width; this._height = height; var vmlViewportStyle = this._vmlViewport.style; vmlViewportStyle.width = width + 'px'; vmlViewportStyle.height = height + 'px'; } }, dispose: function () { this.root.innerHTML = ''; this._vmlRoot = this._vmlViewport = this.storage = null; }, getWidth: function () { return this._width; }, getHeight: function () { return this._height; }, clear: function () { if (this._vmlViewport) { this.root.removeChild(this._vmlViewport); } }, _getWidth: function () { var root = this.root; var stl = root.currentStyle; return (root.clientWidth || parseInt10(stl.width)) - parseInt10(stl.paddingLeft) - parseInt10(stl.paddingRight) | 0; }, _getHeight: function () { var root = this.root; var stl = root.currentStyle; return (root.clientHeight || parseInt10(stl.height)) - parseInt10(stl.paddingTop) - parseInt10(stl.paddingBottom) | 0; } }; // Not supported methods function createMethodNotSupport(method) { return function () { logError('In IE8.0 VML mode painter not support method "' + method + '"'); }; } // Unsupported methods each(['getLayer', 'insertLayer', 'eachLayer', 'eachBuiltinLayer', 'eachOtherLayer', 'getLayers', 'modLayer', 'delLayer', 'clearLayer', 'toDataURL', 'pathToImage'], function (name) { VMLPainter.prototype[name] = createMethodNotSupport(name); }); var _default = VMLPainter; module.exports = _default; /***/ }), /***/ "7SHv": /*!*********************************************!*\ !*** ./node_modules/zrender/lib/Painter.js ***! \*********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var _config = __webpack_require__(/*! ./config */ "LPTA"); var devicePixelRatio = _config.devicePixelRatio; var util = __webpack_require__(/*! ./core/util */ "bYtY"); var logError = __webpack_require__(/*! ./core/log */ "SUKs"); var BoundingRect = __webpack_require__(/*! ./core/BoundingRect */ "mFDi"); var timsort = __webpack_require__(/*! ./core/timsort */ "BPZU"); var Layer = __webpack_require__(/*! ./Layer */ "Xmg4"); var requestAnimationFrame = __webpack_require__(/*! ./animation/requestAnimationFrame */ "mLcG"); var Image = __webpack_require__(/*! ./graphic/Image */ "Dagg"); var env = __webpack_require__(/*! ./core/env */ "ItGF"); var HOVER_LAYER_ZLEVEL = 1e5; var CANVAS_ZLEVEL = 314159; var EL_AFTER_INCREMENTAL_INC = 0.01; var INCREMENTAL_INC = 0.001; function parseInt10(val) { return parseInt(val, 10); } function isLayerValid(layer) { if (!layer) { return false; } if (layer.__builtin__) { return true; } if (typeof layer.resize !== 'function' || typeof layer.refresh !== 'function') { return false; } return true; } var tmpRect = new BoundingRect(0, 0, 0, 0); var viewRect = new BoundingRect(0, 0, 0, 0); function isDisplayableCulled(el, width, height) { tmpRect.copy(el.getBoundingRect()); if (el.transform) { tmpRect.applyTransform(el.transform); } viewRect.width = width; viewRect.height = height; return !tmpRect.intersect(viewRect); } function isClipPathChanged(clipPaths, prevClipPaths) { // displayable.__clipPaths can only be `null`/`undefined` or an non-empty array. if (clipPaths === prevClipPaths) { return false; } if (!clipPaths || !prevClipPaths || clipPaths.length !== prevClipPaths.length) { return true; } for (var i = 0; i < clipPaths.length; i++) { if (clipPaths[i] !== prevClipPaths[i]) { return true; } } return false; } function doClip(clipPaths, ctx) { for (var i = 0; i < clipPaths.length; i++) { var clipPath = clipPaths[i]; clipPath.setTransform(ctx); ctx.beginPath(); clipPath.buildPath(ctx, clipPath.shape); ctx.clip(); // Transform back clipPath.restoreTransform(ctx); } } function createRoot(width, height) { var domRoot = document.createElement('div'); // domRoot.onselectstart = returnFalse; // Avoid page selected domRoot.style.cssText = ['position:relative', // IOS13 safari probably has a compositing bug (z order of the canvas and the consequent // dom does not act as expected) when some of the parent dom has // `-webkit-overflow-scrolling: touch;` and the webpage is longer than one screen and // the canvas is not at the top part of the page. // Check `https://bugs.webkit.org/show_bug.cgi?id=203681` for more details. We remove // this `overflow:hidden` to avoid the bug. // 'overflow:hidden', 'width:' + width + 'px', 'height:' + height + 'px', 'padding:0', 'margin:0', 'border-width:0'].join(';') + ';'; return domRoot; } /** * @alias module:zrender/Painter * @constructor * @param {HTMLElement} root 绘图容器 * @param {module:zrender/Storage} storage * @param {Object} opts */ var Painter = function (root, storage, opts) { this.type = 'canvas'; // In node environment using node-canvas var singleCanvas = !root.nodeName // In node ? || root.nodeName.toUpperCase() === 'CANVAS'; this._opts = opts = util.extend({}, opts || {}); /** * @type {number} */ this.dpr = opts.devicePixelRatio || devicePixelRatio; /** * @type {boolean} * @private */ this._singleCanvas = singleCanvas; /** * 绘图容器 * @type {HTMLElement} */ this.root = root; var rootStyle = root.style; if (rootStyle) { rootStyle['-webkit-tap-highlight-color'] = 'transparent'; rootStyle['-webkit-user-select'] = rootStyle['user-select'] = rootStyle['-webkit-touch-callout'] = 'none'; root.innerHTML = ''; } /** * @type {module:zrender/Storage} */ this.storage = storage; /** * @type {Array.} * @private */ var zlevelList = this._zlevelList = []; /** * @type {Object.} * @private */ var layers = this._layers = {}; /** * @type {Object.} * @private */ this._layerConfig = {}; /** * zrender will do compositing when root is a canvas and have multiple zlevels. */ this._needsManuallyCompositing = false; if (!singleCanvas) { this._width = this._getSize(0); this._height = this._getSize(1); var domRoot = this._domRoot = createRoot(this._width, this._height); root.appendChild(domRoot); } else { var width = root.width; var height = root.height; if (opts.width != null) { width = opts.width; } if (opts.height != null) { height = opts.height; } this.dpr = opts.devicePixelRatio || 1; // Use canvas width and height directly root.width = width * this.dpr; root.height = height * this.dpr; this._width = width; this._height = height; // Create layer if only one given canvas // Device can be specified to create a high dpi image. var mainLayer = new Layer(root, this, this.dpr); mainLayer.__builtin__ = true; mainLayer.initContext(); // FIXME Use canvas width and height // mainLayer.resize(width, height); layers[CANVAS_ZLEVEL] = mainLayer; mainLayer.zlevel = CANVAS_ZLEVEL; // Not use common zlevel. zlevelList.push(CANVAS_ZLEVEL); this._domRoot = root; } /** * @type {module:zrender/Layer} * @private */ this._hoverlayer = null; this._hoverElements = []; }; Painter.prototype = { constructor: Painter, getType: function () { return 'canvas'; }, /** * If painter use a single canvas * @return {boolean} */ isSingleCanvas: function () { return this._singleCanvas; }, /** * @return {HTMLDivElement} */ getViewportRoot: function () { return this._domRoot; }, getViewportRootOffset: function () { var viewportRoot = this.getViewportRoot(); if (viewportRoot) { return { offsetLeft: viewportRoot.offsetLeft || 0, offsetTop: viewportRoot.offsetTop || 0 }; } }, /** * 刷新 * @param {boolean} [paintAll=false] 强制绘制所有displayable */ refresh: function (paintAll) { var list = this.storage.getDisplayList(true); var zlevelList = this._zlevelList; this._redrawId = Math.random(); this._paintList(list, paintAll, this._redrawId); // Paint custum layers for (var i = 0; i < zlevelList.length; i++) { var z = zlevelList[i]; var layer = this._layers[z]; if (!layer.__builtin__ && layer.refresh) { var clearColor = i === 0 ? this._backgroundColor : null; layer.refresh(clearColor); } } this.refreshHover(); return this; }, addHover: function (el, hoverStyle) { if (el.__hoverMir) { return; } var elMirror = new el.constructor({ style: el.style, shape: el.shape, z: el.z, z2: el.z2, silent: el.silent }); elMirror.__from = el; el.__hoverMir = elMirror; hoverStyle && elMirror.setStyle(hoverStyle); this._hoverElements.push(elMirror); return elMirror; }, removeHover: function (el) { var elMirror = el.__hoverMir; var hoverElements = this._hoverElements; var idx = util.indexOf(hoverElements, elMirror); if (idx >= 0) { hoverElements.splice(idx, 1); } el.__hoverMir = null; }, clearHover: function (el) { var hoverElements = this._hoverElements; for (var i = 0; i < hoverElements.length; i++) { var from = hoverElements[i].__from; if (from) { from.__hoverMir = null; } } hoverElements.length = 0; }, refreshHover: function () { var hoverElements = this._hoverElements; var len = hoverElements.length; var hoverLayer = this._hoverlayer; hoverLayer && hoverLayer.clear(); if (!len) { return; } timsort(hoverElements, this.storage.displayableSortFunc); // Use a extream large zlevel // FIXME? if (!hoverLayer) { hoverLayer = this._hoverlayer = this.getLayer(HOVER_LAYER_ZLEVEL); } var scope = {}; hoverLayer.ctx.save(); for (var i = 0; i < len;) { var el = hoverElements[i]; var originalEl = el.__from; // Original el is removed // PENDING if (!(originalEl && originalEl.__zr)) { hoverElements.splice(i, 1); originalEl.__hoverMir = null; len--; continue; } i++; // Use transform // FIXME style and shape ? if (!originalEl.invisible) { el.transform = originalEl.transform; el.invTransform = originalEl.invTransform; el.__clipPaths = originalEl.__clipPaths; // el. this._doPaintEl(el, hoverLayer, true, scope); } } hoverLayer.ctx.restore(); }, getHoverLayer: function () { return this.getLayer(HOVER_LAYER_ZLEVEL); }, _paintList: function (list, paintAll, redrawId) { if (this._redrawId !== redrawId) { return; } paintAll = paintAll || false; this._updateLayerStatus(list); var finished = this._doPaintList(list, paintAll); if (this._needsManuallyCompositing) { this._compositeManually(); } if (!finished) { var self = this; requestAnimationFrame(function () { self._paintList(list, paintAll, redrawId); }); } }, _compositeManually: function () { var ctx = this.getLayer(CANVAS_ZLEVEL).ctx; var width = this._domRoot.width; var height = this._domRoot.height; ctx.clearRect(0, 0, width, height); // PENDING, If only builtin layer? this.eachBuiltinLayer(function (layer) { if (layer.virtual) { ctx.drawImage(layer.dom, 0, 0, width, height); } }); }, _doPaintList: function (list, paintAll) { var layerList = []; for (var zi = 0; zi < this._zlevelList.length; zi++) { var zlevel = this._zlevelList[zi]; var layer = this._layers[zlevel]; if (layer.__builtin__ && layer !== this._hoverlayer && (layer.__dirty || paintAll)) { layerList.push(layer); } } var finished = true; for (var k = 0; k < layerList.length; k++) { var layer = layerList[k]; var ctx = layer.ctx; var scope = {}; ctx.save(); var start = paintAll ? layer.__startIndex : layer.__drawIndex; var useTimer = !paintAll && layer.incremental && Date.now; var startTime = useTimer && Date.now(); var clearColor = layer.zlevel === this._zlevelList[0] ? this._backgroundColor : null; // All elements in this layer are cleared. if (layer.__startIndex === layer.__endIndex) { layer.clear(false, clearColor); } else if (start === layer.__startIndex) { var firstEl = list[start]; if (!firstEl.incremental || !firstEl.notClear || paintAll) { layer.clear(false, clearColor); } } if (start === -1) { console.error('For some unknown reason. drawIndex is -1'); start = layer.__startIndex; } for (var i = start; i < layer.__endIndex; i++) { var el = list[i]; this._doPaintEl(el, layer, paintAll, scope); el.__dirty = el.__dirtyText = false; if (useTimer) { // Date.now can be executed in 13,025,305 ops/second. var dTime = Date.now() - startTime; // Give 15 millisecond to draw. // The rest elements will be drawn in the next frame. if (dTime > 15) { break; } } } layer.__drawIndex = i; if (layer.__drawIndex < layer.__endIndex) { finished = false; } if (scope.prevElClipPaths) { // Needs restore the state. If last drawn element is in the clipping area. ctx.restore(); } ctx.restore(); } if (env.wxa) { // Flush for weixin application util.each(this._layers, function (layer) { if (layer && layer.ctx && layer.ctx.draw) { layer.ctx.draw(); } }); } return finished; }, _doPaintEl: function (el, currentLayer, forcePaint, scope) { var ctx = currentLayer.ctx; var m = el.transform; if ((currentLayer.__dirty || forcePaint) && // Ignore invisible element !el.invisible // Ignore transparent element && el.style.opacity !== 0 // Ignore scale 0 element, in some environment like node-canvas // Draw a scale 0 element can cause all following draw wrong // And setTransform with scale 0 will cause set back transform failed. && !(m && !m[0] && !m[3]) // Ignore culled element && !(el.culling && isDisplayableCulled(el, this._width, this._height))) { var clipPaths = el.__clipPaths; var prevElClipPaths = scope.prevElClipPaths; // Optimize when clipping on group with several elements if (!prevElClipPaths || isClipPathChanged(clipPaths, prevElClipPaths)) { // If has previous clipping state, restore from it if (prevElClipPaths) { ctx.restore(); scope.prevElClipPaths = null; // Reset prevEl since context has been restored scope.prevEl = null; } // New clipping state if (clipPaths) { ctx.save(); doClip(clipPaths, ctx); scope.prevElClipPaths = clipPaths; } } el.beforeBrush && el.beforeBrush(ctx); el.brush(ctx, scope.prevEl || null); scope.prevEl = el; el.afterBrush && el.afterBrush(ctx); } }, /** * 获取 zlevel 所在层,如果不存在则会创建一个新的层 * @param {number} zlevel * @param {boolean} virtual Virtual layer will not be inserted into dom. * @return {module:zrender/Layer} */ getLayer: function (zlevel, virtual) { if (this._singleCanvas && !this._needsManuallyCompositing) { zlevel = CANVAS_ZLEVEL; } var layer = this._layers[zlevel]; if (!layer) { // Create a new layer layer = new Layer('zr_' + zlevel, this, this.dpr); layer.zlevel = zlevel; layer.__builtin__ = true; if (this._layerConfig[zlevel]) { util.merge(layer, this._layerConfig[zlevel], true); } // TODO Remove EL_AFTER_INCREMENTAL_INC magic number else if (this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC]) { util.merge(layer, this._layerConfig[zlevel - EL_AFTER_INCREMENTAL_INC], true); } if (virtual) { layer.virtual = virtual; } this.insertLayer(zlevel, layer); // Context is created after dom inserted to document // Or excanvas will get 0px clientWidth and clientHeight layer.initContext(); } return layer; }, insertLayer: function (zlevel, layer) { var layersMap = this._layers; var zlevelList = this._zlevelList; var len = zlevelList.length; var prevLayer = null; var i = -1; var domRoot = this._domRoot; if (layersMap[zlevel]) { logError('ZLevel ' + zlevel + ' has been used already'); return; } // Check if is a valid layer if (!isLayerValid(layer)) { logError('Layer of zlevel ' + zlevel + ' is not valid'); return; } if (len > 0 && zlevel > zlevelList[0]) { for (i = 0; i < len - 1; i++) { if (zlevelList[i] < zlevel && zlevelList[i + 1] > zlevel) { break; } } prevLayer = layersMap[zlevelList[i]]; } zlevelList.splice(i + 1, 0, zlevel); layersMap[zlevel] = layer; // Vitual layer will not directly show on the screen. // (It can be a WebGL layer and assigned to a ZImage element) // But it still under management of zrender. if (!layer.virtual) { if (prevLayer) { var prevDom = prevLayer.dom; if (prevDom.nextSibling) { domRoot.insertBefore(layer.dom, prevDom.nextSibling); } else { domRoot.appendChild(layer.dom); } } else { if (domRoot.firstChild) { domRoot.insertBefore(layer.dom, domRoot.firstChild); } else { domRoot.appendChild(layer.dom); } } } }, // Iterate each layer eachLayer: function (cb, context) { var zlevelList = this._zlevelList; var z; var i; for (i = 0; i < zlevelList.length; i++) { z = zlevelList[i]; cb.call(context, this._layers[z], z); } }, // Iterate each buildin layer eachBuiltinLayer: function (cb, context) { var zlevelList = this._zlevelList; var layer; var z; var i; for (i = 0; i < zlevelList.length; i++) { z = zlevelList[i]; layer = this._layers[z]; if (layer.__builtin__) { cb.call(context, layer, z); } } }, // Iterate each other layer except buildin layer eachOtherLayer: function (cb, context) { var zlevelList = this._zlevelList; var layer; var z; var i; for (i = 0; i < zlevelList.length; i++) { z = zlevelList[i]; layer = this._layers[z]; if (!layer.__builtin__) { cb.call(context, layer, z); } } }, /** * 获取所有已创建的层 * @param {Array.} [prevLayer] */ getLayers: function () { return this._layers; }, _updateLayerStatus: function (list) { this.eachBuiltinLayer(function (layer, z) { layer.__dirty = layer.__used = false; }); function updatePrevLayer(idx) { if (prevLayer) { if (prevLayer.__endIndex !== idx) { prevLayer.__dirty = true; } prevLayer.__endIndex = idx; } } if (this._singleCanvas) { for (var i = 1; i < list.length; i++) { var el = list[i]; if (el.zlevel !== list[i - 1].zlevel || el.incremental) { this._needsManuallyCompositing = true; break; } } } var prevLayer = null; var incrementalLayerCount = 0; var prevZlevel; for (var i = 0; i < list.length; i++) { var el = list[i]; var zlevel = el.zlevel; var layer; if (prevZlevel !== zlevel) { prevZlevel = zlevel; incrementalLayerCount = 0; } // TODO Not use magic number on zlevel. // Each layer with increment element can be separated to 3 layers. // (Other Element drawn after incremental element) // -----------------zlevel + EL_AFTER_INCREMENTAL_INC-------------------- // (Incremental element) // ----------------------zlevel + INCREMENTAL_INC------------------------ // (Element drawn before incremental element) // --------------------------------zlevel-------------------------------- if (el.incremental) { layer = this.getLayer(zlevel + INCREMENTAL_INC, this._needsManuallyCompositing); layer.incremental = true; incrementalLayerCount = 1; } else { layer = this.getLayer(zlevel + (incrementalLayerCount > 0 ? EL_AFTER_INCREMENTAL_INC : 0), this._needsManuallyCompositing); } if (!layer.__builtin__) { logError('ZLevel ' + zlevel + ' has been used by unkown layer ' + layer.id); } if (layer !== prevLayer) { layer.__used = true; if (layer.__startIndex !== i) { layer.__dirty = true; } layer.__startIndex = i; if (!layer.incremental) { layer.__drawIndex = i; } else { // Mark layer draw index needs to update. layer.__drawIndex = -1; } updatePrevLayer(i); prevLayer = layer; } if (el.__dirty) { layer.__dirty = true; if (layer.incremental && layer.__drawIndex < 0) { // Start draw from the first dirty element. layer.__drawIndex = i; } } } updatePrevLayer(i); this.eachBuiltinLayer(function (layer, z) { // Used in last frame but not in this frame. Needs clear if (!layer.__used && layer.getElementCount() > 0) { layer.__dirty = true; layer.__startIndex = layer.__endIndex = layer.__drawIndex = 0; } // For incremental layer. In case start index changed and no elements are dirty. if (layer.__dirty && layer.__drawIndex < 0) { layer.__drawIndex = layer.__startIndex; } }); }, /** * 清除hover层外所有内容 */ clear: function () { this.eachBuiltinLayer(this._clearLayer); return this; }, _clearLayer: function (layer) { layer.clear(); }, setBackgroundColor: function (backgroundColor) { this._backgroundColor = backgroundColor; }, /** * 修改指定zlevel的绘制参数 * * @param {string} zlevel * @param {Object} config 配置对象 * @param {string} [config.clearColor=0] 每次清空画布的颜色 * @param {string} [config.motionBlur=false] 是否开启动态模糊 * @param {number} [config.lastFrameAlpha=0.7] * 在开启动态模糊的时候使用,与上一帧混合的alpha值,值越大尾迹越明显 */ configLayer: function (zlevel, config) { if (config) { var layerConfig = this._layerConfig; if (!layerConfig[zlevel]) { layerConfig[zlevel] = config; } else { util.merge(layerConfig[zlevel], config, true); } for (var i = 0; i < this._zlevelList.length; i++) { var _zlevel = this._zlevelList[i]; // TODO Remove EL_AFTER_INCREMENTAL_INC magic number if (_zlevel === zlevel || _zlevel === zlevel + EL_AFTER_INCREMENTAL_INC) { var layer = this._layers[_zlevel]; util.merge(layer, layerConfig[zlevel], true); } } } }, /** * 删除指定层 * @param {number} zlevel 层所在的zlevel */ delLayer: function (zlevel) { var layers = this._layers; var zlevelList = this._zlevelList; var layer = layers[zlevel]; if (!layer) { return; } layer.dom.parentNode.removeChild(layer.dom); delete layers[zlevel]; zlevelList.splice(util.indexOf(zlevelList, zlevel), 1); }, /** * 区域大小变化后重绘 */ resize: function (width, height) { if (!this._domRoot.style) { // Maybe in node or worker if (width == null || height == null) { return; } this._width = width; this._height = height; this.getLayer(CANVAS_ZLEVEL).resize(width, height); } else { var domRoot = this._domRoot; // FIXME Why ? domRoot.style.display = 'none'; // Save input w/h var opts = this._opts; width != null && (opts.width = width); height != null && (opts.height = height); width = this._getSize(0); height = this._getSize(1); domRoot.style.display = ''; // 优化没有实际改变的resize if (this._width !== width || height !== this._height) { domRoot.style.width = width + 'px'; domRoot.style.height = height + 'px'; for (var id in this._layers) { if (this._layers.hasOwnProperty(id)) { this._layers[id].resize(width, height); } } util.each(this._progressiveLayers, function (layer) { layer.resize(width, height); }); this.refresh(true); } this._width = width; this._height = height; } return this; }, /** * 清除单独的一个层 * @param {number} zlevel */ clearLayer: function (zlevel) { var layer = this._layers[zlevel]; if (layer) { layer.clear(); } }, /** * 释放 */ dispose: function () { this.root.innerHTML = ''; this.root = this.storage = this._domRoot = this._layers = null; }, /** * Get canvas which has all thing rendered * @param {Object} opts * @param {string} [opts.backgroundColor] * @param {number} [opts.pixelRatio] */ getRenderedCanvas: function (opts) { opts = opts || {}; if (this._singleCanvas && !this._compositeManually) { return this._layers[CANVAS_ZLEVEL].dom; } var imageLayer = new Layer('image', this, opts.pixelRatio || this.dpr); imageLayer.initContext(); imageLayer.clear(false, opts.backgroundColor || this._backgroundColor); if (opts.pixelRatio <= this.dpr) { this.refresh(); var width = imageLayer.dom.width; var height = imageLayer.dom.height; var ctx = imageLayer.ctx; this.eachLayer(function (layer) { if (layer.__builtin__) { ctx.drawImage(layer.dom, 0, 0, width, height); } else if (layer.renderToCanvas) { imageLayer.ctx.save(); layer.renderToCanvas(imageLayer.ctx); imageLayer.ctx.restore(); } }); } else { // PENDING, echarts-gl and incremental rendering. var scope = {}; var displayList = this.storage.getDisplayList(true); for (var i = 0; i < displayList.length; i++) { var el = displayList[i]; this._doPaintEl(el, imageLayer, true, scope); } } return imageLayer.dom; }, /** * 获取绘图区域宽度 */ getWidth: function () { return this._width; }, /** * 获取绘图区域高度 */ getHeight: function () { return this._height; }, _getSize: function (whIdx) { var opts = this._opts; var wh = ['width', 'height'][whIdx]; var cwh = ['clientWidth', 'clientHeight'][whIdx]; var plt = ['paddingLeft', 'paddingTop'][whIdx]; var prb = ['paddingRight', 'paddingBottom'][whIdx]; if (opts[wh] != null && opts[wh] !== 'auto') { return parseFloat(opts[wh]); } var root = this.root; // IE8 does not support getComputedStyle, but it use VML. var stl = document.defaultView.getComputedStyle(root); return (root[cwh] || parseInt10(stl[wh]) || parseInt10(root.style[wh])) - (parseInt10(stl[plt]) || 0) - (parseInt10(stl[prb]) || 0) | 0; }, pathToImage: function (path, dpr) { dpr = dpr || this.dpr; var canvas = document.createElement('canvas'); var ctx = canvas.getContext('2d'); var rect = path.getBoundingRect(); var style = path.style; var shadowBlurSize = style.shadowBlur * dpr; var shadowOffsetX = style.shadowOffsetX * dpr; var shadowOffsetY = style.shadowOffsetY * dpr; var lineWidth = style.hasStroke() ? style.lineWidth : 0; var leftMargin = Math.max(lineWidth / 2, -shadowOffsetX + shadowBlurSize); var rightMargin = Math.max(lineWidth / 2, shadowOffsetX + shadowBlurSize); var topMargin = Math.max(lineWidth / 2, -shadowOffsetY + shadowBlurSize); var bottomMargin = Math.max(lineWidth / 2, shadowOffsetY + shadowBlurSize); var width = rect.width + leftMargin + rightMargin; var height = rect.height + topMargin + bottomMargin; canvas.width = width * dpr; canvas.height = height * dpr; ctx.scale(dpr, dpr); ctx.clearRect(0, 0, width, height); ctx.dpr = dpr; var pathTransform = { position: path.position, rotation: path.rotation, scale: path.scale }; path.position = [leftMargin - rect.x, topMargin - rect.y]; path.rotation = 0; path.scale = [1, 1]; path.updateTransform(); if (path) { path.brush(ctx); } var ImageShape = Image; var imgShape = new ImageShape({ style: { x: 0, y: 0, image: canvas } }); if (pathTransform.position != null) { imgShape.position = path.position = pathTransform.position; } if (pathTransform.rotation != null) { imgShape.rotation = path.rotation = pathTransform.rotation; } if (pathTransform.scale != null) { imgShape.scale = path.scale = pathTransform.scale; } return imgShape; } }; var _default = Painter; module.exports = _default; /***/ }), /***/ "7ZXX": /*!**********************************************!*\ !*** ./src/assets/images/classrooms/err.png ***! \**********************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/err.6e7c5817.png"; /***/ }), /***/ "7ahc": /*!*************************************************************!*\ !*** ./src/components/markdown-editor/code-block/index.tsx ***! \*************************************************************/ /*! exports provided: default, MyCodeMirror */ /*! exports used: MyCodeMirror, default */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MyCodeMirror; }); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends */ "0Owb"); /* harmony import */ var antd_es_button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/button/style */ "+L6B"); /* harmony import */ var antd_es_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/button */ "2/Rp"); /* harmony import */ var antd_es_form_style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd/es/form/style */ "y8nQ"); /* harmony import */ var antd_es_form__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/form */ "Vl3Y"); /* harmony import */ var _Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT"); /* harmony import */ var antd_es_select_style__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/select/style */ "OaEy"); /* harmony import */ var antd_es_select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! antd/es/select */ "2fM7"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! react */ "cDcd"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! codemirror */ "VrN/"); /* harmony import */ var codemirror__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(codemirror__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! codemirror/lib/codemirror.css */ "p77/"); /* harmony import */ var codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! codemirror/theme/blackboard.css */ "c5Ni"); /* harmony import */ var codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(codemirror_theme_blackboard_css__WEBPACK_IMPORTED_MODULE_12__); var Option = antd_es_select__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"].Option; //https://github.com/codemirror/CodeMirror/issues/4838 var formItemLayout = { labelCol: { span: 4 }, wrapperCol: { span: 20 } }; var LanguageDesc = { asp: ['ASP', 'vbscript'], actionscript: ['ActionScript(3.0)/Flash/Flex', 'clike'], bash: ['Bash/Bat', 'shell'], css: ['CSS', 'css'], c: ['C', 'clike'], cpp: ['C++', 'clike'], csharp: ['C#', 'clike'], coffeescript: ['CoffeeScript', 'coffeescript'], d: ['D', 'd'], dart: ['Dart', 'dart'], delphi: ['Delphi/Pascal', 'pascal'], erlang: ['Erlang', 'erlang'], go: ['Golang', 'go'], groovy: ['Groovy', 'groovy'], html: ['HTML', 'text/html'], java: ['Java', 'clike'], json: ['JSON', 'text/json'], javascript: ['Javascript', 'javascript'], lua: ['Lua', 'lua'], less: ['LESS', 'css'], markdown: ['Markdown', 'gfm'], 'objective-c': ['Objective-C', 'clike'], php: ['PHP', 'php'], perl: ['Perl', 'perl'], python: ['Python', 'python'], r: ['R', 'r'], rst: ['reStructedText', 'rst'], ruby: ['Ruby', 'ruby'], sql: ['SQL', 'sql'], sass: ['SASS/SCSS', 'sass'], shell: ['Shell', 'shell'], scala: ['Scala', 'clike'], swift: ['Swift', 'clike'], vb: ['VB/VBScript', 'vb'], xml: ['XML', 'text/xml'], yaml: ['YAML', 'yaml'] }; /* harmony default export */ __webpack_exports__["b"] = (function (_ref) { var callback = _ref.callback, onCancel = _ref.onCancel; var _useState = Object(react__WEBPACK_IMPORTED_MODULE_9__["useState"])('python'), _useState2 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_useState, 2), mode = _useState2[0], setMode = _useState2[1]; function onSetMode(value) { setMode(LanguageDesc[value][1]); } function onSubmit(values) { callback(values); } return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"], Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, formItemLayout, { className: "code-block-panel", initialValues: { language: 'python', content: '' }, onFinish: onSubmit }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Item, { label: "\u4EE3\u7801\u8BED\u8A00", name: "language" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_select__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"], { onChange: onSetMode }, Object.keys(LanguageDesc).map(function (item) { return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(Option, { key: item, value: item }, LanguageDesc[item][0]); }))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_form__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Item, { label: "\u4EE3\u7801\u5185\u5BB9", name: "content", rules: [{ required: true, message: '请输入代码内容' }] }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(MyCodeMirror, { mode: mode })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { className: "flex-container flex-end" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { type: "primary", htmlType: "submit", style: { marginRight: 10 } }, "\u786E\u5B9A"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement(antd_es_button__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], { type: "ghost", onClick: onCancel }, "\u53D6\u6D88"))); }); function MyCodeMirror(_ref2) { var value = _ref2.value, onChange = _ref2.onChange, mode = _ref2.mode, _ref2$options = _ref2.options, options = _ref2$options === void 0 ? {} : _ref2$options; var el = Object(react__WEBPACK_IMPORTED_MODULE_9__["useRef"])(); var _useState3 = Object(react__WEBPACK_IMPORTED_MODULE_9__["useState"])(), _useState4 = Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(_useState3, 2), cm = _useState4[0], setCm = _useState4[1]; Object(react__WEBPACK_IMPORTED_MODULE_9__["useEffect"])(function () { if (cm) { function onChangeHandler(cm) { var content = cm.getValue(); onChange && onChange(content); } cm.on('change', onChangeHandler); return function () { cm.off('change', onChangeHandler); }; } }, [cm, onChange]); Object(react__WEBPACK_IMPORTED_MODULE_9__["useEffect"])(function () { if (cm) { cm.setOption('mode', mode); } }, [cm, mode]); Object(react__WEBPACK_IMPORTED_MODULE_9__["useEffect"])(function () { if (cm) { if (value !== cm.getValue() || value === '') { setTimeout(function () { cm.setValue(value || ' '); }, 300); } } }, [cm, value]); Object(react__WEBPACK_IMPORTED_MODULE_9__["useEffect"])(function () { if (el.current && !cm) { var instance = codemirror__WEBPACK_IMPORTED_MODULE_10___default.a.fromTextArea(el.current, Object(_Users_dingyongkang_Documents_workspace_zhiqing_educoder_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ mode: mode, lineNumbers: true, lineWrapping: true, autoCloseBrackets: true, tabSize: 4, autofocus: true, autoCloseTags: true, matchBrackets: true, styleActiveLine: true }, options)); setCm(instance); } }, [el.current, cm]); return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("div", { className: "my-codemirror-container" }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_9___default.a.createElement("textarea", { ref: el })); } /***/ }), /***/ "7ixt": /*!**************************************************!*\ !*** ./node_modules/rc-tooltip/es/placements.js ***! \**************************************************/ /*! exports provided: placements, default */ /*! exports used: placements */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return placements; }); var autoAdjustOverflow = { adjustX: 1, adjustY: 1 }; var targetOffset = [0, 0]; var placements = { left: { points: ['cr', 'cl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, right: { points: ['cl', 'cr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, top: { points: ['bc', 'tc'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, bottom: { points: ['tc', 'bc'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, topLeft: { points: ['bl', 'tl'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, leftTop: { points: ['tr', 'tl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset }, topRight: { points: ['br', 'tr'], overflow: autoAdjustOverflow, offset: [0, -4], targetOffset: targetOffset }, rightTop: { points: ['tl', 'tr'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomRight: { points: ['tr', 'br'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, rightBottom: { points: ['bl', 'br'], overflow: autoAdjustOverflow, offset: [4, 0], targetOffset: targetOffset }, bottomLeft: { points: ['tl', 'bl'], overflow: autoAdjustOverflow, offset: [0, 4], targetOffset: targetOffset }, leftBottom: { points: ['br', 'bl'], overflow: autoAdjustOverflow, offset: [-4, 0], targetOffset: targetOffset } }; /* unused harmony default export */ var _unused_webpack_default_export = (placements); /***/ }), /***/ "7oTu": /*!********************************************************!*\ !*** ./node_modules/zrender/lib/tool/transformPath.js ***! \********************************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { var PathProxy = __webpack_require__(/*! ../core/PathProxy */ "IMiH"); var _vector = __webpack_require__(/*! ../core/vector */ "QBsz"); var v2ApplyTransform = _vector.applyTransform; var CMD = PathProxy.CMD; var points = [[], [], []]; var mathSqrt = Math.sqrt; var mathAtan2 = Math.atan2; function _default(path, m) { var data = path.data; var cmd; var nPoint; var i; var j; var k; var p; var M = CMD.M; var C = CMD.C; var L = CMD.L; var R = CMD.R; var A = CMD.A; var Q = CMD.Q; for (i = 0, j = 0; i < data.length;) { cmd = data[i++]; j = i; nPoint = 0; switch (cmd) { case M: nPoint = 1; break; case L: nPoint = 1; break; case C: nPoint = 3; break; case Q: nPoint = 2; break; case A: var x = m[4]; var y = m[5]; var sx = mathSqrt(m[0] * m[0] + m[1] * m[1]); var sy = mathSqrt(m[2] * m[2] + m[3] * m[3]); var angle = mathAtan2(-m[1] / sy, m[0] / sx); // cx data[i] *= sx; data[i++] += x; // cy data[i] *= sy; data[i++] += y; // Scale rx and ry // FIXME Assume psi is 0 here data[i++] *= sx; data[i++] *= sy; // Start angle data[i++] += angle; // end angle data[i++] += angle; // FIXME psi i += 2; j = i; break; case R: // x0, y0 p[0] = data[i++]; p[1] = data[i++]; v2ApplyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; // x1, y1 p[0] += data[i++]; p[1] += data[i++]; v2ApplyTransform(p, p, m); data[j++] = p[0]; data[j++] = p[1]; } for (k = 0; k < nPoint; k++) { var p = points[k]; p[0] = data[i++]; p[1] = data[i++]; v2ApplyTransform(p, p, m); // Write back data[j++] = p[0]; data[j++] = p[1]; } } } module.exports = _default; /***/ }), /***/ "7v3h": /*!**************************************!*\ !*** ./src/assets/images/empty2.png ***! \**************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/empty2.dd73f390.png"; /***/ }), /***/ "8/bI": /*!*************************************!*\ !*** ./src/assets/images/empty.png ***! \*************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { module.exports = __webpack_require__.p + "static/empty.8918e228.png"; /***/ }), /***/ "815F": /*!***************************************************!*\ !*** ./node_modules/rc-tree/es/utils/treeUtil.js ***! \***************************************************/ /*! exports provided: getKey, warningWithoutKey, convertTreeToData, flattenTreeData, traverseDataNodes, convertDataToEntities, getTreeNodeProps, convertNodePropsToEventData */ /*! exports used: convertDataToEntities, convertNodePropsToEventData, convertTreeToData, flattenTreeData, getKey, getTreeNodeProps */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getKey; }); /* unused harmony export warningWithoutKey */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return convertTreeToData; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return flattenTreeData; }); /* unused harmony export traverseDataNodes */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return convertDataToEntities; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getTreeNodeProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return convertNodePropsToEventData; }); /* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4"); /* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ"); /* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n"); /* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! rc-util/es/Children/toArray */ "Zm9Q"); /* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../util */ "OZM5"); function getKey(key, pos) { if (key !== null && key !== undefined) { return key; } return pos; } /** * Warning if TreeNode do not provides key */ function warningWithoutKey() { var treeData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var keys = new Map(); function dig(list) { var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; (list || []).forEach(function (treeNode) { var key = treeNode.key, children = treeNode.children; Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(key !== null && key !== undefined, "Tree node must have a certain key: [".concat(path).concat(key, "]")); var recordKey = String(key); Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(!keys.has(recordKey) || key === null || key === undefined, "Same 'key' exist in the Tree: ".concat(recordKey)); keys.set(recordKey, true); dig(children, "".concat(path).concat(recordKey, " > ")); }); } dig(treeData); } /** * Convert `children` of Tree into `treeData` structure. */ function convertTreeToData(rootNodes) { function dig(node) { var treeNodes = Object(rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(node); return treeNodes.map(function (treeNode) { // Filter invalidate node if (!Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* isTreeNode */ "i"])(treeNode)) { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(!treeNode, 'Tree/TreeNode can only accept TreeNode as children.'); return null; } var key = treeNode.key; var _treeNode$props = treeNode.props, children = _treeNode$props.children, rest = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_treeNode$props, ["children"]); var dataNode = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ key: key }, rest); var parsedChildren = dig(children); if (parsedChildren.length) { dataNode.children = parsedChildren; } return dataNode; }).filter(function (dataNode) { return dataNode; }); } return dig(rootNodes); } /** * Flat nest tree data into flatten list. This is used for virtual list render. * @param treeNodeList Origin data node list * @param expandedKeys * need expanded keys, provides `true` means all expanded (used in `rc-tree-select`). */ function flattenTreeData() { var treeNodeList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; var expandedKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; var expandedKeySet = new Set(expandedKeys === true ? [] : expandedKeys); var flattenList = []; function dig(list) { var parent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; return list.map(function (treeNode, index) { var pos = Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* getPosition */ "h"])(parent ? parent.pos : '0', index); var mergedKey = getKey(treeNode.key, pos); // Add FlattenDataNode into list var flattenNode = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, treeNode), {}, { parent: parent, pos: pos, children: null, data: treeNode, isStart: [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parent ? parent.isStart : []), [index === 0]), isEnd: [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(parent ? parent.isEnd : []), [index === list.length - 1]) }); flattenList.push(flattenNode); // Loop treeNode children if (expandedKeys === true || expandedKeySet.has(mergedKey)) { flattenNode.children = dig(treeNode.children || [], flattenNode); } else { flattenNode.children = []; } return flattenNode; }); } dig(treeNodeList); return flattenList; } /** * Traverse all the data by `treeData`. * Please not use it out of the `rc-tree` since we may refactor this code. */ function traverseDataNodes(dataNodes, callback, externalGetKey) { var syntheticGetKey; if (externalGetKey) { if (typeof externalGetKey === 'string') { syntheticGetKey = function syntheticGetKey(node) { return node[externalGetKey]; }; } else if (typeof externalGetKey === 'function') { syntheticGetKey = function syntheticGetKey(node) { return externalGetKey(node); }; } } else { syntheticGetKey = function syntheticGetKey(node, pos) { return getKey(node.key, pos); }; } function processNode(node, index, parent) { var children = node ? node.children : dataNodes; var pos = node ? Object(_util__WEBPACK_IMPORTED_MODULE_5__[/* getPosition */ "h"])(parent.pos, index) : '0'; // Process node if is not root if (node) { var key = syntheticGetKey(node, pos); var data = { node: node, index: index, pos: pos, key: key, parentPos: parent.node ? parent.pos : null, level: parent.level + 1 }; callback(data); } // Process children node if (children) { children.forEach(function (subNode, subIndex) { processNode(subNode, subIndex, { node: node, pos: pos, level: parent ? parent.level + 1 : -1 }); }); } } processNode(null); } /** * Convert `treeData` into entity records. */ function convertDataToEntities(dataNodes) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, initWrapper = _ref.initWrapper, processEntity = _ref.processEntity, onProcessFinished = _ref.onProcessFinished; var externalGetKey = arguments.length > 2 ? arguments[2] : undefined; var posEntities = {}; var keyEntities = {}; var wrapper = { posEntities: posEntities, keyEntities: keyEntities }; if (initWrapper) { wrapper = initWrapper(wrapper) || wrapper; } traverseDataNodes(dataNodes, function (item) { var node = item.node, index = item.index, pos = item.pos, key = item.key, parentPos = item.parentPos, level = item.level; var entity = { node: node, index: index, key: key, pos: pos, level: level }; var mergedKey = getKey(key, pos); posEntities[pos] = entity; keyEntities[mergedKey] = entity; // Fill children entity.parent = posEntities[parentPos]; if (entity.parent) { entity.parent.children = entity.parent.children || []; entity.parent.children.push(entity); } if (processEntity) { processEntity(entity, wrapper); } }, externalGetKey); if (onProcessFinished) { onProcessFinished(wrapper); } return wrapper; } /** * Get TreeNode props with Tree props. */ function getTreeNodeProps(key, _ref2) { var expandedKeys = _ref2.expandedKeys, selectedKeys = _ref2.selectedKeys, loadedKeys = _ref2.loadedKeys, loadingKeys = _ref2.loadingKeys, checkedKeys = _ref2.checkedKeys, halfCheckedKeys = _ref2.halfCheckedKeys, dragOverNodeKey = _ref2.dragOverNodeKey, dropPosition = _ref2.dropPosition, keyEntities = _ref2.keyEntities; var entity = keyEntities[key]; var treeNodeProps = { eventKey: key, expanded: expandedKeys.indexOf(key) !== -1, selected: selectedKeys.indexOf(key) !== -1, loaded: loadedKeys.indexOf(key) !== -1, loading: loadingKeys.indexOf(key) !== -1, checked: checkedKeys.indexOf(key) !== -1, halfChecked: halfCheckedKeys.indexOf(key) !== -1, pos: String(entity ? entity.pos : ''), // [Legacy] Drag props dragOver: dragOverNodeKey === key && dropPosition === 0, dragOverGapTop: dragOverNodeKey === key && dropPosition === -1, dragOverGapBottom: dragOverNodeKey === key && dropPosition === 1 }; return treeNodeProps; } function convertNodePropsToEventData(props) { var data = props.data, expanded = props.expanded, selected = props.selected, checked = props.checked, loaded = props.loaded, loading = props.loading, halfChecked = props.halfChecked, dragOver = props.dragOver, dragOverGapTop = props.dragOverGapTop, dragOverGapBottom = props.dragOverGapBottom, pos = props.pos, active = props.active; var eventData = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, data), {}, { expanded: expanded, selected: selected, checked: checked, loaded: loaded, loading: loading, halfChecked: halfChecked, dragOver: dragOver, dragOverGapTop: dragOverGapTop, dragOverGapBottom: dragOverGapBottom, pos: pos, active: active }); if (!('props' in eventData)) { Object.defineProperty(eventData, 'props', { get: function get() { Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false, 'Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`.'); return props; } }); } return eventData; } /***/ }), /***/ "8Bcu": /*!********************************************************************!*\ !*** ./src/pages/Paths/Detail/components/Right/index.less?modules ***! \********************************************************************/ /*! no static exports found */ /*! exports used: default */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // extracted by mini-css-extract-plugin module.exports = {"flex_box_center":"flex_box_center___3isCS","flex_space_between":"flex_space_between___1zEgQ","flex_box_vertical_center":"flex_box_vertical_center___2IyXM","flex_box_center_end":"flex_box_center_end___1r0jY","flex_box_column":"flex_box_column___2SHBj","rightWrap":"rightWrap___2XCk6","qrCode":"qrCode___3q9Z0","cardTop":"cardTop___2h9UR","cardTop2":"cardTop2___3KQ3O","card":"card___1aOV1","flexRow":"flexRow___DeBf7","flexRowAbout":"flexRowAbout___3sD2f","skillWrap":"skillWrap___pwM-3","skillTopWrap":"skillTopWrap___2oSn4","skillContentWrap":"skillContentWrap___239Us","skillContentWrapMin":"skillContentWrapMin___2KWd4","skillContentWrapMax":"skillContentWrapMax___NVKFP","skillContentIcon":"skillContentIcon___5mU6F","skillContentIconNoStatus":"skillContentIconNoStatus___1_V1l","skillExpandAllWrap":"skillExpandAllWrap___1HSf6","skillExpandAllContent":"skillExpandAllContent___3kY9W","memberItem":"memberItem___3cgRI","radius":"radius___2fxUa","memberItemContent":"memberItemContent___19hpK","directionItemWrap":"directionItemWrap___3Zm3f","groupActionWrap":"groupActionWrap___N0Epv","divabout":"divabout___psa-7","classButton":"classButton___30JJg","bg28e":"bg28e___2DyZD","bgGray":"bgGray___2PZB0","price":"price___2sFWj","li1":"li1___2y74c","discounts":"discounts___2JS39","realPrice":"realPrice___2kTeg","lineationPrice":"lineationPrice___2LeZ4","li2":"li2___2rpKJ"}; /***/ }), /***/ "8EBN": /*!**********************************************!*\ !*** ./node_modules/codemirror/mode/meta.js ***! \**********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { // CodeMirror, copyright (c) by Marijn Haverbeke and others // Distributed under an MIT license: https://codemirror.net/LICENSE (function(mod) { if (true) // CommonJS mod(__webpack_require__(/*! ../lib/codemirror */ "VrN/")); else {} })(function(CodeMirror) { "use strict"; CodeMirror.modeInfo = [ {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]}, {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]}, {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]}, {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i}, {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]}, {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]}, {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]}, {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy"]}, {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]}, {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]}, {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]}, {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]}, {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/}, {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]}, {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]}, {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]}, {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]}, {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]}, {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]}, {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]}, {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]}, {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]}, {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]}, {name: "Django", mime: "text/x-django", mode: "django"}, {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/}, {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]}, {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]}, {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"}, {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]}, {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]}, {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]}, {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]}, {name: "Embedded Javascript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]}, {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]}, {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]}, {name: "Esper", mime: "text/x-esper", mode: "sql"}, {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]}, {name: "FCL", mime: "text/x-fcl", mode: "fcl"}, {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]}, {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]}, {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]}, {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]}, {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]}, {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i}, {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]}, {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/}, {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]}, {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]}, {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]}, {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]}, {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]}, {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]}, {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]}, {name: "HTTP", mime: "message/http", mode: "http"}, {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]}, {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]}, {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]}, {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]}, {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"], mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]}, {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]}, {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]}, {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]}, {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]}, {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"]}, {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]}, {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]}, {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]}, {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]}, {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]}, {name: "mIRC", mime: "text/mirc", mode: "mirc"}, {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"}, {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]}, {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]}, {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]}, {name: "MS SQL", mime: "text/x-mssql", mode: "sql"}, {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]}, {name: "MySQL", mime: "text/x-mysql", mode: "sql"}, {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i}, {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]}, {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"], mode: "ntriples", ext: ["nt", "nq"]}, {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]}, {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]}, {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]}, {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]}, {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]}, {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]}, {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]}, {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]}, {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]}, {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]}, {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]}, {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]}, {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"}, {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]}, {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]}, {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]}, {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/}, {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]}, {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]}, {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]}, {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]}, {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"}, {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]}, {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]}, {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]}, {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]}, {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]}, {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]}, {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]}, {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]}, {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/}, {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]}, {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]}, {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]}, {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]}, {name: "Solr", mime: "text/x-solr", mode: "solr"}, {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]}, {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]}, {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]}, {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]}, {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]}, {name: "SQLite", mime: "text/x-sqlite", mode: "sql"}, {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]}, {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]}, {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]}, {name: "sTeX", mime: "text/x-stex", mode: "stex"}, {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]}, {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]}, {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]}, {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]}, {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"}, {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"}, {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]}, {name: "Tornado", mime: "text/x-tornado", mode: "tornado"}, {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]}, {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]}, {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]}, {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]}, {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]}, {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]}, {name: "Twig", mime: "text/x-twig", mode: "twig"}, {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]}, {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]}, {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]}, {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]}, {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]}, {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]}, {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]}, {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]}, {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]}, {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]}, {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]}, {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}, {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]}, {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]}, {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]}, {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]}, ]; // Ensure all modes have a mime property for backwards compatibility for (var i = 0; i < CodeMirror.modeInfo.length; i++) { var info = CodeMirror.modeInfo[i]; if (info.mimes) info.mime = info.mimes[0]; } CodeMirror.findModeByMIME = function(mime) { mime = mime.toLowerCase(); for (var i = 0; i < CodeMirror.modeInfo.length; i++) { var info = CodeMirror.modeInfo[i]; if (info.mime == mime) return info; if (info.mimes) for (var j = 0; j < info.mimes.length; j++) if (info.mimes[j] == mime) return info; } if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml") if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json") }; CodeMirror.findModeByExtension = function(ext) { ext = ext.toLowerCase(); for (var i = 0; i < CodeMirror.modeInfo.length; i++) { var info = CodeMirror.modeInfo[i]; if (info.ext) for (var j = 0; j < info.ext.length; j++) if (info.ext[j] == ext) return info; } }; CodeMirror.findModeByFileName = function(filename) { for (var i = 0; i < CodeMirror.modeInfo.length; i++) { var info = CodeMirror.modeInfo[i]; if (info.file && info.file.test(filename)) return info; } var dot = filename.lastIndexOf("."); var ext = dot > -1 && filename.substring(dot + 1, filename.length); if (ext) return CodeMirror.findModeByExtension(ext); }; CodeMirror.findModeByName = function(name) { name = name.toLowerCase(); for (var i = 0; i < CodeMirror.modeInfo.length; i++) { var info = CodeMirror.modeInfo[i]; if (info.name.toLowerCase() == name) return info; if (info.alias) for (var j = 0; j < info.alias.length; j++) if (info.alias[j].toLowerCase() == name) return info; } }; }); /***/ }), /***/ "8XDt": /*!*********************************************!*\ !*** ./node_modules/zrender/lib/vml/vml.js ***! \*********************************************/ /*! no static exports found */ /*! all exports used */ /*! ModuleConcatenation bailout: Module is not an ECMAScript module */ /***/ (function(module, exports, __webpack_require__) { __webpack_require__(/*! ./graphic */ "qH13"); var _zrender = __webpack_require__(/*! ../zrender */ "aX58"); var registerPainter = _zrender.registerPainter; var Painter = __webpack_require__(/*! ./Painter */ "6fms"); registerPainter('vml', Painter); /***/ }), /***/ "8mKB": /*!******************************************************!*\ !*** ./node_modules/rc-rate/es/index.js + 3 modules ***! \******************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js var defineProperty = __webpack_require__("rePB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js var classCallCheck = __webpack_require__("1OyB"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js var createClass = __webpack_require__("vuIU"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js var inherits = __webpack_require__("Ji7U"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js var possibleConstructorReturn = __webpack_require__("md7G"); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js var getPrototypeOf = __webpack_require__("foSv"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js var findDOMNode = __webpack_require__("m+aA"); // EXTERNAL MODULE: ./node_modules/classnames/index.js var classnames = __webpack_require__("TSYQ"); var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames); // EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js var KeyCode = __webpack_require__("4IlW"); // CONCATENATED MODULE: ./node_modules/rc-rate/es/util.js /* eslint-disable import/prefer-default-export */ function getScroll(w) { var ret = w.pageXOffset; var method = 'scrollLeft'; if (typeof ret !== 'number') { var d = w.document; // ie6,7,8 standard mode ret = d.documentElement[method]; if (typeof ret !== 'number') { // quirks mode ret = d.body[method]; } } return ret; } function getClientPosition(elem) { var x; var y; var doc = elem.ownerDocument; var body = doc.body; var docElem = doc && doc.documentElement; var box = elem.getBoundingClientRect(); x = box.left; y = box.top; x -= docElem.clientLeft || body.clientLeft || 0; y -= docElem.clientTop || body.clientTop || 0; return { left: x, top: y }; } function getOffsetLeft(el) { var pos = getClientPosition(el); var doc = el.ownerDocument; // Only IE use `parentWindow` var w = doc.defaultView || doc.parentWindow; pos.left += getScroll(w); return pos.left; } // CONCATENATED MODULE: ./node_modules/rc-rate/es/Star.js function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } var Star_Star = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Star, _React$Component); var _super = _createSuper(Star); function Star() { var _this; Object(classCallCheck["a" /* default */])(this, Star); _this = _super.apply(this, arguments); _this.onHover = function (e) { var _this$props = _this.props, onHover = _this$props.onHover, index = _this$props.index; onHover(e, index); }; _this.onClick = function (e) { var _this$props2 = _this.props, onClick = _this$props2.onClick, index = _this$props2.index; onClick(e, index); }; _this.onKeyDown = function (e) { var _this$props3 = _this.props, onClick = _this$props3.onClick, index = _this$props3.index; if (e.keyCode === 13) { onClick(e, index); } }; return _this; } Object(createClass["a" /* default */])(Star, [{ key: "getClassName", value: function getClassName() { var _this$props4 = this.props, prefixCls = _this$props4.prefixCls, index = _this$props4.index, value = _this$props4.value, allowHalf = _this$props4.allowHalf, focused = _this$props4.focused; var starValue = index + 1; var className = prefixCls; if (value === 0 && index === 0 && focused) { className += " ".concat(prefixCls, "-focused"); } else if (allowHalf && value + 0.5 >= starValue && value < starValue) { className += " ".concat(prefixCls, "-half ").concat(prefixCls, "-active"); if (focused) { className += " ".concat(prefixCls, "-focused"); } } else { className += starValue <= value ? " ".concat(prefixCls, "-full") : " ".concat(prefixCls, "-zero"); if (starValue === value && focused) { className += " ".concat(prefixCls, "-focused"); } } return className; } }, { key: "render", value: function render() { var onHover = this.onHover, onClick = this.onClick, onKeyDown = this.onKeyDown; var _this$props5 = this.props, disabled = _this$props5.disabled, prefixCls = _this$props5.prefixCls, character = _this$props5.character, characterRender = _this$props5.characterRender, index = _this$props5.index, count = _this$props5.count, value = _this$props5.value; var characterNode = typeof character === 'function' ? character(this.props) : character; var start = external_window_React_default.a.createElement("li", { className: this.getClassName() }, external_window_React_default.a.createElement("div", { onClick: disabled ? null : onClick, onKeyDown: disabled ? null : onKeyDown, onMouseMove: disabled ? null : onHover, role: "radio", "aria-checked": value > index ? 'true' : 'false', "aria-posinset": index + 1, "aria-setsize": count, tabIndex: disabled ? -1 : 0 }, external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-first") }, characterNode), external_window_React_default.a.createElement("div", { className: "".concat(prefixCls, "-second") }, characterNode))); if (characterRender) { start = characterRender(start, this.props); } return start; } }]); return Star; }(external_window_React_default.a.Component); // CONCATENATED MODULE: ./node_modules/rc-rate/es/Rate.js function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function Rate_createSuper(Derived) { var hasNativeReflectConstruct = Rate_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; } function Rate_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function noop() {} var Rate_Rate = /*#__PURE__*/function (_React$Component) { Object(inherits["a" /* default */])(Rate, _React$Component); var _super = Rate_createSuper(Rate); function Rate(props) { var _this; Object(classCallCheck["a" /* default */])(this, Rate); _this = _super.call(this, props); _this.onHover = function (event, index) { var onHoverChange = _this.props.onHoverChange; var hoverValue = _this.getStarValue(index, event.pageX); var cleanedValue = _this.state.cleanedValue; if (hoverValue !== cleanedValue) { _this.setState({ hoverValue: hoverValue, cleanedValue: null }); } onHoverChange(hoverValue); }; _this.onMouseLeave = function () { var onHoverChange = _this.props.onHoverChange; _this.setState({ hoverValue: undefined, cleanedValue: null }); onHoverChange(undefined); }; _this.onClick = function (event, index) { var allowClear = _this.props.allowClear; var value = _this.state.value; var newValue = _this.getStarValue(index, event.pageX); var isReset = false; if (allowClear) { isReset = newValue === value; } _this.onMouseLeave(); _this.changeValue(isReset ? 0 : newValue); _this.setState({ cleanedValue: isReset ? newValue : null }); }; _this.onFocus = function () { var onFocus = _this.props.onFocus; _this.setState({ focused: true }); if (onFocus) { onFocus(); } }; _this.onBlur = function () { var onBlur = _this.props.onBlur; _this.setState({ focused: false }); if (onBlur) { onBlur(); } }; _this.onKeyDown = function (event) { var keyCode = event.keyCode; var _this$props = _this.props, count = _this$props.count, allowHalf = _this$props.allowHalf, onKeyDown = _this$props.onKeyDown, direction = _this$props.direction; var reverse = direction === 'rtl'; var value = _this.state.value; if (keyCode === KeyCode["a" /* default */].RIGHT && value < count && !reverse) { if (allowHalf) { value += 0.5; } else { value += 1; } _this.changeValue(value); event.preventDefault(); } else if (keyCode === KeyCode["a" /* default */].LEFT && value > 0 && !reverse) { if (allowHalf) { value -= 0.5; } else { value -= 1; } _this.changeValue(value); event.preventDefault(); } else if (keyCode === KeyCode["a" /* default */].RIGHT && value > 0 && reverse) { if (allowHalf) { value -= 0.5; } else { value -= 1; } _this.changeValue(value); event.preventDefault(); } else if (keyCode === KeyCode["a" /* default */].LEFT && value < count && reverse) { if (allowHalf) { value += 0.5; } else { value += 1; } _this.changeValue(value); event.preventDefault(); } if (onKeyDown) { onKeyDown(event); } }; _this.saveRef = function (index) { return function (node) { _this.stars[index] = node; }; }; _this.saveRate = function (node) { _this.rate = node; }; var value = props.value; if (value === undefined) { value = props.defaultValue; } _this.stars = {}; _this.state = { value: value, focused: false, cleanedValue: null }; return _this; } Object(createClass["a" /* default */])(Rate, [{ key: "componentDidMount", value: function componentDidMount() { var _this$props2 = this.props, autoFocus = _this$props2.autoFocus, disabled = _this$props2.disabled; if (autoFocus && !disabled) { this.focus(); } } }, { key: "getStarDOM", value: function getStarDOM(index) { return Object(findDOMNode["a" /* default */])(this.stars[index]); } }, { key: "getStarValue", value: function getStarValue(index, x) { var _this$props3 = this.props, allowHalf = _this$props3.allowHalf, direction = _this$props3.direction; var reverse = direction === 'rtl'; var value = index + 1; if (allowHalf) { var starEle = this.getStarDOM(index); var leftDis = getOffsetLeft(starEle); var width = starEle.clientWidth; if (reverse && x - leftDis > width / 2) { value -= 0.5; } else if (!reverse && x - leftDis < width / 2) { value -= 0.5; } } return value; } }, { key: "focus", value: function focus() { var disabled = this.props.disabled; if (!disabled) { this.rate.focus(); } } }, { key: "blur", value: function blur() { var disabled = this.props.disabled; if (!disabled) { this.rate.blur(); } } }, { key: "changeValue", value: function changeValue(value) { var onChange = this.props.onChange; if (!('value' in this.props)) { this.setState({ value: value }); } onChange(value); } }, { key: "render", value: function render() { var _this$props4 = this.props, count = _this$props4.count, allowHalf = _this$props4.allowHalf, style = _this$props4.style, prefixCls = _this$props4.prefixCls, disabled = _this$props4.disabled, className = _this$props4.className, character = _this$props4.character, characterRender = _this$props4.characterRender, tabIndex = _this$props4.tabIndex, direction = _this$props4.direction; var _this$state = this.state, value = _this$state.value, hoverValue = _this$state.hoverValue, focused = _this$state.focused; var stars = []; var disabledClass = disabled ? "".concat(prefixCls, "-disabled") : ''; for (var index = 0; index < count; index += 1) { stars.push(external_window_React_default.a.createElement(Star_Star, { ref: this.saveRef(index), index: index, count: count, disabled: disabled, prefixCls: "".concat(prefixCls, "-star"), allowHalf: allowHalf, value: hoverValue === undefined ? value : hoverValue, onClick: this.onClick, onHover: this.onHover, key: index, character: character, characterRender: characterRender, focused: focused })); } var rateClassName = classnames_default()(prefixCls, disabledClass, className, Object(defineProperty["a" /* default */])({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')); return external_window_React_default.a.createElement("ul", { className: rateClassName, style: style, onMouseLeave: disabled ? null : this.onMouseLeave, tabIndex: disabled ? -1 : tabIndex, onFocus: disabled ? null : this.onFocus, onBlur: disabled ? null : this.onBlur, onKeyDown: disabled ? null : this.onKeyDown, ref: this.saveRate, role: "radiogroup" }, stars); } }], [{ key: "getDerivedStateFromProps", value: function getDerivedStateFromProps(nextProps, state) { if ('value' in nextProps && nextProps.value !== undefined) { return _objectSpread(_objectSpread({}, state), {}, { value: nextProps.value }); } return state; } }]); return Rate; }(external_window_React_default.a.Component); Rate_Rate.defaultProps = { defaultValue: 0, count: 5, allowHalf: false, allowClear: true, style: {}, prefixCls: 'rc-rate', onChange: noop, character: '★', onHoverChange: noop, tabIndex: 0, direction: 'ltr' }; /* harmony default export */ var es_Rate = (Rate_Rate); // CONCATENATED MODULE: ./node_modules/rc-rate/es/index.js /* harmony default export */ var es = __webpack_exports__["a"] = (es_Rate); /***/ }), /***/ "9Bee": /*!*********************************************************!*\ !*** ./src/components/RenderHtml/index.tsx + 1 modules ***! \*********************************************************/ /*! exports provided: default */ /*! exports used: default */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js */ /*! ModuleConcatenation bailout: Cannot concat with ./src/components/PreviewAll/index.tsx */ /*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hls.js/dist/hls.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/katex/dist/katex.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/lib/marked.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with ./node_modules/marked/src/helpers.js (<- Module is not an ECMAScript module) */ /*! ModuleConcatenation bailout: Cannot concat with external "window.React" (<- Module is not an ECMAScript module) */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js var objectSpread2 = __webpack_require__("k1fw"); // EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules var slicedToArray = __webpack_require__("tJVT"); // EXTERNAL MODULE: external "window.React" var external_window_React_ = __webpack_require__("cDcd"); var external_window_React_default = /*#__PURE__*/__webpack_require__.n(external_window_React_); // EXTERNAL MODULE: ./node_modules/katex/dist/katex.min.css var katex_min = __webpack_require__("vg9a"); // EXTERNAL MODULE: ./node_modules/marked/lib/marked.js var marked = __webpack_require__("DlQD"); var marked_default = /*#__PURE__*/__webpack_require__.n(marked); // EXTERNAL MODULE: ./node_modules/marked/src/helpers.js var helpers = __webpack_require__("rUJ1"); // CONCATENATED MODULE: ./src/utils/marked.ts function indentCodeCompensation(raw, text) { var matchIndentToCode = raw.match(/^(\s+)(?:```)/); if (matchIndentToCode === null) { return text; } var indentToCode = matchIndentToCode[1]; return text.split('\n').map(function (node) { var matchIndentInNode = node.match(/^\s+/); if (matchIndentInNode === null) { return node; } var _matchIndentInNode = Object(slicedToArray["a" /* default */])(matchIndentInNode, 1), indentInNode = _matchIndentInNode[0]; if (indentInNode.length >= indentToCode.length) { return node.slice(indentToCode.length); } return node; }).join('\n'); } //兼容之前的 ##标题式写法 var toc = []; var ctx = ["